rolldown 1.0.0-beta.3-commit.ce40585 → 1.0.0-beta.3-commit.c075d4a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cli.cjs +1 -1
- package/dist/cjs/experimental-index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/parallel-plugin-worker.cjs +1 -1
- package/dist/esm/cli.mjs +1 -1
- package/dist/esm/experimental-index.mjs +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/parallel-plugin-worker.mjs +1 -1
- package/dist/shared/{src-BubSct_b.mjs → src-BemoIDgp.mjs} +6 -4
- package/dist/shared/{src-ClM4RQ_J.cjs → src-CkwNRdT9.cjs} +6 -4
- package/dist/types/binding.d.ts +2 -1
- package/dist/types/options/output-options.d.ts +1 -0
- package/dist/types/plugin/plugin-context.js +4 -1
- package/dist/types/utils/bindingify-output-options.js +2 -1
- package/package.json +14 -14
package/dist/cjs/cli.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
|
|
3
|
-
const require_src = require('../shared/src-
|
|
3
|
+
const require_src = require('../shared/src-CkwNRdT9.cjs');
|
|
4
4
|
const require_binding = require('../shared/binding-orkvONpS.cjs');
|
|
5
5
|
const node_process = require_chunk.__toESM(require("node:process"));
|
|
6
6
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
|
|
3
|
-
const require_src = require('../shared/src-
|
|
3
|
+
const require_src = require('../shared/src-CkwNRdT9.cjs');
|
|
4
4
|
const require_binding = require('../shared/binding-orkvONpS.cjs');
|
|
5
5
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
6
6
|
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
|
|
3
|
-
const require_src = require('../shared/src-
|
|
3
|
+
const require_src = require('../shared/src-CkwNRdT9.cjs');
|
|
4
4
|
const require_binding = require('../shared/binding-orkvONpS.cjs');
|
|
5
5
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
6
6
|
|
package/dist/esm/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { colors } from "../shared/binding-l7VLSKnB.mjs";
|
|
2
|
-
import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-
|
|
2
|
+
import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-BemoIDgp.mjs";
|
|
3
3
|
import process$1, { cwd } from "node:process";
|
|
4
4
|
import path, { sep } from "node:path";
|
|
5
5
|
import fs from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { import_binding } from "../shared/binding-l7VLSKnB.mjs";
|
|
2
|
-
import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-
|
|
2
|
+
import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-BemoIDgp.mjs";
|
|
3
3
|
import { pathToFileURL } from "node:url";
|
|
4
4
|
|
|
5
5
|
//#region src/plugin/parallel-plugin.ts
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../shared/binding-l7VLSKnB.mjs";
|
|
2
|
-
import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-
|
|
2
|
+
import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-BemoIDgp.mjs";
|
|
3
3
|
|
|
4
4
|
export { VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { import_binding } from "../shared/binding-l7VLSKnB.mjs";
|
|
2
|
-
import { PluginContextData, bindingifyPlugin } from "../shared/src-
|
|
2
|
+
import { PluginContextData, bindingifyPlugin } from "../shared/src-BemoIDgp.mjs";
|
|
3
3
|
import { parentPort, workerData } from "node:worker_threads";
|
|
4
4
|
|
|
5
5
|
//#region src/parallel-plugin-worker.ts
|
|
@@ -796,12 +796,13 @@ var PluginContext = class extends MinimalPluginContext {
|
|
|
796
796
|
emitFile(file) {
|
|
797
797
|
if (file.type === "prebuilt-chunk") return unimplemented("PluginContext.emitFile with type prebuilt-chunk");
|
|
798
798
|
if (file.type === "chunk") return this.context.emitChunk(file);
|
|
799
|
+
const fnSanitizedFileName = file.fileName || typeof this.outputOptions.sanitizeFileName !== "function" ? undefined : this.outputOptions.sanitizeFileName(file.name || "asset");
|
|
799
800
|
const filename = file.fileName ? undefined : this.getAssetFileNames(file);
|
|
800
801
|
return this.context.emitFile({
|
|
801
802
|
...file,
|
|
802
803
|
originalFileName: file.originalFileName || undefined,
|
|
803
804
|
source: bindingAssetSource(file.source)
|
|
804
|
-
}, filename);
|
|
805
|
+
}, filename, fnSanitizedFileName);
|
|
805
806
|
}
|
|
806
807
|
getAssetFileNames(file) {
|
|
807
808
|
if (typeof this.outputOptions.assetFileNames === "function") return this.outputOptions.assetFileNames({
|
|
@@ -1694,7 +1695,7 @@ function bindingifyTreeshakeOptions(config) {
|
|
|
1694
1695
|
//#endregion
|
|
1695
1696
|
//#region src/utils/bindingify-output-options.ts
|
|
1696
1697
|
function bindingifyOutputOptions(outputOptions) {
|
|
1697
|
-
const { dir, format, exports, hashCharacters, sourcemap, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file } = outputOptions;
|
|
1698
|
+
const { dir, format, exports, hashCharacters, sourcemap, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName } = outputOptions;
|
|
1698
1699
|
return {
|
|
1699
1700
|
dir,
|
|
1700
1701
|
file: file == null ? undefined : file,
|
|
@@ -1723,7 +1724,8 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
1723
1724
|
inlineDynamicImports: outputOptions.inlineDynamicImports,
|
|
1724
1725
|
advancedChunks: outputOptions.advancedChunks,
|
|
1725
1726
|
polyfillRequire: outputOptions.polyfillRequire,
|
|
1726
|
-
target: outputOptions.target
|
|
1727
|
+
target: outputOptions.target,
|
|
1728
|
+
sanitizeFileName
|
|
1727
1729
|
};
|
|
1728
1730
|
}
|
|
1729
1731
|
function bindingifyAddon(configAddon) {
|
|
@@ -2641,7 +2643,7 @@ const watch = (input) => {
|
|
|
2641
2643
|
|
|
2642
2644
|
//#endregion
|
|
2643
2645
|
//#region package.json
|
|
2644
|
-
var version = "1.0.0-beta.3-commit.
|
|
2646
|
+
var version = "1.0.0-beta.3-commit.c075d4a";
|
|
2645
2647
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
2646
2648
|
|
|
2647
2649
|
//#endregion
|
|
@@ -798,12 +798,13 @@ var PluginContext = class extends MinimalPluginContext {
|
|
|
798
798
|
emitFile(file) {
|
|
799
799
|
if (file.type === "prebuilt-chunk") return unimplemented("PluginContext.emitFile with type prebuilt-chunk");
|
|
800
800
|
if (file.type === "chunk") return this.context.emitChunk(file);
|
|
801
|
+
const fnSanitizedFileName = file.fileName || typeof this.outputOptions.sanitizeFileName !== "function" ? undefined : this.outputOptions.sanitizeFileName(file.name || "asset");
|
|
801
802
|
const filename = file.fileName ? undefined : this.getAssetFileNames(file);
|
|
802
803
|
return this.context.emitFile({
|
|
803
804
|
...file,
|
|
804
805
|
originalFileName: file.originalFileName || undefined,
|
|
805
806
|
source: bindingAssetSource(file.source)
|
|
806
|
-
}, filename);
|
|
807
|
+
}, filename, fnSanitizedFileName);
|
|
807
808
|
}
|
|
808
809
|
getAssetFileNames(file) {
|
|
809
810
|
if (typeof this.outputOptions.assetFileNames === "function") return this.outputOptions.assetFileNames({
|
|
@@ -1696,7 +1697,7 @@ function bindingifyTreeshakeOptions(config) {
|
|
|
1696
1697
|
//#endregion
|
|
1697
1698
|
//#region src/utils/bindingify-output-options.ts
|
|
1698
1699
|
function bindingifyOutputOptions(outputOptions) {
|
|
1699
|
-
const { dir, format, exports: exports$1, hashCharacters, sourcemap, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file } = outputOptions;
|
|
1700
|
+
const { dir, format, exports: exports$1, hashCharacters, sourcemap, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName } = outputOptions;
|
|
1700
1701
|
return {
|
|
1701
1702
|
dir,
|
|
1702
1703
|
file: file == null ? undefined : file,
|
|
@@ -1725,7 +1726,8 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
1725
1726
|
inlineDynamicImports: outputOptions.inlineDynamicImports,
|
|
1726
1727
|
advancedChunks: outputOptions.advancedChunks,
|
|
1727
1728
|
polyfillRequire: outputOptions.polyfillRequire,
|
|
1728
|
-
target: outputOptions.target
|
|
1729
|
+
target: outputOptions.target,
|
|
1730
|
+
sanitizeFileName
|
|
1729
1731
|
};
|
|
1730
1732
|
}
|
|
1731
1733
|
function bindingifyAddon(configAddon) {
|
|
@@ -2643,7 +2645,7 @@ const watch = (input) => {
|
|
|
2643
2645
|
|
|
2644
2646
|
//#endregion
|
|
2645
2647
|
//#region package.json
|
|
2646
|
-
var version = "1.0.0-beta.3-commit.
|
|
2648
|
+
var version = "1.0.0-beta.3-commit.c075d4a";
|
|
2647
2649
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
2648
2650
|
|
|
2649
2651
|
//#endregion
|
package/dist/types/binding.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ export declare class BindingOutputs {
|
|
|
103
103
|
export declare class BindingPluginContext {
|
|
104
104
|
load(specifier: string, sideEffects: BindingHookSideEffects | undefined, fn: () => void): Promise<void>
|
|
105
105
|
resolve(specifier: string, importer?: string | undefined | null, extraOptions?: BindingPluginContextResolveOptions | undefined | null): Promise<BindingPluginContextResolvedId | null>
|
|
106
|
-
emitFile(file: BindingEmittedAsset, assetFilename?: string | undefined | null): string
|
|
106
|
+
emitFile(file: BindingEmittedAsset, assetFilename?: string | undefined | null, fnSanitizedFileName?: string | undefined | null): string
|
|
107
107
|
emitChunk(file: BindingEmittedChunk): string
|
|
108
108
|
getFileName(referenceId: string): string
|
|
109
109
|
getModuleInfo(moduleId: string): BindingModuleInfo | null
|
|
@@ -498,6 +498,7 @@ export interface BindingOutputOptions {
|
|
|
498
498
|
chunkFileNames?: string | ((chunk: PreRenderedChunk) => string)
|
|
499
499
|
cssEntryFileNames?: string | ((chunk: PreRenderedChunk) => string)
|
|
500
500
|
cssChunkFileNames?: string | ((chunk: PreRenderedChunk) => string)
|
|
501
|
+
sanitizeFileName?: boolean | ((name: string) => string)
|
|
501
502
|
banner?: (chunk: RenderedChunk) => MaybePromise<VoidNullable<string>>
|
|
502
503
|
dir?: string
|
|
503
504
|
file?: string
|
|
@@ -44,6 +44,7 @@ export interface OutputOptions {
|
|
|
44
44
|
chunkFileNames?: string | ChunkFileNamesFunction;
|
|
45
45
|
cssEntryFileNames?: string | ChunkFileNamesFunction;
|
|
46
46
|
cssChunkFileNames?: string | ChunkFileNamesFunction;
|
|
47
|
+
sanitizeFileName?: boolean | ((name: string) => string);
|
|
47
48
|
minify?: boolean;
|
|
48
49
|
name?: string;
|
|
49
50
|
globals?: Record<string, string> | GlobalsFunction;
|
|
@@ -83,12 +83,15 @@ export class PluginContext extends MinimalPluginContext {
|
|
|
83
83
|
if (file.type === 'chunk') {
|
|
84
84
|
return this.context.emitChunk(file);
|
|
85
85
|
}
|
|
86
|
+
const fnSanitizedFileName = file.fileName || typeof this.outputOptions.sanitizeFileName !== 'function'
|
|
87
|
+
? undefined
|
|
88
|
+
: this.outputOptions.sanitizeFileName(file.name || 'asset');
|
|
86
89
|
const filename = file.fileName ? undefined : this.getAssetFileNames(file);
|
|
87
90
|
return this.context.emitFile({
|
|
88
91
|
...file,
|
|
89
92
|
originalFileName: file.originalFileName || undefined,
|
|
90
93
|
source: bindingAssetSource(file.source),
|
|
91
|
-
}, filename);
|
|
94
|
+
}, filename, fnSanitizedFileName);
|
|
92
95
|
}
|
|
93
96
|
getAssetFileNames(file) {
|
|
94
97
|
if (typeof this.outputOptions.assetFileNames === 'function') {
|
|
@@ -2,7 +2,7 @@ import { unimplemented } from './misc';
|
|
|
2
2
|
import { transformRenderedChunk } from './transform-rendered-chunk';
|
|
3
3
|
import { transformAssetSource } from './asset-source';
|
|
4
4
|
export function bindingifyOutputOptions(outputOptions) {
|
|
5
|
-
const { dir, format, exports, hashCharacters, sourcemap, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, } = outputOptions;
|
|
5
|
+
const { dir, format, exports, hashCharacters, sourcemap, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName, } = outputOptions;
|
|
6
6
|
return {
|
|
7
7
|
dir,
|
|
8
8
|
// Handle case: rollup/test/sourcemaps/samples/sourcemap-file-hashed/_config.js
|
|
@@ -34,6 +34,7 @@ export function bindingifyOutputOptions(outputOptions) {
|
|
|
34
34
|
advancedChunks: outputOptions.advancedChunks,
|
|
35
35
|
polyfillRequire: outputOptions.polyfillRequire,
|
|
36
36
|
target: outputOptions.target,
|
|
37
|
+
sanitizeFileName,
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
40
|
function bindingifyAddon(configAddon) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolldown",
|
|
3
|
-
"version": "1.0.0-beta.3-commit.
|
|
3
|
+
"version": "1.0.0-beta.3-commit.c075d4a",
|
|
4
4
|
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
|
|
5
5
|
"homepage": "https://rolldown.rs/",
|
|
6
6
|
"repository": {
|
|
@@ -123,21 +123,21 @@
|
|
|
123
123
|
"unbuild": "^3.0.0",
|
|
124
124
|
"why-is-node-running": "^3.0.0",
|
|
125
125
|
"@rolldown/testing": "0.0.1",
|
|
126
|
-
"rolldown": "1.0.0-beta.3-commit.
|
|
126
|
+
"rolldown": "1.0.0-beta.3-commit.c075d4a"
|
|
127
127
|
},
|
|
128
128
|
"optionalDependencies": {
|
|
129
|
-
"@rolldown/binding-darwin-arm64": "1.0.0-beta.3-commit.
|
|
130
|
-
"@rolldown/binding-
|
|
131
|
-
"@rolldown/binding-
|
|
132
|
-
"@rolldown/binding-
|
|
133
|
-
"@rolldown/binding-linux-arm64-
|
|
134
|
-
"@rolldown/binding-linux-x64-
|
|
135
|
-
"@rolldown/binding-linux-
|
|
136
|
-
"@rolldown/binding-
|
|
137
|
-
"@rolldown/binding-
|
|
138
|
-
"@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.3-commit.
|
|
139
|
-
"@rolldown/binding-win32-
|
|
140
|
-
"@rolldown/binding-win32-
|
|
129
|
+
"@rolldown/binding-darwin-arm64": "1.0.0-beta.3-commit.c075d4a",
|
|
130
|
+
"@rolldown/binding-darwin-x64": "1.0.0-beta.3-commit.c075d4a",
|
|
131
|
+
"@rolldown/binding-freebsd-x64": "1.0.0-beta.3-commit.c075d4a",
|
|
132
|
+
"@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.3-commit.c075d4a",
|
|
133
|
+
"@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.3-commit.c075d4a",
|
|
134
|
+
"@rolldown/binding-linux-x64-musl": "1.0.0-beta.3-commit.c075d4a",
|
|
135
|
+
"@rolldown/binding-linux-arm64-musl": "1.0.0-beta.3-commit.c075d4a",
|
|
136
|
+
"@rolldown/binding-linux-x64-gnu": "1.0.0-beta.3-commit.c075d4a",
|
|
137
|
+
"@rolldown/binding-wasm32-wasi": "1.0.0-beta.3-commit.c075d4a",
|
|
138
|
+
"@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.3-commit.c075d4a",
|
|
139
|
+
"@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.3-commit.c075d4a",
|
|
140
|
+
"@rolldown/binding-win32-x64-msvc": "1.0.0-beta.3-commit.c075d4a"
|
|
141
141
|
},
|
|
142
142
|
"scripts": {
|
|
143
143
|
"# Scrips for binding #": "_",
|