@atlaspack/core 2.25.2-dev-swc-4fc8a99f4.0 → 2.26.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @atlaspack/core
2
2
 
3
+ ## 2.26.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#827](https://github.com/atlassian-labs/atlaspack/pull/827) [`ff8ac84`](https://github.com/atlassian-labs/atlaspack/commit/ff8ac84bd0be15caa7c7af21bf5b6e47b6d36438) Thanks [@OscarCookeAbbott](https://github.com/OscarCookeAbbott)! - Fix custom environment properties sometimes being ignored
8
+
9
+ ### Patch Changes
10
+
11
+ - [#817](https://github.com/atlassian-labs/atlaspack/pull/817) [`3da8e69`](https://github.com/atlassian-labs/atlaspack/commit/3da8e690605472d81c531366b65fa9844f8ca337) Thanks [@mattcompiles](https://github.com/mattcompiles)! - Fix an issue when creating the BundleGraph and some Dependency.sourceAssetId values have diverged from the actual Asset.id values.
12
+
13
+ Fix behind flag `sourceAssetIdBundleGraphFix`
14
+
15
+ - [#810](https://github.com/atlassian-labs/atlaspack/pull/810) [`c372f3f`](https://github.com/atlassian-labs/atlaspack/commit/c372f3fd6fce8200d5cf47f41bc7895c6cbb5558) Thanks [@benjervis](https://github.com/benjervis)! - Add the `scope-hosting-stats` debug tool to report on the percentage of assets that were able to be scope hoisted during the build.
16
+
17
+ - [#831](https://github.com/atlassian-labs/atlaspack/pull/831) [`27fd73f`](https://github.com/atlassian-labs/atlaspack/commit/27fd73fa07d358653f1be6f2d15d72dc5d8fc2fd) Thanks [@benjervis](https://github.com/benjervis)! - Update some Rust internals to use Arcs instead of passing references. This won't make any difference in the immediate term, but is required setup for the next set of changes
18
+
19
+ - [#834](https://github.com/atlassian-labs/atlaspack/pull/834) [`3091fa3`](https://github.com/atlassian-labs/atlaspack/commit/3091fa36425ecffe3938e55247a035b08cda37a2) Thanks [@benjervis](https://github.com/benjervis)! - We no longer want to use `meta` fields internally in Atlaspack, so they have been removed from the Rust side of the codebase, and are mapped back to the legacy format on the JS side.
20
+
21
+ - Updated dependencies [[`79a7e22`](https://github.com/atlassian-labs/atlaspack/commit/79a7e22ef119891a2f4180a9d3cc66b38dd52092), [`3da8e69`](https://github.com/atlassian-labs/atlaspack/commit/3da8e690605472d81c531366b65fa9844f8ca337), [`c372f3f`](https://github.com/atlassian-labs/atlaspack/commit/c372f3fd6fce8200d5cf47f41bc7895c6cbb5558), [`17dfea9`](https://github.com/atlassian-labs/atlaspack/commit/17dfea9e9f3169807808520df9c09ebf70dc8b10), [`f1070ec`](https://github.com/atlassian-labs/atlaspack/commit/f1070ec48e99b4ec111a03179c5ab5b74163fab1), [`27fd73f`](https://github.com/atlassian-labs/atlaspack/commit/27fd73fa07d358653f1be6f2d15d72dc5d8fc2fd), [`3091fa3`](https://github.com/atlassian-labs/atlaspack/commit/3091fa36425ecffe3938e55247a035b08cda37a2)]:
22
+ - @atlaspack/feature-flags@2.25.5
23
+ - @atlaspack/rust@3.8.3
24
+ - @atlaspack/utils@3.0.3
25
+ - @atlaspack/cache@3.2.30
26
+ - @atlaspack/fs@2.15.30
27
+ - @atlaspack/graph@3.5.24
28
+ - @atlaspack/package-manager@2.14.35
29
+ - @atlaspack/logger@2.14.27
30
+ - @atlaspack/plugin@2.14.35
31
+ - @atlaspack/profiler@2.14.32
32
+ - @atlaspack/types@2.15.25
33
+ - @atlaspack/workers@2.14.35
34
+
3
35
  ## 2.25.1
4
36
 
5
37
  ### Patch Changes
@@ -180,8 +180,7 @@ function getAssetGraph(serializedGraph) {
180
180
  });
181
181
  }
182
182
  else if (node.type === 'dependency') {
183
- let id = node.value.id;
184
- let dependency = node.value.dependency;
183
+ let { dependency, id } = node.value;
185
184
  dependency.id = id;
186
185
  dependency.env.id = (0, feature_flags_1.getFeatureFlag)('environmentDeduplication')
187
186
  ? // TODO: Rust can do this and avoid copying a significant amount of data over
@@ -77,12 +77,13 @@ function assetGraphDiff(jsAssetGraph, rustAssetGraph, projectRoot) {
77
77
  return;
78
78
  if (node.type === 'dependency') {
79
79
  let sourcePath = node.value.sourcePath
80
- ? (0, projectPath_1.toProjectPath)(node.value.sourcePath)
80
+ ? (0, projectPath_1.toProjectPath)(projectRoot, node.value.sourcePath)
81
81
  : (0, projectPath_1.toProjectPath)(projectRoot, 'entry');
82
82
  nodes[`dep:${sourcePath}:${node.value.specifier}`] = filterNode(node);
83
83
  }
84
84
  else if (node.type === 'asset') {
85
- nodes[`asset:${(0, projectPath_1.toProjectPath)(node.value.filePath)}`] = filterNode(node);
85
+ nodes[`asset:${(0, projectPath_1.toProjectPath)(projectRoot, node.value.filePath)}`] =
86
+ filterNode(node);
86
87
  }
87
88
  });
88
89
  return nodes;
@@ -170,8 +170,10 @@ function getAssetGraph(serializedGraph) {
170
170
  value: asset
171
171
  });
172
172
  } else if (node.type === 'dependency') {
173
- let id = node.value.id;
174
- let dependency = node.value.dependency;
173
+ let {
174
+ dependency,
175
+ id
176
+ } = node.value;
175
177
  dependency.id = id;
176
178
  dependency.env.id = (0, _featureFlags().getFeatureFlag)('environmentDeduplication') ?
177
179
  // TODO: Rust can do this and avoid copying a significant amount of data over
@@ -86,10 +86,10 @@ function assetGraphDiff(jsAssetGraph, rustAssetGraph, projectRoot) {
86
86
  let node = graph.getNode(nodeId) ?? null;
87
87
  if (!node) return;
88
88
  if (node.type === 'dependency') {
89
- let sourcePath = node.value.sourcePath ? (0, _projectPath.toProjectPath)(node.value.sourcePath) : (0, _projectPath.toProjectPath)(projectRoot, 'entry');
89
+ let sourcePath = node.value.sourcePath ? (0, _projectPath.toProjectPath)(projectRoot, node.value.sourcePath) : (0, _projectPath.toProjectPath)(projectRoot, 'entry');
90
90
  nodes[`dep:${sourcePath}:${node.value.specifier}`] = filterNode(node);
91
91
  } else if (node.type === 'asset') {
92
- nodes[`asset:${(0, _projectPath.toProjectPath)(node.value.filePath)}`] = filterNode(node);
92
+ nodes[`asset:${(0, _projectPath.toProjectPath)(projectRoot, node.value.filePath)}`] = filterNode(node);
93
93
  }
94
94
  });
95
95
  return nodes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/core",
3
- "version": "2.25.2-dev-swc-4fc8a99f4.0",
3
+ "version": "2.26.0",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -22,22 +22,22 @@
22
22
  "build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
23
23
  },
24
24
  "dependencies": {
25
- "@atlaspack/build-cache": "2.13.7-dev-swc-4fc8a99f4.0",
26
- "@atlaspack/cache": "3.2.30-dev-swc-4fc8a99f4.0",
27
- "@atlaspack/diagnostic": "2.14.5-dev-swc-4fc8a99f4.0",
28
- "@atlaspack/events": "2.14.5-dev-swc-4fc8a99f4.0",
29
- "@atlaspack/feature-flags": "2.25.5-dev-swc-4fc8a99f4.0",
30
- "@atlaspack/fs": "2.15.30-dev-swc-4fc8a99f4.0",
31
- "@atlaspack/graph": "3.5.24-dev-swc-4fc8a99f4.0",
32
- "@atlaspack/logger": "2.14.27-dev-swc-4fc8a99f4.0",
33
- "@atlaspack/package-manager": "2.14.35-dev-swc-4fc8a99f4.0",
34
- "@atlaspack/plugin": "2.14.35-dev-swc-4fc8a99f4.0",
35
- "@atlaspack/profiler": "2.14.32-dev-swc-4fc8a99f4.0",
36
- "@atlaspack/rust": "3.8.3-dev-swc-4fc8a99f4.0",
37
- "@atlaspack/types": "2.15.25-dev-swc-4fc8a99f4.0",
38
- "@atlaspack/utils": "3.0.3-dev-swc-4fc8a99f4.0",
39
- "@atlaspack/workers": "2.14.35-dev-swc-4fc8a99f4.0",
40
25
  "@mischnic/json-sourcemap": "^0.1.0",
26
+ "@atlaspack/build-cache": "2.13.6",
27
+ "@atlaspack/cache": "3.2.30",
28
+ "@atlaspack/diagnostic": "2.14.4",
29
+ "@atlaspack/events": "2.14.4",
30
+ "@atlaspack/feature-flags": "2.25.5",
31
+ "@atlaspack/fs": "2.15.30",
32
+ "@atlaspack/graph": "3.5.24",
33
+ "@atlaspack/logger": "2.14.27",
34
+ "@atlaspack/package-manager": "2.14.35",
35
+ "@atlaspack/plugin": "2.14.35",
36
+ "@atlaspack/profiler": "2.14.32",
37
+ "@atlaspack/rust": "3.8.3",
38
+ "@atlaspack/types": "2.15.25",
39
+ "@atlaspack/utils": "3.0.3",
40
+ "@atlaspack/workers": "2.14.35",
41
41
  "@parcel/source-map": "^2.1.1",
42
42
  "base-x": "^3.0.8",
43
43
  "browserslist": "^4.6.6",
@@ -50,16 +50,15 @@
50
50
  "semver": "^7.5.2"
51
51
  },
52
52
  "devDependencies": {
53
- "@atlaspack/babel-register": "2.14.5-dev-swc-4fc8a99f4.0",
53
+ "@atlaspack/babel-register": "2.14.4",
54
54
  "@types/node": ">= 18",
55
- "graphviz": "^0.0.9",
56
- "jest-diff": "*",
57
55
  "rfdc": "1",
56
+ "jest-diff": "*",
57
+ "graphviz": "^0.0.9",
58
58
  "tempy": "^0.2.1"
59
59
  },
60
60
  "browser": {
61
61
  "./src/serializerCore.js": "./src/serializerCore.browser.js"
62
62
  },
63
- "type": "commonjs",
64
- "gitHead": "4fc8a99f4944cddf9c65ed0cb547cba40a83488c"
63
+ "type": "commonjs"
65
64
  }
@@ -193,8 +193,7 @@ export function getAssetGraph(serializedGraph: any): {
193
193
  value: asset,
194
194
  });
195
195
  } else if (node.type === 'dependency') {
196
- let id = node.value.id;
197
- let dependency = node.value.dependency;
196
+ let {dependency, id} = node.value;
198
197
 
199
198
  dependency.id = id;
200
199
  dependency.env.id = getFeatureFlag('environmentDeduplication')
@@ -4,7 +4,7 @@ import deepClone from 'rfdc/default';
4
4
  import {diff} from 'jest-diff';
5
5
  import AssetGraph from '../AssetGraph';
6
6
  import type {AssetGraphNode} from '../types';
7
- import {fromProjectPathRelative, toProjectPath} from '../projectPath';
7
+ import {toProjectPath} from '../projectPath';
8
8
 
9
9
  function filterNode(node: any) {
10
10
  let clone = deepClone(node);
@@ -86,11 +86,12 @@ function assetGraphDiff(
86
86
 
87
87
  if (node.type === 'dependency') {
88
88
  let sourcePath = node.value.sourcePath
89
- ? toProjectPath(node.value.sourcePath)
89
+ ? toProjectPath(projectRoot, node.value.sourcePath)
90
90
  : toProjectPath(projectRoot, 'entry');
91
91
  nodes[`dep:${sourcePath}:${node.value.specifier}`] = filterNode(node);
92
92
  } else if (node.type === 'asset') {
93
- nodes[`asset:${toProjectPath(node.value.filePath)}`] = filterNode(node);
93
+ nodes[`asset:${toProjectPath(projectRoot, node.value.filePath)}`] =
94
+ filterNode(node);
94
95
  }
95
96
  });
96
97