@rolldown/browser 1.0.0-beta.7-commit.30e0395 → 1.0.0-beta.8

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/browser.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  import { BindingHookSideEffects, BindingLogLevel, BindingPluginOrder, BindingWatcher, Bundler, parseSync, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
2
2
  import path from "pathe";
3
- import colors from "ansis";
4
3
  import "@valibot/to-json-schema";
4
+ import colors from "ansis";
5
5
  import * as v from "valibot";
6
6
 
7
7
  //#region package.json
8
- var version = "1.0.0-beta.7-commit.30e0395";
8
+ var version = "1.0.0-beta.8";
9
9
 
10
10
  //#endregion
11
11
  //#region src/builtin-plugin/utils.ts
@@ -165,19 +165,13 @@ function locate(source, search, options) {
165
165
 
166
166
  //#endregion
167
167
  //#region src/log/logs.ts
168
- const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", MINIFY_WARNING = "MINIFY_WARNING", PARSE_ERROR = "PARSE_ERROR";
168
+ const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR";
169
169
  function logParseError(message) {
170
170
  return {
171
171
  code: PARSE_ERROR,
172
172
  message
173
173
  };
174
174
  }
175
- function logMinifyWarning() {
176
- return {
177
- code: MINIFY_WARNING,
178
- message: colors.yellow("The built-in minifier is still under development. Setting \"minify: true\" is not recommended for production use.")
179
- };
180
- }
181
175
  function logInvalidLogPosition(pluginName) {
182
176
  return {
183
177
  code: INVALID_LOG_POSITION,
@@ -2865,7 +2859,6 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode, isCl
2865
2859
  const logLevel = inputOptions.logLevel || LOG_LEVEL_INFO;
2866
2860
  const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel, watchMode);
2867
2861
  if (!isClose) outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions, onLog, logLevel, watchMode);
2868
- if (outputOptions.minify === true) onLog(LOG_LEVEL_WARN, logMinifyWarning());
2869
2862
  const normalizedOutputPlugins = await normalizePluginOption(outputOptions.plugins);
2870
2863
  let plugins = [...normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX), ...checkOutputPluginOption(normalizePlugins(normalizedOutputPlugins, ANONYMOUS_OUTPUT_PLUGIN_PREFIX), onLog)];
2871
2864
  if (inputOptions.experimental?.enableComposingJsPlugins ?? false) plugins = composeJsPlugins(plugins);
package/dist/cli.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
2
- const require_src = require('./shared/src-CK8XlMNc.cjs');
3
- require('./shared/parse-ast-index-bjOxmbym.cjs');
2
+ const require_src = require('./shared/src-6wlgtDMg.cjs');
3
+ require('./shared/parse-ast-index-DPj-F51D.cjs');
4
4
  const node_path = require_chunk.__toESM(require("node:path"));
5
5
  const ansis = require_chunk.__toESM(require("ansis"));
6
6
  const node_process = require_chunk.__toESM(require("node:process"));
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { __commonJS, __esm, __toESM } from "./shared/chunk-DSsiIF1Z.mjs";
2
- import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_misc, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-BdmQlecB.mjs";
3
- import "./shared/parse-ast-index-CKT1pwFw.mjs";
2
+ import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_misc, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-Dr_jviNR.mjs";
3
+ import "./shared/parse-ast-index-BoNJRs1a.mjs";
4
4
  import path, { sep } from "node:path";
5
5
  import colors from "ansis";
6
6
  import process$1, { cwd } from "node:process";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('./shared/src-CK8XlMNc.cjs');
4
- require('./shared/parse-ast-index-bjOxmbym.cjs');
3
+ const require_src = require('./shared/src-6wlgtDMg.cjs');
4
+ require('./shared/parse-ast-index-DPj-F51D.cjs');
5
5
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
6
6
  const node_url = require_chunk.__toESM(require("node:url"));
7
7
 
@@ -1,5 +1,5 @@
1
- import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/src-BdmQlecB.mjs";
2
- import "./shared/parse-ast-index-CKT1pwFw.mjs";
1
+ import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/src-Dr_jviNR.mjs";
2
+ import "./shared/parse-ast-index-BoNJRs1a.mjs";
3
3
  import { moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
4
4
  import { pathToFileURL } from "node:url";
5
5
 
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
- const require_src = require('./shared/src-CK8XlMNc.cjs');
2
- require('./shared/parse-ast-index-bjOxmbym.cjs');
1
+ const require_src = require('./shared/src-6wlgtDMg.cjs');
2
+ require('./shared/parse-ast-index-DPj-F51D.cjs');
3
3
 
4
4
  exports.VERSION = require_src.VERSION
5
5
  exports.build = require_src.build
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { VERSION, build, defineConfig, init_src, rolldown, watch, withFilter } from "./shared/src-BdmQlecB.mjs";
2
- import "./shared/parse-ast-index-CKT1pwFw.mjs";
1
+ import { VERSION, build, defineConfig, init_src, rolldown, watch, withFilter } from "./shared/src-Dr_jviNR.mjs";
2
+ import "./shared/parse-ast-index-BoNJRs1a.mjs";
3
3
 
4
4
  init_src();
5
5
  export { VERSION, build, defineConfig, rolldown, watch, withFilter };
@@ -1,6 +1,6 @@
1
1
  const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
2
- const require_src = require('./shared/src-CK8XlMNc.cjs');
3
- require('./shared/parse-ast-index-bjOxmbym.cjs');
2
+ const require_src = require('./shared/src-6wlgtDMg.cjs');
3
+ require('./shared/parse-ast-index-DPj-F51D.cjs');
4
4
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
5
5
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { __commonJS } from "./shared/chunk-DSsiIF1Z.mjs";
2
- import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-BdmQlecB.mjs";
3
- import "./shared/parse-ast-index-CKT1pwFw.mjs";
2
+ import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-Dr_jviNR.mjs";
3
+ import "./shared/parse-ast-index-BoNJRs1a.mjs";
4
4
  import { registerPlugins } from "./rolldown-binding.wasi.cjs";
5
5
  import { parentPort, workerData } from "node:worker_threads";
6
6
 
@@ -1,4 +1,4 @@
1
- const require_parse_ast_index = require('./shared/parse-ast-index-bjOxmbym.cjs');
1
+ const require_parse_ast_index = require('./shared/parse-ast-index-DPj-F51D.cjs');
2
2
 
3
3
  exports.parseAst = require_parse_ast_index.parseAst
4
4
  exports.parseAstAsync = require_parse_ast_index.parseAstAsync
@@ -1,4 +1,4 @@
1
- import { init_parse_ast_index, parseAst, parseAstAsync } from "./shared/parse-ast-index-CKT1pwFw.mjs";
1
+ import { init_parse_ast_index, parseAst, parseAstAsync } from "./shared/parse-ast-index-BoNJRs1a.mjs";
2
2
 
3
3
  init_parse_ast_index();
4
4
  export { parseAst, parseAstAsync };
@@ -1,6 +1,5 @@
1
1
  import { __esm } from "./chunk-DSsiIF1Z.mjs";
2
2
  import { parseAsync, parseSync } from "../rolldown-binding.wasi.cjs";
3
- import colors from "ansis";
4
3
 
5
4
  //#region src/utils/code-frame.ts
6
5
  function spaces(index) {
@@ -113,12 +112,6 @@ function logParseError(message) {
113
112
  message
114
113
  };
115
114
  }
116
- function logMinifyWarning() {
117
- return {
118
- code: MINIFY_WARNING,
119
- message: colors.yellow("The built-in minifier is still under development. Setting \"minify: true\" is not recommended for production use.")
120
- };
121
- }
122
115
  function logInvalidLogPosition(pluginName) {
123
116
  return {
124
117
  code: INVALID_LOG_POSITION,
@@ -186,11 +179,11 @@ function augmentCodeLocation(properties, pos, source, id) {
186
179
  properties.frame = getCodeFrame(source, line, column);
187
180
  }
188
181
  }
189
- var INVALID_LOG_POSITION, PLUGIN_ERROR, INPUT_HOOK_IN_OUTPUT_PLUGIN, CYCLE_LOADING, MULTIPLY_NOTIFY_OPTION, MINIFY_WARNING, PARSE_ERROR;
182
+ var INVALID_LOG_POSITION, PLUGIN_ERROR, INPUT_HOOK_IN_OUTPUT_PLUGIN, CYCLE_LOADING, MULTIPLY_NOTIFY_OPTION, PARSE_ERROR;
190
183
  var init_logs = __esm({ "src/log/logs.ts"() {
191
184
  init_code_frame();
192
185
  init_locate_character();
193
- INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", MINIFY_WARNING = "MINIFY_WARNING", PARSE_ERROR = "PARSE_ERROR";
186
+ INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR";
194
187
  } });
195
188
 
196
189
  //#endregion
@@ -280,4 +273,4 @@ var init_parse_ast_index = __esm({ "src/parse-ast-index.ts"() {
280
273
  } });
281
274
 
282
275
  //#endregion
283
- export { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMinifyWarning, logMultiplyNotifyOption, logPluginError, parseAst, parseAstAsync };
276
+ export { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst, parseAstAsync };
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('./chunk-qZFfknuJ.cjs');
3
3
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("../rolldown-binding.wasi.cjs"));
4
- const ansis = require_chunk.__toESM(require("ansis"));
5
4
 
6
5
  //#region src/utils/code-frame.ts
7
6
  function spaces(index) {
@@ -104,19 +103,13 @@ function locate(source, search, options) {
104
103
 
105
104
  //#endregion
106
105
  //#region src/log/logs.ts
107
- const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", MINIFY_WARNING = "MINIFY_WARNING", PARSE_ERROR = "PARSE_ERROR";
106
+ const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR";
108
107
  function logParseError(message) {
109
108
  return {
110
109
  code: PARSE_ERROR,
111
110
  message
112
111
  };
113
112
  }
114
- function logMinifyWarning() {
115
- return {
116
- code: MINIFY_WARNING,
117
- message: ansis.default.yellow("The built-in minifier is still under development. Setting \"minify: true\" is not recommended for production use.")
118
- };
119
- }
120
113
  function logInvalidLogPosition(pluginName) {
121
114
  return {
122
115
  code: INVALID_LOG_POSITION,
@@ -294,12 +287,6 @@ Object.defineProperty(exports, 'logInvalidLogPosition', {
294
287
  return logInvalidLogPosition;
295
288
  }
296
289
  });
297
- Object.defineProperty(exports, 'logMinifyWarning', {
298
- enumerable: true,
299
- get: function () {
300
- return logMinifyWarning;
301
- }
302
- });
303
290
  Object.defineProperty(exports, 'logMultiplyNotifyOption', {
304
291
  enumerable: true,
305
292
  get: function () {
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  const require_chunk = require('./chunk-qZFfknuJ.cjs');
3
- const require_parse_ast_index = require('./parse-ast-index-bjOxmbym.cjs');
3
+ const require_parse_ast_index = require('./parse-ast-index-DPj-F51D.cjs');
4
4
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("../rolldown-binding.wasi.cjs"));
5
5
  const node_path = require_chunk.__toESM(require("node:path"));
6
- const ansis = require_chunk.__toESM(require("ansis"));
7
6
  const __valibot_to_json_schema = require_chunk.__toESM(require("@valibot/to-json-schema"));
7
+ const ansis = require_chunk.__toESM(require("ansis"));
8
8
  const valibot = require_chunk.__toESM(require("valibot"));
9
9
  const node_os = require_chunk.__toESM(require("node:os"));
10
10
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
11
11
 
12
12
  //#region package.json
13
- var version = "1.0.0-beta.7-commit.30e0395";
13
+ var version = "1.0.0-beta.8";
14
14
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
15
15
 
16
16
  //#endregion
@@ -2753,7 +2753,6 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode, isCl
2753
2753
  const logLevel = inputOptions.logLevel || LOG_LEVEL_INFO;
2754
2754
  const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel, watchMode);
2755
2755
  if (!isClose) outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions, onLog, logLevel, watchMode);
2756
- if (outputOptions.minify === true) onLog(LOG_LEVEL_WARN, require_parse_ast_index.logMinifyWarning());
2757
2756
  const normalizedOutputPlugins = await normalizePluginOption(outputOptions.plugins);
2758
2757
  let plugins = [...normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX), ...checkOutputPluginOption(normalizePlugins(normalizedOutputPlugins, ANONYMOUS_OUTPUT_PLUGIN_PREFIX), onLog)];
2759
2758
  if (inputOptions.experimental?.enableComposingJsPlugins ?? false) plugins = composeJsPlugins(plugins);
@@ -1,15 +1,15 @@
1
1
  import { __esm } from "./chunk-DSsiIF1Z.mjs";
2
- import { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMinifyWarning, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-CKT1pwFw.mjs";
2
+ import { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-BoNJRs1a.mjs";
3
3
  import { BindingCallableBuiltinPlugin, BindingHookSideEffects, BindingLogLevel, BindingPluginOrder, BindingWatcher, Bundler, ParallelJsPluginRegistry, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
4
4
  import path from "node:path";
5
- import colors from "ansis";
6
5
  import { toJsonSchema } from "@valibot/to-json-schema";
6
+ import colors from "ansis";
7
7
  import * as v from "valibot";
8
8
  import { availableParallelism } from "node:os";
9
9
  import { Worker } from "node:worker_threads";
10
10
 
11
11
  //#region package.json
12
- var version = "1.0.0-beta.7-commit.30e0395";
12
+ var version = "1.0.0-beta.8";
13
13
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
14
14
 
15
15
  //#endregion
@@ -4095,7 +4095,6 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode, isCl
4095
4095
  const logLevel = inputOptions.logLevel || LOG_LEVEL_INFO;
4096
4096
  const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel, watchMode);
4097
4097
  if (!isClose) outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions, onLog, logLevel, watchMode);
4098
- if (outputOptions.minify === true) onLog(LOG_LEVEL_WARN, logMinifyWarning());
4099
4098
  const normalizedOutputPlugins = await normalizePluginOption(outputOptions.plugins);
4100
4099
  let plugins = [...normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX), ...checkOutputPluginOption(normalizePlugins(normalizedOutputPlugins, ANONYMOUS_OUTPUT_PLUGIN_PREFIX), onLog)];
4101
4100
  if (inputOptions.experimental?.enableComposingJsPlugins ?? false) plugins = composeJsPlugins(plugins);
@@ -4121,7 +4120,6 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode, isCl
4121
4120
  var init_create_bundler_option = __esm({ "src/utils/create-bundler-option.ts"() {
4122
4121
  init_logger();
4123
4122
  init_logging();
4124
- init_logs();
4125
4123
  init_plugin_driver();
4126
4124
  init_bindingify_input_options();
4127
4125
  init_bindingify_output_options();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolldown/browser",
3
- "version": "1.0.0-beta.7-commit.30e0395",
3
+ "version": "1.0.0-beta.8",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "homepage": "https://rolldown.rs/",
6
6
  "type": "module",