@atlaspack/core 2.12.1-canary.3479 → 2.12.1-canary.3481
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.
|
@@ -18,7 +18,15 @@ function _diagnostic() {
|
|
|
18
18
|
};
|
|
19
19
|
return data;
|
|
20
20
|
}
|
|
21
|
+
function _rust() {
|
|
22
|
+
const data = require("@atlaspack/rust");
|
|
23
|
+
_rust = function () {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
21
28
|
var _AssetGraph = _interopRequireWildcard(require("../AssetGraph"));
|
|
29
|
+
var _constants = require("../constants");
|
|
22
30
|
var _projectPath = require("../projectPath");
|
|
23
31
|
var _RequestTracker = require("../RequestTracker");
|
|
24
32
|
var _SymbolPropagation = require("../SymbolPropagation");
|
|
@@ -163,6 +171,12 @@ function getAssetGraph(serializedGraph, options) {
|
|
|
163
171
|
filePath: (0, _projectPath.toProjectPath)(options.projectRoot, asset.filePath),
|
|
164
172
|
symbols: asset.symbols != null ? new Map(asset.symbols.map(mapSymbols)) : null
|
|
165
173
|
};
|
|
174
|
+
if (asset.map) {
|
|
175
|
+
let mapKey = (0, _rust().hashString)(`${_constants.ATLASPACK_VERSION}:map:${asset.id}`);
|
|
176
|
+
asset.mapKey = mapKey;
|
|
177
|
+
options.cache.setBlob(mapKey, asset.map);
|
|
178
|
+
delete asset.map;
|
|
179
|
+
}
|
|
166
180
|
cachedAssets.set(id, asset.code);
|
|
167
181
|
changedAssets.set(id, asset);
|
|
168
182
|
graph.addNodeByContentKey(id, {
|
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.3481+5a0bcfea2",
|
|
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.3481+5a0bcfea2",
|
|
24
|
+
"@atlaspack/cache": "2.12.1-canary.3481+5a0bcfea2",
|
|
25
|
+
"@atlaspack/diagnostic": "2.12.1-canary.3481+5a0bcfea2",
|
|
26
|
+
"@atlaspack/events": "2.12.1-canary.3481+5a0bcfea2",
|
|
27
|
+
"@atlaspack/feature-flags": "2.12.1-canary.3481+5a0bcfea2",
|
|
28
|
+
"@atlaspack/fs": "2.12.1-canary.3481+5a0bcfea2",
|
|
29
|
+
"@atlaspack/graph": "3.2.1-canary.3481+5a0bcfea2",
|
|
30
|
+
"@atlaspack/logger": "2.12.1-canary.3481+5a0bcfea2",
|
|
31
|
+
"@atlaspack/package-manager": "2.12.1-canary.3481+5a0bcfea2",
|
|
32
|
+
"@atlaspack/plugin": "2.12.1-canary.3481+5a0bcfea2",
|
|
33
|
+
"@atlaspack/profiler": "2.12.1-canary.3481+5a0bcfea2",
|
|
34
|
+
"@atlaspack/rust": "2.12.1-canary.3481+5a0bcfea2",
|
|
35
|
+
"@atlaspack/types": "2.12.1-canary.3481+5a0bcfea2",
|
|
36
|
+
"@atlaspack/utils": "2.12.1-canary.3481+5a0bcfea2",
|
|
37
|
+
"@atlaspack/workers": "2.12.1-canary.3481+5a0bcfea2",
|
|
38
38
|
"@mischnic/json-sourcemap": "^0.1.0",
|
|
39
39
|
"@parcel/source-map": "^2.1.1",
|
|
40
40
|
"base-x": "^3.0.8",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"browser": {
|
|
66
66
|
"./src/serializerCore.js": "./src/serializerCore.browser.js"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "5a0bcfea2abb18275b7fe8331814f60a086d73fd"
|
|
69
69
|
}
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
import invariant from 'assert';
|
|
4
4
|
|
|
5
5
|
import ThrowableDiagnostic from '@atlaspack/diagnostic';
|
|
6
|
+
import {hashString} from '@atlaspack/rust';
|
|
6
7
|
import type {Async} from '@atlaspack/types';
|
|
7
8
|
|
|
8
9
|
import AssetGraph, {nodeFromAssetGroup} from '../AssetGraph';
|
|
9
10
|
import type {AtlaspackV3} from '../atlaspack-v3';
|
|
11
|
+
import {ATLASPACK_VERSION} from '../constants';
|
|
10
12
|
import {toProjectPath} from '../projectPath';
|
|
11
13
|
import {requestTypes, type StaticRunOpts} from '../RequestTracker';
|
|
12
14
|
import {propagateSymbols} from '../SymbolPropagation';
|
|
@@ -200,6 +202,14 @@ function getAssetGraph(serializedGraph, options) {
|
|
|
200
202
|
asset.symbols != null ? new Map(asset.symbols.map(mapSymbols)) : null,
|
|
201
203
|
};
|
|
202
204
|
|
|
205
|
+
if (asset.map) {
|
|
206
|
+
let mapKey = hashString(`${ATLASPACK_VERSION}:map:${asset.id}`);
|
|
207
|
+
|
|
208
|
+
asset.mapKey = mapKey;
|
|
209
|
+
options.cache.setBlob(mapKey, asset.map);
|
|
210
|
+
delete asset.map;
|
|
211
|
+
}
|
|
212
|
+
|
|
203
213
|
cachedAssets.set(id, asset.code);
|
|
204
214
|
changedAssets.set(id, asset);
|
|
205
215
|
|