@venizia/dev-configs 0.4.6 → 0.4.7-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/LICENSE.md +1 -3
- package/README.md +1 -1
- package/dist/checks/catalog.d.ts +4 -2
- package/dist/checks/catalog.d.ts.map +1 -1
- package/dist/checks/catalog.js +72 -68
- package/dist/checks/catalog.js.map +1 -1
- package/dist/checks/module-cycles.d.ts +11 -9
- package/dist/checks/module-cycles.d.ts.map +1 -1
- package/dist/checks/module-cycles.js +32 -30
- package/dist/checks/module-cycles.js.map +1 -1
- package/dist/checks/purity/manifest.d.ts +44 -38
- package/dist/checks/purity/manifest.d.ts.map +1 -1
- package/dist/checks/purity/manifest.js +121 -115
- package/dist/checks/purity/manifest.js.map +1 -1
- package/dist/checks/purity/probe.d.ts +22 -18
- package/dist/checks/purity/probe.d.ts.map +1 -1
- package/dist/checks/purity/probe.js +101 -99
- package/dist/checks/purity/probe.js.map +1 -1
- package/dist/checks/purity/run.d.ts +18 -16
- package/dist/checks/purity/run.d.ts.map +1 -1
- package/dist/checks/purity/run.js +90 -86
- package/dist/checks/purity/run.js.map +1 -1
- package/dist/checks/test-controls.d.ts +17 -15
- package/dist/checks/test-controls.d.ts.map +1 -1
- package/dist/checks/test-controls.js +71 -69
- package/dist/checks/test-controls.js.map +1 -1
- package/dist/checks/test-dead-code.d.ts +5 -3
- package/dist/checks/test-dead-code.d.ts.map +1 -1
- package/dist/checks/test-dead-code.js +23 -21
- package/dist/checks/test-dead-code.js.map +1 -1
- package/dist/checks/test-mutate.d.ts +12 -7
- package/dist/checks/test-mutate.d.ts.map +1 -1
- package/dist/checks/test-mutate.js +59 -56
- package/dist/checks/test-mutate.js.map +1 -1
- package/dist/checks/test-weight.d.ts +11 -8
- package/dist/checks/test-weight.d.ts.map +1 -1
- package/dist/checks/test-weight.js +98 -94
- package/dist/checks/test-weight.js.map +1 -1
- package/dist/cli/check.d.ts.map +1 -1
- package/dist/cli/check.js +11 -8
- package/dist/cli/check.js.map +1 -1
- package/dist/cli/codemod/async-style.d.ts +62 -0
- package/dist/cli/codemod/async-style.d.ts.map +1 -0
- package/dist/cli/codemod/async-style.js +248 -0
- package/dist/cli/codemod/async-style.js.map +1 -0
- package/dist/cli/codemod/const-classes.d.ts.map +1 -1
- package/dist/cli/codemod/const-classes.js +2 -1
- package/dist/cli/codemod/const-classes.js.map +1 -1
- package/dist/cli/codemod/drop-redundant-casts.d.ts.map +1 -1
- package/dist/cli/codemod/drop-redundant-casts.js +2 -1
- package/dist/cli/codemod/drop-redundant-casts.js.map +1 -1
- package/dist/cli/codemod/files.d.ts +7 -0
- package/dist/cli/codemod/files.d.ts.map +1 -1
- package/dist/cli/codemod/files.js +33 -0
- package/dist/cli/codemod/files.js.map +1 -1
- package/dist/cli/codemod/index.d.ts.map +1 -1
- package/dist/cli/codemod/index.js +12 -3
- package/dist/cli/codemod/index.js.map +1 -1
- package/dist/cli/codemod/model-settings.d.ts +7 -5
- package/dist/cli/codemod/model-settings.d.ts.map +1 -1
- package/dist/cli/codemod/model-settings.js +293 -291
- package/dist/cli/codemod/model-settings.js.map +1 -1
- package/dist/cli/codemod/namespace-functions/index.d.ts +20 -0
- package/dist/cli/codemod/namespace-functions/index.d.ts.map +1 -0
- package/dist/cli/codemod/namespace-functions/index.js +182 -0
- package/dist/cli/codemod/namespace-functions/index.js.map +1 -0
- package/dist/cli/codemod/namespace-functions/logger-scope.d.ts +32 -0
- package/dist/cli/codemod/namespace-functions/logger-scope.d.ts.map +1 -0
- package/dist/cli/codemod/namespace-functions/logger-scope.js +128 -0
- package/dist/cli/codemod/namespace-functions/logger-scope.js.map +1 -0
- package/dist/cli/codemod/namespace-functions/mapping.d.ts +66 -0
- package/dist/cli/codemod/namespace-functions/mapping.d.ts.map +1 -0
- package/dist/cli/codemod/namespace-functions/mapping.js +99 -0
- package/dist/cli/codemod/namespace-functions/mapping.js.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/boot.d.ts +7 -0
- package/dist/cli/codemod/namespace-functions/mappings/boot.d.ts.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/boot.js +28 -0
- package/dist/cli/codemod/namespace-functions/mappings/boot.js.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/connectors.d.ts +4 -0
- package/dist/cli/codemod/namespace-functions/mappings/connectors.d.ts.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/connectors.js +218 -0
- package/dist/cli/codemod/namespace-functions/mappings/connectors.js.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/core-server.d.ts +7 -0
- package/dist/cli/codemod/namespace-functions/mappings/core-server.d.ts.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/core-server.js +162 -0
- package/dist/cli/codemod/namespace-functions/mappings/core-server.js.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/core-worker.d.ts +7 -0
- package/dist/cli/codemod/namespace-functions/mappings/core-worker.d.ts.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/core-worker.js +18 -0
- package/dist/cli/codemod/namespace-functions/mappings/core-worker.js.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/dev-configs.d.ts +7 -0
- package/dist/cli/codemod/namespace-functions/mappings/dev-configs.d.ts.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/dev-configs.js +192 -0
- package/dist/cli/codemod/namespace-functions/mappings/dev-configs.js.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/filter.d.ts +7 -0
- package/dist/cli/codemod/namespace-functions/mappings/filter.d.ts.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/filter.js +30 -0
- package/dist/cli/codemod/namespace-functions/mappings/filter.js.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/helpers.d.ts +16 -0
- package/dist/cli/codemod/namespace-functions/mappings/helpers.d.ts.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/helpers.js +535 -0
- package/dist/cli/codemod/namespace-functions/mappings/helpers.js.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/index.d.ts +4 -0
- package/dist/cli/codemod/namespace-functions/mappings/index.d.ts.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/index.js +25 -0
- package/dist/cli/codemod/namespace-functions/mappings/index.js.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/inversion.d.ts +10 -0
- package/dist/cli/codemod/namespace-functions/mappings/inversion.d.ts.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/inversion.js +81 -0
- package/dist/cli/codemod/namespace-functions/mappings/inversion.js.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/kernel.d.ts +17 -0
- package/dist/cli/codemod/namespace-functions/mappings/kernel.d.ts.map +1 -0
- package/dist/cli/codemod/namespace-functions/mappings/kernel.js +229 -0
- package/dist/cli/codemod/namespace-functions/mappings/kernel.js.map +1 -0
- package/dist/cli/codemod/namespace-functions/rewriter.d.ts +61 -0
- package/dist/cli/codemod/namespace-functions/rewriter.d.ts.map +1 -0
- package/dist/cli/codemod/namespace-functions/rewriter.js +564 -0
- package/dist/cli/codemod/namespace-functions/rewriter.js.map +1 -0
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/compilers/bun.d.ts +1 -1
- package/dist/compilers/bun.js +1 -1
- package/dist/compilers/bun.js.map +1 -1
- package/dist/linters/house/await-support.d.ts +74 -0
- package/dist/linters/house/await-support.d.ts.map +1 -0
- package/dist/linters/house/await-support.js +238 -0
- package/dist/linters/house/await-support.js.map +1 -0
- package/dist/linters/house/common.d.ts +15 -9
- package/dist/linters/house/common.d.ts.map +1 -1
- package/dist/linters/house/common.js +20 -15
- package/dist/linters/house/common.js.map +1 -1
- package/dist/linters/house/configs.d.ts +26 -0
- package/dist/linters/house/configs.d.ts.map +1 -1
- package/dist/linters/house/configs.js +55 -1
- package/dist/linters/house/configs.js.map +1 -1
- package/dist/linters/house/const-class-values.rule.d.ts.map +1 -1
- package/dist/linters/house/const-class-values.rule.js +27 -19
- package/dist/linters/house/const-class-values.rule.js.map +1 -1
- package/dist/linters/house/effect-cleanup-consistency.rule.d.ts +17 -0
- package/dist/linters/house/effect-cleanup-consistency.rule.d.ts.map +1 -0
- package/dist/linters/house/effect-cleanup-consistency.rule.js +87 -0
- package/dist/linters/house/effect-cleanup-consistency.rule.js.map +1 -0
- package/dist/linters/house/hook-support.d.ts +29 -0
- package/dist/linters/house/hook-support.d.ts.map +1 -0
- package/dist/linters/house/hook-support.js +72 -0
- package/dist/linters/house/hook-support.js.map +1 -0
- package/dist/linters/house/index.d.ts +9 -0
- package/dist/linters/house/index.d.ts.map +1 -1
- package/dist/linters/house/index.js +9 -0
- package/dist/linters/house/index.js.map +1 -1
- package/dist/linters/house/max-params-own.rule.d.ts.map +1 -1
- package/dist/linters/house/max-params-own.rule.js +33 -24
- package/dist/linters/house/max-params-own.rule.js.map +1 -1
- package/dist/linters/house/no-async-hook-callback.rule.d.ts +18 -0
- package/dist/linters/house/no-async-hook-callback.rule.d.ts.map +1 -0
- package/dist/linters/house/no-async-hook-callback.rule.js +50 -0
- package/dist/linters/house/no-async-hook-callback.rule.js.map +1 -0
- package/dist/linters/house/no-await-promise-chain.rule.d.ts +24 -0
- package/dist/linters/house/no-await-promise-chain.rule.d.ts.map +1 -0
- package/dist/linters/house/no-await-promise-chain.rule.js +298 -0
- package/dist/linters/house/no-await-promise-chain.rule.js.map +1 -0
- package/dist/linters/house/no-inline-await.rule.d.ts +20 -0
- package/dist/linters/house/no-inline-await.rule.d.ts.map +1 -0
- package/dist/linters/house/no-inline-await.rule.js +70 -0
- package/dist/linters/house/no-inline-await.rule.js.map +1 -0
- package/dist/linters/house/no-new-error.rule.js +4 -4
- package/dist/linters/house/no-new-error.rule.js.map +1 -1
- package/dist/linters/house/no-return-await.rule.d.ts +15 -0
- package/dist/linters/house/no-return-await.rule.d.ts.map +1 -0
- package/dist/linters/house/no-return-await.rule.js +92 -0
- package/dist/linters/house/no-return-await.rule.js.map +1 -0
- package/dist/linters/house/no-silent-catch.rule.d.ts +22 -0
- package/dist/linters/house/no-silent-catch.rule.d.ts.map +1 -0
- package/dist/linters/house/no-silent-catch.rule.js +88 -0
- package/dist/linters/house/no-silent-catch.rule.js.map +1 -0
- package/dist/linters/house/plugin.d.ts.map +1 -1
- package/dist/linters/house/plugin.js +12 -0
- package/dist/linters/house/plugin.js.map +1 -1
- package/dist/linters/house/promise-chain-support.d.ts +49 -0
- package/dist/linters/house/promise-chain-support.d.ts.map +1 -0
- package/dist/linters/house/promise-chain-support.js +188 -0
- package/dist/linters/house/promise-chain-support.js.map +1 -0
- package/dist/linters/rules/no-restricted-properties.rule.js +1 -1
- package/dist/linters/rules/no-restricted-properties.rule.js.map +1 -1
- package/dist/testing/rejection.helper.d.ts +25 -20
- package/dist/testing/rejection.helper.d.ts.map +1 -1
- package/dist/testing/rejection.helper.js +33 -31
- package/dist/testing/rejection.helper.js.map +1 -1
- package/dist/testing/repo-tmp.d.ts +19 -9
- package/dist/testing/repo-tmp.d.ts.map +1 -1
- package/dist/testing/repo-tmp.js +50 -48
- package/dist/testing/repo-tmp.js.map +1 -1
- package/dist/testing/spawn.helper.d.ts +12 -10
- package/dist/testing/spawn.helper.d.ts.map +1 -1
- package/dist/testing/spawn.helper.js +22 -16
- package/dist/testing/spawn.helper.js.map +1 -1
- package/dist/testing/tmpdir-preload.js +1 -1
- package/dist/testing/tmpdir-preload.js.map +1 -1
- package/package.json +2 -3
|
@@ -1,37 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.RejectionHelper = void 0;
|
|
4
4
|
const bun_test_1 = require("bun:test");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
class RejectionHelper {
|
|
6
|
+
/**
|
|
7
|
+
* Awaits a task that must reject and returns what it rejected with; throws when the task resolves.
|
|
8
|
+
*
|
|
9
|
+
* bun types the async matchers (`expect(task).rejects` / `.resolves`) as `void`, so
|
|
10
|
+
* `await expect(task).rejects.toThrow()` is refused by `await-thenable` - and left un-awaited the
|
|
11
|
+
* assertion never runs. Awaiting the task itself needs no matcher and no cast:
|
|
12
|
+
* `RejectionHelper.expectRejection({ task, message })` or
|
|
13
|
+
* `expect(await RejectionHelper.rejectionOf({ task })).toBeInstanceOf(Error)`,
|
|
14
|
+
* and for a resolution `expect(await task).toMatchObject(...)`.
|
|
15
|
+
*/
|
|
16
|
+
static async rejectionOf(opts) {
|
|
17
|
+
try {
|
|
18
|
+
await opts.task;
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
return error;
|
|
22
|
+
}
|
|
23
|
+
return bun_test_1.expect.unreachable('Expected the task to reject, but it resolved');
|
|
17
24
|
}
|
|
18
|
-
|
|
19
|
-
|
|
25
|
+
/**
|
|
26
|
+
* The task rejects with an Error whose message contains `message` (a string) or matches it (a
|
|
27
|
+
* RegExp). The message is compared as a string on purpose: bun 1.4.2 `toMatchObject` with an
|
|
28
|
+
* asymmetric matcher overwrites the matched property on the object it checks, so a later read of
|
|
29
|
+
* `error.message` gets the matcher back.
|
|
30
|
+
*/
|
|
31
|
+
static async expectRejection(opts) {
|
|
32
|
+
const { task, message } = opts;
|
|
33
|
+
const reason = await RejectionHelper.rejectionOf({ task });
|
|
34
|
+
(0, bun_test_1.expect)(reason).toBeInstanceOf(Error);
|
|
35
|
+
(0, bun_test_1.expect)(reason instanceof Error ? reason.message : String(reason)).toMatch(message);
|
|
20
36
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
exports.rejectionOf = rejectionOf;
|
|
24
|
-
/**
|
|
25
|
-
* The task rejects with an Error whose message contains `message` (a string) or matches it (a
|
|
26
|
-
* RegExp). The message is compared as a string on purpose: bun 1.4.2 `toMatchObject` with an
|
|
27
|
-
* asymmetric matcher overwrites the matched property on the object it checks, so a later read of
|
|
28
|
-
* `error.message` gets the matcher back.
|
|
29
|
-
*/
|
|
30
|
-
const expectRejection = async (opts) => {
|
|
31
|
-
const { task, message } = opts;
|
|
32
|
-
const reason = await (0, exports.rejectionOf)(task);
|
|
33
|
-
(0, bun_test_1.expect)(reason).toBeInstanceOf(Error);
|
|
34
|
-
(0, bun_test_1.expect)(reason instanceof Error ? reason.message : String(reason)).toMatch(message);
|
|
35
|
-
};
|
|
36
|
-
exports.expectRejection = expectRejection;
|
|
37
|
+
}
|
|
38
|
+
exports.RejectionHelper = RejectionHelper;
|
|
37
39
|
//# sourceMappingURL=rejection.helper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rejection.helper.js","sourceRoot":"","sources":["../../src/testing/rejection.helper.ts"],"names":[],"mappings":";;;AAAA,uCAAkC;AAElC
|
|
1
|
+
{"version":3,"file":"rejection.helper.js","sourceRoot":"","sources":["../../src/testing/rejection.helper.ts"],"names":[],"mappings":";;;AAAA,uCAAkC;AAElC,MAAa,eAAe;IAC1B;;;;;;;;;OASG;IACH,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,IAAgC;QACvD,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,IAAI,CAAC;QAClB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,iBAAM,CAAC,WAAW,CAAC,8CAA8C,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,IAG5B;QACC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QAC/B,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;QAE3D,IAAA,iBAAM,EAAC,MAAM,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QACrC,IAAA,iBAAM,EAAC,MAAM,YAAY,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACrF,CAAC;CACF;AArCD,0CAqCC","sourcesContent":["import { expect } from 'bun:test';\n\nexport class RejectionHelper {\n /**\n * Awaits a task that must reject and returns what it rejected with; throws when the task resolves.\n *\n * bun types the async matchers (`expect(task).rejects` / `.resolves`) as `void`, so\n * `await expect(task).rejects.toThrow()` is refused by `await-thenable` - and left un-awaited the\n * assertion never runs. Awaiting the task itself needs no matcher and no cast:\n * `RejectionHelper.expectRejection({ task, message })` or\n * `expect(await RejectionHelper.rejectionOf({ task })).toBeInstanceOf(Error)`,\n * and for a resolution `expect(await task).toMatchObject(...)`.\n */\n static async rejectionOf(opts: { task: Promise<unknown> }): Promise<unknown> {\n try {\n await opts.task;\n } catch (error) {\n return error;\n }\n\n return expect.unreachable('Expected the task to reject, but it resolved');\n }\n\n /**\n * The task rejects with an Error whose message contains `message` (a string) or matches it (a\n * RegExp). The message is compared as a string on purpose: bun 1.4.2 `toMatchObject` with an\n * asymmetric matcher overwrites the matched property on the object it checks, so a later read of\n * `error.message` gets the matcher back.\n */\n static async expectRejection(opts: {\n task: Promise<unknown>;\n message: string | RegExp;\n }): Promise<void> {\n const { task, message } = opts;\n const reason = await RejectionHelper.rejectionOf({ task });\n\n expect(reason).toBeInstanceOf(Error);\n expect(reason instanceof Error ? reason.message : String(reason)).toMatch(message);\n }\n}\n"]}
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
/** The folder under the repository root that holds a test run's temp folders. */
|
|
2
2
|
export declare const REPO_TMP_DIRECTORY: string;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
})
|
|
3
|
+
export declare class RepoTmp {
|
|
4
|
+
/** The nearest ancestor of `start` that holds a `.git` (folder or file); `start` itself when there is none. */
|
|
5
|
+
static findRoot(opts?: {
|
|
6
|
+
start?: string;
|
|
7
|
+
}): string;
|
|
8
|
+
/**
|
|
9
|
+
* `Bun.spawn` and `Bun.spawnSync` hand a child the environment the process started with, not the one
|
|
10
|
+
* it has now, so a TMPDIR set here would never reach it. Wrapped to default to the current one; an
|
|
11
|
+
* `env` a caller passes wins. `spawn(cmd, options)` and `spawn({ cmd, ...options })` are both handled.
|
|
12
|
+
*/
|
|
13
|
+
private static withCurrentEnv;
|
|
14
|
+
/**
|
|
15
|
+
* Points TMPDIR at the repository's test folder unless it is already inside it (make's value, or a
|
|
16
|
+
* private folder a caller made there), and returns the folder now in force. Idempotent.
|
|
17
|
+
*/
|
|
18
|
+
static apply(opts?: {
|
|
19
|
+
root?: string;
|
|
20
|
+
}): string;
|
|
21
|
+
}
|
|
12
22
|
//# sourceMappingURL=repo-tmp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo-tmp.d.ts","sourceRoot":"","sources":["../../src/testing/repo-tmp.ts"],"names":[],"mappings":"AAWA,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,QAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"repo-tmp.d.ts","sourceRoot":"","sources":["../../src/testing/repo-tmp.ts"],"names":[],"mappings":"AAWA,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,QAA2C,CAAC;AAI3E,qBAAa,OAAO;IAClB,+GAA+G;IAC/G,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,MAAM;IAkBtD;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAe7B;;;OAGG;IACH,MAAM,CAAC,KAAK,CAAC,IAAI,GAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,MAAM;CAqBnD"}
|
package/dist/testing/repo-tmp.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.RepoTmp = exports.REPO_TMP_DIRECTORY = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Where a test makes its temp folders: `.agents/local/tmp/tests` of the repository, never the system
|
|
6
6
|
* temp. `make test` sets TMPDIR to a folder like it; this does the same for a run without make - a
|
|
@@ -13,55 +13,57 @@ const node_fs_1 = require("node:fs");
|
|
|
13
13
|
const node_path_1 = require("node:path");
|
|
14
14
|
/** The folder under the repository root that holds a test run's temp folders. */
|
|
15
15
|
exports.REPO_TMP_DIRECTORY = (0, node_path_1.join)('.agents', 'local', 'tmp', 'tests');
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
class RepoTmp {
|
|
17
|
+
/** The nearest ancestor of `start` that holds a `.git` (folder or file); `start` itself when there is none. */
|
|
18
|
+
static findRoot(opts = {}) {
|
|
19
|
+
const { start = process.cwd() } = opts;
|
|
20
|
+
let current = (0, node_path_1.resolve)(start);
|
|
21
|
+
for (;;) {
|
|
22
|
+
if ((0, node_fs_1.existsSync)((0, node_path_1.join)(current, '.git'))) {
|
|
23
|
+
return current;
|
|
24
|
+
}
|
|
25
|
+
const parent = (0, node_path_1.dirname)(current);
|
|
26
|
+
if (parent === current) {
|
|
27
|
+
return (0, node_path_1.resolve)(start);
|
|
28
|
+
}
|
|
29
|
+
current = parent;
|
|
26
30
|
}
|
|
27
|
-
current = parent;
|
|
28
31
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return
|
|
32
|
+
/**
|
|
33
|
+
* `Bun.spawn` and `Bun.spawnSync` hand a child the environment the process started with, not the one
|
|
34
|
+
* it has now, so a TMPDIR set here would never reach it. Wrapped to default to the current one; an
|
|
35
|
+
* `env` a caller passes wins. `spawn(cmd, options)` and `spawn({ cmd, ...options })` are both handled.
|
|
36
|
+
*/
|
|
37
|
+
static withCurrentEnv(spawn) {
|
|
38
|
+
return (...args) => {
|
|
39
|
+
const [first, second] = args;
|
|
40
|
+
const options = Array.isArray(first) ? second : first;
|
|
41
|
+
if (options?.env !== undefined) {
|
|
42
|
+
return spawn(...args);
|
|
43
|
+
}
|
|
44
|
+
return Array.isArray(first)
|
|
45
|
+
? spawn(first, { ...second, env: process.env })
|
|
46
|
+
: spawn({ ...first, env: process.env });
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Points TMPDIR at the repository's test folder unless it is already inside it (make's value, or a
|
|
51
|
+
* private folder a caller made there), and returns the folder now in force. Idempotent.
|
|
52
|
+
*/
|
|
53
|
+
static apply(opts = {}) {
|
|
54
|
+
const root = opts.root ?? RepoTmp.findRoot();
|
|
55
|
+
const testTmp = (0, node_path_1.join)(root, exports.REPO_TMP_DIRECTORY);
|
|
56
|
+
const current = process.env.TMPDIR;
|
|
57
|
+
if (current !== undefined && `${(0, node_path_1.resolve)(current)}${node_path_1.sep}`.startsWith(`${testTmp}${node_path_1.sep}`)) {
|
|
58
|
+
return current;
|
|
42
59
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
* Points TMPDIR at the repository's test folder unless it is already inside it (make's value, or a
|
|
50
|
-
* private folder a caller made there), and returns the folder now in force. Idempotent.
|
|
51
|
-
*/
|
|
52
|
-
const useRepoTmp = (opts = {}) => {
|
|
53
|
-
const root = opts.root ?? (0, exports.findRepositoryRoot)();
|
|
54
|
-
const testTmp = (0, node_path_1.join)(root, exports.REPO_TMP_DIRECTORY);
|
|
55
|
-
const current = process.env.TMPDIR;
|
|
56
|
-
if (current !== undefined && `${(0, node_path_1.resolve)(current)}${node_path_1.sep}`.startsWith(`${testTmp}${node_path_1.sep}`)) {
|
|
57
|
-
return current;
|
|
60
|
+
(0, node_fs_1.mkdirSync)((0, node_path_1.join)(testTmp, '.git'), { recursive: true });
|
|
61
|
+
process.env.TMPDIR = testTmp;
|
|
62
|
+
process.env.GIT_CEILING_DIRECTORIES = testTmp;
|
|
63
|
+
Bun.spawn = RepoTmp.withCurrentEnv(Bun.spawn);
|
|
64
|
+
Bun.spawnSync = RepoTmp.withCurrentEnv(Bun.spawnSync);
|
|
65
|
+
return testTmp;
|
|
58
66
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
process.env.GIT_CEILING_DIRECTORIES = testTmp;
|
|
62
|
-
Bun.spawn = withCurrentEnv(Bun.spawn);
|
|
63
|
-
Bun.spawnSync = withCurrentEnv(Bun.spawnSync);
|
|
64
|
-
return testTmp;
|
|
65
|
-
};
|
|
66
|
-
exports.useRepoTmp = useRepoTmp;
|
|
67
|
+
}
|
|
68
|
+
exports.RepoTmp = RepoTmp;
|
|
67
69
|
//# sourceMappingURL=repo-tmp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo-tmp.js","sourceRoot":"","sources":["../../src/testing/repo-tmp.ts"],"names":[],"mappings":";;;AAAA;;;;;;;GAOG;AACH,qCAAgD;AAChD,yCAAwD;AAExD,iFAAiF;AACpE,QAAA,kBAAkB,GAAG,IAAA,gBAAI,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"repo-tmp.js","sourceRoot":"","sources":["../../src/testing/repo-tmp.ts"],"names":[],"mappings":";;;AAAA;;;;;;;GAOG;AACH,qCAAgD;AAChD,yCAAwD;AAExD,iFAAiF;AACpE,QAAA,kBAAkB,GAAG,IAAA,gBAAI,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAI3E,MAAa,OAAO;IAClB,+GAA+G;IAC/G,MAAM,CAAC,QAAQ,CAAC,OAA2B,EAAE;QAC3C,MAAM,EAAE,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC;QACvC,IAAI,OAAO,GAAG,IAAA,mBAAO,EAAC,KAAK,CAAC,CAAC;QAE7B,SAAS,CAAC;YACR,IAAI,IAAA,oBAAU,EAAC,IAAA,gBAAI,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;gBACtC,OAAO,OAAO,CAAC;YACjB,CAAC;YAED,MAAM,MAAM,GAAG,IAAA,mBAAO,EAAC,OAAO,CAAC,CAAC;YAChC,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;gBACvB,OAAO,IAAA,mBAAO,EAAC,KAAK,CAAC,CAAC;YACxB,CAAC;YAED,OAAO,GAAG,MAAM,CAAC;QACnB,CAAC;IACH,CAAC;IAED;;;;OAIG;IACK,MAAM,CAAC,cAAc,CAAC,KAAa;QACzC,OAAO,CAAC,GAAG,IAAI,EAAE,EAAE;YACjB,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;YAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;YAEtD,IAAK,OAAyC,EAAE,GAAG,KAAK,SAAS,EAAE,CAAC;gBAClE,OAAO,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;YACxB,CAAC;YAED,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;gBACzB,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,GAAI,MAAiB,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;gBAC3D,CAAC,CAAC,KAAK,CAAC,EAAE,GAAI,KAAgB,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QACxD,CAAC,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,KAAK,CAAC,OAA0B,EAAE;QACvC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC7C,MAAM,OAAO,GAAG,IAAA,gBAAI,EAAC,IAAI,EAAE,0BAAkB,CAAC,CAAC;QAC/C,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;QAEnC,IAAI,OAAO,KAAK,SAAS,IAAI,GAAG,IAAA,mBAAO,EAAC,OAAO,CAAC,GAAG,eAAG,EAAE,CAAC,UAAU,CAAC,GAAG,OAAO,GAAG,eAAG,EAAE,CAAC,EAAE,CAAC;YACxF,OAAO,OAAO,CAAC;QACjB,CAAC;QAED,IAAA,mBAAS,EAAC,IAAA,gBAAI,EAAC,OAAO,EAAE,MAAM,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC;QAC7B,OAAO,CAAC,GAAG,CAAC,uBAAuB,GAAG,OAAO,CAAC;QAC9C,GAAG,CAAC,KAAK,GAAG,OAAO,CAAC,cAAc,CAChC,GAAG,CAAC,KAA0B,CACA,CAAC;QACjC,GAAG,CAAC,SAAS,GAAG,OAAO,CAAC,cAAc,CACpC,GAAG,CAAC,SAA8B,CACA,CAAC;QAErC,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAjED,0BAiEC","sourcesContent":["/**\n * Where a test makes its temp folders: `.agents/local/tmp/tests` of the repository, never the system\n * temp. `make test` sets TMPDIR to a folder like it; this does the same for a run without make - a\n * bare `bun test` on one file - and is the one place that knows the path.\n *\n * The empty `.git` marker in it stops git and bun's ignore lookup from reading the enclosing\n * repository, so GIT_CEILING_DIRECTORIES is set to the same folder.\n */\nimport { existsSync, mkdirSync } from 'node:fs';\nimport { dirname, join, resolve, sep } from 'node:path';\n\n/** The folder under the repository root that holds a test run's temp folders. */\nexport const REPO_TMP_DIRECTORY = join('.agents', 'local', 'tmp', 'tests');\n\ntype TSpawn = (...args: unknown[]) => unknown;\n\nexport class RepoTmp {\n /** The nearest ancestor of `start` that holds a `.git` (folder or file); `start` itself when there is none. */\n static findRoot(opts: { start?: string } = {}): string {\n const { start = process.cwd() } = opts;\n let current = resolve(start);\n\n for (;;) {\n if (existsSync(join(current, '.git'))) {\n return current;\n }\n\n const parent = dirname(current);\n if (parent === current) {\n return resolve(start);\n }\n\n current = parent;\n }\n }\n\n /**\n * `Bun.spawn` and `Bun.spawnSync` hand a child the environment the process started with, not the one\n * it has now, so a TMPDIR set here would never reach it. Wrapped to default to the current one; an\n * `env` a caller passes wins. `spawn(cmd, options)` and `spawn({ cmd, ...options })` are both handled.\n */\n private static withCurrentEnv(spawn: TSpawn): TSpawn {\n return (...args) => {\n const [first, second] = args;\n const options = Array.isArray(first) ? second : first;\n\n if ((options as { env?: unknown } | undefined)?.env !== undefined) {\n return spawn(...args);\n }\n\n return Array.isArray(first)\n ? spawn(first, { ...(second as object), env: process.env })\n : spawn({ ...(first as object), env: process.env });\n };\n }\n\n /**\n * Points TMPDIR at the repository's test folder unless it is already inside it (make's value, or a\n * private folder a caller made there), and returns the folder now in force. Idempotent.\n */\n static apply(opts: { root?: string } = {}): string {\n const root = opts.root ?? RepoTmp.findRoot();\n const testTmp = join(root, REPO_TMP_DIRECTORY);\n const current = process.env.TMPDIR;\n\n if (current !== undefined && `${resolve(current)}${sep}`.startsWith(`${testTmp}${sep}`)) {\n return current;\n }\n\n mkdirSync(join(testTmp, '.git'), { recursive: true });\n process.env.TMPDIR = testTmp;\n process.env.GIT_CEILING_DIRECTORIES = testTmp;\n Bun.spawn = RepoTmp.withCurrentEnv(\n Bun.spawn as unknown as TSpawn,\n ) as unknown as typeof Bun.spawn;\n Bun.spawnSync = RepoTmp.withCurrentEnv(\n Bun.spawnSync as unknown as TSpawn,\n ) as unknown as typeof Bun.spawnSync;\n\n return testTmp;\n }\n}\n"]}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/** Long enough for a cold `bun build` under a loaded parallel run; it bounds a stall, not a slow run. */
|
|
2
2
|
export declare const SPAWN_TIMEOUT_MS = 120000;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
export declare class SpawnHelper {
|
|
4
|
+
/**
|
|
5
|
+
* `Bun.spawnSync`, bounded. A sync spawn blocks the worker thread, so bun's own test timeout cannot
|
|
6
|
+
* fire while it waits: the `timeout` option is the only bound. Its default signal, SIGTERM, can be
|
|
7
|
+
* outlived by a stuck child - one such child once stalled a whole suite for 770s - so this kills with
|
|
8
|
+
* SIGKILL, and throws naming the command instead of returning a half-finished result.
|
|
9
|
+
*/
|
|
10
|
+
static spawnSyncBounded<const In extends Bun.SpawnOptions.Writable = 'ignore', const Out extends Bun.SpawnOptions.Readable = 'pipe', const Err extends Bun.SpawnOptions.Readable = 'pipe'>(opts: Bun.SpawnOptions.SpawnSyncOptions<In, Out, Err> & {
|
|
11
|
+
cmd: string[];
|
|
12
|
+
onExit?: undefined;
|
|
13
|
+
}): Bun.SyncSubprocess<Out, Err>;
|
|
14
|
+
}
|
|
13
15
|
//# sourceMappingURL=spawn.helper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spawn.helper.d.ts","sourceRoot":"","sources":["../../src/testing/spawn.helper.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,eAAO,MAAM,gBAAgB,SAAU,CAAC;AAExC;;;;;
|
|
1
|
+
{"version":3,"file":"spawn.helper.d.ts","sourceRoot":"","sources":["../../src/testing/spawn.helper.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,eAAO,MAAM,gBAAgB,SAAU,CAAC;AAExC,qBAAa,WAAW;IACtB;;;;;OAKG;IACH,MAAM,CAAC,gBAAgB,CACrB,KAAK,CAAC,EAAE,SAAS,GAAG,CAAC,YAAY,CAAC,QAAQ,GAAG,QAAQ,EACrD,KAAK,CAAC,GAAG,SAAS,GAAG,CAAC,YAAY,CAAC,QAAQ,GAAG,MAAM,EACpD,KAAK,CAAC,GAAG,SAAS,GAAG,CAAC,YAAY,CAAC,QAAQ,GAAG,MAAM,EACpD,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,gBAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG;QAAE,GAAG,EAAE,MAAM,EAAE,CAAC;QAAC,MAAM,CAAC,EAAE,SAAS,CAAA;KAAE;CAiBhG"}
|
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SpawnHelper = exports.SPAWN_TIMEOUT_MS = void 0;
|
|
4
4
|
/** Long enough for a cold `bun build` under a loaded parallel run; it bounds a stall, not a slow run. */
|
|
5
5
|
exports.SPAWN_TIMEOUT_MS = 120_000;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
class SpawnHelper {
|
|
7
|
+
/**
|
|
8
|
+
* `Bun.spawnSync`, bounded. A sync spawn blocks the worker thread, so bun's own test timeout cannot
|
|
9
|
+
* fire while it waits: the `timeout` option is the only bound. Its default signal, SIGTERM, can be
|
|
10
|
+
* outlived by a stuck child - one such child once stalled a whole suite for 770s - so this kills with
|
|
11
|
+
* SIGKILL, and throws naming the command instead of returning a half-finished result.
|
|
12
|
+
*/
|
|
13
|
+
static spawnSyncBounded(opts) {
|
|
14
|
+
const timeout = opts.timeout ?? exports.SPAWN_TIMEOUT_MS;
|
|
15
|
+
const result = Bun.spawnSync({
|
|
16
|
+
...opts,
|
|
17
|
+
timeout,
|
|
18
|
+
killSignal: 'SIGKILL',
|
|
19
|
+
});
|
|
20
|
+
if (result.exitedDueToTimeout) {
|
|
21
|
+
// eslint-disable-next-line venizia/no-new-error -- getError would be a dev-configs -> inversion cycle
|
|
22
|
+
throw new Error(`[SpawnHelper.spawnSyncBounded] did not exit within ${timeout} ms, killed | cmd: ${opts.cmd.join(' ').slice(0, 200)}`);
|
|
23
|
+
}
|
|
24
|
+
return result;
|
|
18
25
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
exports.spawnSyncBounded = spawnSyncBounded;
|
|
26
|
+
}
|
|
27
|
+
exports.SpawnHelper = SpawnHelper;
|
|
22
28
|
//# sourceMappingURL=spawn.helper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spawn.helper.js","sourceRoot":"","sources":["../../src/testing/spawn.helper.ts"],"names":[],"mappings":";;;AAAA,yGAAyG;AAC5F,QAAA,gBAAgB,GAAG,OAAO,CAAC;AAExC;;;;;
|
|
1
|
+
{"version":3,"file":"spawn.helper.js","sourceRoot":"","sources":["../../src/testing/spawn.helper.ts"],"names":[],"mappings":";;;AAAA,yGAAyG;AAC5F,QAAA,gBAAgB,GAAG,OAAO,CAAC;AAExC,MAAa,WAAW;IACtB;;;;;OAKG;IACH,MAAM,CAAC,gBAAgB,CAIrB,IAA6F;QAC7F,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,wBAAgB,CAAC;QACjD,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,CAAe;YACzC,GAAG,IAAI;YACP,OAAO;YACP,UAAU,EAAE,SAAkB;SAC/B,CAAC,CAAC;QAEH,IAAI,MAAM,CAAC,kBAAkB,EAAE,CAAC;YAC9B,sGAAsG;YACtG,MAAM,IAAI,KAAK,CACb,sDAAsD,OAAO,sBAAsB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CACtH,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA5BD,kCA4BC","sourcesContent":["/** Long enough for a cold `bun build` under a loaded parallel run; it bounds a stall, not a slow run. */\nexport const SPAWN_TIMEOUT_MS = 120_000;\n\nexport class SpawnHelper {\n /**\n * `Bun.spawnSync`, bounded. A sync spawn blocks the worker thread, so bun's own test timeout cannot\n * fire while it waits: the `timeout` option is the only bound. Its default signal, SIGTERM, can be\n * outlived by a stuck child - one such child once stalled a whole suite for 770s - so this kills with\n * SIGKILL, and throws naming the command instead of returning a half-finished result.\n */\n static spawnSyncBounded<\n const In extends Bun.SpawnOptions.Writable = 'ignore',\n const Out extends Bun.SpawnOptions.Readable = 'pipe',\n const Err extends Bun.SpawnOptions.Readable = 'pipe',\n >(opts: Bun.SpawnOptions.SpawnSyncOptions<In, Out, Err> & { cmd: string[]; onExit?: undefined }) {\n const timeout = opts.timeout ?? SPAWN_TIMEOUT_MS;\n const result = Bun.spawnSync<In, Out, Err>({\n ...opts,\n timeout,\n killSignal: 'SIGKILL' as const,\n });\n\n if (result.exitedDueToTimeout) {\n // eslint-disable-next-line venizia/no-new-error -- getError would be a dev-configs -> inversion cycle\n throw new Error(\n `[SpawnHelper.spawnSyncBounded] did not exit within ${timeout} ms, killed | cmd: ${opts.cmd.join(' ').slice(0, 200)}`,\n );\n }\n\n return result;\n }\n}\n"]}
|
|
@@ -7,5 +7,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
* run inside a package: there, pass `--preload @venizia/dev-configs/testing/tmpdir-preload` in the `test` script.
|
|
8
8
|
*/
|
|
9
9
|
const repo_tmp_1 = require("./repo-tmp");
|
|
10
|
-
|
|
10
|
+
repo_tmp_1.RepoTmp.apply();
|
|
11
11
|
//# sourceMappingURL=tmpdir-preload.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tmpdir-preload.js","sourceRoot":"","sources":["../../src/testing/tmpdir-preload.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"tmpdir-preload.js","sourceRoot":"","sources":["../../src/testing/tmpdir-preload.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yCAAqC;AAErC,kBAAO,CAAC,KAAK,EAAE,CAAC","sourcesContent":["/**\n * Test preload: `[test] preload = [\"@venizia/dev-configs/testing/tmpdir-preload\"]` in a bunfig makes\n * a bare `bun test` keep its temp folders in the repository, like `make test` does. Bun reads only the\n * `bunfig.toml` of the folder it runs in, so a root file applies to a run from the root, not to `bun test`\n * run inside a package: there, pass `--preload @venizia/dev-configs/testing/tmpdir-preload` in the `test` script.\n */\nimport { RepoTmp } from './repo-tmp';\n\nRepoTmp.apply();\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venizia/dev-configs",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7-1",
|
|
4
4
|
"description": "Shareable development configurations for TypeScript projects: oxlint presets with per-rule builders, the ESLint naming-convention rule, the legacy ESLint flat config, and TypeScript compiler options with critical decorator support (experimentalDecorators, emitDecoratorMetadata, useDefineForClassFields). Single source of truth for consistent code style, type checking, and build settings across monorepo packages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build-tools",
|
|
@@ -105,8 +105,7 @@
|
|
|
105
105
|
"access": "public"
|
|
106
106
|
},
|
|
107
107
|
"scripts": {
|
|
108
|
-
"force-update": "sh ../../scripts/build/force-update.sh"
|
|
109
|
-
"prepublishOnly": "make rebuild"
|
|
108
|
+
"force-update": "sh ../../scripts/build/force-update.sh"
|
|
110
109
|
},
|
|
111
110
|
"dependencies": {
|
|
112
111
|
"@eslint/js": "^10.0.1",
|