@atlaspack/core 2.23.6-dev-export-func-opt-b714be46e.0 → 2.24.1
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/CHANGELOG.md +56 -0
- package/lib/AssetGraph.js +2 -8
- package/lib/BundleGraph.js +2 -17
- package/lib/SymbolPropagation.js +4 -32
- package/lib/atlaspack-v3/AtlaspackV3.js +7 -3
- package/lib/atlaspack-v3/worker/compat/asset-symbols.js +3 -3
- package/lib/public/Symbols.js +3 -52
- package/lib/requests/AssetGraphRequestRust.js +1 -1
- package/lib/types/BundleGraph.d.ts +6 -6
- package/lib/types/atlaspack-v3/AtlaspackV3.d.ts +1 -1
- package/lib/types/atlaspack-v3/worker/compat/asset-symbols.d.ts +19 -19
- package/lib/types/public/BundleGraph.d.ts +3 -3
- package/lib/types/public/Symbols.d.ts +6 -6
- package/lib/types/types.d.ts +9 -9
- package/package.json +21 -22
- package/src/AssetGraph.ts +0 -4
- package/src/BundleGraph.ts +8 -18
- package/src/SymbolPropagation.ts +22 -43
- package/src/atlaspack-v3/AtlaspackV3.ts +12 -3
- package/src/atlaspack-v3/worker/compat/asset-symbols.ts +37 -31
- package/src/public/BundleGraph.ts +3 -2
- package/src/public/Symbols.ts +2 -36
- package/src/requests/AssetGraphRequestRust.ts +1 -1
- package/src/types.ts +9 -8
- package/LICENSE +0 -201
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @ts-expect-error TS2305
|
|
2
1
|
import type {Symbol as NapiSymbol} from '@atlaspack/rust';
|
|
3
2
|
import type {
|
|
4
3
|
AssetSymbols as IAssetSymbols,
|
|
@@ -10,8 +9,8 @@ import type {
|
|
|
10
9
|
} from '@atlaspack/types';
|
|
11
10
|
|
|
12
11
|
export class MutableDependencySymbols implements IMutableDependencySymbols {
|
|
13
|
-
#symbols: Map<
|
|
14
|
-
#locals: Set<
|
|
12
|
+
#symbols: Map<Symbol, DependencyAssetSymbol>;
|
|
13
|
+
#locals: Set<Symbol>;
|
|
15
14
|
|
|
16
15
|
get isCleared(): boolean {
|
|
17
16
|
return this.#symbols.size === 0;
|
|
@@ -29,25 +28,25 @@ export class MutableDependencySymbols implements IMutableDependencySymbols {
|
|
|
29
28
|
throw new Error('MutableDependencySymbols.ensure()');
|
|
30
29
|
}
|
|
31
30
|
|
|
32
|
-
get(exportSymbol:
|
|
31
|
+
get(exportSymbol: Symbol): DependencyAssetSymbol | null | undefined {
|
|
33
32
|
return this.#symbols.get(exportSymbol);
|
|
34
33
|
}
|
|
35
34
|
|
|
36
|
-
hasExportSymbol(exportSymbol:
|
|
35
|
+
hasExportSymbol(exportSymbol: Symbol): boolean {
|
|
37
36
|
return this.#symbols.has(exportSymbol);
|
|
38
37
|
}
|
|
39
38
|
|
|
40
|
-
hasLocalSymbol(local:
|
|
39
|
+
hasLocalSymbol(local: Symbol): boolean {
|
|
41
40
|
return this.#locals.has(local);
|
|
42
41
|
}
|
|
43
42
|
|
|
44
|
-
exportSymbols(): Iterable<
|
|
43
|
+
exportSymbols(): Iterable<Symbol> {
|
|
45
44
|
return this.#symbols.keys();
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
set(
|
|
49
|
-
exportSymbol:
|
|
50
|
-
local:
|
|
48
|
+
exportSymbol: Symbol,
|
|
49
|
+
local: Symbol,
|
|
51
50
|
loc?: SourceLocation | null,
|
|
52
51
|
isWeak?: boolean | null,
|
|
53
52
|
): void {
|
|
@@ -60,7 +59,7 @@ export class MutableDependencySymbols implements IMutableDependencySymbols {
|
|
|
60
59
|
});
|
|
61
60
|
}
|
|
62
61
|
|
|
63
|
-
delete(exportSymbol:
|
|
62
|
+
delete(exportSymbol: Symbol): void {
|
|
64
63
|
let existing = this.#symbols.get(exportSymbol);
|
|
65
64
|
if (!existing) return;
|
|
66
65
|
this.#locals.delete(existing.local);
|
|
@@ -75,8 +74,8 @@ export class MutableDependencySymbols implements IMutableDependencySymbols {
|
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
export class AssetSymbols implements IAssetSymbols {
|
|
78
|
-
#symbols: Map<
|
|
79
|
-
#locals: Set<
|
|
77
|
+
#symbols: Map<Symbol, AssetSymbol>;
|
|
78
|
+
#locals: Set<Symbol>;
|
|
80
79
|
|
|
81
80
|
get isCleared(): boolean {
|
|
82
81
|
return this.#symbols.size === 0;
|
|
@@ -91,8 +90,8 @@ export class AssetSymbols implements IAssetSymbols {
|
|
|
91
90
|
}
|
|
92
91
|
|
|
93
92
|
#set(
|
|
94
|
-
exportSymbol:
|
|
95
|
-
local:
|
|
93
|
+
exportSymbol: Symbol,
|
|
94
|
+
local: Symbol,
|
|
96
95
|
loc?: SourceLocation | null,
|
|
97
96
|
): undefined {
|
|
98
97
|
this.#locals.add(local);
|
|
@@ -103,19 +102,19 @@ export class AssetSymbols implements IAssetSymbols {
|
|
|
103
102
|
});
|
|
104
103
|
}
|
|
105
104
|
|
|
106
|
-
get(exportSymbol:
|
|
105
|
+
get(exportSymbol: Symbol): AssetSymbol | null | undefined {
|
|
107
106
|
return this.#symbols.get(exportSymbol);
|
|
108
107
|
}
|
|
109
108
|
|
|
110
|
-
hasExportSymbol(exportSymbol:
|
|
109
|
+
hasExportSymbol(exportSymbol: Symbol): boolean {
|
|
111
110
|
return this.#symbols.has(exportSymbol);
|
|
112
111
|
}
|
|
113
112
|
|
|
114
|
-
hasLocalSymbol(local:
|
|
113
|
+
hasLocalSymbol(local: Symbol): boolean {
|
|
115
114
|
return this.#locals.has(local);
|
|
116
115
|
}
|
|
117
116
|
|
|
118
|
-
exportSymbols(): Iterable<
|
|
117
|
+
exportSymbols(): Iterable<Symbol> {
|
|
119
118
|
return this.#symbols.keys();
|
|
120
119
|
}
|
|
121
120
|
|
|
@@ -131,8 +130,8 @@ export class AssetSymbols implements IAssetSymbols {
|
|
|
131
130
|
}
|
|
132
131
|
|
|
133
132
|
export class MutableAssetSymbols implements IMutableAssetSymbols {
|
|
134
|
-
#symbols: Map<
|
|
135
|
-
#locals: Set<
|
|
133
|
+
#symbols: Map<Symbol, AssetSymbol>;
|
|
134
|
+
#locals: Set<Symbol>;
|
|
136
135
|
|
|
137
136
|
get isCleared(): boolean {
|
|
138
137
|
return this.#symbols.size === 0;
|
|
@@ -141,10 +140,17 @@ export class MutableAssetSymbols implements IMutableAssetSymbols {
|
|
|
141
140
|
constructor(inner: NapiSymbol[] | null | undefined | null) {
|
|
142
141
|
this.#symbols = new Map();
|
|
143
142
|
this.#locals = new Set();
|
|
144
|
-
for (const {
|
|
145
|
-
|
|
143
|
+
for (const {
|
|
144
|
+
exported,
|
|
145
|
+
loc,
|
|
146
|
+
local,
|
|
147
|
+
isEsmExport,
|
|
148
|
+
selfReferenced,
|
|
149
|
+
isStaticBindingSafe,
|
|
150
|
+
} of inner || []) {
|
|
146
151
|
this.set(exported, local, loc, {
|
|
147
152
|
isEsm: isEsmExport,
|
|
153
|
+
isStaticBindingSafe,
|
|
148
154
|
selfReferenced,
|
|
149
155
|
});
|
|
150
156
|
}
|
|
@@ -183,8 +189,8 @@ export class MutableAssetSymbols implements IMutableAssetSymbols {
|
|
|
183
189
|
}
|
|
184
190
|
|
|
185
191
|
set(
|
|
186
|
-
exportSymbol:
|
|
187
|
-
local:
|
|
192
|
+
exportSymbol: Symbol,
|
|
193
|
+
local: Symbol,
|
|
188
194
|
loc?: SourceLocation | null,
|
|
189
195
|
meta?: Meta | null,
|
|
190
196
|
): void {
|
|
@@ -196,23 +202,23 @@ export class MutableAssetSymbols implements IMutableAssetSymbols {
|
|
|
196
202
|
});
|
|
197
203
|
}
|
|
198
204
|
|
|
199
|
-
get(exportSymbol:
|
|
205
|
+
get(exportSymbol: Symbol): AssetSymbol | null | undefined {
|
|
200
206
|
return this.#symbols.get(exportSymbol);
|
|
201
207
|
}
|
|
202
208
|
|
|
203
|
-
hasExportSymbol(exportSymbol:
|
|
209
|
+
hasExportSymbol(exportSymbol: Symbol): boolean {
|
|
204
210
|
return this.#symbols.has(exportSymbol);
|
|
205
211
|
}
|
|
206
212
|
|
|
207
|
-
hasLocalSymbol(local:
|
|
213
|
+
hasLocalSymbol(local: Symbol): boolean {
|
|
208
214
|
return this.#locals.has(local);
|
|
209
215
|
}
|
|
210
216
|
|
|
211
|
-
exportSymbols(): Iterable<
|
|
217
|
+
exportSymbols(): Iterable<Symbol> {
|
|
212
218
|
return this.#symbols.keys();
|
|
213
219
|
}
|
|
214
220
|
|
|
215
|
-
delete(exportSymbol:
|
|
221
|
+
delete(exportSymbol: Symbol): void {
|
|
216
222
|
let existing = this.#symbols.get(exportSymbol);
|
|
217
223
|
if (!existing) return;
|
|
218
224
|
this.#locals.delete(existing.local);
|
|
@@ -227,13 +233,13 @@ export class MutableAssetSymbols implements IMutableAssetSymbols {
|
|
|
227
233
|
}
|
|
228
234
|
|
|
229
235
|
export type AssetSymbol = {
|
|
230
|
-
local:
|
|
236
|
+
local: Symbol;
|
|
231
237
|
loc: SourceLocation | null | undefined;
|
|
232
238
|
meta?: Meta | null | undefined;
|
|
233
239
|
};
|
|
234
240
|
|
|
235
241
|
export type DependencyAssetSymbol = {
|
|
236
|
-
local:
|
|
242
|
+
local: Symbol;
|
|
237
243
|
loc: SourceLocation | null | undefined;
|
|
238
244
|
meta?: Meta | null | undefined;
|
|
239
245
|
isWeak: boolean;
|
|
@@ -10,6 +10,7 @@ import type {
|
|
|
10
10
|
GraphVisitor,
|
|
11
11
|
NamedBundle,
|
|
12
12
|
SymbolResolution,
|
|
13
|
+
Symbol,
|
|
13
14
|
Target,
|
|
14
15
|
} from '@atlaspack/types';
|
|
15
16
|
import type {Bundle as InternalBundle, AtlaspackOptions} from '../types';
|
|
@@ -244,7 +245,7 @@ export default class BundleGraph<TBundle extends IBundle>
|
|
|
244
245
|
|
|
245
246
|
getSymbolResolution(
|
|
246
247
|
asset: IAsset,
|
|
247
|
-
symbol:
|
|
248
|
+
symbol: Symbol,
|
|
248
249
|
boundary?: IBundle | null,
|
|
249
250
|
): SymbolResolution {
|
|
250
251
|
let res = this.#graph.getSymbolResolution(
|
|
@@ -335,7 +336,7 @@ export default class BundleGraph<TBundle extends IBundle>
|
|
|
335
336
|
|
|
336
337
|
getUsedSymbols(
|
|
337
338
|
v: IAsset | IDependency,
|
|
338
|
-
): ReadonlySet<
|
|
339
|
+
): ReadonlySet<Symbol> | null | undefined {
|
|
339
340
|
if (v instanceof Asset) {
|
|
340
341
|
return this.#graph.getUsedSymbolsAsset(assetToAssetValue(v));
|
|
341
342
|
} else {
|
package/src/public/Symbols.ts
CHANGED
|
@@ -47,25 +47,20 @@ export class AssetSymbols implements IAssetSymbols {
|
|
|
47
47
|
return this;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
// @ts-expect-error TS2416
|
|
51
50
|
hasExportSymbol(exportSymbol: ISymbol): boolean {
|
|
52
|
-
// @ts-expect-error TS2345
|
|
53
51
|
return Boolean(this.#value.symbols?.has(exportSymbol));
|
|
54
52
|
}
|
|
55
53
|
|
|
56
|
-
// @ts-expect-error TS2416
|
|
57
54
|
hasLocalSymbol(local: ISymbol): boolean {
|
|
58
55
|
if (this.#value.symbols == null) {
|
|
59
56
|
return false;
|
|
60
57
|
}
|
|
61
58
|
for (let s of this.#value.symbols.values()) {
|
|
62
|
-
// @ts-expect-error TS2367
|
|
63
59
|
if (local === s.local) return true;
|
|
64
60
|
}
|
|
65
61
|
return false;
|
|
66
62
|
}
|
|
67
63
|
|
|
68
|
-
// @ts-expect-error TS2416
|
|
69
64
|
get(exportSymbol: ISymbol):
|
|
70
65
|
| {
|
|
71
66
|
local: ISymbol;
|
|
@@ -74,10 +69,8 @@ export class AssetSymbols implements IAssetSymbols {
|
|
|
74
69
|
}
|
|
75
70
|
| null
|
|
76
71
|
| undefined {
|
|
77
|
-
// @ts-expect-error TS2322
|
|
78
72
|
return fromInternalAssetSymbol(
|
|
79
73
|
this.#options.projectRoot,
|
|
80
|
-
// @ts-expect-error TS2345
|
|
81
74
|
this.#value.symbols?.get(exportSymbol),
|
|
82
75
|
);
|
|
83
76
|
}
|
|
@@ -86,9 +79,7 @@ export class AssetSymbols implements IAssetSymbols {
|
|
|
86
79
|
return this.#value.symbols == null;
|
|
87
80
|
}
|
|
88
81
|
|
|
89
|
-
// @ts-expect-error TS2416
|
|
90
82
|
exportSymbols(): Iterable<ISymbol> {
|
|
91
|
-
// @ts-expect-error TS2322
|
|
92
83
|
return this.#value.symbols?.keys() ?? [];
|
|
93
84
|
}
|
|
94
85
|
// @ts-expect-error TS2416
|
|
@@ -132,25 +123,20 @@ export class MutableAssetSymbols implements IMutableAssetSymbols {
|
|
|
132
123
|
|
|
133
124
|
// immutable
|
|
134
125
|
|
|
135
|
-
// @ts-expect-error TS2416
|
|
136
126
|
hasExportSymbol(exportSymbol: ISymbol): boolean {
|
|
137
|
-
// @ts-expect-error TS2345
|
|
138
127
|
return Boolean(this.#value.symbols?.has(exportSymbol));
|
|
139
128
|
}
|
|
140
129
|
|
|
141
|
-
// @ts-expect-error TS2416
|
|
142
130
|
hasLocalSymbol(local: ISymbol): boolean {
|
|
143
131
|
if (this.#value.symbols == null) {
|
|
144
132
|
return false;
|
|
145
133
|
}
|
|
146
134
|
for (let s of this.#value.symbols.values()) {
|
|
147
|
-
// @ts-expect-error TS2367
|
|
148
135
|
if (local === s.local) return true;
|
|
149
136
|
}
|
|
150
137
|
return false;
|
|
151
138
|
}
|
|
152
139
|
|
|
153
|
-
// @ts-expect-error TS2416
|
|
154
140
|
get(exportSymbol: ISymbol):
|
|
155
141
|
| {
|
|
156
142
|
local: ISymbol;
|
|
@@ -159,10 +145,8 @@ export class MutableAssetSymbols implements IMutableAssetSymbols {
|
|
|
159
145
|
}
|
|
160
146
|
| null
|
|
161
147
|
| undefined {
|
|
162
|
-
// @ts-expect-error TS2322
|
|
163
148
|
return fromInternalAssetSymbol(
|
|
164
149
|
this.#options.projectRoot,
|
|
165
|
-
// @ts-expect-error TS2345
|
|
166
150
|
this.#value.symbols?.get(exportSymbol),
|
|
167
151
|
);
|
|
168
152
|
}
|
|
@@ -171,7 +155,6 @@ export class MutableAssetSymbols implements IMutableAssetSymbols {
|
|
|
171
155
|
return this.#value.symbols == null;
|
|
172
156
|
}
|
|
173
157
|
|
|
174
|
-
// @ts-expect-error TS2416
|
|
175
158
|
exportSymbols(): Iterable<ISymbol> {
|
|
176
159
|
// @ts-expect-error TS2322
|
|
177
160
|
return this.#value.symbols.keys();
|
|
@@ -201,14 +184,12 @@ export class MutableAssetSymbols implements IMutableAssetSymbols {
|
|
|
201
184
|
}
|
|
202
185
|
}
|
|
203
186
|
|
|
204
|
-
// @ts-expect-error TS2416
|
|
205
187
|
set(
|
|
206
188
|
exportSymbol: ISymbol,
|
|
207
189
|
local: ISymbol,
|
|
208
190
|
loc?: SourceLocation | null,
|
|
209
191
|
meta?: Meta | null,
|
|
210
192
|
) {
|
|
211
|
-
// @ts-expect-error TS2345
|
|
212
193
|
nullthrows(this.#value.symbols).set(exportSymbol, {
|
|
213
194
|
local,
|
|
214
195
|
loc: toInternalSourceLocation(this.#options.projectRoot, loc),
|
|
@@ -216,9 +197,7 @@ export class MutableAssetSymbols implements IMutableAssetSymbols {
|
|
|
216
197
|
});
|
|
217
198
|
}
|
|
218
199
|
|
|
219
|
-
// @ts-expect-error TS2416
|
|
220
200
|
delete(exportSymbol: ISymbol) {
|
|
221
|
-
// @ts-expect-error TS2345
|
|
222
201
|
nullthrows(this.#value.symbols).delete(exportSymbol);
|
|
223
202
|
}
|
|
224
203
|
}
|
|
@@ -248,24 +227,19 @@ export class MutableDependencySymbols implements IMutableDependencySymbols {
|
|
|
248
227
|
|
|
249
228
|
// immutable:
|
|
250
229
|
|
|
251
|
-
// @ts-expect-error TS2416
|
|
252
230
|
hasExportSymbol(exportSymbol: ISymbol): boolean {
|
|
253
|
-
// @ts-expect-error TS2345
|
|
254
231
|
return Boolean(this.#value.symbols?.has(exportSymbol));
|
|
255
232
|
}
|
|
256
233
|
|
|
257
|
-
// @ts-expect-error TS2416
|
|
258
234
|
hasLocalSymbol(local: ISymbol): boolean {
|
|
259
235
|
if (this.#value.symbols) {
|
|
260
236
|
for (let s of this.#value.symbols.values()) {
|
|
261
|
-
// @ts-expect-error TS2367
|
|
262
237
|
if (local === s.local) return true;
|
|
263
238
|
}
|
|
264
239
|
}
|
|
265
240
|
return false;
|
|
266
241
|
}
|
|
267
242
|
|
|
268
|
-
// @ts-expect-error TS2416
|
|
269
243
|
get(exportSymbol: ISymbol):
|
|
270
244
|
| {
|
|
271
245
|
local: ISymbol;
|
|
@@ -275,10 +249,8 @@ export class MutableDependencySymbols implements IMutableDependencySymbols {
|
|
|
275
249
|
}
|
|
276
250
|
| null
|
|
277
251
|
| undefined {
|
|
278
|
-
// @ts-expect-error TS2322
|
|
279
252
|
return fromInternalDependencySymbol(
|
|
280
253
|
this.#options.projectRoot,
|
|
281
|
-
// @ts-expect-error TS2345
|
|
282
254
|
nullthrows(this.#value.symbols).get(exportSymbol),
|
|
283
255
|
);
|
|
284
256
|
}
|
|
@@ -287,7 +259,6 @@ export class MutableDependencySymbols implements IMutableDependencySymbols {
|
|
|
287
259
|
return this.#value.symbols == null;
|
|
288
260
|
}
|
|
289
261
|
|
|
290
|
-
// @ts-expect-error TS2416
|
|
291
262
|
exportSymbols(): Iterable<ISymbol> {
|
|
292
263
|
// @ts-expect-error TS2322
|
|
293
264
|
return this.#value.symbols ? this.#value.symbols.keys() : EMPTY_ITERABLE;
|
|
@@ -321,7 +292,6 @@ export class MutableDependencySymbols implements IMutableDependencySymbols {
|
|
|
321
292
|
}
|
|
322
293
|
}
|
|
323
294
|
|
|
324
|
-
// @ts-expect-error TS2416
|
|
325
295
|
set(
|
|
326
296
|
exportSymbol: ISymbol,
|
|
327
297
|
local: ISymbol,
|
|
@@ -329,18 +299,14 @@ export class MutableDependencySymbols implements IMutableDependencySymbols {
|
|
|
329
299
|
isWeak?: boolean | null,
|
|
330
300
|
) {
|
|
331
301
|
let symbols = nullthrows(this.#value.symbols);
|
|
332
|
-
// @ts-expect-error TS2345
|
|
333
302
|
symbols.set(exportSymbol, {
|
|
334
303
|
local,
|
|
335
304
|
loc: toInternalSourceLocation(this.#options.projectRoot, loc),
|
|
336
|
-
// @ts-expect-error TS2345
|
|
337
305
|
isWeak: (symbols.get(exportSymbol)?.isWeak ?? true) && (isWeak ?? false),
|
|
338
306
|
});
|
|
339
307
|
}
|
|
340
308
|
|
|
341
|
-
// @ts-expect-error TS2416
|
|
342
309
|
delete(exportSymbol: ISymbol) {
|
|
343
|
-
// @ts-expect-error TS2345
|
|
344
310
|
nullthrows(this.#value.symbols).delete(exportSymbol);
|
|
345
311
|
}
|
|
346
312
|
}
|
|
@@ -352,7 +318,7 @@ function fromInternalAssetSymbol(
|
|
|
352
318
|
| {
|
|
353
319
|
// @ts-expect-error TS2304
|
|
354
320
|
loc: InternalSourceLocation | null | undefined;
|
|
355
|
-
local:
|
|
321
|
+
local: ISymbol;
|
|
356
322
|
meta?: Meta | null | undefined;
|
|
357
323
|
},
|
|
358
324
|
) {
|
|
@@ -373,7 +339,7 @@ function fromInternalDependencySymbol(
|
|
|
373
339
|
isWeak: boolean;
|
|
374
340
|
// @ts-expect-error TS2304
|
|
375
341
|
loc: InternalSourceLocation | null | undefined;
|
|
376
|
-
local:
|
|
342
|
+
local: ISymbol;
|
|
377
343
|
meta?: Meta | null | undefined;
|
|
378
344
|
},
|
|
379
345
|
) {
|
package/src/types.ts
CHANGED
|
@@ -22,6 +22,7 @@ import type {
|
|
|
22
22
|
TargetDescriptor,
|
|
23
23
|
HMROptions,
|
|
24
24
|
DetailedReportOptions,
|
|
25
|
+
Symbol,
|
|
25
26
|
} from '@atlaspack/types';
|
|
26
27
|
import type {SharedReference} from '@atlaspack/workers';
|
|
27
28
|
import type {FileSystem} from '@atlaspack/fs';
|
|
@@ -163,9 +164,9 @@ export type Dependency = {
|
|
|
163
164
|
range: SemverRange | null | undefined;
|
|
164
165
|
symbols:
|
|
165
166
|
| Map<
|
|
166
|
-
|
|
167
|
+
Symbol,
|
|
167
168
|
{
|
|
168
|
-
local:
|
|
169
|
+
local: Symbol;
|
|
169
170
|
loc: InternalSourceLocation | null | undefined;
|
|
170
171
|
isWeak: boolean;
|
|
171
172
|
meta?: Meta | null | undefined;
|
|
@@ -210,9 +211,9 @@ export type Asset = {
|
|
|
210
211
|
astGenerator: ASTGenerator | null | undefined;
|
|
211
212
|
symbols:
|
|
212
213
|
| Map<
|
|
213
|
-
|
|
214
|
+
Symbol,
|
|
214
215
|
{
|
|
215
|
-
local:
|
|
216
|
+
local: Symbol;
|
|
216
217
|
loc: InternalSourceLocation | null | undefined;
|
|
217
218
|
meta?: Meta | null | undefined;
|
|
218
219
|
}
|
|
@@ -365,7 +366,7 @@ export type AssetNode = {
|
|
|
365
366
|
id: ContentKey;
|
|
366
367
|
readonly type: 'asset';
|
|
367
368
|
value: Asset;
|
|
368
|
-
usedSymbols: Set<
|
|
369
|
+
usedSymbols: Set<Symbol>;
|
|
369
370
|
hasDeferred?: boolean;
|
|
370
371
|
usedSymbolsDownDirty: boolean;
|
|
371
372
|
usedSymbolsUpDirty: boolean;
|
|
@@ -381,7 +382,7 @@ export type DependencyNode = {
|
|
|
381
382
|
deferred: boolean;
|
|
382
383
|
/** dependency was deferred (= no used symbols (in immediate parents) & side-effect free) */
|
|
383
384
|
hasDeferred?: boolean;
|
|
384
|
-
usedSymbolsDown: Set<
|
|
385
|
+
usedSymbolsDown: Set<Symbol>;
|
|
385
386
|
/**
|
|
386
387
|
* a requested symbol -> either
|
|
387
388
|
* - if ambiguous (e.g. dependency to asset group with both CSS modules and JS asset): undefined
|
|
@@ -389,10 +390,10 @@ export type DependencyNode = {
|
|
|
389
390
|
* - the asset it resolved to, and the potentially renamed export name
|
|
390
391
|
*/
|
|
391
392
|
usedSymbolsUp: Map<
|
|
392
|
-
|
|
393
|
+
Symbol,
|
|
393
394
|
| {
|
|
394
395
|
asset: ContentKey;
|
|
395
|
-
symbol:
|
|
396
|
+
symbol: Symbol | null | undefined;
|
|
396
397
|
}
|
|
397
398
|
| undefined
|
|
398
399
|
| null
|
package/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright (c) 2024 Atlassian US., Inc.
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|