@parcel/packager-js 2.0.0-dev.1632 → 2.0.0-dev.1652
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.
|
@@ -26,7 +26,7 @@ function _nullthrows() {
|
|
|
26
26
|
return data;
|
|
27
27
|
}
|
|
28
28
|
function _assert() {
|
|
29
|
-
const data =
|
|
29
|
+
const data = _interopRequireWildcard(require("assert"));
|
|
30
30
|
_assert = function () {
|
|
31
31
|
return data;
|
|
32
32
|
};
|
|
@@ -700,7 +700,11 @@ ${code}
|
|
|
700
700
|
}
|
|
701
701
|
isWrapped(resolved, parentAsset) {
|
|
702
702
|
if (resolved.meta.isConstantModule) {
|
|
703
|
-
|
|
703
|
+
if (!this.bundle.hasAsset(resolved)) {
|
|
704
|
+
throw new (_assert().AssertionError)({
|
|
705
|
+
message: `Constant module ${_path().default.relative(this.options.projectRoot, resolved.filePath)} referenced from ${_path().default.relative(this.options.projectRoot, parentAsset.filePath)} not found in bundle ${this.bundle.name}`
|
|
706
|
+
});
|
|
707
|
+
}
|
|
704
708
|
return false;
|
|
705
709
|
}
|
|
706
710
|
return !this.bundle.hasAsset(resolved) && !this.externalAssets.has(resolved) || this.wrappedAssets.has(resolved.id) && resolved !== parentAsset;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcel/packager-js",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.1652+8b017703f",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
"source": "src/index.js",
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">= 16.0.0",
|
|
20
|
-
"parcel": "^2.0.0-dev.
|
|
20
|
+
"parcel": "^2.0.0-dev.1650+8b017703f"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@parcel/diagnostic": "2.0.0-dev.
|
|
24
|
-
"@parcel/plugin": "2.0.0-dev.
|
|
25
|
-
"@parcel/rust": "2.12.1-dev.
|
|
23
|
+
"@parcel/diagnostic": "2.0.0-dev.1652+8b017703f",
|
|
24
|
+
"@parcel/plugin": "2.0.0-dev.1652+8b017703f",
|
|
25
|
+
"@parcel/rust": "2.12.1-dev.3275+8b017703f",
|
|
26
26
|
"@parcel/source-map": "^2.1.1",
|
|
27
|
-
"@parcel/types": "2.0.0-dev.
|
|
28
|
-
"@parcel/utils": "2.0.0-dev.
|
|
27
|
+
"@parcel/types": "2.0.0-dev.1652+8b017703f",
|
|
28
|
+
"@parcel/utils": "2.0.0-dev.1652+8b017703f",
|
|
29
29
|
"globals": "^13.2.0",
|
|
30
30
|
"nullthrows": "^1.1.1"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "8b017703fdf4a90a643ce0190cdd7482060dc86b"
|
|
33
33
|
}
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from '@parcel/utils';
|
|
18
18
|
import SourceMap from '@parcel/source-map';
|
|
19
19
|
import nullthrows from 'nullthrows';
|
|
20
|
-
import invariant from 'assert';
|
|
20
|
+
import invariant, {AssertionError} from 'assert';
|
|
21
21
|
import ThrowableDiagnostic, {
|
|
22
22
|
convertSourceLocationToHighlight,
|
|
23
23
|
} from '@parcel/diagnostic';
|
|
@@ -922,10 +922,17 @@ ${code}
|
|
|
922
922
|
|
|
923
923
|
isWrapped(resolved: Asset, parentAsset: Asset): boolean {
|
|
924
924
|
if (resolved.meta.isConstantModule) {
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
925
|
+
if (!this.bundle.hasAsset(resolved)) {
|
|
926
|
+
throw new AssertionError({
|
|
927
|
+
message: `Constant module ${path.relative(
|
|
928
|
+
this.options.projectRoot,
|
|
929
|
+
resolved.filePath,
|
|
930
|
+
)} referenced from ${path.relative(
|
|
931
|
+
this.options.projectRoot,
|
|
932
|
+
parentAsset.filePath,
|
|
933
|
+
)} not found in bundle ${this.bundle.name}`,
|
|
934
|
+
});
|
|
935
|
+
}
|
|
929
936
|
return false;
|
|
930
937
|
}
|
|
931
938
|
return (
|