Skip to content

Commit c9105a9

Browse files
committed
refactor: rename coverage command to cover
1 parent ba7f7ea commit c9105a9

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ TypeScript implementation of [Package URL specification](https://github.com/pack
3434
- **Lint**: `pnpm check:lint`
3535
- **Check all**: `pnpm check`
3636
- **Fix**: `pnpm check:lint:fix` or `pnpm fix`
37-
- **Coverage**: `pnpm coverage`
37+
- **Coverage**: `pnpm cover`
3838

3939
### PURL Standards
4040

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"build": "node scripts/build.mjs",
3636
"check:tsc": "tsgo --noEmit -p .config/tsconfig.check.json",
3737
"clean": "node scripts/clean.mjs",
38-
"coverage": "node scripts/coverage.mjs",
38+
"cover": "node scripts/cover.mjs",
3939
"lint": "node scripts/lint.mjs",
4040
"fix": "node scripts/lint.mjs --fix",
4141
"prepare": "husky",
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Collects both code coverage and type coverage.
44
*
55
* Usage:
6-
* node scripts/coverage.mjs [--code-only|--type-only|--percent]
6+
* node scripts/cover.mjs [--code-only|--type-only|--percent]
77
*/
88

99
import { parseArgs } from 'node:util'
@@ -44,10 +44,10 @@ async function main() {
4444
if (values['code-only']) {
4545
logger.log('Collecting code coverage...')
4646
const exitCode = await runSequence([
47-
{ args: ['run', 'pretest:unit'], command: 'pnpm' },
47+
{ args: ['run', 'build'], command: 'pnpm' },
4848
{
49-
args: ['run', 'test:unit:coverage'],
50-
command: 'pnpm',
49+
args: ['-q', 'run', '-f', '.env.test', '--', 'vitest', '--config', '.config/vitest.config.mts', '--run', '--coverage'],
50+
command: 'dotenvx',
5151
},
5252
])
5353
process.exitCode = exitCode
@@ -58,10 +58,10 @@ async function main() {
5858
logger.log('Collecting coverage (code + type)...')
5959

6060
const codeExitCode = await runSequence([
61-
{ args: ['run', 'pretest:unit'], command: 'pnpm' },
61+
{ args: ['run', 'build'], command: 'pnpm' },
6262
{
63-
args: ['run', 'test:unit:coverage'],
64-
command: 'pnpm',
63+
args: ['-q', 'run', '-f', '.env.test', '--', 'vitest', '--config', '.config/vitest.config.mts', '--run', '--coverage'],
64+
command: 'dotenvx',
6565
},
6666
])
6767

0 commit comments

Comments
 (0)