Skip to content

Commit be7b49a

Browse files
feat(setup): remove zx & use execa (#349)
<!-- 👋 Hi, thanks for sending a PR to template-typescript-node-package! 💖. Please fill out all fields below and make sure each item is true and [x] checked. Otherwise we may not be able to review your PR. --> ## PR Checklist - [x] Addresses an existing open issue: fixes #340 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/main/.github/CONTRIBUTING.md) were taken ## Overview <!-- Description of what is changed and how the code change does that. --> - Maintain the clack prompt till the end with intro, spinner & outro - Add confirm clack promt for `skip-api` - Improve some node commands with well tested packages which are well tested - Added try catch block to every command to catch the errors & the message in granular - Reorganize catching errors without having to use `caughtError` - Added `{cause: error}` to get the complete stack trace in the final catch block - Added restoring the half completed changed on error - Remove dependencies only on successfull setup run - Update test file with `execa` --------- Co-authored-by: Josh Goldberg ✨ <[email protected]>
1 parent 18cf9e7 commit be7b49a

File tree

6 files changed

+177
-107
lines changed

6 files changed

+177
-107
lines changed

cspell.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"lcov",
2121
"packagejson",
2222
"quickstart",
23-
"wontfix"
23+
"wontfix",
24+
"execa"
2425
]
2526
}

knip.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"$schema": "https://unpkg.com/knip@next/schema.json",
33
"entry": ["src/index.ts!", "script/setup*.js"],
4+
"ignoreBinaries": ["cat", "gh"],
45
"ignoreDependencies": ["all-contributors-cli"],
56
"project": ["src/**/*.ts!", "script/**/*.js"]
67
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
"lint:packages": "pnpm-deduplicate --list",
2828
"lint:spelling": "cspell \"**\" \".github/**/*\"",
2929
"prepare": "husky install",
30-
"setup": "npx --yes zx --quiet script/setup.js",
31-
"setup:test": "npx --yes zx --quiet script/setup-test-e2e.js",
30+
"setup": "node script/setup.js",
31+
"setup:test": "node script/setup-test-e2e.js",
3232
"should-semantic-release": "should-semantic-release --verbose",
3333
"test": "vitest"
3434
},
@@ -57,6 +57,7 @@
5757
"eslint-plugin-typescript-sort-keys": "^2.1.0",
5858
"eslint-plugin-vitest": "^0.0.57",
5959
"eslint-plugin-yml": "^1.5.0",
60+
"execa": "^7.1.1",
6061
"husky": "^8.0.3",
6162
"jsonc-eslint-parser": "^2.1.0",
6263
"knip": "2.4.0",

0 commit comments

Comments
 (0)