@ms-cloudpack/esm-stub-utilities 0.13.4 → 0.13.6
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.
|
@@ -3,7 +3,7 @@ let workerPool;
|
|
|
3
3
|
/**
|
|
4
4
|
* Write ESM stubs using a worker pool.
|
|
5
5
|
*/
|
|
6
|
-
// This is tested in bundler-
|
|
6
|
+
// This is tested in bundler-rollup/src/writeESMStubsInWorker.test.ts so we can
|
|
7
7
|
// use the compiled version of the workerEntry file.
|
|
8
8
|
export async function writeESMStubsInWorker(options) {
|
|
9
9
|
const { maxWorkers = 5, ...stubOptions } = options;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeESMStubsInWorker.js","sourceRoot":"","sources":["../src/writeESMStubsInWorker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAIvD,IAAI,UAAkC,CAAC;AAEvC;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"writeESMStubsInWorker.js","sourceRoot":"","sources":["../src/writeESMStubsInWorker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAIvD,IAAI,UAAkC,CAAC;AAEvC;;GAEG;AACH,+EAA+E;AAC/E,oDAAoD;AACpD,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,OAAuD;IAEvD,MAAM,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,WAAW,EAAE,GAAG,OAAO,CAAC;IAEnD,UAAU,KAAK,IAAI,UAAU,CAAC;QAC5B,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG;QAC3B,SAAS,EAAE,sBAAsB;QACjC,UAAU;KACX,CAAC,CAAC;IAEH,IAAI,CAAC;QACH,OAAO,MAAM,UAAU,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAClE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO;YACL,UAAU,EAAE,EAAE;YACd,MAAM,EAAE;gBACN;oBACE,MAAM,EAAE,qBAAqB;oBAC7B,mEAAmE;oBACnE,IAAI,EAAG,GAAa,EAAE,KAAK,IAAK,GAAa,EAAE,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC;iBACtE;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB;IACzC,MAAM,UAAU,EAAE,OAAO,EAAE,CAAC;IAC5B,UAAU,GAAG,SAAS,CAAC;AACzB,CAAC","sourcesContent":["import { WorkerPool } from '@ms-cloudpack/worker-pool';\nimport type { WriteESMStubsOptions } from './types/WriteESMStubsOptions.js';\nimport type { WriteESMStubsResult } from './types/WriteESMStubsResult.js';\n\nlet workerPool: WorkerPool | undefined;\n\n/**\n * Write ESM stubs using a worker pool.\n */\n// This is tested in bundler-rollup/src/writeESMStubsInWorker.test.ts so we can\n// use the compiled version of the workerEntry file.\nexport async function writeESMStubsInWorker(\n options: WriteESMStubsOptions & { maxWorkers?: number },\n): Promise<WriteESMStubsResult> {\n const { maxWorkers = 5, ...stubOptions } = options;\n\n workerPool ??= new WorkerPool({\n parentPath: import.meta.url,\n entryPath: './worker/workerEntry',\n maxWorkers,\n });\n\n try {\n return await workerPool.execute('writeESMStubs', [stubOptions]);\n } catch (err) {\n return {\n newEntries: {},\n errors: [\n {\n source: 'ESM stub generation',\n // note: err won't be an instance of Error because of serialization\n text: (err as Error)?.stack || (err as Error)?.message || String(err),\n },\n ],\n };\n }\n}\n\nexport async function disposeStubWorkerPool() {\n await workerPool?.dispose();\n workerPool = undefined;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/esm-stub-utilities",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.6",
|
|
4
4
|
"description": "Generates ESM stubs for CommonJS entry files.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@ms-cloudpack/common-types": "^0.
|
|
18
|
-
"@ms-cloudpack/json-utilities": "^0.1.
|
|
19
|
-
"@ms-cloudpack/package-utilities": "^10.2.
|
|
17
|
+
"@ms-cloudpack/common-types": "^0.22.0",
|
|
18
|
+
"@ms-cloudpack/json-utilities": "^0.1.8",
|
|
19
|
+
"@ms-cloudpack/package-utilities": "^10.2.3",
|
|
20
20
|
"@ms-cloudpack/path-string-parsing": "^1.2.4",
|
|
21
21
|
"@ms-cloudpack/worker-pool": "^0.1.3",
|
|
22
22
|
"jsdom": "^24.0.0",
|