@atlaspack/core 2.19.3-typescript-5b4d3ad41.0 → 2.19.3-typescript-bc4459c37.0
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -14,11 +14,11 @@ function _jestDiff() {
|
|
|
14
14
|
};
|
|
15
15
|
return data;
|
|
16
16
|
}
|
|
17
|
-
var _AssetGraph = _interopRequireDefault(require("../AssetGraph"));
|
|
18
17
|
var _projectPath = require("../projectPath");
|
|
19
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
-
/* eslint-disable no-console */
|
|
21
|
-
//
|
|
19
|
+
/* eslint-disable no-console */
|
|
20
|
+
// @ts-expect-error missing types
|
|
21
|
+
|
|
22
22
|
function filterNode(node) {
|
|
23
23
|
let clone = (0, _default().default)(node);
|
|
24
24
|
|
|
@@ -43,6 +43,8 @@ function filterNode(node) {
|
|
|
43
43
|
delete clone.value.dependencies;
|
|
44
44
|
return clone;
|
|
45
45
|
}
|
|
46
|
+
|
|
47
|
+
// @ts-expect-error missing return type
|
|
46
48
|
function compactDeep(obj, ignoredPatterns = [], currentPath = '$') {
|
|
47
49
|
if (obj instanceof Map) {
|
|
48
50
|
const copy = {};
|
|
@@ -53,6 +55,7 @@ function compactDeep(obj, ignoredPatterns = [], currentPath = '$') {
|
|
|
53
55
|
});
|
|
54
56
|
return copy;
|
|
55
57
|
} else if (Array.isArray(obj)) {
|
|
58
|
+
// @ts-expect-error implicit any
|
|
56
59
|
return obj.map(v => compactDeep(v, ignoredPatterns, `${currentPath}[]`));
|
|
57
60
|
} else if (typeof obj === 'object') {
|
|
58
61
|
const copy = {};
|
|
@@ -77,6 +80,8 @@ function compactDeep(obj, ignoredPatterns = [], currentPath = '$') {
|
|
|
77
80
|
function assetGraphDiff(jsAssetGraph, rustAssetGraph) {
|
|
78
81
|
const getNodes = graph => {
|
|
79
82
|
let nodes = {};
|
|
83
|
+
|
|
84
|
+
// @ts-expect-error implicit any
|
|
80
85
|
graph.traverse(nodeId => {
|
|
81
86
|
let node = graph.getNode(nodeId) ?? null;
|
|
82
87
|
if (!node) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/core",
|
|
3
|
-
"version": "2.19.3-typescript-
|
|
3
|
+
"version": "2.19.3-typescript-bc4459c37.0",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -22,21 +22,21 @@
|
|
|
22
22
|
"check-ts": "tsc --emitDeclarationOnly --rootDir src"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@atlaspack/build-cache": "2.13.4-typescript-
|
|
26
|
-
"@atlaspack/cache": "3.2.16-typescript-
|
|
27
|
-
"@atlaspack/diagnostic": "2.14.2-typescript-
|
|
28
|
-
"@atlaspack/events": "2.14.2-typescript-
|
|
29
|
-
"@atlaspack/feature-flags": "2.19.3-typescript-
|
|
30
|
-
"@atlaspack/fs": "2.15.16-typescript-
|
|
31
|
-
"@atlaspack/graph": "3.5.10-typescript-
|
|
32
|
-
"@atlaspack/logger": "2.14.14-typescript-
|
|
33
|
-
"@atlaspack/package-manager": "2.14.21-typescript-
|
|
34
|
-
"@atlaspack/plugin": "2.14.21-typescript-
|
|
35
|
-
"@atlaspack/profiler": "2.14.18-typescript-
|
|
36
|
-
"@atlaspack/rust": "3.4.2-typescript-
|
|
37
|
-
"@atlaspack/types": "2.15.11-typescript-
|
|
38
|
-
"@atlaspack/utils": "2.17.3-typescript-
|
|
39
|
-
"@atlaspack/workers": "2.14.21-typescript-
|
|
25
|
+
"@atlaspack/build-cache": "2.13.4-typescript-bc4459c37.0",
|
|
26
|
+
"@atlaspack/cache": "3.2.16-typescript-bc4459c37.0",
|
|
27
|
+
"@atlaspack/diagnostic": "2.14.2-typescript-bc4459c37.0",
|
|
28
|
+
"@atlaspack/events": "2.14.2-typescript-bc4459c37.0",
|
|
29
|
+
"@atlaspack/feature-flags": "2.19.3-typescript-bc4459c37.0",
|
|
30
|
+
"@atlaspack/fs": "2.15.16-typescript-bc4459c37.0",
|
|
31
|
+
"@atlaspack/graph": "3.5.10-typescript-bc4459c37.0",
|
|
32
|
+
"@atlaspack/logger": "2.14.14-typescript-bc4459c37.0",
|
|
33
|
+
"@atlaspack/package-manager": "2.14.21-typescript-bc4459c37.0",
|
|
34
|
+
"@atlaspack/plugin": "2.14.21-typescript-bc4459c37.0",
|
|
35
|
+
"@atlaspack/profiler": "2.14.18-typescript-bc4459c37.0",
|
|
36
|
+
"@atlaspack/rust": "3.4.2-typescript-bc4459c37.0",
|
|
37
|
+
"@atlaspack/types": "2.15.11-typescript-bc4459c37.0",
|
|
38
|
+
"@atlaspack/utils": "2.17.3-typescript-bc4459c37.0",
|
|
39
|
+
"@atlaspack/workers": "2.14.21-typescript-bc4459c37.0",
|
|
40
40
|
"@mischnic/json-sourcemap": "^0.1.0",
|
|
41
41
|
"@parcel/source-map": "^2.1.1",
|
|
42
42
|
"base-x": "^3.0.8",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"semver": "^7.5.2"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@atlaspack/babel-register": "2.14.2-typescript-
|
|
53
|
+
"@atlaspack/babel-register": "2.14.2-typescript-bc4459c37.0",
|
|
54
54
|
"@types/node": ">= 18",
|
|
55
55
|
"graphviz": "^0.0.9",
|
|
56
56
|
"jest-diff": "*",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"./src/serializerCore.js": "./src/serializerCore.browser.js"
|
|
62
62
|
},
|
|
63
63
|
"type": "commonjs",
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "bc4459c37a38ef1f74772126637e1d8841d1fcb0"
|
|
65
65
|
}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
|
-
// @
|
|
3
|
-
|
|
4
|
-
// $FlowFixMe
|
|
2
|
+
// @ts-expect-error missing types
|
|
5
3
|
import deepClone from 'rfdc/default';
|
|
6
|
-
// $FlowFixMe
|
|
7
4
|
import {diff} from 'jest-diff';
|
|
8
5
|
import AssetGraph from '../AssetGraph';
|
|
9
6
|
import type {AssetGraphNode} from '../types';
|
|
10
7
|
import {fromProjectPathRelative, toProjectPath} from '../projectPath';
|
|
11
8
|
|
|
12
|
-
function filterNode(node) {
|
|
9
|
+
function filterNode(node: any) {
|
|
13
10
|
let clone = deepClone(node);
|
|
14
11
|
|
|
15
12
|
// Clean up anything you don't want to see in the diff
|
|
@@ -35,24 +32,26 @@ function filterNode(node) {
|
|
|
35
32
|
return clone;
|
|
36
33
|
}
|
|
37
34
|
|
|
35
|
+
// @ts-expect-error missing return type
|
|
38
36
|
function compactDeep(
|
|
39
|
-
obj:
|
|
37
|
+
obj: unknown,
|
|
40
38
|
ignoredPatterns: Array<string> = [],
|
|
41
39
|
currentPath: string = '$',
|
|
42
40
|
) {
|
|
43
41
|
if (obj instanceof Map) {
|
|
44
|
-
const copy = {};
|
|
45
|
-
Array.from(obj.entries()).forEach(([k, v]) => {
|
|
42
|
+
const copy: Record<string, any> = {};
|
|
43
|
+
Array.from(obj.entries()).forEach(([k, v]: [any, any]) => {
|
|
46
44
|
if (v != null) {
|
|
47
45
|
copy[k] = compactDeep(v, ignoredPatterns, `${currentPath}.${k}`);
|
|
48
46
|
}
|
|
49
47
|
});
|
|
50
48
|
return copy;
|
|
51
49
|
} else if (Array.isArray(obj)) {
|
|
50
|
+
// @ts-expect-error implicit any
|
|
52
51
|
return obj.map((v) => compactDeep(v, ignoredPatterns, `${currentPath}[]`));
|
|
53
52
|
} else if (typeof obj === 'object') {
|
|
54
|
-
const copy = {};
|
|
55
|
-
Object.entries(obj ?? {}).forEach(([key, value]) => {
|
|
53
|
+
const copy: Record<string, any> = {};
|
|
54
|
+
Object.entries(obj ?? {}).forEach(([key, value]: [any, any]) => {
|
|
56
55
|
const path = `${currentPath}.${key}`;
|
|
57
56
|
if (ignoredPatterns.some((pattern) => path.includes(pattern))) {
|
|
58
57
|
return;
|
|
@@ -73,9 +72,10 @@ function compactDeep(
|
|
|
73
72
|
}
|
|
74
73
|
|
|
75
74
|
function assetGraphDiff(jsAssetGraph: AssetGraph, rustAssetGraph: AssetGraph) {
|
|
76
|
-
const getNodes = (graph) => {
|
|
77
|
-
let nodes = {};
|
|
75
|
+
const getNodes = (graph: any) => {
|
|
76
|
+
let nodes: Record<string, any> = {};
|
|
78
77
|
|
|
78
|
+
// @ts-expect-error implicit any
|
|
79
79
|
graph.traverse((nodeId) => {
|
|
80
80
|
let node: AssetGraphNode | null = graph.getNode(nodeId) ?? null;
|
|
81
81
|
if (!node) return;
|
|
@@ -98,8 +98,8 @@ function assetGraphDiff(jsAssetGraph: AssetGraph, rustAssetGraph: AssetGraph) {
|
|
|
98
98
|
const rustNodes = getNodes(rustAssetGraph);
|
|
99
99
|
|
|
100
100
|
const all = new Set([...Object.keys(jsNodes), ...Object.keys(rustNodes)]);
|
|
101
|
-
const missing = [];
|
|
102
|
-
const extra = [];
|
|
101
|
+
const missing: Array<any | string> = [];
|
|
102
|
+
const extra: Array<any | string> = [];
|
|
103
103
|
|
|
104
104
|
for (const key of all.keys()) {
|
|
105
105
|
if (process.env.NATIVE_COMPARE !== 'true') {
|
|
File without changes
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// // @flow
|
|
2
|
-
// 'use strict';
|
|
3
|
-
|
|
4
|
-
// const PackagerRunner = require('../src/PackagerRunner');
|
|
5
|
-
// const assert = require('assert');
|
|
6
|
-
// const path = require('path');
|
|
7
|
-
|
|
8
|
-
// const config = require('@atlaspack/config-default');
|
|
9
|
-
|
|
10
|
-
// describe('PackagerRunner', () => {
|
|
11
|
-
// it('works', async () => {
|
|
12
|
-
// let bundle = {
|
|
13
|
-
// destPath: path.join(__dirname, 'dist', 'bundle.js'),
|
|
14
|
-
// assets: [
|
|
15
|
-
// {blobs: {code: require.resolve('./fixtures/module-a')}},
|
|
16
|
-
// {blobs: {code: require.resolve('./fixtures/module-b')}},
|
|
17
|
-
// ],
|
|
18
|
-
// };
|
|
19
|
-
|
|
20
|
-
// let packagerRunner = new PackagerRunner({
|
|
21
|
-
// atlaspackConfig: config,
|
|
22
|
-
// options: {}
|
|
23
|
-
// });
|
|
24
|
-
|
|
25
|
-
// await packagerRunner.runPackager({ bundle });
|
|
26
|
-
// });
|
|
27
|
-
// });
|