@rspack-canary/browser 1.7.2-canary-6ee0d4b1-20260110181602 → 1.7.2-canary-a6892fef-20260113061323

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.
@@ -38,6 +38,8 @@ export type ApiTargetProperties = {
38
38
  importScripts: boolean | null;
39
39
  /** has importScripts available when creating a worker */
40
40
  importScriptsInWorker: boolean | null;
41
+ /** node.js allows to use `import.meta.dirname` and `import.meta.filename` */
42
+ importMetaDirnameAndFilename: boolean | null;
41
43
  /** has fetch function available for WebAssembly */
42
44
  fetchWasm: boolean | null;
43
45
  /** has global variable available */
@@ -272,6 +272,8 @@ export type Environment = {
272
272
  dynamicImport?: boolean;
273
273
  /** The environment supports an async import() when creating a worker, only for web targets at the moment. */
274
274
  dynamicImportInWorker?: boolean;
275
+ /** The environment supports `import.meta.dirname` and `import.meta.filename`. */
276
+ importMetaDirnameAndFilename?: boolean;
275
277
  /** The environment supports 'for of' iteration ('for (const x of array) { ... }'). */
276
278
  forOf?: boolean;
277
279
  /** The environment supports 'globalThis'. */
package/dist/index.mjs CHANGED
@@ -55386,11 +55386,13 @@ function getRawOutputEnvironment(environment = {}) {
55386
55386
  destructuring: Boolean(environment.destructuring),
55387
55387
  document: Boolean(environment.document),
55388
55388
  dynamicImport: Boolean(environment.dynamicImport),
55389
+ dynamicImportInWorker: Boolean(environment.dynamicImportInWorker),
55389
55390
  forOf: Boolean(environment.forOf),
55390
55391
  globalThis: Boolean(environment.globalThis),
55391
55392
  module: Boolean(environment.module),
55392
55393
  optionalChaining: Boolean(environment.optionalChaining),
55393
- templateLiteral: Boolean(environment.templateLiteral)
55394
+ templateLiteral: Boolean(environment.templateLiteral),
55395
+ importMetaDirnameAndFilename: Boolean(environment.importMetaDirnameAndFilename)
55394
55396
  };
55395
55397
  }
55396
55398
  function getRawExtensionAlias(alias = {}) {
@@ -57824,6 +57826,12 @@ const browserslistTargetHandler_resolve = (browsers)=>{
57824
57826
  18
57825
57827
  ]
57826
57828
  }),
57829
+ importMetaDirnameAndFilename: nodeProperty && rawChecker({
57830
+ node: [
57831
+ 22,
57832
+ 16
57833
+ ]
57834
+ }),
57827
57835
  require: nodeProperty
57828
57836
  };
57829
57837
  };
@@ -57913,6 +57921,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
57913
57921
  require: !asyncFlag,
57914
57922
  nodeBuiltins: true,
57915
57923
  nodePrefixForCoreModules: +major < 15 ? v(14, 18) : v(16),
57924
+ importMetaDirnameAndFilename: v(22, 16),
57916
57925
  global: true,
57917
57926
  document: false,
57918
57927
  fetchWasm: false,
@@ -57953,6 +57962,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
57953
57962
  global: true,
57954
57963
  nodeBuiltins: true,
57955
57964
  nodePrefixForCoreModules: v(15),
57965
+ importMetaDirnameAndFilename: v(37),
57956
57966
  require: true,
57957
57967
  document: 'renderer' === context,
57958
57968
  fetchWasm: 'renderer' === context,
@@ -58205,7 +58215,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
58205
58215
  if ('object' == typeof rspackFuture) {
58206
58216
  D(rspackFuture, 'bundlerInfo', {});
58207
58217
  if ('object' == typeof rspackFuture.bundlerInfo) {
58208
- D(rspackFuture.bundlerInfo, 'version', "1.7.2-canary-6ee0d4b1-20260110181602");
58218
+ D(rspackFuture.bundlerInfo, 'version', "1.7.2-canary-a6892fef-20260113061323");
58209
58219
  D(rspackFuture.bundlerInfo, 'bundler', 'rspack');
58210
58220
  D(rspackFuture.bundlerInfo, 'force', !library);
58211
58221
  }
@@ -58471,6 +58481,7 @@ const applyOutputDefaults = (output, { context, outputModule, targetProperties:
58471
58481
  F(environment, 'destructuring', ()=>tp && optimistic(tp.destructuring));
58472
58482
  F(environment, 'optionalChaining', ()=>tp && optimistic(tp.optionalChaining));
58473
58483
  F(environment, 'nodePrefixForCoreModules', ()=>tp && optimistic(tp.nodePrefixForCoreModules));
58484
+ F(environment, 'importMetaDirnameAndFilename', ()=>tp?.importMetaDirnameAndFilename);
58474
58485
  F(environment, 'templateLiteral', ()=>tp && optimistic(tp.templateLiteral));
58475
58486
  F(environment, 'dynamicImport', ()=>conditionallyOptimistic(tp?.dynamicImport, output.module));
58476
58487
  F(environment, 'dynamicImportInWorker', ()=>conditionallyOptimistic(tp?.dynamicImportInWorker, output.module));
@@ -60474,7 +60485,7 @@ class MultiStats {
60474
60485
  return obj;
60475
60486
  });
60476
60487
  if (childOptions.version) {
60477
- obj.rspackVersion = "1.7.2-canary-6ee0d4b1-20260110181602";
60488
+ obj.rspackVersion = "1.7.2-canary-a6892fef-20260113061323";
60478
60489
  obj.version = "5.75.0";
60479
60490
  }
60480
60491
  if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join('');
@@ -62306,7 +62317,7 @@ const SIMPLE_EXTRACTORS = {
62306
62317
  },
62307
62318
  version: (object)=>{
62308
62319
  object.version = "5.75.0";
62309
- object.rspackVersion = "1.7.2-canary-6ee0d4b1-20260110181602";
62320
+ object.rspackVersion = "1.7.2-canary-a6892fef-20260113061323";
62310
62321
  },
62311
62322
  env: (object, _compilation, _context, { _env })=>{
62312
62323
  object.env = _env;
@@ -66976,7 +66987,7 @@ function transformSync(source, options) {
66976
66987
  const _options = JSON.stringify(options || {});
66977
66988
  return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
66978
66989
  }
66979
- const exports_rspackVersion = "1.7.2-canary-6ee0d4b1-20260110181602";
66990
+ const exports_rspackVersion = "1.7.2-canary-a6892fef-20260113061323";
66980
66991
  const exports_version = "5.75.0";
66981
66992
  const exports_WebpackError = Error;
66982
66993
  const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack-canary/browser",
3
- "version": "1.7.2-canary-6ee0d4b1-20260110181602",
3
+ "version": "1.7.2-canary-a6892fef-20260113061323",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "Rspack for running in the browser. This is still in early stage and may not follow the semver.",