@parcel/packager-js 2.13.0 → 2.13.2
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/lib/DevPackager.js +10 -0
- package/package.json +8 -8
- package/src/DevPackager.js +10 -0
package/lib/DevPackager.js
CHANGED
|
@@ -108,6 +108,16 @@ class DevPackager {
|
|
|
108
108
|
deps[specifier] = dep.specifier;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
+
|
|
112
|
+
// Add dependencies for parcelRequire calls added by runtimes
|
|
113
|
+
// so that the HMR runtime can correctly traverse parents.
|
|
114
|
+
let hmrDeps = asset.meta.hmrDeps;
|
|
115
|
+
if (this.options.hmrOptions && Array.isArray(hmrDeps)) {
|
|
116
|
+
for (let id of hmrDeps) {
|
|
117
|
+
(0, _assert().default)(typeof id === 'string');
|
|
118
|
+
deps[id] = id;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
111
121
|
let {
|
|
112
122
|
code,
|
|
113
123
|
mapBuffer
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcel/packager-js",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.2",
|
|
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.13.
|
|
20
|
+
"parcel": "^2.13.2"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@parcel/diagnostic": "2.13.
|
|
24
|
-
"@parcel/plugin": "2.13.
|
|
25
|
-
"@parcel/rust": "2.13.
|
|
23
|
+
"@parcel/diagnostic": "2.13.2",
|
|
24
|
+
"@parcel/plugin": "2.13.2",
|
|
25
|
+
"@parcel/rust": "2.13.2",
|
|
26
26
|
"@parcel/source-map": "^2.1.1",
|
|
27
|
-
"@parcel/types": "2.13.
|
|
28
|
-
"@parcel/utils": "2.13.
|
|
27
|
+
"@parcel/types": "2.13.2",
|
|
28
|
+
"@parcel/utils": "2.13.2",
|
|
29
29
|
"globals": "^13.2.0",
|
|
30
30
|
"nullthrows": "^1.1.1"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "4d27ec8b8bd1792f536811fef86e74a31fa0e704"
|
|
33
33
|
}
|
package/src/DevPackager.js
CHANGED
|
@@ -112,6 +112,16 @@ export class DevPackager {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
// Add dependencies for parcelRequire calls added by runtimes
|
|
116
|
+
// so that the HMR runtime can correctly traverse parents.
|
|
117
|
+
let hmrDeps = asset.meta.hmrDeps;
|
|
118
|
+
if (this.options.hmrOptions && Array.isArray(hmrDeps)) {
|
|
119
|
+
for (let id of hmrDeps) {
|
|
120
|
+
invariant(typeof id === 'string');
|
|
121
|
+
deps[id] = id;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
115
125
|
let {code, mapBuffer} = results[i];
|
|
116
126
|
let output = code || '';
|
|
117
127
|
wrapped +=
|