@atlaspack/core 2.12.1-canary.3544 → 2.12.1-canary.3545
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.
|
@@ -119,17 +119,23 @@ class MutableAssetSymbols {
|
|
|
119
119
|
this.#locals = new Set();
|
|
120
120
|
for (const {
|
|
121
121
|
exported,
|
|
122
|
+
loc,
|
|
122
123
|
local,
|
|
123
|
-
|
|
124
|
+
isEsmExport,
|
|
125
|
+
selfReferenced
|
|
124
126
|
} of inner || []) {
|
|
125
|
-
this.set(exported, local, loc
|
|
127
|
+
this.set(exported, local, loc, {
|
|
128
|
+
isEsm: isEsmExport,
|
|
129
|
+
selfReferenced
|
|
130
|
+
});
|
|
126
131
|
}
|
|
127
132
|
}
|
|
128
133
|
intoNapi() {
|
|
129
134
|
const results = [];
|
|
130
135
|
for (const [exportSymbol, {
|
|
131
136
|
local,
|
|
132
|
-
loc
|
|
137
|
+
loc,
|
|
138
|
+
meta
|
|
133
139
|
}] of this.#symbols.entries()) {
|
|
134
140
|
results.push({
|
|
135
141
|
exported: exportSymbol,
|
|
@@ -145,10 +151,9 @@ class MutableAssetSymbols {
|
|
|
145
151
|
column: loc.end.column
|
|
146
152
|
}
|
|
147
153
|
} : undefined,
|
|
148
|
-
|
|
154
|
+
isEsmExport: Boolean(meta === null || meta === void 0 ? void 0 : meta.isEsm),
|
|
149
155
|
isWeak: false,
|
|
150
|
-
|
|
151
|
-
selfReferenced: false
|
|
156
|
+
selfReferenced: Boolean(meta === null || meta === void 0 ? void 0 : meta.selfReferenced)
|
|
152
157
|
});
|
|
153
158
|
}
|
|
154
159
|
return results;
|
|
@@ -156,12 +161,12 @@ class MutableAssetSymbols {
|
|
|
156
161
|
ensure() {
|
|
157
162
|
throw new Error('MutableAssetSymbols.ensure()');
|
|
158
163
|
}
|
|
159
|
-
set(exportSymbol, local, loc) {
|
|
164
|
+
set(exportSymbol, local, loc, meta) {
|
|
160
165
|
this.#locals.add(local);
|
|
161
166
|
this.#symbols.set(exportSymbol, {
|
|
162
167
|
local,
|
|
163
168
|
loc,
|
|
164
|
-
meta
|
|
169
|
+
meta
|
|
165
170
|
});
|
|
166
171
|
}
|
|
167
172
|
get(exportSymbol) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/core",
|
|
3
|
-
"version": "2.12.1-canary.
|
|
3
|
+
"version": "2.12.1-canary.3545+2f2945668",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -20,21 +20,21 @@
|
|
|
20
20
|
"check-ts": "tsc --noEmit index.d.ts"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@atlaspack/build-cache": "2.12.1-canary.
|
|
24
|
-
"@atlaspack/cache": "2.12.1-canary.
|
|
25
|
-
"@atlaspack/diagnostic": "2.12.1-canary.
|
|
26
|
-
"@atlaspack/events": "2.12.1-canary.
|
|
27
|
-
"@atlaspack/feature-flags": "2.12.1-canary.
|
|
28
|
-
"@atlaspack/fs": "2.12.1-canary.
|
|
29
|
-
"@atlaspack/graph": "3.2.1-canary.
|
|
30
|
-
"@atlaspack/logger": "2.12.1-canary.
|
|
31
|
-
"@atlaspack/package-manager": "2.12.1-canary.
|
|
32
|
-
"@atlaspack/plugin": "2.12.1-canary.
|
|
33
|
-
"@atlaspack/profiler": "2.12.1-canary.
|
|
34
|
-
"@atlaspack/rust": "2.12.1-canary.
|
|
35
|
-
"@atlaspack/types": "2.12.1-canary.
|
|
36
|
-
"@atlaspack/utils": "2.12.1-canary.
|
|
37
|
-
"@atlaspack/workers": "2.12.1-canary.
|
|
23
|
+
"@atlaspack/build-cache": "2.12.1-canary.3545+2f2945668",
|
|
24
|
+
"@atlaspack/cache": "2.12.1-canary.3545+2f2945668",
|
|
25
|
+
"@atlaspack/diagnostic": "2.12.1-canary.3545+2f2945668",
|
|
26
|
+
"@atlaspack/events": "2.12.1-canary.3545+2f2945668",
|
|
27
|
+
"@atlaspack/feature-flags": "2.12.1-canary.3545+2f2945668",
|
|
28
|
+
"@atlaspack/fs": "2.12.1-canary.3545+2f2945668",
|
|
29
|
+
"@atlaspack/graph": "3.2.1-canary.3545+2f2945668",
|
|
30
|
+
"@atlaspack/logger": "2.12.1-canary.3545+2f2945668",
|
|
31
|
+
"@atlaspack/package-manager": "2.12.1-canary.3545+2f2945668",
|
|
32
|
+
"@atlaspack/plugin": "2.12.1-canary.3545+2f2945668",
|
|
33
|
+
"@atlaspack/profiler": "2.12.1-canary.3545+2f2945668",
|
|
34
|
+
"@atlaspack/rust": "2.12.1-canary.3545+2f2945668",
|
|
35
|
+
"@atlaspack/types": "2.12.1-canary.3545+2f2945668",
|
|
36
|
+
"@atlaspack/utils": "2.12.1-canary.3545+2f2945668",
|
|
37
|
+
"@atlaspack/workers": "2.12.1-canary.3545+2f2945668",
|
|
38
38
|
"@mischnic/json-sourcemap": "^0.1.0",
|
|
39
39
|
"@parcel/source-map": "^2.1.1",
|
|
40
40
|
"base-x": "^3.0.8",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"browser": {
|
|
67
67
|
"./src/serializerCore.js": "./src/serializerCore.browser.js"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "2f2945668ee50567c7c8a59f9e0ed91dcb5d71cc"
|
|
70
70
|
}
|
|
@@ -138,14 +138,18 @@ export class MutableAssetSymbols implements IMutableAssetSymbols {
|
|
|
138
138
|
constructor(inner: ?(NapiSymbol[]) | null) {
|
|
139
139
|
this.#symbols = new Map();
|
|
140
140
|
this.#locals = new Set();
|
|
141
|
-
for (const {exported, local,
|
|
142
|
-
|
|
141
|
+
for (const {exported, loc, local, isEsmExport, selfReferenced} of inner ||
|
|
142
|
+
[]) {
|
|
143
|
+
this.set(exported, local, loc, {
|
|
144
|
+
isEsm: isEsmExport,
|
|
145
|
+
selfReferenced,
|
|
146
|
+
});
|
|
143
147
|
}
|
|
144
148
|
}
|
|
145
149
|
|
|
146
150
|
intoNapi(): NapiSymbol[] {
|
|
147
151
|
const results: NapiSymbol[] = [];
|
|
148
|
-
for (const [exportSymbol, {local, loc}] of this.#symbols.entries()) {
|
|
152
|
+
for (const [exportSymbol, {local, loc, meta}] of this.#symbols.entries()) {
|
|
149
153
|
results.push({
|
|
150
154
|
exported: exportSymbol,
|
|
151
155
|
local,
|
|
@@ -162,10 +166,9 @@ export class MutableAssetSymbols implements IMutableAssetSymbols {
|
|
|
162
166
|
},
|
|
163
167
|
}
|
|
164
168
|
: undefined,
|
|
165
|
-
|
|
169
|
+
isEsmExport: Boolean(meta?.isEsm),
|
|
166
170
|
isWeak: false,
|
|
167
|
-
|
|
168
|
-
selfReferenced: false,
|
|
171
|
+
selfReferenced: Boolean(meta?.selfReferenced),
|
|
169
172
|
});
|
|
170
173
|
}
|
|
171
174
|
return results;
|
|
@@ -175,12 +178,17 @@ export class MutableAssetSymbols implements IMutableAssetSymbols {
|
|
|
175
178
|
throw new Error('MutableAssetSymbols.ensure()');
|
|
176
179
|
}
|
|
177
180
|
|
|
178
|
-
set(
|
|
181
|
+
set(
|
|
182
|
+
exportSymbol: Symbol,
|
|
183
|
+
local: Symbol,
|
|
184
|
+
loc: ?SourceLocation,
|
|
185
|
+
meta: ?Meta,
|
|
186
|
+
): void {
|
|
179
187
|
this.#locals.add(local);
|
|
180
188
|
this.#symbols.set(exportSymbol, {
|
|
181
189
|
local,
|
|
182
190
|
loc,
|
|
183
|
-
meta
|
|
191
|
+
meta,
|
|
184
192
|
});
|
|
185
193
|
}
|
|
186
194
|
|
|
@@ -214,7 +222,12 @@ export class MutableAssetSymbols implements IMutableAssetSymbols {
|
|
|
214
222
|
}
|
|
215
223
|
}
|
|
216
224
|
|
|
217
|
-
export type AssetSymbol = {|
|
|
225
|
+
export type AssetSymbol = {|
|
|
226
|
+
local: Symbol,
|
|
227
|
+
loc: ?SourceLocation,
|
|
228
|
+
meta?: ?Meta,
|
|
229
|
+
|};
|
|
230
|
+
|
|
218
231
|
export type DependencyAssetSymbol = {|
|
|
219
232
|
local: Symbol,
|
|
220
233
|
loc: ?SourceLocation,
|