@atlaspack/core 2.31.1-dev-swc44-b0b390313.0 → 2.31.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 +20 -0
- package/dist/atlaspack-v3/NapiWorkerPool.js +13 -3
- package/lib/atlaspack-v3/NapiWorkerPool.js +14 -3
- package/package.json +21 -22
- package/src/atlaspack-v3/NapiWorkerPool.ts +15 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/LICENSE +0 -201
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaspack/core
|
|
2
2
|
|
|
3
|
+
## 2.31.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#942](https://github.com/atlassian-labs/atlaspack/pull/942) [`695339e`](https://github.com/atlassian-labs/atlaspack/commit/695339e4fd46df9590013c2ef4de74cb22225927) Thanks [@marcins](https://github.com/marcins)! - Improve error handling in Tokens transform
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`7cb8569`](https://github.com/atlassian-labs/atlaspack/commit/7cb85698143e381fcb887173b2bfd15f0aea7918), [`695339e`](https://github.com/atlassian-labs/atlaspack/commit/695339e4fd46df9590013c2ef4de74cb22225927)]:
|
|
10
|
+
- @atlaspack/rust@3.17.0
|
|
11
|
+
- @atlaspack/cache@3.2.42
|
|
12
|
+
- @atlaspack/fs@2.15.42
|
|
13
|
+
- @atlaspack/logger@2.14.39
|
|
14
|
+
- @atlaspack/source-map@3.2.2
|
|
15
|
+
- @atlaspack/utils@3.2.8
|
|
16
|
+
- @atlaspack/package-manager@2.14.47
|
|
17
|
+
- @atlaspack/profiler@2.15.8
|
|
18
|
+
- @atlaspack/workers@2.14.47
|
|
19
|
+
- @atlaspack/types@2.15.37
|
|
20
|
+
- @atlaspack/graph@3.6.9
|
|
21
|
+
- @atlaspack/plugin@2.14.47
|
|
22
|
+
|
|
3
23
|
## 2.31.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
@@ -48,11 +48,21 @@ class NapiWorkerPool {
|
|
|
48
48
|
clearAllWorkerState() {
|
|
49
49
|
return Promise.all(__classPrivateFieldGet(this, _NapiWorkerPool_workers, "f").map((worker) => new Promise((res) => {
|
|
50
50
|
worker.postMessage('clearState');
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
// Set up a message handler that only resolves on 'stateCleared'
|
|
52
|
+
// and ignores all other messages (like the initial napiWorker Transferable)
|
|
53
|
+
const messageHandler = (message) => {
|
|
54
|
+
if (message === 'stateCleared') {
|
|
55
|
+
worker.removeListener('message', messageHandler);
|
|
53
56
|
res();
|
|
54
57
|
}
|
|
55
|
-
|
|
58
|
+
else {
|
|
59
|
+
// Log unexpected messages for debugging
|
|
60
|
+
// eslint-disable-next-line no-console
|
|
61
|
+
console.warn(`[NapiWorkerPool] Received unexpected message during clearAllWorkerState: ${JSON.stringify(message)} (type: ${typeof message})`);
|
|
62
|
+
// Keep listening for 'stateCleared' - don't remove the listener
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
worker.on('message', messageHandler);
|
|
56
66
|
})));
|
|
57
67
|
}
|
|
58
68
|
workerCount() {
|
|
@@ -65,11 +65,22 @@ class NapiWorkerPool {
|
|
|
65
65
|
clearAllWorkerState() {
|
|
66
66
|
return Promise.all(this.#workers.map(worker => new Promise(res => {
|
|
67
67
|
worker.postMessage('clearState');
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
|
|
69
|
+
// Set up a message handler that only resolves on 'stateCleared'
|
|
70
|
+
// and ignores all other messages (like the initial napiWorker Transferable)
|
|
71
|
+
const messageHandler = message => {
|
|
72
|
+
if (message === 'stateCleared') {
|
|
73
|
+
worker.removeListener('message', messageHandler);
|
|
70
74
|
res();
|
|
75
|
+
} else {
|
|
76
|
+
// Log unexpected messages for debugging
|
|
77
|
+
// eslint-disable-next-line no-console
|
|
78
|
+
console.warn(`[NapiWorkerPool] Received unexpected message during clearAllWorkerState: ${JSON.stringify(message)} (type: ${typeof message})`);
|
|
79
|
+
// Keep listening for 'stateCleared' - don't remove the listener
|
|
71
80
|
}
|
|
72
|
-
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
worker.on('message', messageHandler);
|
|
73
84
|
})));
|
|
74
85
|
}
|
|
75
86
|
workerCount() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/core",
|
|
3
|
-
"version": "2.31.1
|
|
3
|
+
"version": "2.31.1",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -22,23 +22,23 @@
|
|
|
22
22
|
"build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@atlaspack/build-cache": "2.13.7-dev-swc44-b0b390313.0",
|
|
26
|
-
"@atlaspack/cache": "3.2.42-dev-swc44-b0b390313.0",
|
|
27
|
-
"@atlaspack/diagnostic": "2.14.5-dev-swc44-b0b390313.0",
|
|
28
|
-
"@atlaspack/events": "2.14.5-dev-swc44-b0b390313.0",
|
|
29
|
-
"@atlaspack/feature-flags": "2.27.6-dev-swc44-b0b390313.0",
|
|
30
|
-
"@atlaspack/fs": "2.15.42-dev-swc44-b0b390313.0",
|
|
31
|
-
"@atlaspack/graph": "3.6.9-dev-swc44-b0b390313.0",
|
|
32
|
-
"@atlaspack/logger": "2.14.39-dev-swc44-b0b390313.0",
|
|
33
|
-
"@atlaspack/package-manager": "2.14.47-dev-swc44-b0b390313.0",
|
|
34
|
-
"@atlaspack/plugin": "2.14.47-dev-swc44-b0b390313.0",
|
|
35
|
-
"@atlaspack/profiler": "2.15.8-dev-swc44-b0b390313.0",
|
|
36
|
-
"@atlaspack/rust": "3.16.1-dev-swc44-b0b390313.0",
|
|
37
|
-
"@atlaspack/source-map": "3.2.2-dev-swc44-b0b390313.0",
|
|
38
|
-
"@atlaspack/types": "2.15.37-dev-swc44-b0b390313.0",
|
|
39
|
-
"@atlaspack/utils": "3.2.8-dev-swc44-b0b390313.0",
|
|
40
|
-
"@atlaspack/workers": "2.14.47-dev-swc44-b0b390313.0",
|
|
41
25
|
"@mischnic/json-sourcemap": "^0.1.0",
|
|
26
|
+
"@atlaspack/build-cache": "2.13.6",
|
|
27
|
+
"@atlaspack/cache": "3.2.42",
|
|
28
|
+
"@atlaspack/diagnostic": "2.14.4",
|
|
29
|
+
"@atlaspack/events": "2.14.4",
|
|
30
|
+
"@atlaspack/feature-flags": "2.27.5",
|
|
31
|
+
"@atlaspack/fs": "2.15.42",
|
|
32
|
+
"@atlaspack/graph": "3.6.9",
|
|
33
|
+
"@atlaspack/logger": "2.14.39",
|
|
34
|
+
"@atlaspack/package-manager": "2.14.47",
|
|
35
|
+
"@atlaspack/plugin": "2.14.47",
|
|
36
|
+
"@atlaspack/profiler": "2.15.8",
|
|
37
|
+
"@atlaspack/rust": "3.17.0",
|
|
38
|
+
"@atlaspack/types": "2.15.37",
|
|
39
|
+
"@atlaspack/utils": "3.2.8",
|
|
40
|
+
"@atlaspack/workers": "2.14.47",
|
|
41
|
+
"@atlaspack/source-map": "3.2.2",
|
|
42
42
|
"base-x": "^3.0.8",
|
|
43
43
|
"browserslist": "^4.6.6",
|
|
44
44
|
"clone": "^2.1.1",
|
|
@@ -50,16 +50,15 @@
|
|
|
50
50
|
"semver": "^7.5.2"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@atlaspack/babel-register": "2.14.
|
|
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": "b0b3903133091347563cb8ea34f328655c4ba0fb"
|
|
63
|
+
"type": "commonjs"
|
|
65
64
|
}
|
|
@@ -53,11 +53,23 @@ export class NapiWorkerPool implements INapiWorkerPool {
|
|
|
53
53
|
new Promise<void>((res) => {
|
|
54
54
|
worker.postMessage('clearState');
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
// Set up a message handler that only resolves on 'stateCleared'
|
|
57
|
+
// and ignores all other messages (like the initial napiWorker Transferable)
|
|
58
|
+
const messageHandler = (message: unknown) => {
|
|
59
|
+
if (message === 'stateCleared') {
|
|
60
|
+
worker.removeListener('message', messageHandler);
|
|
58
61
|
res();
|
|
62
|
+
} else {
|
|
63
|
+
// Log unexpected messages for debugging
|
|
64
|
+
// eslint-disable-next-line no-console
|
|
65
|
+
console.warn(
|
|
66
|
+
`[NapiWorkerPool] Received unexpected message during clearAllWorkerState: ${JSON.stringify(message)} (type: ${typeof message})`,
|
|
67
|
+
);
|
|
68
|
+
// Keep listening for 'stateCleared' - don't remove the listener
|
|
59
69
|
}
|
|
60
|
-
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
worker.on('message', messageHandler);
|
|
61
73
|
}),
|
|
62
74
|
),
|
|
63
75
|
);
|