@rolldown/browser 1.0.0-beta.8-commit.c76291c → 1.0.0-beta.8-commit.56abf23

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.
@@ -1,12 +1,20 @@
1
- import { BindingHookSideEffects, BindingLogLevel, BindingPluginOrder, BindingWatcher, Bundler, parseSync, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
1
+ import { BindingCallableBuiltinPlugin, BindingHookSideEffects, BindingLogLevel, BindingPluginOrder, BindingWatcher, Bundler, parseSync, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
2
2
  import path from "pathe";
3
3
  import colors from "ansis";
4
4
 
5
5
  //#region package.json
6
- var version = "1.0.0-beta.8-commit.c76291c";
6
+ var version = "1.0.0-beta.8-commit.56abf23";
7
7
 
8
8
  //#endregion
9
9
  //#region src/builtin-plugin/utils.ts
10
+ function makeBuiltinPluginCallable(plugin) {
11
+ let callablePlugin = new BindingCallableBuiltinPlugin(bindingifyBuiltInPlugin(plugin));
12
+ const wrappedPlugin = plugin;
13
+ for (const key in callablePlugin) wrappedPlugin[key] = function(...args$1) {
14
+ return callablePlugin[key](...args$1);
15
+ };
16
+ return wrappedPlugin;
17
+ }
10
18
  function bindingifyBuiltInPlugin(plugin) {
11
19
  return {
12
20
  __name: plugin.name,
@@ -22,6 +30,64 @@ var BuiltinPlugin = class {
22
30
  this._options = _options;
23
31
  }
24
32
  };
33
+ function modulePreloadPolyfillPlugin(config) {
34
+ return new BuiltinPlugin("builtin:module-preload-polyfill", config);
35
+ }
36
+ function dynamicImportVarsPlugin(config) {
37
+ return new BuiltinPlugin("builtin:dynamic-import-vars", config);
38
+ }
39
+ function importGlobPlugin(config) {
40
+ return new BuiltinPlugin("builtin:import-glob", config);
41
+ }
42
+ function reportPlugin(config) {
43
+ return new BuiltinPlugin("builtin:report", config);
44
+ }
45
+ function manifestPlugin(config) {
46
+ return new BuiltinPlugin("builtin:manifest", config);
47
+ }
48
+ function wasmHelperPlugin() {
49
+ return new BuiltinPlugin("builtin:wasm-helper");
50
+ }
51
+ function wasmFallbackPlugin() {
52
+ return new BuiltinPlugin("builtin:wasm-fallback");
53
+ }
54
+ function loadFallbackPlugin() {
55
+ return new BuiltinPlugin("builtin:load-fallback");
56
+ }
57
+ function jsonPlugin(config) {
58
+ return new BuiltinPlugin("builtin:json", config);
59
+ }
60
+ function buildImportAnalysisPlugin(config) {
61
+ return new BuiltinPlugin("builtin:build-import-analysis", config);
62
+ }
63
+ function viteResolvePlugin(config) {
64
+ const builtinPlugin = new BuiltinPlugin("builtin:vite-resolve", config);
65
+ return makeBuiltinPluginCallable(builtinPlugin);
66
+ }
67
+ function moduleFederationPlugin(config) {
68
+ return new BuiltinPlugin("builtin:module-federation", {
69
+ ...config,
70
+ remotes: config.remotes && Object.entries(config.remotes).map(([name, remote]) => {
71
+ if (typeof remote === "string") {
72
+ const [entryGlobalName] = remote.split("@");
73
+ const entry = remote.replace(entryGlobalName + "@", "");
74
+ return {
75
+ entry,
76
+ name,
77
+ entryGlobalName
78
+ };
79
+ }
80
+ return {
81
+ ...remote,
82
+ name: remote.name ?? name
83
+ };
84
+ }),
85
+ manifest: config.manifest === false ? void 0 : config.manifest === true ? {} : config.manifest
86
+ });
87
+ }
88
+ function isolatedDeclarationPlugin(config) {
89
+ return new BuiltinPlugin("builtin:isolated-declaration", config);
90
+ }
25
91
 
26
92
  //#endregion
27
93
  //#region src/utils/misc.ts
@@ -2001,43 +2067,7 @@ function normalizeTransformHookSourcemap(id$1, originalCode, rawMap) {
2001
2067
  }
2002
2068
 
2003
2069
  //#endregion
2004
- //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-D6FCK2GA.js
2005
- function u$1(o, n, a) {
2006
- let t$1 = (r) => o(r, ...n);
2007
- return a === void 0 ? t$1 : Object.assign(t$1, {
2008
- lazy: a,
2009
- lazyArgs: n
2010
- });
2011
- }
2012
-
2013
- //#endregion
2014
- //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-WIMGWYZL.js
2015
- function u(r, n, o) {
2016
- let a = r.length - n.length;
2017
- if (a === 0) return r(...n);
2018
- if (a === 1) return u$1(r, n, o);
2019
- throw new Error("Wrong number of arguments");
2020
- }
2021
-
2022
- //#endregion
2023
- //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-3IFJP4R5.js
2024
- function d(...r) {
2025
- return u(i, r);
2026
- }
2027
- var i = (r, t$1) => {
2028
- let a = [[], []];
2029
- for (let [o, e] of r.entries()) t$1(e, o, r) ? a[0].push(e) : a[1].push(e);
2030
- return a;
2031
- };
2032
-
2033
- //#endregion
2034
- //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-5NQBDF4H.js
2035
- function t(...n) {
2036
- return u(Object.keys, n);
2037
- }
2038
-
2039
- //#endregion
2040
- //#region src/filter-index.ts
2070
+ //#region ../pluginutils/dist/esm/composable-filters.js
2041
2071
  var And = class {
2042
2072
  kind;
2043
2073
  args;
@@ -2118,6 +2148,42 @@ function exclude(expr) {
2118
2148
  return new Exclude(expr);
2119
2149
  }
2120
2150
 
2151
+ //#endregion
2152
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-D6FCK2GA.js
2153
+ function u$1(o, n, a) {
2154
+ let t$1 = (r) => o(r, ...n);
2155
+ return a === void 0 ? t$1 : Object.assign(t$1, {
2156
+ lazy: a,
2157
+ lazyArgs: n
2158
+ });
2159
+ }
2160
+
2161
+ //#endregion
2162
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-WIMGWYZL.js
2163
+ function u(r, n, o) {
2164
+ let a = r.length - n.length;
2165
+ if (a === 0) return r(...n);
2166
+ if (a === 1) return u$1(r, n, o);
2167
+ throw new Error("Wrong number of arguments");
2168
+ }
2169
+
2170
+ //#endregion
2171
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-3IFJP4R5.js
2172
+ function d(...r) {
2173
+ return u(i, r);
2174
+ }
2175
+ var i = (r, t$1) => {
2176
+ let a = [[], []];
2177
+ for (let [o, e] of r.entries()) t$1(e, o, r) ? a[0].push(e) : a[1].push(e);
2178
+ return a;
2179
+ };
2180
+
2181
+ //#endregion
2182
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-5NQBDF4H.js
2183
+ function t(...n) {
2184
+ return u(Object.keys, n);
2185
+ }
2186
+
2121
2187
  //#endregion
2122
2188
  //#region src/plugin/bindingify-hook-filter.ts
2123
2189
  function generalHookFilterMatcherToFilterExprs(matcher, stringKind) {
@@ -4253,4 +4319,4 @@ function defineConfig(config) {
4253
4319
  const VERSION = version;
4254
4320
 
4255
4321
  //#endregion
4256
- export { VERSION, build, defineConfig, rolldown, watch };
4322
+ export { BuiltinPlugin, VERSION, build, buildImportAnalysisPlugin, composeJsPlugins, createBundler, defineConfig, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reportPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolldown/browser",
3
- "version": "1.0.0-beta.8-commit.c76291c",
3
+ "version": "1.0.0-beta.8-commit.56abf23",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "homepage": "https://rolldown.rs/",
6
6
  "type": "module",
@@ -31,11 +31,12 @@
31
31
  "types": "./dist/index.d.cts",
32
32
  "exports": {
33
33
  ".": {
34
- "browser": "./dist/browser.mjs",
34
+ "browser": "./dist/index.browser.mjs",
35
35
  "require": "./dist/index.cjs",
36
36
  "import": "./dist/index.mjs"
37
37
  },
38
38
  "./experimental": {
39
+ "browser": "./dist/experimental-index.browser.mjs",
39
40
  "require": "./dist/experimental-index.cjs",
40
41
  "import": "./dist/experimental-index.mjs"
41
42
  },
@@ -56,7 +57,7 @@
56
57
  "dependencies": {
57
58
  "@napi-rs/wasm-runtime": "^0.2.8",
58
59
  "@oxc-project/types": "0.68.1",
59
- "ansis": "^3.17.0",
60
+ "ansis": "^4.0.0",
60
61
  "pathe": "^2.0.3"
61
62
  },
62
63
  "peerDependencies": {