@atlaspack/core 2.12.1-canary.3389 → 2.12.1-canary.3391
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.
|
@@ -113,6 +113,16 @@ function getAssetGraph(serializedGraph, options) {
|
|
|
113
113
|
let cachedAssets = new Map();
|
|
114
114
|
let changedAssets = new Map();
|
|
115
115
|
let entry = 0;
|
|
116
|
+
let envs = new Map();
|
|
117
|
+
let getEnvId = env => {
|
|
118
|
+
let envKey = [env.context, env.engines.atlaspack, env.engines.browsers, env.engines.electron, env.engines.node, env.includeNodeModules, env.isLibrary, env.outputFormat, env.shouldScopeHoist, env.shouldOptimize, env.sourceType].join(':');
|
|
119
|
+
let envId = envs.get(envKey);
|
|
120
|
+
if (envId == null) {
|
|
121
|
+
envId = envs.size;
|
|
122
|
+
envs.set(envKey, envId);
|
|
123
|
+
}
|
|
124
|
+
return envId;
|
|
125
|
+
};
|
|
116
126
|
for (let node of serializedGraph.nodes) {
|
|
117
127
|
if (node.type === 'root') {
|
|
118
128
|
let index = graph.addNodeByContentKey('@@root', {
|
|
@@ -136,6 +146,7 @@ function getAssetGraph(serializedGraph, options) {
|
|
|
136
146
|
...asset,
|
|
137
147
|
env: {
|
|
138
148
|
...asset.env,
|
|
149
|
+
id: getEnvId(asset.env),
|
|
139
150
|
sourceType: sourceTypeLookup[asset.env.sourceType]
|
|
140
151
|
},
|
|
141
152
|
bundleBehavior: asset.bundleBehavior === 255 ? null : asset.bundleBehavior,
|
|
@@ -162,6 +173,7 @@ function getAssetGraph(serializedGraph, options) {
|
|
|
162
173
|
id,
|
|
163
174
|
env: {
|
|
164
175
|
...dependency.env,
|
|
176
|
+
id: getEnvId(dependency.env),
|
|
165
177
|
sourceType: sourceTypeLookup[dependency.env.sourceType]
|
|
166
178
|
},
|
|
167
179
|
bundleBehavior: dependency.bundleBehavior === 255 ? null : dependency.bundleBehavior,
|
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.3391+d0b87ba61",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -20,20 +20,20 @@
|
|
|
20
20
|
"check-ts": "tsc --noEmit index.d.ts"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@atlaspack/cache": "2.12.1-canary.
|
|
24
|
-
"@atlaspack/diagnostic": "2.12.1-canary.
|
|
25
|
-
"@atlaspack/events": "2.12.1-canary.
|
|
26
|
-
"@atlaspack/feature-flags": "2.12.1-canary.
|
|
27
|
-
"@atlaspack/fs": "2.12.1-canary.
|
|
28
|
-
"@atlaspack/graph": "3.2.1-canary.
|
|
29
|
-
"@atlaspack/logger": "2.12.1-canary.
|
|
30
|
-
"@atlaspack/package-manager": "2.12.1-canary.
|
|
31
|
-
"@atlaspack/plugin": "2.12.1-canary.
|
|
32
|
-
"@atlaspack/profiler": "2.12.1-canary.
|
|
33
|
-
"@atlaspack/rust": "2.12.1-canary.
|
|
34
|
-
"@atlaspack/types": "2.12.1-canary.
|
|
35
|
-
"@atlaspack/utils": "2.12.1-canary.
|
|
36
|
-
"@atlaspack/workers": "2.12.1-canary.
|
|
23
|
+
"@atlaspack/cache": "2.12.1-canary.3391+d0b87ba61",
|
|
24
|
+
"@atlaspack/diagnostic": "2.12.1-canary.3391+d0b87ba61",
|
|
25
|
+
"@atlaspack/events": "2.12.1-canary.3391+d0b87ba61",
|
|
26
|
+
"@atlaspack/feature-flags": "2.12.1-canary.3391+d0b87ba61",
|
|
27
|
+
"@atlaspack/fs": "2.12.1-canary.3391+d0b87ba61",
|
|
28
|
+
"@atlaspack/graph": "3.2.1-canary.3391+d0b87ba61",
|
|
29
|
+
"@atlaspack/logger": "2.12.1-canary.3391+d0b87ba61",
|
|
30
|
+
"@atlaspack/package-manager": "2.12.1-canary.3391+d0b87ba61",
|
|
31
|
+
"@atlaspack/plugin": "2.12.1-canary.3391+d0b87ba61",
|
|
32
|
+
"@atlaspack/profiler": "2.12.1-canary.3391+d0b87ba61",
|
|
33
|
+
"@atlaspack/rust": "2.12.1-canary.3391+d0b87ba61",
|
|
34
|
+
"@atlaspack/types": "2.12.1-canary.3391+d0b87ba61",
|
|
35
|
+
"@atlaspack/utils": "2.12.1-canary.3391+d0b87ba61",
|
|
36
|
+
"@atlaspack/workers": "2.12.1-canary.3391+d0b87ba61",
|
|
37
37
|
"@mischnic/json-sourcemap": "^0.1.0",
|
|
38
38
|
"@parcel/source-map": "^2.1.1",
|
|
39
39
|
"base-x": "^3.0.8",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"browser": {
|
|
56
56
|
"./src/serializerCore.js": "./src/serializerCore.browser.js"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "d0b87ba6174d356e7d0f8fbe668e66cde9913db2"
|
|
59
59
|
}
|
|
@@ -10,6 +10,7 @@ import type {AtlaspackV3} from '../atlaspack-v3';
|
|
|
10
10
|
import {toProjectPath} from '../projectPath';
|
|
11
11
|
import {requestTypes, type StaticRunOpts} from '../RequestTracker';
|
|
12
12
|
import {propagateSymbols} from '../SymbolPropagation';
|
|
13
|
+
import type {Environment} from '../types';
|
|
13
14
|
|
|
14
15
|
import type {
|
|
15
16
|
AssetGraphRequestInput,
|
|
@@ -125,6 +126,31 @@ function getAssetGraph(serializedGraph, options) {
|
|
|
125
126
|
let changedAssets = new Map();
|
|
126
127
|
let entry = 0;
|
|
127
128
|
|
|
129
|
+
let envs = new Map();
|
|
130
|
+
let getEnvId = (env: Environment) => {
|
|
131
|
+
let envKey = [
|
|
132
|
+
env.context,
|
|
133
|
+
env.engines.atlaspack,
|
|
134
|
+
env.engines.browsers,
|
|
135
|
+
env.engines.electron,
|
|
136
|
+
env.engines.node,
|
|
137
|
+
env.includeNodeModules,
|
|
138
|
+
env.isLibrary,
|
|
139
|
+
env.outputFormat,
|
|
140
|
+
env.shouldScopeHoist,
|
|
141
|
+
env.shouldOptimize,
|
|
142
|
+
env.sourceType,
|
|
143
|
+
].join(':');
|
|
144
|
+
|
|
145
|
+
let envId = envs.get(envKey);
|
|
146
|
+
if (envId == null) {
|
|
147
|
+
envId = envs.size;
|
|
148
|
+
envs.set(envKey, envId);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return envId;
|
|
152
|
+
};
|
|
153
|
+
|
|
128
154
|
for (let node of serializedGraph.nodes) {
|
|
129
155
|
if (node.type === 'root') {
|
|
130
156
|
let index = graph.addNodeByContentKey('@@root', {
|
|
@@ -152,6 +178,7 @@ function getAssetGraph(serializedGraph, options) {
|
|
|
152
178
|
...asset,
|
|
153
179
|
env: {
|
|
154
180
|
...asset.env,
|
|
181
|
+
id: getEnvId(asset.env),
|
|
155
182
|
sourceType: sourceTypeLookup[asset.env.sourceType],
|
|
156
183
|
},
|
|
157
184
|
bundleBehavior:
|
|
@@ -184,6 +211,7 @@ function getAssetGraph(serializedGraph, options) {
|
|
|
184
211
|
id,
|
|
185
212
|
env: {
|
|
186
213
|
...dependency.env,
|
|
214
|
+
id: getEnvId(dependency.env),
|
|
187
215
|
sourceType: sourceTypeLookup[dependency.env.sourceType],
|
|
188
216
|
},
|
|
189
217
|
bundleBehavior:
|