@atlaspack/core 2.28.0 → 2.29.1

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,57 @@
1
1
  # @atlaspack/core
2
2
 
3
+ ## 2.29.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#911](https://github.com/atlassian-labs/atlaspack/pull/911) [`d98c992`](https://github.com/atlassian-labs/atlaspack/commit/d98c992a56121a4f9f6a011ced5e103f96fe3999) Thanks [@mattcompiles](https://github.com/mattcompiles)! - Fix dist dir when using V3 in dev mode
8
+
9
+ - Updated dependencies [[`96f1d7f`](https://github.com/atlassian-labs/atlaspack/commit/96f1d7f3efef12ce4f5966e34d00b299fcefb4dd), [`f6fc5e2`](https://github.com/atlassian-labs/atlaspack/commit/f6fc5e2acc30720f9a9676dfbc02bf780066653b), [`91738fd`](https://github.com/atlassian-labs/atlaspack/commit/91738fd77cb6b3b7acc93e799327ec283d27f7c0), [`38f3569`](https://github.com/atlassian-labs/atlaspack/commit/38f3569a7024357c43274666312bc6d024bfe5f9), [`3f6a3b8`](https://github.com/atlassian-labs/atlaspack/commit/3f6a3b8df4589fd4d65c072281c7f33bd37341d6), [`96f1d7f`](https://github.com/atlassian-labs/atlaspack/commit/96f1d7f3efef12ce4f5966e34d00b299fcefb4dd), [`d8024ce`](https://github.com/atlassian-labs/atlaspack/commit/d8024ce5c9ced1a9bc39144c979138be3a12b2fb), [`308e7ff`](https://github.com/atlassian-labs/atlaspack/commit/308e7ff979c05c1ae97fe6b08a65666b53d86cc7), [`d98c992`](https://github.com/atlassian-labs/atlaspack/commit/d98c992a56121a4f9f6a011ced5e103f96fe3999)]:
10
+ - @atlaspack/rust@3.13.0
11
+ - @atlaspack/source-map@3.1.2
12
+ - @atlaspack/feature-flags@2.27.2
13
+ - @atlaspack/cache@3.2.36
14
+ - @atlaspack/fs@2.15.36
15
+ - @atlaspack/logger@2.14.33
16
+ - @atlaspack/utils@3.2.2
17
+ - @atlaspack/graph@3.6.3
18
+ - @atlaspack/package-manager@2.14.41
19
+ - @atlaspack/profiler@2.15.2
20
+ - @atlaspack/workers@2.14.41
21
+ - @atlaspack/plugin@2.14.41
22
+ - @atlaspack/types@2.15.31
23
+
24
+ ## 2.29.0
25
+
26
+ ### Minor Changes
27
+
28
+ - [#898](https://github.com/atlassian-labs/atlaspack/pull/898) [`a884bd2`](https://github.com/atlassian-labs/atlaspack/commit/a884bd2a6bd6f37d088fb886dd9b88e85328501b) Thanks [@mattcompiles](https://github.com/mattcompiles)! - Add `unstable_alias` feature to .parcelrc V3 builds for configuring build specific aliases
29
+
30
+ ### Patch Changes
31
+
32
+ - [#899](https://github.com/atlassian-labs/atlaspack/pull/899) [`5710532`](https://github.com/atlassian-labs/atlaspack/commit/57105322b26ce42af2cbfcc0506cff929e50b630) Thanks [@mattcompiles](https://github.com/mattcompiles)! - Fix v3 environment ids not being consistent with v2
33
+
34
+ - [#901](https://github.com/atlassian-labs/atlaspack/pull/901) [`6fac01d`](https://github.com/atlassian-labs/atlaspack/commit/6fac01dbb1bfc5b971176c1a1c008297bf4b8f91) Thanks [@benjervis](https://github.com/benjervis)! - Makes the serialization and LMDB write steps into separate Promises, so that we can return them separately and parallelise some work.
35
+
36
+ - [#905](https://github.com/atlassian-labs/atlaspack/pull/905) [`432d571`](https://github.com/atlassian-labs/atlaspack/commit/432d571ea4e9fc67be12304fcafe8c445e844174) Thanks [@mattcompiles](https://github.com/mattcompiles)! - Decrease max V3 JS workers to 4
37
+
38
+ - [#899](https://github.com/atlassian-labs/atlaspack/pull/899) [`5710532`](https://github.com/atlassian-labs/atlaspack/commit/57105322b26ce42af2cbfcc0506cff929e50b630) Thanks [@mattcompiles](https://github.com/mattcompiles)! - Add HMR and react-refresh support to v3
39
+
40
+ - Updated dependencies [[`a884bd2`](https://github.com/atlassian-labs/atlaspack/commit/a884bd2a6bd6f37d088fb886dd9b88e85328501b), [`25fee72`](https://github.com/atlassian-labs/atlaspack/commit/25fee723d2228d0482ec8a8f1b8379ccd2977ce7), [`6fac01d`](https://github.com/atlassian-labs/atlaspack/commit/6fac01dbb1bfc5b971176c1a1c008297bf4b8f91), [`2f3af93`](https://github.com/atlassian-labs/atlaspack/commit/2f3af9374bcc082e6f4835f6f5a2b98e32ea45b4), [`432d571`](https://github.com/atlassian-labs/atlaspack/commit/432d571ea4e9fc67be12304fcafe8c445e844174), [`042cd95`](https://github.com/atlassian-labs/atlaspack/commit/042cd95a32ad38cd02d57aa3344c36d4e7ab8f9c), [`28f5424`](https://github.com/atlassian-labs/atlaspack/commit/28f5424f7e2080dd4fbbeb1bc5314a530197a23e), [`a884bd2`](https://github.com/atlassian-labs/atlaspack/commit/a884bd2a6bd6f37d088fb886dd9b88e85328501b), [`5710532`](https://github.com/atlassian-labs/atlaspack/commit/57105322b26ce42af2cbfcc0506cff929e50b630), [`44eb8c3`](https://github.com/atlassian-labs/atlaspack/commit/44eb8c388d3e63f1ef5d835aee7aee5d1bb0620f)]:
41
+ - @atlaspack/rust@3.12.0
42
+ - @atlaspack/feature-flags@2.27.1
43
+ - @atlaspack/cache@3.2.35
44
+ - @atlaspack/fs@2.15.35
45
+ - @atlaspack/logger@2.14.32
46
+ - @atlaspack/source-map@3.1.1
47
+ - @atlaspack/utils@3.2.1
48
+ - @atlaspack/graph@3.6.2
49
+ - @atlaspack/package-manager@2.14.40
50
+ - @atlaspack/profiler@2.15.1
51
+ - @atlaspack/workers@2.14.40
52
+ - @atlaspack/plugin@2.14.40
53
+ - @atlaspack/types@2.15.30
54
+
3
55
  ## 2.28.0
4
56
 
5
57
  ### Minor Changes
package/dist/Atlaspack.js CHANGED
@@ -186,6 +186,7 @@ class Atlaspack {
186
186
  env: resolvedOptions.env,
187
187
  fs: inputFS && new atlaspack_v3_1.FileSystemV3(inputFS),
188
188
  defaultTargetOptions: resolvedOptions.defaultTargetOptions,
189
+ serveOptions: resolvedOptions.serveOptions,
189
190
  lmdb,
190
191
  featureFlags: resolvedOptions.featureFlags,
191
192
  });
@@ -97,6 +97,15 @@ exports.default = {
97
97
  compressors: mapPipelineSchema('compressor', 'compressors'),
98
98
  reporters: pipelineSchema('reporter', 'reporters'),
99
99
  runtimes: pipelineSchema('runtime', 'runtimes'),
100
+ // This isn't currently supported in V2, however we need to allow it to
101
+ // parse as even V3 builds need the AtlaspackConfigRequest
102
+ unstable_alias: {
103
+ type: 'object',
104
+ properties: {},
105
+ additionalProperties: {
106
+ type: 'string',
107
+ },
108
+ },
100
109
  filePath: {
101
110
  type: 'string',
102
111
  },
@@ -48,15 +48,8 @@ class AtlaspackV3 {
48
48
  this._napiWorkerPool.shutdown();
49
49
  }
50
50
  }
51
- async buildAssetGraph() {
52
- // @ts-expect-error TS2488
53
- let [graph, error] = await (0, rust_1.atlaspackNapiBuildAssetGraph)(this._atlaspack_napi);
54
- if (error !== null) {
55
- throw new diagnostic_1.default({
56
- diagnostic: error,
57
- });
58
- }
59
- return graph;
51
+ buildAssetGraph() {
52
+ return (0, rust_1.atlaspackNapiBuildAssetGraph)(this._atlaspack_napi);
60
53
  }
61
54
  async respondToFsEvents(events) {
62
55
  // @ts-expect-error TS2488
@@ -29,7 +29,11 @@ class NapiWorkerPool {
29
29
  _NapiWorkerPool_napiWorkers.set(this, void 0);
30
30
  _NapiWorkerPool_workerCount.set(this, void 0);
31
31
  // @ts-expect-error TS2322
32
- __classPrivateFieldSet(this, _NapiWorkerPool_workerCount, workerCount ?? ATLASPACK_NAPI_WORKERS ?? (0, rust_1.getAvailableThreads)(), "f");
32
+ __classPrivateFieldSet(this, _NapiWorkerPool_workerCount, workerCount ??
33
+ ATLASPACK_NAPI_WORKERS ??
34
+ // Default to a maximum of 4 workers as performance worsens beyond that
35
+ // point in most cases
36
+ Math.min((0, rust_1.getAvailableThreads)(), 4), "f");
33
37
  if (!__classPrivateFieldGet(this, _NapiWorkerPool_workerCount, "f")) {
34
38
  // TODO use main thread if workerCount is 0
35
39
  }
@@ -22,11 +22,13 @@ function createAssetGraphRequestRust(rustAtlaspack) {
22
22
  id: input.name,
23
23
  run: async (input) => {
24
24
  let options = input.options;
25
- let serializedAssetGraph = (await rustAtlaspack.buildAssetGraph());
26
- // Newly created nodes
27
- serializedAssetGraph.nodes = serializedAssetGraph.nodes.map((node) => JSON.parse(node));
28
- // Updated existing nodes
29
- serializedAssetGraph.updates = serializedAssetGraph.updates.map((node) => JSON.parse(node));
25
+ let { assetGraphPromise, commitPromise } = await rustAtlaspack.buildAssetGraph();
26
+ let [serializedAssetGraph, assetGraphError] = (await assetGraphPromise);
27
+ if (assetGraphError) {
28
+ throw new diagnostic_1.default({
29
+ diagnostic: assetGraphError,
30
+ });
31
+ }
30
32
  // Don't reuse a previous asset graph result if Rust didn't have one too
31
33
  let prevResult = null;
32
34
  if (serializedAssetGraph.hadPreviousGraph) {
@@ -58,6 +60,14 @@ function createAssetGraphRequestRust(rustAtlaspack) {
58
60
  changedAssetsPropagation,
59
61
  previousSymbolPropagationErrors: undefined,
60
62
  };
63
+ let [_commitResult, commitError] = await commitPromise;
64
+ if (commitError) {
65
+ throw new diagnostic_1.default({
66
+ diagnostic: {
67
+ message: 'Error committing asset graph in Rust: ' + commitError.message,
68
+ },
69
+ });
70
+ }
61
71
  await input.api.storeResult(result);
62
72
  input.api.invalidateOnBuild();
63
73
  return result;
@@ -146,7 +156,7 @@ function getAssetGraph(serializedGraph, prevAssetGraph) {
146
156
  ].join(':');
147
157
  let envId = envs.get(envKey);
148
158
  if (envId == null) {
149
- envId = envs.size.toString();
159
+ envId = (0, Environment_1.getEnvironmentHash)(env);
150
160
  envs.set(envKey, envId);
151
161
  }
152
162
  return envId;
@@ -168,6 +178,7 @@ function getAssetGraph(serializedGraph, prevAssetGraph) {
168
178
  let node = isUpdateNode
169
179
  ? serializedGraph.updates[index - nodeTypeSwitchoverIndex]
170
180
  : serializedGraph.nodes[index];
181
+ node = JSON.parse(node);
171
182
  if (node.type === 'entry') {
172
183
  let id = 'entry:' + ++entry;
173
184
  graph.addNodeByContentKey(id, {
package/lib/Atlaspack.js CHANGED
@@ -226,6 +226,7 @@ class Atlaspack {
226
226
  env: resolvedOptions.env,
227
227
  fs: inputFS && new _atlaspackV.FileSystemV3(inputFS),
228
228
  defaultTargetOptions: resolvedOptions.defaultTargetOptions,
229
+ serveOptions: resolvedOptions.serveOptions,
229
230
  lmdb,
230
231
  featureFlags: resolvedOptions.featureFlags
231
232
  });
@@ -94,6 +94,15 @@ var _default = exports.default = {
94
94
  compressors: mapPipelineSchema('compressor', 'compressors'),
95
95
  reporters: pipelineSchema('reporter', 'reporters'),
96
96
  runtimes: pipelineSchema('runtime', 'runtimes'),
97
+ // This isn't currently supported in V2, however we need to allow it to
98
+ // parse as even V3 builds need the AtlaspackConfigRequest
99
+ unstable_alias: {
100
+ type: 'object',
101
+ properties: {},
102
+ additionalProperties: {
103
+ type: 'string'
104
+ }
105
+ },
97
106
  filePath: {
98
107
  type: 'string'
99
108
  },
@@ -69,15 +69,8 @@ class AtlaspackV3 {
69
69
  this._napiWorkerPool.shutdown();
70
70
  }
71
71
  }
72
- async buildAssetGraph() {
73
- // @ts-expect-error TS2488
74
- let [graph, error] = await (0, _rust().atlaspackNapiBuildAssetGraph)(this._atlaspack_napi);
75
- if (error !== null) {
76
- throw new (_diagnostic().default)({
77
- diagnostic: error
78
- });
79
- }
80
- return graph;
72
+ buildAssetGraph() {
73
+ return (0, _rust().atlaspackNapiBuildAssetGraph)(this._atlaspack_napi);
81
74
  }
82
75
  async respondToFsEvents(events) {
83
76
  // @ts-expect-error TS2488
@@ -47,7 +47,10 @@ class NapiWorkerPool {
47
47
  workerCount: undefined
48
48
  }) {
49
49
  // @ts-expect-error TS2322
50
- this.#workerCount = workerCount ?? ATLASPACK_NAPI_WORKERS ?? (0, _rust().getAvailableThreads)();
50
+ this.#workerCount = workerCount ?? ATLASPACK_NAPI_WORKERS ??
51
+ // Default to a maximum of 4 workers as performance worsens beyond that
52
+ // point in most cases
53
+ Math.min((0, _rust().getAvailableThreads)(), 4);
51
54
  if (!this.#workerCount) {
52
55
  // TODO use main thread if workerCount is 0
53
56
  }
@@ -46,13 +46,16 @@ function createAssetGraphRequestRust(rustAtlaspack) {
46
46
  id: input.name,
47
47
  run: async input => {
48
48
  let options = input.options;
49
- let serializedAssetGraph = await rustAtlaspack.buildAssetGraph();
50
-
51
- // Newly created nodes
52
- serializedAssetGraph.nodes = serializedAssetGraph.nodes.map(node => JSON.parse(node));
53
-
54
- // Updated existing nodes
55
- serializedAssetGraph.updates = serializedAssetGraph.updates.map(node => JSON.parse(node));
49
+ let {
50
+ assetGraphPromise,
51
+ commitPromise
52
+ } = await rustAtlaspack.buildAssetGraph();
53
+ let [serializedAssetGraph, assetGraphError] = await assetGraphPromise;
54
+ if (assetGraphError) {
55
+ throw new (_diagnostic().default)({
56
+ diagnostic: assetGraphError
57
+ });
58
+ }
56
59
 
57
60
  // Don't reuse a previous asset graph result if Rust didn't have one too
58
61
  let prevResult = null;
@@ -91,6 +94,14 @@ function createAssetGraphRequestRust(rustAtlaspack) {
91
94
  changedAssetsPropagation,
92
95
  previousSymbolPropagationErrors: undefined
93
96
  };
97
+ let [_commitResult, commitError] = await commitPromise;
98
+ if (commitError) {
99
+ throw new (_diagnostic().default)({
100
+ diagnostic: {
101
+ message: 'Error committing asset graph in Rust: ' + commitError.message
102
+ }
103
+ });
104
+ }
94
105
  await input.api.storeResult(result);
95
106
  input.api.invalidateOnBuild();
96
107
  return result;
@@ -169,7 +180,7 @@ function getAssetGraph(serializedGraph, prevAssetGraph) {
169
180
  let envKey = [env.context, env.engines.atlaspack, env.engines.browsers, env.engines.electron, env.engines.node, env.includeNodeModules, env.isLibrary, env.outputFormat, env.shouldScopeHoist, env.shouldOptimize, env.sourceType].join(':');
170
181
  let envId = envs.get(envKey);
171
182
  if (envId == null) {
172
- envId = envs.size.toString();
183
+ envId = (0, _Environment.getEnvironmentHash)(env);
173
184
  envs.set(envKey, envId);
174
185
  }
175
186
  return envId;
@@ -188,6 +199,7 @@ function getAssetGraph(serializedGraph, prevAssetGraph) {
188
199
  for (let index = 0; index < nodesCount; index++) {
189
200
  let isUpdateNode = index >= nodeTypeSwitchoverIndex;
190
201
  let node = isUpdateNode ? serializedGraph.updates[index - nodeTypeSwitchoverIndex] : serializedGraph.nodes[index];
202
+ node = JSON.parse(node);
191
203
  if (node.type === 'entry') {
192
204
  let id = 'entry:' + ++entry;
193
205
  graph.addNodeByContentKey(id, {
@@ -34,6 +34,13 @@ declare const _default: {
34
34
  compressors: SchemaEntity;
35
35
  reporters: SchemaEntity;
36
36
  runtimes: SchemaEntity;
37
+ unstable_alias: {
38
+ type: string;
39
+ properties: {};
40
+ additionalProperties: {
41
+ type: string;
42
+ };
43
+ };
37
44
  filePath: {
38
45
  type: string;
39
46
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/core",
3
- "version": "2.28.0",
3
+ "version": "2.29.1",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -24,21 +24,21 @@
24
24
  "dependencies": {
25
25
  "@mischnic/json-sourcemap": "^0.1.0",
26
26
  "@atlaspack/build-cache": "2.13.6",
27
- "@atlaspack/cache": "3.2.34",
27
+ "@atlaspack/cache": "3.2.36",
28
28
  "@atlaspack/diagnostic": "2.14.4",
29
29
  "@atlaspack/events": "2.14.4",
30
- "@atlaspack/feature-flags": "2.27.0",
31
- "@atlaspack/fs": "2.15.34",
32
- "@atlaspack/graph": "3.6.1",
33
- "@atlaspack/logger": "2.14.31",
34
- "@atlaspack/package-manager": "2.14.39",
35
- "@atlaspack/plugin": "2.14.39",
36
- "@atlaspack/profiler": "2.15.0",
37
- "@atlaspack/rust": "3.11.0",
38
- "@atlaspack/types": "2.15.29",
39
- "@atlaspack/utils": "3.2.0",
40
- "@atlaspack/workers": "2.14.39",
41
- "@atlaspack/source-map": "3.1.0",
30
+ "@atlaspack/feature-flags": "2.27.2",
31
+ "@atlaspack/fs": "2.15.36",
32
+ "@atlaspack/graph": "3.6.3",
33
+ "@atlaspack/logger": "2.14.33",
34
+ "@atlaspack/package-manager": "2.14.41",
35
+ "@atlaspack/plugin": "2.14.41",
36
+ "@atlaspack/profiler": "2.15.2",
37
+ "@atlaspack/rust": "3.13.0",
38
+ "@atlaspack/types": "2.15.31",
39
+ "@atlaspack/utils": "3.2.2",
40
+ "@atlaspack/workers": "2.14.41",
41
+ "@atlaspack/source-map": "3.1.2",
42
42
  "base-x": "^3.0.8",
43
43
  "browserslist": "^4.6.6",
44
44
  "clone": "^2.1.1",
package/src/Atlaspack.ts CHANGED
@@ -198,6 +198,7 @@ export default class Atlaspack {
198
198
  env: resolvedOptions.env,
199
199
  fs: inputFS && new FileSystemV3(inputFS),
200
200
  defaultTargetOptions: resolvedOptions.defaultTargetOptions,
201
+ serveOptions: resolvedOptions.serveOptions,
201
202
  lmdb,
202
203
  featureFlags: resolvedOptions.featureFlags,
203
204
  });
@@ -107,6 +107,15 @@ export default {
107
107
  compressors: mapPipelineSchema('compressor', 'compressors') as SchemaEntity,
108
108
  reporters: pipelineSchema('reporter', 'reporters') as SchemaEntity,
109
109
  runtimes: pipelineSchema('runtime', 'runtimes') as SchemaEntity,
110
+ // This isn't currently supported in V2, however we need to allow it to
111
+ // parse as even V3 builds need the AtlaspackConfigRequest
112
+ unstable_alias: {
113
+ type: 'object',
114
+ properties: {},
115
+ additionalProperties: {
116
+ type: 'string',
117
+ },
118
+ },
110
119
  filePath: {
111
120
  type: 'string',
112
121
  },
@@ -91,19 +91,8 @@ export class AtlaspackV3 {
91
91
  }
92
92
  }
93
93
 
94
- async buildAssetGraph(): Promise<any> {
95
- // @ts-expect-error TS2488
96
- let [graph, error] = await atlaspackNapiBuildAssetGraph(
97
- this._atlaspack_napi,
98
- );
99
-
100
- if (error !== null) {
101
- throw new ThrowableDiagnostic({
102
- diagnostic: error,
103
- });
104
- }
105
-
106
- return graph;
94
+ buildAssetGraph(): Promise<any> {
95
+ return atlaspackNapiBuildAssetGraph(this._atlaspack_napi) as Promise<any>;
107
96
  }
108
97
 
109
98
  async respondToFsEvents(events: Array<Event>): Promise<boolean> {
@@ -23,7 +23,11 @@ export class NapiWorkerPool implements INapiWorkerPool {
23
23
  constructor({workerCount}: NapiWorkerPoolOptions = {workerCount: undefined}) {
24
24
  // @ts-expect-error TS2322
25
25
  this.#workerCount =
26
- workerCount ?? ATLASPACK_NAPI_WORKERS ?? getAvailableThreads();
26
+ workerCount ??
27
+ ATLASPACK_NAPI_WORKERS ??
28
+ // Default to a maximum of 4 workers as performance worsens beyond that
29
+ // point in most cases
30
+ Math.min(getAvailableThreads(), 4);
27
31
  if (!this.#workerCount) {
28
32
  // TODO use main thread if workerCount is 0
29
33
  }
@@ -53,18 +53,17 @@ export function createAssetGraphRequestRust(
53
53
  id: input.name,
54
54
  run: async (input) => {
55
55
  let options = input.options;
56
- let serializedAssetGraph =
57
- (await rustAtlaspack.buildAssetGraph()) as SerializedAssetGraphDelta;
56
+ let {assetGraphPromise, commitPromise} =
57
+ await rustAtlaspack.buildAssetGraph();
58
58
 
59
- // Newly created nodes
60
- serializedAssetGraph.nodes = serializedAssetGraph.nodes.map((node) =>
61
- JSON.parse(node),
62
- );
59
+ let [serializedAssetGraph, assetGraphError] =
60
+ (await assetGraphPromise) as [SerializedAssetGraphDelta, Error | null];
63
61
 
64
- // Updated existing nodes
65
- serializedAssetGraph.updates = serializedAssetGraph.updates.map((node) =>
66
- JSON.parse(node),
67
- );
62
+ if (assetGraphError) {
63
+ throw new ThrowableDiagnostic({
64
+ diagnostic: assetGraphError,
65
+ });
66
+ }
68
67
 
69
68
  // Don't reuse a previous asset graph result if Rust didn't have one too
70
69
  let prevResult = null;
@@ -106,6 +105,17 @@ export function createAssetGraphRequestRust(
106
105
  previousSymbolPropagationErrors: undefined,
107
106
  };
108
107
 
108
+ let [_commitResult, commitError] = await commitPromise;
109
+
110
+ if (commitError) {
111
+ throw new ThrowableDiagnostic({
112
+ diagnostic: {
113
+ message:
114
+ 'Error committing asset graph in Rust: ' + commitError.message,
115
+ },
116
+ });
117
+ }
118
+
109
119
  await input.api.storeResult(result);
110
120
  input.api.invalidateOnBuild();
111
121
 
@@ -213,7 +223,7 @@ export function getAssetGraph(
213
223
 
214
224
  let envId = envs.get(envKey);
215
225
  if (envId == null) {
216
- envId = envs.size.toString();
226
+ envId = getEnvironmentHash(env);
217
227
  envs.set(envKey, envId);
218
228
  }
219
229
 
@@ -242,6 +252,8 @@ export function getAssetGraph(
242
252
  ? serializedGraph.updates[index - nodeTypeSwitchoverIndex]
243
253
  : serializedGraph.nodes[index];
244
254
 
255
+ node = JSON.parse(node);
256
+
245
257
  if (node.type === 'entry') {
246
258
  let id = 'entry:' + ++entry;
247
259
 
@@ -133,7 +133,7 @@ describe('AtlaspackConfigRequest', () => {
133
133
  (e: any) => {
134
134
  assert.strictEqual(
135
135
  e.diagnostics[0].codeFrames[0].codeHighlights[0].message,
136
- `Possible values: "$schema", "bundler", "resolvers", "transformers", "validators", "namers", "packagers", "optimizers", "compressors", "reporters", "runtimes", "filePath", "resolveFrom"`,
136
+ `Possible values: "$schema", "bundler", "resolvers", "transformers", "validators", "namers", "packagers", "optimizers", "compressors", "reporters", "runtimes", "unstable\\_alias", "filePath", "resolveFrom"`,
137
137
  );
138
138
  return true;
139
139
  },