type-a-bin 0.1.1 → 0.1.2
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/README.md +12 -8
- package/package.json +4 -25
package/README.md
CHANGED
|
@@ -540,9 +540,10 @@ library lives at the root; additional packages live under `packages/`:
|
|
|
540
540
|
|
|
541
541
|
- [Node.js](https://nodejs.org) 26 and [pnpm](https://pnpm.io) (enforced
|
|
542
542
|
via `engines` in `package.json`)
|
|
543
|
-
- [pandoc](https://pandoc.org) ≥ 3.10 — only needed for Markdown
|
|
544
|
-
|
|
545
|
-
the
|
|
543
|
+
- [pandoc](https://pandoc.org) ≥ 3.10 — only needed for the Markdown
|
|
544
|
+
steps of `pnpm lint` / `pnpm format` (which run through
|
|
545
|
+
[ts-canon](https://github.com/SynthLuvr/ts-canon)), not for using the
|
|
546
|
+
library
|
|
546
547
|
- On Windows: [Git for Windows](https://gitforwindows.org/) — its bash
|
|
547
548
|
powers bash-interpreter mocks (node-interpreter mocks need nothing
|
|
548
549
|
beyond Node itself)
|
|
@@ -555,8 +556,8 @@ Run from the repository root:
|
|
|
555
556
|
|----|----|
|
|
556
557
|
| `pnpm build` | Build the library (and workspace packages) to `dist/` |
|
|
557
558
|
| `pnpm test` | Build, run unit tests, then run workspace tests |
|
|
558
|
-
| `pnpm lint` | Run all linters (Biome, oxlint, ast-grep, pandoc, audit, jscpd) |
|
|
559
|
-
| `pnpm format` | Run all formatters with auto-fix |
|
|
559
|
+
| `pnpm lint` | Run all linters via ts-canon (Biome, oxlint, ast-grep, pandoc, peer-deps, audit, jscpd) |
|
|
560
|
+
| `pnpm format` | Run all formatters via ts-canon with auto-fix |
|
|
560
561
|
| `pnpm test:watch` | Run unit tests in watch mode |
|
|
561
562
|
|
|
562
563
|
## Releasing
|
|
@@ -574,9 +575,12 @@ an *empty* environment, and the `npm publish` action allowed.
|
|
|
574
575
|
|
|
575
576
|
To cut a release, run the workflow from `main` with a semver `bump` or
|
|
576
577
|
an exact `version`. It builds, tests, publishes to npm with provenance,
|
|
577
|
-
then
|
|
578
|
-
|
|
579
|
-
|
|
578
|
+
then lands the version bump on `main` via an automatically merged pull
|
|
579
|
+
request (the `main` ruleset requires all changes to go through a PR, so
|
|
580
|
+
the workflow cannot push to `main` directly), pushes the `vX.Y.Z` tag,
|
|
581
|
+
and opens the GitHub release. If the version is already on npm — e.g. a
|
|
582
|
+
previous run published but failed later — publish is skipped and only
|
|
583
|
+
the remaining bookkeeping runs, so re-running the same version is safe.
|
|
580
584
|
|
|
581
585
|
If publishing fails, the workflow annotates the run with the fix. Both
|
|
582
586
|
known registry rejections are auth or provenance problems, not problems
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "type-a-bin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Mock any executable binary for testing in Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,38 +26,17 @@
|
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build:lib": "del-cli dist && tsc && del-cli dist/tests",
|
|
28
28
|
"build": "pnpm build:lib && pnpm -r build",
|
|
29
|
-
"format
|
|
30
|
-
"
|
|
31
|
-
"format:braces": "ast-grep scan --rule .ast-grep/rules/strip-braces.yml -U .",
|
|
32
|
-
"format:check": "biome check --write .",
|
|
33
|
-
"format": "npm-run-all format:arrows format:braces format:biome format:check format:md",
|
|
34
|
-
"lint:biome": "biome check .",
|
|
35
|
-
"lint:oxlint": "tsx scripts/oxlint.mts --deny-warnings .",
|
|
36
|
-
"lint": "npm-run-all lint:biome lint:oxlint lint:exports lint:functions lint:file-comment lint:md lint:peer-deps lint:audit lint:duplicates",
|
|
37
|
-
"lint:exports": "ast-grep scan --rule .ast-grep/rules/no-inline-export.yml --error=no-inline-export --globs '!**/*.d.ts' .",
|
|
38
|
-
"lint:functions": "ast-grep scan --rule .ast-grep/rules/no-function-declaration.yml --error=no-function-declaration --globs '!**/*.d.ts' .",
|
|
39
|
-
"lint:file-comment": "ast-grep scan --rule .ast-grep/rules/no-file-comment.yml --error=no-file-comment --globs '!**/*.d.ts' .",
|
|
40
|
-
"lint:md": "tsx scripts/pandoc-md.mts --check",
|
|
41
|
-
"lint:audit": "pnpm audit --prod",
|
|
42
|
-
"lint:duplicates": "jscpd src --format typescript --min-lines 3 --threshold 5",
|
|
43
|
-
"lint:peer-deps": "tsx scripts/peer-deps.mts",
|
|
44
|
-
"format:md": "tsx scripts/pandoc-md.mts --write",
|
|
29
|
+
"format": "ts-canon format",
|
|
30
|
+
"lint": "ts-canon lint",
|
|
45
31
|
"test:lib": "vitest run --coverage",
|
|
46
32
|
"test": "pnpm build:lib && pnpm test:lib && pnpm -r test",
|
|
47
33
|
"test:watch": "vitest"
|
|
48
34
|
},
|
|
49
35
|
"devDependencies": {
|
|
50
|
-
"@ast-grep/cli": "^0.45.2",
|
|
51
|
-
"@ast-grep/cli-linux-x64-gnu": "^0.45.2",
|
|
52
|
-
"@biomejs/biome": "^2.5.10",
|
|
53
36
|
"@types/node": "^26.3.0",
|
|
54
37
|
"@vitest/coverage-v8": "^4.1.11",
|
|
55
|
-
"convert-to-arrow": "^1.1.4",
|
|
56
38
|
"del-cli": "^7.0.0",
|
|
57
|
-
"
|
|
58
|
-
"npm-run-all2": "^9.0.3",
|
|
59
|
-
"oxlint": "^1.80.0",
|
|
60
|
-
"oxlint-tsgolint": "^7.0.2001",
|
|
39
|
+
"ts-canon": "^0.1.3",
|
|
61
40
|
"tsx": "^4.23.12",
|
|
62
41
|
"typescript": "^7.0.2",
|
|
63
42
|
"vitest": "^4.1.11"
|