Skip to content

Commit 486f89d

Browse files
build: renamed *:test to test:* in every file (#811)
<!-- 👋 Hi, thanks for sending a PR to create-typescript-app! 💖. 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 #786 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Also fixed a typo "initiamigratelize" in .github/workflows/DEVELOPMENT.md. <!-- Description of what is changed and how the code change does that. --> --------- Co-authored-by: Josh Goldberg <[email protected]>
1 parent c348a61 commit 486f89d

File tree

7 files changed

+23
-23
lines changed

7 files changed

+23
-23
lines changed

.github/DEVELOPMENT.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ You can run the end-to-end test for creation locally on the command-line.
116116
Note that the files need to be built with `pnpm run build` beforehand.
117117

118118
```shell
119-
pnpm run create:test
119+
pnpm run test:create
120120
```
121121

122122
That end-to-end test executes `script/create-test-e2e.js`, which:
@@ -142,7 +142,7 @@ You can run the end-to-end test for initializing locally on the command-line.
142142
Note that files need to be built with `pnpm run build` beforehand.
143143

144144
```shell
145-
pnpm run initialize:test
145+
pnpm run test:initialize
146146
```
147147

148148
That end-to-end test executes `script/initialize-test-e2e.js`, which:
@@ -153,7 +153,7 @@ That end-to-end test executes `script/initialize-test-e2e.js`, which:
153153
4. Resets everything
154154
5. Runs initialization a second time, capturing test coverage
155155

156-
The `pnpm run initialize:test` script is run in CI to ensure that templating changes are in sync with the template's actual files.
156+
The `pnpm run test:initialize` script is run in CI to ensure that templating changes are in sync with the template's actual files.
157157
See `.github/workflows/test-initialize.yml`.
158158

159159
### The Migration Script
@@ -183,7 +183,7 @@ node ../create-typescript-app/bin/migrate.js
183183
You can run the end-to-end test for migrating locally on the command-line:
184184

185185
```shell
186-
pnpm run initiamigratelize:test
186+
pnpm run test:migrate
187187
```
188188

189189
That end-to-end test executes `script/migrate-test-e2e.js`, which:
@@ -192,5 +192,5 @@ That end-to-end test executes `script/migrate-test-e2e.js`, which:
192192
2. Checks that only a small list of allowed files were changed
193193
3. Checks that the local repository's files were changed correctly (e.g. removed initialization-only files)
194194

195-
The `pnpm run migrate:test` script is run in CI to ensure that templating changes are in sync with the template's actual files.
195+
The `pnpm run test:migrate` script is run in CI to ensure that templating changes are in sync with the template's actual files.
196196
See `.github/workflows/test-migrate.yml`.

.github/workflows/test-create.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
- uses: actions/checkout@v4
66
- uses: ./.github/actions/prepare
77
- run: pnpm run build
8-
- run: pnpm run create:test
8+
- run: pnpm run test:create
99
- if: always()
1010
name: Codecov
1111
uses: codecov/codecov-action@v3

.github/workflows/test-initialize.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
- uses: actions/checkout@v4
66
- uses: ./.github/actions/prepare
77
- run: pnpm run build
8-
- run: pnpm run initialize:test
8+
- run: pnpm run test:initialize
99
- if: always()
1010
name: Codecov
1111
uses: codecov/codecov-action@v3

.github/workflows/test-migrate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
- uses: actions/checkout@v4
66
- uses: ./.github/actions/prepare
77
- run: pnpm run build
8-
- run: pnpm run migrate:test
8+
- run: pnpm run test:migrate
99
- if: always()
1010
name: Codecov
1111
uses: codecov/codecov-action@v3

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@
2323
],
2424
"scripts": {
2525
"build": "tsup",
26-
"create:test": "node script/create-test-e2e.js",
2726
"format": "prettier \"**/*\" --ignore-unknown",
2827
"format:write": "pnpm format --write",
2928
"initialize": "tsx ./src/bin/index.js --mode initialize",
30-
"initialize:test": "node script/initialize-test-e2e.js",
3129
"lint": "eslint . .*js --max-warnings 0",
3230
"lint:knip": "knip",
3331
"lint:md": "markdownlint \"**/*.md\" \".github/**/*.md\" --rules sentences-per-line",
3432
"lint:package-json": "npmPkgJsonLint .",
3533
"lint:packages": "pnpm dedupe --check",
3634
"lint:spelling": "cspell \"**\" \".github/**/*\"",
37-
"migrate:test": "node script/migrate-test-e2e.js",
3835
"prepare": "husky install",
3936
"should-semantic-release": "should-semantic-release --verbose",
4037
"test": "vitest",
38+
"test:create": "node script/create-test-e2e.js",
39+
"test:initialize": "node script/initialize-test-e2e.js",
40+
"test:migrate": "node script/migrate-test-e2e.js",
4141
"tsc": "tsc"
4242
},
4343
"lint-staged": {

src/steps/updateLocalFiles.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,14 @@ describe("updateLocalFiles", () => {
125125
[
126126
{
127127
"files": "./package.json",
128-
"from": /"create:test": "\\.\\+\\\\n/g,
128+
"from": /"test:create": "\\.\\+\\\\n/g,
129129
"to": "",
130130
},
131131
],
132132
[
133133
{
134134
"files": "./package.json",
135-
"from": /"initialize:test": "\\.\\*/g,
135+
"from": /"test:initialize": "\\.\\*/g,
136136
"to": "",
137137
},
138138
],
@@ -146,7 +146,7 @@ describe("updateLocalFiles", () => {
146146
[
147147
{
148148
"files": "./package.json",
149-
"from": /"migrate:test": "\\.\\+\\\\n/g,
149+
"from": /"test:migrate": "\\.\\+\\\\n/g,
150150
"to": "",
151151
},
152152
],
@@ -260,14 +260,14 @@ describe("updateLocalFiles", () => {
260260
[
261261
{
262262
"files": "./package.json",
263-
"from": /"create:test": "\\.\\+\\\\n/g,
263+
"from": /"test:create": "\\.\\+\\\\n/g,
264264
"to": "",
265265
},
266266
],
267267
[
268268
{
269269
"files": "./package.json",
270-
"from": /"initialize:test": "\\.\\*/g,
270+
"from": /"test:initialize": "\\.\\*/g,
271271
"to": "",
272272
},
273273
],
@@ -281,7 +281,7 @@ describe("updateLocalFiles", () => {
281281
[
282282
{
283283
"files": "./package.json",
284-
"from": /"migrate:test": "\\.\\+\\\\n/g,
284+
"from": /"test:migrate": "\\.\\+\\\\n/g,
285285
"to": "",
286286
},
287287
],
@@ -398,14 +398,14 @@ describe("updateLocalFiles", () => {
398398
[
399399
{
400400
"files": "./package.json",
401-
"from": /"create:test": "\\.\\+\\\\n/g,
401+
"from": /"test:create": "\\.\\+\\\\n/g,
402402
"to": "",
403403
},
404404
],
405405
[
406406
{
407407
"files": "./package.json",
408-
"from": /"initialize:test": "\\.\\*/g,
408+
"from": /"test:initialize": "\\.\\*/g,
409409
"to": "",
410410
},
411411
],
@@ -419,7 +419,7 @@ describe("updateLocalFiles", () => {
419419
[
420420
{
421421
"files": "./package.json",
422-
"from": /"migrate:test": "\\.\\+\\\\n/g,
422+
"from": /"test:migrate": "\\.\\+\\\\n/g,
423423
"to": "",
424424
},
425425
],

src/steps/updateLocalFiles.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ export async function updateLocalFiles(options: Options) {
1919
[/\/\*\n.+\*\/\n\n/gs, ``, ".eslintrc.cjs"],
2020
[/"author": ".+"/g, `"author": "${options.author}"`, "./package.json"],
2121
[/"bin": ".+\n/g, ``, "./package.json"],
22-
[/"create:test": ".+\n/g, ``, "./package.json"],
23-
[/"initialize:test": ".*/g, ``, "./package.json"],
22+
[/"test:create": ".+\n/g, ``, "./package.json"],
23+
[/"test:initialize": ".*/g, ``, "./package.json"],
2424
[/"initialize": ".*/g, ``, "./package.json"],
25-
[/"migrate:test": ".+\n/g, ``, "./package.json"],
25+
[/"test:migrate": ".+\n/g, ``, "./package.json"],
2626
[/## Getting Started.*## Development/gs, `## Development`, "./README.md"],
2727
[/\n## Setup Scripts.*$/gs, "", "./.github/DEVELOPMENT.md"],
2828
[`\t\t"src/initialize/index.ts",\n`, ``, "./knip.jsonc"],

0 commit comments

Comments
 (0)