@atlaspack/core 2.12.1-canary.3439 → 2.12.1-canary.3441
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/Dependency.js +1 -1
- package/lib/assetUtils.js +1 -1
- package/package.json +16 -16
- package/src/Dependency.js +1 -1
- package/src/assetUtils.js +1 -1
- package/test/Dependency.test.js +28 -0
package/lib/Dependency.js
CHANGED
package/lib/assetUtils.js
CHANGED
|
@@ -62,7 +62,7 @@ function _profiler() {
|
|
|
62
62
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
63
63
|
function createAssetIdFromOptions(options) {
|
|
64
64
|
return (0, _rust().createAssetId)({
|
|
65
|
-
|
|
65
|
+
environmentId: options.env.id,
|
|
66
66
|
filePath: options.filePath,
|
|
67
67
|
code: options.code,
|
|
68
68
|
pipeline: options.pipeline,
|
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.3441+d191cc659",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
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.3441+d191cc659",
|
|
24
|
+
"@atlaspack/diagnostic": "2.12.1-canary.3441+d191cc659",
|
|
25
|
+
"@atlaspack/events": "2.12.1-canary.3441+d191cc659",
|
|
26
|
+
"@atlaspack/feature-flags": "2.12.1-canary.3441+d191cc659",
|
|
27
|
+
"@atlaspack/fs": "2.12.1-canary.3441+d191cc659",
|
|
28
|
+
"@atlaspack/graph": "3.2.1-canary.3441+d191cc659",
|
|
29
|
+
"@atlaspack/logger": "2.12.1-canary.3441+d191cc659",
|
|
30
|
+
"@atlaspack/package-manager": "2.12.1-canary.3441+d191cc659",
|
|
31
|
+
"@atlaspack/plugin": "2.12.1-canary.3441+d191cc659",
|
|
32
|
+
"@atlaspack/profiler": "2.12.1-canary.3441+d191cc659",
|
|
33
|
+
"@atlaspack/rust": "2.12.1-canary.3441+d191cc659",
|
|
34
|
+
"@atlaspack/types": "2.12.1-canary.3441+d191cc659",
|
|
35
|
+
"@atlaspack/utils": "2.12.1-canary.3441+d191cc659",
|
|
36
|
+
"@atlaspack/workers": "2.12.1-canary.3441+d191cc659",
|
|
37
37
|
"@mischnic/json-sourcemap": "^0.1.0",
|
|
38
38
|
"@parcel/source-map": "^2.1.1",
|
|
39
39
|
"base-x": "^3.0.8",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"browser": {
|
|
58
58
|
"./src/serializerCore.js": "./src/serializerCore.browser.js"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "d191cc659802642a7b62cbde92aa8bd08d028600"
|
|
61
61
|
}
|
package/src/Dependency.js
CHANGED
package/src/assetUtils.js
CHANGED
|
@@ -70,7 +70,7 @@ export type AssetOptions = {|
|
|
|
70
70
|
|
|
71
71
|
export function createAssetIdFromOptions(options: AssetOptions): string {
|
|
72
72
|
return createAssetIdRust({
|
|
73
|
-
|
|
73
|
+
environmentId: options.env.id,
|
|
74
74
|
filePath: options.filePath,
|
|
75
75
|
code: options.code,
|
|
76
76
|
pipeline: options.pipeline,
|
package/test/Dependency.test.js
CHANGED
|
@@ -17,5 +17,33 @@ describe('Dependency', () => {
|
|
|
17
17
|
});
|
|
18
18
|
expect(id1).toEqual(id2);
|
|
19
19
|
});
|
|
20
|
+
|
|
21
|
+
it('dependencies with different targets should have different IDs', () => {
|
|
22
|
+
let id1 = createDependencyId({
|
|
23
|
+
specifier: 'foo',
|
|
24
|
+
env: createEnvironment(),
|
|
25
|
+
specifierType: 'esm',
|
|
26
|
+
target: {
|
|
27
|
+
name: 'test-1234',
|
|
28
|
+
distDir: 'dist-dir',
|
|
29
|
+
env: createEnvironment(),
|
|
30
|
+
publicUrl: 'public-url',
|
|
31
|
+
source: '1234',
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
let id2 = createDependencyId({
|
|
35
|
+
specifier: 'foo',
|
|
36
|
+
env: createEnvironment(),
|
|
37
|
+
specifierType: 'esm',
|
|
38
|
+
target: {
|
|
39
|
+
name: 'test-1234',
|
|
40
|
+
distDir: 'dist-dir',
|
|
41
|
+
env: createEnvironment(),
|
|
42
|
+
publicUrl: 'public-url',
|
|
43
|
+
source: '5678', // <- this is different
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
expect(id1).not.toEqual(id2);
|
|
47
|
+
});
|
|
20
48
|
});
|
|
21
49
|
});
|