synckit 0.8.3 → 0.8.5
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/lib/index.cjs +57 -36
- package/lib/index.d.ts +3 -2
- package/lib/index.js +16 -40
- package/lib/index.js.map +1 -1
- package/lib/types.d.ts +6 -6
- package/package.json +4 -122
package/lib/index.cjs
CHANGED
@@ -56,7 +56,7 @@ const DEFAULT_EXEC_ARGV = (SYNCKIT_EXEC_ARGV == null ? void 0 : SYNCKIT_EXEC_ARG
|
|
56
56
|
const DEFAULT_TS_RUNNER = SYNCKIT_TS_RUNNER || TsRunner.TsNode;
|
57
57
|
const MTS_SUPPORTED_NODE_VERSION = 16;
|
58
58
|
const syncFnCache = /* @__PURE__ */ new Map();
|
59
|
-
|
59
|
+
function extractProperties(object) {
|
60
60
|
if (object && typeof object === "object") {
|
61
61
|
const properties = {};
|
62
62
|
for (const key in object) {
|
@@ -64,7 +64,7 @@ const extractProperties = (object) => {
|
|
64
64
|
}
|
65
65
|
return properties;
|
66
66
|
}
|
67
|
-
}
|
67
|
+
}
|
68
68
|
function createSyncFn(workerPath, bufferSizeOrOptions, timeout) {
|
69
69
|
if (!path__default["default"].isAbsolute(workerPath)) {
|
70
70
|
throw new Error("`workerPath` must be absolute");
|
@@ -73,7 +73,10 @@ function createSyncFn(workerPath, bufferSizeOrOptions, timeout) {
|
|
73
73
|
if (cachedSyncFn) {
|
74
74
|
return cachedSyncFn;
|
75
75
|
}
|
76
|
-
const syncFn = startWorkerThread(
|
76
|
+
const syncFn = startWorkerThread(
|
77
|
+
workerPath,
|
78
|
+
typeof bufferSizeOrOptions === "number" ? { bufferSize: bufferSizeOrOptions, timeout } : bufferSizeOrOptions
|
79
|
+
);
|
77
80
|
syncFnCache.set(workerPath, syncFn);
|
78
81
|
return syncFn;
|
79
82
|
}
|
@@ -162,12 +165,19 @@ const setupTsRunner = (workerPath, { execArgv, tsRunner }) => {
|
|
162
165
|
}
|
163
166
|
if (process.versions.pnp) {
|
164
167
|
const nodeOptions = NODE_OPTIONS == null ? void 0 : NODE_OPTIONS.split(/\s+/);
|
165
|
-
|
166
|
-
|
168
|
+
let pnpApiPath;
|
169
|
+
try {
|
170
|
+
pnpApiPath = cjsRequire.resolve("pnpapi");
|
171
|
+
} catch (e) {
|
172
|
+
}
|
173
|
+
if (pnpApiPath && !(nodeOptions == null ? void 0 : nodeOptions.some(
|
174
|
+
(option, index) => ["-r", "--require"].includes(option) && pnpApiPath === cjsRequire.resolve(nodeOptions[index + 1])
|
175
|
+
)) && !execArgv.includes(pnpApiPath)) {
|
167
176
|
execArgv = ["-r", pnpApiPath, ...execArgv];
|
168
177
|
const pnpLoaderPath = path__default["default"].resolve(pnpApiPath, "../.pnp.loader.mjs");
|
169
178
|
if (isFile(pnpLoaderPath)) {
|
170
|
-
|
179
|
+
const experimentalLoader = node_url.pathToFileURL(pnpLoaderPath).toString();
|
180
|
+
execArgv = ["--experimental-loader", experimentalLoader, ...execArgv];
|
171
181
|
}
|
172
182
|
}
|
173
183
|
}
|
@@ -202,16 +212,21 @@ function startWorkerThread(workerPath, {
|
|
202
212
|
TsRunner.SWC,
|
203
213
|
...isTsxSupported ? [] : [TsRunner.TSX]
|
204
214
|
].includes(tsRunner)) {
|
205
|
-
throw new Error(
|
215
|
+
throw new Error(
|
216
|
+
`${tsRunner} is not supported for ${ext} files yet` + (isTsxSupported ? ", you can try [tsx](https://github.com/esbuild-kit/tsx) instead" : "")
|
217
|
+
);
|
206
218
|
}
|
207
219
|
}
|
208
220
|
const useEval = isTs && !tsUseEsm;
|
209
|
-
const worker = new node_worker_threads.Worker(
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
221
|
+
const worker = new node_worker_threads.Worker(
|
222
|
+
tsUseEsm && tsRunner === TsRunner.TsNode ? dataUrl(`import '${String(workerPathUrl)}'`) : useEval ? `require('${finalWorkerPath.replace(/\\/g, "\\\\")}')` : workerPathUrl,
|
223
|
+
{
|
224
|
+
eval: useEval,
|
225
|
+
workerData: { workerPort },
|
226
|
+
transferList: [workerPort],
|
227
|
+
execArgv: finalExecArgv
|
228
|
+
}
|
229
|
+
);
|
215
230
|
let nextID = 0;
|
216
231
|
const syncFn = (...args) => {
|
217
232
|
const id = nextID++;
|
@@ -246,32 +261,38 @@ function runAsWorker(fn) {
|
|
246
261
|
}
|
247
262
|
const { workerPort } = node_worker_threads.workerData;
|
248
263
|
try {
|
249
|
-
node_worker_threads.parentPort.on(
|
250
|
-
|
251
|
-
(
|
264
|
+
node_worker_threads.parentPort.on(
|
265
|
+
"message",
|
266
|
+
({ sharedBuffer, id, args }) => {
|
267
|
+
;
|
268
|
+
(() => __async(this, null, function* () {
|
269
|
+
const sharedBufferView = new Int32Array(sharedBuffer);
|
270
|
+
let msg;
|
271
|
+
try {
|
272
|
+
msg = { id, result: yield fn(...args) };
|
273
|
+
} catch (error) {
|
274
|
+
msg = { id, error, properties: extractProperties(error) };
|
275
|
+
}
|
276
|
+
workerPort.postMessage(msg);
|
277
|
+
Atomics.add(sharedBufferView, 0, 1);
|
278
|
+
Atomics.notify(sharedBufferView, 0);
|
279
|
+
}))();
|
280
|
+
}
|
281
|
+
);
|
282
|
+
} catch (error) {
|
283
|
+
node_worker_threads.parentPort.on(
|
284
|
+
"message",
|
285
|
+
({ sharedBuffer, id }) => {
|
252
286
|
const sharedBufferView = new Int32Array(sharedBuffer);
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
}
|
259
|
-
workerPort.postMessage(msg);
|
287
|
+
workerPort.postMessage({
|
288
|
+
id,
|
289
|
+
error,
|
290
|
+
properties: extractProperties(error)
|
291
|
+
});
|
260
292
|
Atomics.add(sharedBufferView, 0, 1);
|
261
293
|
Atomics.notify(sharedBufferView, 0);
|
262
|
-
}
|
263
|
-
|
264
|
-
} catch (error) {
|
265
|
-
node_worker_threads.parentPort.on("message", ({ sharedBuffer, id }) => {
|
266
|
-
const sharedBufferView = new Int32Array(sharedBuffer);
|
267
|
-
workerPort.postMessage({
|
268
|
-
id,
|
269
|
-
error,
|
270
|
-
properties: extractProperties(error)
|
271
|
-
});
|
272
|
-
Atomics.add(sharedBufferView, 0, 1);
|
273
|
-
Atomics.notify(sharedBufferView, 0);
|
274
|
-
});
|
294
|
+
}
|
295
|
+
);
|
275
296
|
}
|
276
297
|
}
|
277
298
|
|
package/lib/index.d.ts
CHANGED
@@ -7,7 +7,7 @@ export declare const TsRunner: {
|
|
7
7
|
readonly SWC: "swc";
|
8
8
|
readonly TSX: "tsx";
|
9
9
|
};
|
10
|
-
export
|
10
|
+
export type TsRunner = ValueOf<typeof TsRunner>;
|
11
11
|
export declare const DEFAULT_BUFFER_SIZE: number | undefined;
|
12
12
|
export declare const DEFAULT_TIMEOUT: number | undefined;
|
13
13
|
export declare const DEFAULT_WORKER_BUFFER_SIZE: number;
|
@@ -20,7 +20,8 @@ export interface SynckitOptions {
|
|
20
20
|
execArgv?: string[];
|
21
21
|
tsRunner?: TsRunner;
|
22
22
|
}
|
23
|
-
export declare
|
23
|
+
export declare function extractProperties<T extends object>(object: T): T;
|
24
|
+
export declare function extractProperties<T>(object?: T): T | undefined;
|
24
25
|
export declare function createSyncFn<T extends AnyAsyncFn>(workerPath: string, bufferSize?: number, timeout?: number): Syncify<T>;
|
25
26
|
export declare function createSyncFn<T extends AnyAsyncFn>(workerPath: string, options?: SynckitOptions): Syncify<T>;
|
26
27
|
export declare const isFile: (path: string) => boolean;
|
package/lib/index.js
CHANGED
@@ -3,21 +3,14 @@ import fs from 'node:fs';
|
|
3
3
|
import { createRequire } from 'node:module';
|
4
4
|
import path from 'node:path';
|
5
5
|
import { pathToFileURL } from 'node:url';
|
6
|
-
import { MessageChannel, Worker, receiveMessageOnPort,
|
7
|
-
// type-coverage:ignore-next-line -- we can't control
|
8
|
-
workerData, parentPort, } from 'node:worker_threads';
|
6
|
+
import { MessageChannel, Worker, receiveMessageOnPort, workerData, parentPort, } from 'node:worker_threads';
|
9
7
|
import { findUp, tryExtensions } from '@pkgr/utils';
|
10
8
|
export * from './types.js';
|
11
9
|
export const TsRunner = {
|
12
|
-
// https://github.com/TypeStrong/ts-node
|
13
10
|
TsNode: 'ts-node',
|
14
|
-
// https://github.com/egoist/esbuild-register
|
15
11
|
EsbuildRegister: 'esbuild-register',
|
16
|
-
// https://github.com/folke/esbuild-runner
|
17
12
|
EsbuildRunner: 'esbuild-runner',
|
18
|
-
// https://github.com/swc-project/swc-node/tree/master/packages/register
|
19
13
|
SWC: 'swc',
|
20
|
-
// https://github.com/esbuild-kit/tsx
|
21
14
|
TSX: 'tsx',
|
22
15
|
};
|
23
16
|
const { SYNCKIT_BUFFER_SIZE, SYNCKIT_TIMEOUT, SYNCKIT_EXEC_ARGV, SYNCKIT_TS_RUNNER, NODE_OPTIONS, } = process.env;
|
@@ -26,16 +19,12 @@ export const DEFAULT_BUFFER_SIZE = SYNCKIT_BUFFER_SIZE
|
|
26
19
|
: undefined;
|
27
20
|
export const DEFAULT_TIMEOUT = SYNCKIT_TIMEOUT ? +SYNCKIT_TIMEOUT : undefined;
|
28
21
|
export const DEFAULT_WORKER_BUFFER_SIZE = DEFAULT_BUFFER_SIZE || 1024;
|
29
|
-
/* istanbul ignore next */
|
30
22
|
export const DEFAULT_EXEC_ARGV = (SYNCKIT_EXEC_ARGV === null || SYNCKIT_EXEC_ARGV === void 0 ? void 0 : SYNCKIT_EXEC_ARGV.split(',')) || [];
|
31
23
|
export const DEFAULT_TS_RUNNER = (SYNCKIT_TS_RUNNER ||
|
32
24
|
TsRunner.TsNode);
|
33
25
|
export const MTS_SUPPORTED_NODE_VERSION = 16;
|
34
26
|
const syncFnCache = new Map();
|
35
|
-
|
36
|
-
// error objects to have extra properties such as "warnings" so implement the
|
37
|
-
// property copying manually.
|
38
|
-
export const extractProperties = (object) => {
|
27
|
+
export function extractProperties(object) {
|
39
28
|
if (object && typeof object === 'object') {
|
40
29
|
const properties = {};
|
41
30
|
for (const key in object) {
|
@@ -43,7 +32,7 @@ export const extractProperties = (object) => {
|
|
43
32
|
}
|
44
33
|
return properties;
|
45
34
|
}
|
46
|
-
}
|
35
|
+
}
|
47
36
|
export function createSyncFn(workerPath, bufferSizeOrOptions, timeout) {
|
48
37
|
if (!path.isAbsolute(workerPath)) {
|
49
38
|
throw new Error('`workerPath` must be absolute');
|
@@ -52,8 +41,7 @@ export function createSyncFn(workerPath, bufferSizeOrOptions, timeout) {
|
|
52
41
|
if (cachedSyncFn) {
|
53
42
|
return cachedSyncFn;
|
54
43
|
}
|
55
|
-
const syncFn = startWorkerThread(workerPath,
|
56
|
-
/* istanbul ignore next */ typeof bufferSizeOrOptions === 'number'
|
44
|
+
const syncFn = startWorkerThread(workerPath, typeof bufferSizeOrOptions === 'number'
|
57
45
|
? { bufferSize: bufferSizeOrOptions, timeout }
|
58
46
|
: bufferSizeOrOptions);
|
59
47
|
syncFnCache.set(workerPath, syncFn);
|
@@ -61,7 +49,7 @@ export function createSyncFn(workerPath, bufferSizeOrOptions, timeout) {
|
|
61
49
|
}
|
62
50
|
const cjsRequire = typeof require === 'undefined'
|
63
51
|
? createRequire(import.meta.url)
|
64
|
-
:
|
52
|
+
: require;
|
65
53
|
const dataUrl = (code) => new URL(`data:text/javascript,${encodeURIComponent(code)}`);
|
66
54
|
export const isFile = (path) => {
|
67
55
|
try {
|
@@ -151,17 +139,22 @@ const setupTsRunner = (workerPath, { execArgv, tsRunner }) => {
|
|
151
139
|
}
|
152
140
|
}
|
153
141
|
}
|
154
|
-
/* istanbul ignore if -- https://github.com/facebook/jest/issues/5274 */
|
155
142
|
if (process.versions.pnp) {
|
156
143
|
const nodeOptions = NODE_OPTIONS === null || NODE_OPTIONS === void 0 ? void 0 : NODE_OPTIONS.split(/\s+/);
|
157
|
-
|
158
|
-
|
159
|
-
pnpApiPath
|
144
|
+
let pnpApiPath;
|
145
|
+
try {
|
146
|
+
pnpApiPath = cjsRequire.resolve('pnpapi');
|
147
|
+
}
|
148
|
+
catch (_a) { }
|
149
|
+
if (pnpApiPath &&
|
150
|
+
!(nodeOptions === null || nodeOptions === void 0 ? void 0 : nodeOptions.some((option, index) => ['-r', '--require'].includes(option) &&
|
151
|
+
pnpApiPath === cjsRequire.resolve(nodeOptions[index + 1]))) &&
|
160
152
|
!execArgv.includes(pnpApiPath)) {
|
161
153
|
execArgv = ['-r', pnpApiPath, ...execArgv];
|
162
154
|
const pnpLoaderPath = path.resolve(pnpApiPath, '../.pnp.loader.mjs');
|
163
155
|
if (isFile(pnpLoaderPath)) {
|
164
|
-
|
156
|
+
const experimentalLoader = pathToFileURL(pnpLoaderPath).toString();
|
157
|
+
execArgv = ['--experimental-loader', experimentalLoader, ...execArgv];
|
165
158
|
}
|
166
159
|
}
|
167
160
|
}
|
@@ -173,7 +166,6 @@ const setupTsRunner = (workerPath, { execArgv, tsRunner }) => {
|
|
173
166
|
execArgv,
|
174
167
|
};
|
175
168
|
};
|
176
|
-
// eslint-disable-next-line sonarjs/cognitive-complexity
|
177
169
|
function startWorkerThread(workerPath, { bufferSize = DEFAULT_WORKER_BUFFER_SIZE, timeout = DEFAULT_TIMEOUT, execArgv = DEFAULT_EXEC_ARGV, tsRunner = DEFAULT_TS_RUNNER, } = {}) {
|
178
170
|
const { port1: mainPort, port2: workerPort } = new MessageChannel();
|
179
171
|
const { isTs, ext, tsUseEsm, workerPath: finalWorkerPath, execArgv: finalExecArgv, } = setupTsRunner(workerPath, { execArgv, tsRunner });
|
@@ -181,15 +173,11 @@ function startWorkerThread(workerPath, { bufferSize = DEFAULT_WORKER_BUFFER_SIZE
|
|
181
173
|
if (/\.[cm]ts$/.test(finalWorkerPath)) {
|
182
174
|
const isTsxSupported = !tsUseEsm ||
|
183
175
|
Number.parseFloat(process.versions.node) >= MTS_SUPPORTED_NODE_VERSION;
|
184
|
-
/* istanbul ignore if */
|
185
176
|
if ([
|
186
|
-
// https://github.com/egoist/esbuild-register/issues/79
|
187
177
|
TsRunner.EsbuildRegister,
|
188
|
-
// https://github.com/folke/esbuild-runner/issues/67
|
189
178
|
TsRunner.EsbuildRunner,
|
190
|
-
// https://github.com/swc-project/swc-node/issues/667
|
191
179
|
TsRunner.SWC,
|
192
|
-
...
|
180
|
+
...(isTsxSupported ? [] : [TsRunner.TSX]),
|
193
181
|
].includes(tsRunner)) {
|
194
182
|
throw new Error(`${tsRunner} is not supported for ${ext} files yet` +
|
195
183
|
(isTsxSupported
|
@@ -216,13 +204,11 @@ function startWorkerThread(workerPath, { bufferSize = DEFAULT_WORKER_BUFFER_SIZE
|
|
216
204
|
const msg = { sharedBuffer, id, args };
|
217
205
|
worker.postMessage(msg);
|
218
206
|
const status = Atomics.wait(sharedBufferView, 0, 0, timeout);
|
219
|
-
/* istanbul ignore if */
|
220
207
|
if (!['ok', 'not-equal'].includes(status)) {
|
221
208
|
throw new Error('Internal error: Atomics.wait() failed: ' + status);
|
222
209
|
}
|
223
210
|
const { id: id2, result, error, properties, } = receiveMessageOnPort(mainPort)
|
224
211
|
.message;
|
225
|
-
/* istanbul ignore if */
|
226
212
|
if (id !== id2) {
|
227
213
|
throw new Error(`Internal error: Expected id ${id} but got id ${id2}`);
|
228
214
|
}
|
@@ -234,16 +220,13 @@ function startWorkerThread(workerPath, { bufferSize = DEFAULT_WORKER_BUFFER_SIZE
|
|
234
220
|
worker.unref();
|
235
221
|
return syncFn;
|
236
222
|
}
|
237
|
-
/* istanbul ignore next */
|
238
223
|
export function runAsWorker(fn) {
|
239
|
-
// type-coverage:ignore-next-line -- we can't control
|
240
224
|
if (!workerData) {
|
241
225
|
return;
|
242
226
|
}
|
243
227
|
const { workerPort } = workerData;
|
244
228
|
try {
|
245
229
|
parentPort.on('message', ({ sharedBuffer, id, args }) => {
|
246
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
247
230
|
;
|
248
231
|
(() => __awaiter(this, void 0, void 0, function* () {
|
249
232
|
const sharedBufferView = new Int32Array(sharedBuffer);
|
@@ -259,13 +242,6 @@ export function runAsWorker(fn) {
|
|
259
242
|
Atomics.notify(sharedBufferView, 0);
|
260
243
|
}))();
|
261
244
|
});
|
262
|
-
/**
|
263
|
-
* @see https://github.com/un-ts/synckit/issues/94
|
264
|
-
*
|
265
|
-
* Starting the worker can fail, due to syntax error, for example. In that case
|
266
|
-
* we just fail all incoming messages with whatever error message we got.
|
267
|
-
* Otherwise incoming messages will hang forever waiting for a reply.
|
268
|
-
*/
|
269
245
|
}
|
270
246
|
catch (error) {
|
271
247
|
parentPort.on('message', ({ sharedBuffer, id }) => {
|
package/lib/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EACL,cAAc,EACd,MAAM,EACN,oBAAoB
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EACL,cAAc,EACd,MAAM,EACN,oBAAoB,EAEpB,UAAU,EACV,UAAU,GACX,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAYnD,cAAc,YAAY,CAAA;AAE1B,MAAM,CAAC,MAAM,QAAQ,GAAG;IAEtB,MAAM,EAAE,SAAS;IAEjB,eAAe,EAAE,kBAAkB;IAEnC,aAAa,EAAE,gBAAgB;IAE/B,GAAG,EAAE,KAAK;IAEV,GAAG,EAAE,KAAK;C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AC;aACrC,CAAC,CAAA;YACF,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;YACnC,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAA;QACrC,CAAC,CACF,CAAA;KACF;AACH,CAAC"}
|
package/lib/types.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import { MessagePort } from 'node:worker_threads';
|
3
|
-
export
|
4
|
-
export
|
5
|
-
export
|
6
|
-
export
|
7
|
-
export
|
8
|
-
export
|
3
|
+
export type AnyFn<R = any, T extends any[] = any[]> = (...args: T) => R;
|
4
|
+
export type AnyPromise<T = any> = Promise<T>;
|
5
|
+
export type AnyAsyncFn<T = any> = AnyFn<Promise<T>>;
|
6
|
+
export type Syncify<T extends AnyAsyncFn> = T extends (...args: infer Args) => Promise<infer R> ? (...args: Args) => R : never;
|
7
|
+
export type PromiseType<T extends AnyPromise> = T extends Promise<infer R> ? R : never;
|
8
|
+
export type ValueOf<T> = T[keyof T];
|
9
9
|
export interface MainToWorkerMessage<T extends unknown[]> {
|
10
10
|
sharedBuffer: SharedArrayBuffer;
|
11
11
|
id: number;
|
package/package.json
CHANGED
@@ -1,44 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "synckit",
|
3
|
-
"version": "0.8.
|
3
|
+
"version": "0.8.5",
|
4
4
|
"type": "module",
|
5
5
|
"description": "Perform async work synchronously in Node.js using `worker_threads` with first-class TypeScript support.",
|
6
6
|
"repository": "git+https://github.com/un-ts/synckit.git",
|
7
7
|
"author": "JounQin (https://www.1stG.me) <admin@1stg.me>",
|
8
|
-
"donate": {
|
9
|
-
"recipients": [
|
10
|
-
{
|
11
|
-
"name": "unts",
|
12
|
-
"platform": "opencollective",
|
13
|
-
"address": "https://opencollective.com/unts",
|
14
|
-
"weight": 60
|
15
|
-
},
|
16
|
-
{
|
17
|
-
"name": "rxts",
|
18
|
-
"platform": "opencollective",
|
19
|
-
"address": "https://opencollective.com/rxts",
|
20
|
-
"weight": 20
|
21
|
-
},
|
22
|
-
{
|
23
|
-
"name": "1stG",
|
24
|
-
"email": "i@1stg.me",
|
25
|
-
"weight": 20,
|
26
|
-
"platforms": [
|
27
|
-
{
|
28
|
-
"platform": "opencollective",
|
29
|
-
"address": "https://opencollective.com/1stG"
|
30
|
-
},
|
31
|
-
{
|
32
|
-
"platform": "patreon",
|
33
|
-
"address": "https://www.patreon.com/1stG"
|
34
|
-
}
|
35
|
-
]
|
36
|
-
}
|
37
|
-
]
|
38
|
-
},
|
39
8
|
"funding": "https://opencollective.com/unts",
|
40
9
|
"license": "MIT",
|
41
|
-
"packageManager": "yarn@1.22.19",
|
42
10
|
"engines": {
|
43
11
|
"node": "^14.18.0 || >=16.0.0"
|
44
12
|
},
|
@@ -64,94 +32,8 @@
|
|
64
32
|
"synchronize",
|
65
33
|
"synckit"
|
66
34
|
],
|
67
|
-
"scripts": {
|
68
|
-
"benchmark": "run-s benchmark:*",
|
69
|
-
"benchmark-export": "run-s benchmark-export:*",
|
70
|
-
"benchmark-export:cjs": "yarn benchmark:cjs > benchmarks/benchmark.cjs.txt",
|
71
|
-
"benchmark-export:esm": "yarn benchmark:esm> benchmarks/benchmark.esm.txt",
|
72
|
-
"benchmark:cjs": "node benchmarks/benchmark.cjs",
|
73
|
-
"benchmark:esm": "node benchmarks/benchmark.js",
|
74
|
-
"build": "run-p build:*",
|
75
|
-
"build:r": "r -f cjs",
|
76
|
-
"build:ts": "tsc -p src",
|
77
|
-
"lint": "run-p lint:*",
|
78
|
-
"lint:es": "eslint . --cache -f friendly --max-warnings 10",
|
79
|
-
"lint:tsc": "tsc --noEmit",
|
80
|
-
"prepare": "patch-package && simple-git-hooks && yarn-deduplicate --strategy fewer || exit 0",
|
81
|
-
"prerelease": "yarn build",
|
82
|
-
"release": "changeset publish",
|
83
|
-
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
84
|
-
"typecov": "type-coverage"
|
85
|
-
},
|
86
35
|
"dependencies": {
|
87
|
-
"@pkgr/utils": "^2.3.
|
88
|
-
"tslib": "^2.
|
89
|
-
},
|
90
|
-
"devDependencies": {
|
91
|
-
"@1stg/lib-config": "^9.0.2",
|
92
|
-
"@changesets/changelog-github": "^0.4.6",
|
93
|
-
"@changesets/cli": "^2.23.2",
|
94
|
-
"@swc-node/register": "^1.5.1",
|
95
|
-
"@types/jest": "^28.1.5",
|
96
|
-
"@types/node": "^18.0.4",
|
97
|
-
"deasync": "^0.1.27",
|
98
|
-
"esbuild-register": "^3.3.3",
|
99
|
-
"esbuild-runner": "^2.2.1",
|
100
|
-
"execa": "^6.1.0",
|
101
|
-
"jest": "^28.1.3",
|
102
|
-
"patch-package": "^6.4.7",
|
103
|
-
"sync-threads": "^1.0.1",
|
104
|
-
"ts-expect": "^1.3.0",
|
105
|
-
"ts-jest": "^28.0.6",
|
106
|
-
"ts-node": "^10.9.1",
|
107
|
-
"tsx": "^3.8.0",
|
108
|
-
"type-coverage": "^2.22.0",
|
109
|
-
"typescript": "^4.7.4",
|
110
|
-
"yarn-deduplicate": "^5.0.0"
|
111
|
-
},
|
112
|
-
"resolutions": {
|
113
|
-
"prettier": "^2.7.1"
|
114
|
-
},
|
115
|
-
"commitlint": {
|
116
|
-
"extends": "@1stg"
|
117
|
-
},
|
118
|
-
"jest": {
|
119
|
-
"preset": "ts-jest",
|
120
|
-
"testEnvironment": "node",
|
121
|
-
"collectCoverage": true,
|
122
|
-
"extensionsToTreatAsEsm": [
|
123
|
-
".ts"
|
124
|
-
],
|
125
|
-
"moduleNameMapper": {
|
126
|
-
"^(\\.{1,2}/.*)\\.js$": "$1",
|
127
|
-
"^synckit$": "<rootDir>/src"
|
128
|
-
},
|
129
|
-
"globals": {
|
130
|
-
"ts-jest": {
|
131
|
-
"useESM": true,
|
132
|
-
"tsconfig": {
|
133
|
-
"importHelpers": false
|
134
|
-
}
|
135
|
-
}
|
136
|
-
}
|
137
|
-
},
|
138
|
-
"prettier": "@1stg/prettier-config",
|
139
|
-
"renovate": {
|
140
|
-
"extends": [
|
141
|
-
"@1stg"
|
142
|
-
]
|
143
|
-
},
|
144
|
-
"typeCoverage": {
|
145
|
-
"atLeast": 100,
|
146
|
-
"cache": true,
|
147
|
-
"detail": true,
|
148
|
-
"ignoreAsAssertion": true,
|
149
|
-
"ignoreFiles": [
|
150
|
-
"**/*.d.ts"
|
151
|
-
],
|
152
|
-
"ignoreNonNullAssertion": true,
|
153
|
-
"showRelativePath": true,
|
154
|
-
"strict": true,
|
155
|
-
"update": true
|
36
|
+
"@pkgr/utils": "^2.3.1",
|
37
|
+
"tslib": "^2.5.0"
|
156
38
|
}
|
157
|
-
}
|
39
|
+
}
|