@parcel/packager-react-static 2.14.4 → 2.14.5-canary.3441

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.
@@ -399,11 +399,16 @@ async function loadBundleUncached(bundle, bundleGraph, getInlineBundleContents)
399
399
  throw new Error(`Could not resolve module "${id}" from "${from}"`);
400
400
  }
401
401
  let defaultRequire = _module().default.createRequire(from);
402
- if (res.resolution.type === 'Builtin') {
403
- return defaultRequire(res.resolution.value);
402
+ let resolution = res.resolution;
403
+ if (resolution.type === 'Builtin') {
404
+ let {
405
+ scheme,
406
+ module
407
+ } = resolution.value;
408
+ return defaultRequire(scheme ? `${scheme}:${module}` : module);
404
409
  }
405
- if (res.resolution.type === 'Path') {
406
- let cacheKey = res.resolution.value + '#' + env;
410
+ if (resolution.type === 'Path') {
411
+ let cacheKey = resolution.value + '#' + env;
407
412
  const cachedModule = moduleCache.get(cacheKey);
408
413
  if (cachedModule) {
409
414
  return cachedModule.exports;
@@ -412,7 +417,7 @@ async function loadBundleUncached(bundle, bundleGraph, getInlineBundleContents)
412
417
  if (assetId) {
413
418
  return loadAsset(assetId);
414
419
  }
415
- let filePath = (0, _nullthrows().default)(res.resolution.value);
420
+ let filePath = resolution.value;
416
421
  let code = _fs().default.readFileSync(filePath, 'utf8');
417
422
  let require = id => {
418
423
  return loadModule(id, filePath, env);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcel/packager-react-static",
3
- "version": "2.14.4",
3
+ "version": "2.14.5-canary.3441+d0c8ddd99",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -17,16 +17,16 @@
17
17
  "source": "src/ReactStaticPackager.js",
18
18
  "engines": {
19
19
  "node": ">= 16.0.0",
20
- "parcel": "^2.14.4"
20
+ "parcel": "^2.0.0-canary.1816+d0c8ddd99"
21
21
  },
22
22
  "dependencies": {
23
- "@parcel/node-resolver-core": "3.5.4",
24
- "@parcel/plugin": "2.14.4",
25
- "@parcel/rust": "2.14.4",
26
- "@parcel/types": "2.14.4",
27
- "@parcel/utils": "2.14.4",
23
+ "@parcel/node-resolver-core": "3.5.5-canary.3441+d0c8ddd99",
24
+ "@parcel/plugin": "2.0.0-canary.1818+d0c8ddd99",
25
+ "@parcel/rust": "2.14.5-canary.3441+d0c8ddd99",
26
+ "@parcel/types": "2.0.0-canary.1818+d0c8ddd99",
27
+ "@parcel/utils": "2.0.0-canary.1818+d0c8ddd99",
28
28
  "nullthrows": "^1.1.1",
29
29
  "rsc-html-stream": "^0.0.5"
30
30
  },
31
- "gitHead": "c09fee751b61e2f9d52164f88248b9c668614134"
31
+ "gitHead": "d0c8ddd99d1937e8e1d13043684a8a10617187a6"
32
32
  }
@@ -439,12 +439,14 @@ async function loadBundleUncached(
439
439
  }
440
440
 
441
441
  let defaultRequire = Module.createRequire(from);
442
- if (res.resolution.type === 'Builtin') {
443
- return defaultRequire(res.resolution.value);
442
+ let resolution = res.resolution;
443
+ if (resolution.type === 'Builtin') {
444
+ let {scheme, module} = resolution.value;
445
+ return defaultRequire(scheme ? `${scheme}:${module}` : module);
444
446
  }
445
447
 
446
- if (res.resolution.type === 'Path') {
447
- let cacheKey = res.resolution.value + '#' + env;
448
+ if (resolution.type === 'Path') {
449
+ let cacheKey = resolution.value + '#' + env;
448
450
  const cachedModule = moduleCache.get(cacheKey);
449
451
  if (cachedModule) {
450
452
  return cachedModule.exports;
@@ -455,7 +457,7 @@ async function loadBundleUncached(
455
457
  return loadAsset(assetId);
456
458
  }
457
459
 
458
- let filePath = nullthrows(res.resolution.value);
460
+ let filePath = resolution.value;
459
461
  let code = fs.readFileSync(filePath, 'utf8');
460
462
  let require = (id: string) => {
461
463
  return loadModule(id, filePath, env);