@atlaspack/core 2.12.1-canary.3577 → 2.12.1-canary.3579
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/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.3579+6a2f4e49b",
|
|
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.3579+6a2f4e49b",
|
|
24
|
+
"@atlaspack/cache": "2.12.1-canary.3579+6a2f4e49b",
|
|
25
|
+
"@atlaspack/diagnostic": "2.12.1-canary.3579+6a2f4e49b",
|
|
26
|
+
"@atlaspack/events": "2.12.1-canary.3579+6a2f4e49b",
|
|
27
|
+
"@atlaspack/feature-flags": "2.12.1-canary.3579+6a2f4e49b",
|
|
28
|
+
"@atlaspack/fs": "2.12.1-canary.3579+6a2f4e49b",
|
|
29
|
+
"@atlaspack/graph": "3.2.1-canary.3579+6a2f4e49b",
|
|
30
|
+
"@atlaspack/logger": "2.12.1-canary.3579+6a2f4e49b",
|
|
31
|
+
"@atlaspack/package-manager": "2.12.1-canary.3579+6a2f4e49b",
|
|
32
|
+
"@atlaspack/plugin": "2.12.1-canary.3579+6a2f4e49b",
|
|
33
|
+
"@atlaspack/profiler": "2.12.1-canary.3579+6a2f4e49b",
|
|
34
|
+
"@atlaspack/rust": "2.12.1-canary.3579+6a2f4e49b",
|
|
35
|
+
"@atlaspack/types": "2.12.1-canary.3579+6a2f4e49b",
|
|
36
|
+
"@atlaspack/utils": "2.12.1-canary.3579+6a2f4e49b",
|
|
37
|
+
"@atlaspack/workers": "2.12.1-canary.3579+6a2f4e49b",
|
|
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": "6a2f4e49b3923e9345b5169538229cd743c798a9"
|
|
70
70
|
}
|
package/src/Dependency.js
CHANGED
|
@@ -57,15 +57,15 @@ export function createDependencyId({
|
|
|
57
57
|
priority,
|
|
58
58
|
packageConditions,
|
|
59
59
|
}: {|
|
|
60
|
-
sourceAssetId
|
|
60
|
+
sourceAssetId?: string | void,
|
|
61
61
|
specifier: DependencySpecifier,
|
|
62
62
|
env: Environment,
|
|
63
|
-
target
|
|
64
|
-
pipeline
|
|
63
|
+
target?: Target | void,
|
|
64
|
+
pipeline?: ?string,
|
|
65
65
|
specifierType: $Keys<typeof SpecifierType>,
|
|
66
|
-
bundleBehavior
|
|
67
|
-
priority
|
|
68
|
-
packageConditions
|
|
66
|
+
bundleBehavior?: ?IBundleBehavior,
|
|
67
|
+
priority?: $Keys<typeof Priority> | void,
|
|
68
|
+
packageConditions?: Array<string> | void,
|
|
69
69
|
|}): string {
|
|
70
70
|
assert(typeof specifierType === 'string');
|
|
71
71
|
assert(typeof priority === 'string' || priority == null);
|
package/test/Dependency.test.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
// @flow
|
|
1
2
|
import expect from 'expect';
|
|
2
3
|
import {createDependencyId} from '../src/Dependency';
|
|
3
4
|
import {createEnvironment} from '../src/Environment';
|
|
5
|
+
import type {ProjectPath} from '../src/projectPath';
|
|
4
6
|
|
|
5
7
|
describe('Dependency', () => {
|
|
6
8
|
describe('createDependencyId', () => {
|
|
@@ -25,7 +27,7 @@ describe('Dependency', () => {
|
|
|
25
27
|
specifierType: 'esm',
|
|
26
28
|
target: {
|
|
27
29
|
name: 'test-1234',
|
|
28
|
-
distDir: 'dist-dir',
|
|
30
|
+
distDir: (('dist-dir': any): ProjectPath),
|
|
29
31
|
env: createEnvironment(),
|
|
30
32
|
publicUrl: 'public-url',
|
|
31
33
|
source: '1234',
|
|
@@ -37,7 +39,7 @@ describe('Dependency', () => {
|
|
|
37
39
|
specifierType: 'esm',
|
|
38
40
|
target: {
|
|
39
41
|
name: 'test-1234',
|
|
40
|
-
distDir: 'dist-dir',
|
|
42
|
+
distDir: (('dist-dir': any): ProjectPath),
|
|
41
43
|
env: createEnvironment(),
|
|
42
44
|
publicUrl: 'public-url',
|
|
43
45
|
source: '5678', // <- this is different
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @flow
|
|
1
2
|
import assert from 'assert';
|
|
2
3
|
import {getAssetGraph} from '../../src/requests/AssetGraphRequestRust';
|
|
3
4
|
|
|
@@ -8,8 +9,8 @@ describe('AssetGraphRequestRust -> getAssetGraph', function () {
|
|
|
8
9
|
const indexAsset = assetGraph.getNodeByContentKey('79c128d4f549c408');
|
|
9
10
|
const libraryDep = assetGraph.getNodeByContentKey('cfe74f65a41af1a7');
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
if (indexAsset?.type !== 'asset') return assert(false);
|
|
13
|
+
if (libraryDep?.type !== 'dependency') return assert(false);
|
|
13
14
|
|
|
14
15
|
assert.equal(indexAsset.value.filePath, '/index.ts');
|
|
15
16
|
assert.equal(libraryDep.value.specifier, './library');
|