Skip to content

Commit 87de835

Browse files
chore: switch tooling to npm, with [email protected]
1 parent 5da206f commit 87de835

19 files changed

+30
-5262
lines changed

.github/DEVELOPMENT.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Development
22

3-
After [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo) and [installing Yarn](https://yarnpkg.com/getting-started):
3+
After [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo) and [installing Node.js](https://nodejs.org):
44

55
```shell
66
git clone https://github.com/ < your-name-here > /performance
77
cd performance
8-
yarn install
8+
npm install
99
```
1010

1111
> This repository includes a list of suggested VS Code extensions.
@@ -19,23 +19,23 @@ It should be applied automatically when you save files in VS Code or make a Git
1919
To manually reformat all files, you can run:
2020

2121
```shell
22-
yarn format --write
22+
npm run format -- --write
2323
```
2424

2525
## Linting
2626

2727
This package includes several forms of linting to enforce consistent code quality and styling.
2828
Each should be shown in VS Code, and can be run manually on the command-line:
2929

30-
- `yarn lint` ([ESLint](https://eslint.org) with [typescript-eslint](https://typescript-eslint.io)): Lints JavaScript and TypeScript source files
31-
- `yarn lint:knip` ([knip](https://github.com/webpro/knip)): Detects unused files, dependencies, and code exports
32-
- `yarn lint:md` ([Markdownlint](https://github.com/DavidAnson/markdownlint): Checks Markdown source files
33-
- `yarn lint:spelling` ([cspell](https://cspell.org)): Spell checks across all source files
30+
- `npm lint` ([ESLint](https://eslint.org) with [typescript-eslint](https://typescript-eslint.io)): Lints JavaScript and TypeScript source files
31+
- `npm lint:knip` ([knip](https://github.com/webpro/knip)): Detects unused files, dependencies, and code exports
32+
- `npm lint:md` ([Markdownlint](https://github.com/DavidAnson/markdownlint): Checks Markdown source files
33+
- `npm lint:spelling` ([cspell](https://cspell.org)): Spell checks across all source files
3434

3535
Read the individual documentation for each linter to understand how it can be configured and used best.
3636

3737
For example, ESLint can be run with `--fix` to auto-fix some lint rule complaints:
3838

3939
```shell
40-
yarn run lint --fix
40+
npm run lint -- --fix
4141
```

.github/actions/prepare/action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ runs:
66
steps:
77
- uses: actions/setup-node@v4
88
with:
9-
cache: yarn
109
node-version: "20"
11-
- run: yarn install
10+
- run: npm install
1211
shell: bash
1312
using: composite

.github/workflows/lint-knip.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
steps:
55
- uses: actions/checkout@v4
66
- uses: ./.github/actions/prepare
7-
- run: yarn lint:knip
7+
- run: npm run lint:knip
88

99
name: Lint Knip
1010

.github/workflows/lint-markdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
steps:
55
- uses: actions/checkout@v4
66
- uses: ./.github/actions/prepare
7-
- run: yarn lint:md
7+
- run: npm run lint:md
88

99
name: Lint Markdown
1010

.github/workflows/lint-spelling.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
steps:
55
- uses: actions/checkout@v4
66
- uses: ./.github/actions/prepare
7-
- run: yarn lint:spelling
7+
- run: npm run lint:spelling
88

99
name: Lint spelling
1010

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
steps:
55
- uses: actions/checkout@v4
66
- uses: ./.github/actions/prepare
7-
- run: yarn lint
7+
- run: npm run lint
88

99
name: Lint
1010

.github/workflows/prettier.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
steps:
55
- uses: actions/checkout@v4
66
- uses: ./.github/actions/prepare
7-
- run: yarn format --list-different
7+
- run: npm run format -- --list-different
88

99
name: Prettier
1010

.github/workflows/tsc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
steps:
55
- uses: actions/checkout@v4
66
- uses: ./.github/actions/prepare
7-
- run: yarn tsc
7+
- run: npm run tsc
88

99
name: Type Check
1010

.gitignore

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
!.yarn/patches
2-
!.yarn/plugins
3-
!.yarn/releases
4-
!.yarn/sdks
5-
!.yarn/versions
6-
.yarn/*
71
cases/
82
node_modules/
3+
package-lock.json

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
.all-contributorsrc
22
.husky/
33
cases/
4-
yarn.yaml

.yarn/install-state.gz

-438 KB
Binary file not shown.

.yarnrc.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
## Usage
1717

1818
```shell
19-
yarn
20-
yarn generate
21-
yarn measure
19+
npm install
20+
npm generate
21+
npm measure
2222
```
2323

2424
## Contributors

cspell.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"dictionaries": ["typescript"],
3-
"ignorePaths": [".github", "node_modules", "yarn.yaml"],
3+
"ignorePaths": [".github", "cases", "node_modules"],
44
"words": ["execa", "knip", "packagejson", "tseslint"]
55
}

eslint.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import tseslint from "typescript-eslint";
1212

1313
export default tseslint.config(
1414
{
15-
ignores: ["cases", "node_modules", "projects", "yarn.yaml", ".yarn"],
15+
ignores: ["cases", "node_modules", "projects"],
1616
},
1717
{
1818
linterOptions: {
@@ -38,7 +38,7 @@ export default tseslint.config(
3838
files: ["**/*.js", "**/*.ts"],
3939
languageOptions: {
4040
parserOptions: {
41-
EXPERIMENTAL_useProjectService: {
41+
projectService: {
4242
allowDefaultProjectForFiles: ["./*.*s", "eslint.config.js"],
4343
defaultProject: "./tsconfig.json",
4444
},

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,15 @@
6767
"sentences-per-line": "^0.2.1",
6868
"tsx": "^4.16.2",
6969
"typescript": "^5.5.3",
70-
"typescript-eslint": "^7.16.0"
70+
"typescript-eslint": "8.0.0-alpha.44"
7171
},
72-
"packageManager": "[email protected]",
7372
"engines": {
7473
"node": ">=22"
7574
},
7675
"publishConfig": {
7776
"provenance": true
77+
},
78+
"overrides": {
79+
"@typescript-eslint/utils": "8.0.0-alpha.44"
7880
}
7981
}

src/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,6 @@ for (const files of caseEntries[0].values) {
8181
}
8282
}
8383

84-
await execa({ stdio: "inherit" })`yarn`;
84+
await execa({ stdio: "inherit" })`npm install`;
8585

8686
console.log("Seeded cases.");

src/measure.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ async function runProjectLint(data: CaseData) {
1414
cwd: path.join(casesPath, projectName),
1515
reject: false,
1616
})(`hyperfine`, [
17-
"yarn lint",
17+
"npm run lint",
1818
"--ignore-failure",
1919
"--show-output",
2020
"--warmup",
@@ -23,10 +23,11 @@ async function runProjectLint(data: CaseData) {
2323

2424
if (result.exitCode) {
2525
console.log(result.stderr);
26+
console.log({ result });
2627
}
2728

2829
return (
29-
result.stdout.match(/[0-9.]+\s+\S+\s+±\s+[0-9.]+\s+\S+/)?.[0] ??
30+
/[0-9.]+\s+\S+\s+±\s+[0-9.]+\s+\S+/.exec(result.stdout)?.[0] ??
3031
result.stdout
3132
);
3233
}

0 commit comments

Comments
 (0)