Skip to content

Commit f978b54

Browse files
authored
chore!: build package as ESM-only (#70)
* chore: bump deps * chore!: build package as ESM-only
1 parent e0eeb19 commit f978b54

10 files changed

Lines changed: 866 additions & 1082 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
node_modules/
33
lib/
44
dist/
5+
tmp/
56
coverage/
67
.jest-cache/
78
benchmark/results/make-matrix-local.json

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20.16.0
1+
v22.13.1

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"editor.defaultFormatter": "biomejs.biome",
55
"editor.formatOnSave": true,
66
"editor.codeActionsOnSave": {
7-
"quickfix.biome": "explicit",
87
"source.fixAll": "always",
98
"source.organizeImports.biome": "explicit"
109
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ This project welcomes contributions. To get started, please [open an issue](http
140140

141141
### Testing, linting and commit style
142142

143-
This project uses [Biome](https://biomejs.dev/), [commitlint](https://github.com/conventional-changelog/commitlint) and [vitest](https://vitest.dev/) — in combination with [lint-staged](https://github.com/okonet/lint-staged) and [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks) — to enforce code quality, consistency and changelog style. These tools will check changed files, and cancel a commit with logging if any of the following are true:
143+
This project uses [Biome](https://biomejs.dev/), [commitlint](https://github.com/conventional-changelog/commitlint) and [vitest](https://vitest.dev/) — in combination with [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks) — to enforce code quality, consistency and changelog style. These tools will check changed files, and cancel a commit with logging if any of the following are true:
144144

145145
1. Biome has found non-fixable issues in the code
146146
2. The Vitest testing suites haven't all passed

biome.json

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
33
"vcs": {
44
"enabled": true,
55
"clientKind": "git",
@@ -16,16 +16,31 @@
1616
"attributePosition": "auto",
1717
"bracketSpacing": true
1818
},
19-
"organizeImports": {
20-
"enabled": true
19+
"assist": {
20+
"actions": {
21+
"source": {
22+
"organizeImports": {
23+
"level": "on",
24+
"options": {
25+
"groups": [
26+
":NODE:",
27+
":BLANK_LINE:",
28+
":PACKAGE:",
29+
":BLANK_LINE:",
30+
":PATH:",
31+
":BLANK_LINE:"
32+
]
33+
}
34+
}
35+
}
36+
}
2137
},
2238
"linter": {
2339
"enabled": true,
2440
"rules": {
2541
"recommended": true,
2642
"correctness": {
27-
"noUnusedVariables": "error",
28-
"useArrayLiterals": "error"
43+
"noUnusedVariables": "error"
2944
},
3045
"style": {
3146
"noNamespace": "error",
@@ -51,7 +66,7 @@
5166
},
5267
"overrides": [
5368
{
54-
"include": ["./scripts/run-benchmark.ts"],
69+
"includes": ["./scripts/**/*.ts"],
5570
"linter": { "rules": { "suspicious": { "noConsole": "off" } } }
5671
}
5772
]

package.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@
2020
"bugs": {
2121
"url": "https://github.com/neefrehman/make-matrix/issues"
2222
},
23-
"files": ["src/**/*", "dist/**/*"],
23+
"files": [
24+
"src/**/*",
25+
"dist/**/*"
26+
],
2427
"type": "module",
2528
"sideEffects": false,
2629
"exports": {
2730
".": {
2831
"types": "./dist/index.d.ts",
29-
"require": "./dist/index.cjs",
3032
"import": "./dist/index.js",
3133
"development": "./src/index.ts"
3234
}
@@ -42,53 +44,51 @@
4244
"build": "tsdown --config='scripts/build.ts'",
4345
"preversion": "pnpm run check",
4446
"version": "pnpm run build && pnpm run format:fix && git add -A src",
45-
"postversion": "pnpm run benchmark:ci && pnpm run updateBadges && git push && git push --tags",
46-
"updateBadges": "tsx scripts/update-badges.ts",
47-
"pre-commit": "lint-staged",
47+
"postversion": "pnpm run benchmark:ci && node --experimental-strip-types scripts/update-badges.ts && git push && git push --tags",
4848
"commit-msg": "commitlint -e",
4949
"commitizen": "cz",
5050
"commitlint": "commitlint",
51-
"benchmark": "tsx scripts/run-benchmark.ts current",
52-
"benchmark:ci": "tsx scripts/run-benchmark.ts current ci",
53-
"benchmark:diff": "tsx scripts/run-benchmark.ts diff",
54-
"benchmark:diff:ci": "tsx scripts/run-benchmark.ts diff ci"
51+
"benchmark": "node --experimental-strip-types scripts/run-benchmark.ts current",
52+
"benchmark:ci": "node --experimental-strip-types scripts/run-benchmark.ts current ci",
53+
"benchmark:diff": "node --experimental-strip-types scripts/run-benchmark.ts diff",
54+
"benchmark:diff:ci": "node --experimental-strip-types scripts/run-benchmark.ts diff ci"
5555
},
5656
"devDependencies": {
5757
"@actions/github": "6.0.1",
58-
"@biomejs/biome": "1.9.4",
58+
"@biomejs/biome": "2.2.4",
5959
"@commitlint/cli": "19.8.1",
6060
"@commitlint/config-conventional": "19.8.1",
6161
"@semantic-release/git": "10.0.1",
62+
"@types/node": "24.3.3",
6263
"benny": "3.7.1",
6364
"commitizen": "4.3.1",
6465
"cz-conventional-changelog": "3.3.0",
65-
"lint-staged": "15.5.2",
66-
"semantic-release": "24.2.7",
66+
"semantic-release": "24.2.8",
6767
"simple-git-hooks": "2.13.1",
68-
"terser": "5.43.1",
69-
"tsdown": "0.13.1",
70-
"tsx": "^4.19.4",
68+
"tsdown": "0.15.1",
7169
"typescript": "5.9.2",
7270
"vitest": "3.2.4"
7371
},
74-
"lint-staged": {
75-
"*": [],
76-
"*.(js|ts|tsx)": ["biome check --write", "vitest related --run --passWithNoTests"]
77-
},
7872
"simple-git-hooks": {
79-
"commit-msg": "npm run commit-msg",
80-
"pre-commit": "npm run pre-commit"
73+
"commit-msg": "pnpm run commit-msg",
74+
"pre-commit": "pnpm run check:fix && pnpm run test"
8175
},
8276
"commitlint": {
83-
"extends": ["@commitlint/config-conventional"],
77+
"extends": [
78+
"@commitlint/config-conventional"
79+
],
8480
"rules": {
85-
"body-max-line-length": [1, "always", 100]
81+
"body-max-line-length": [
82+
1,
83+
"always",
84+
100
85+
]
8686
}
8787
},
8888
"config": {
8989
"commitizen": {
9090
"path": "./node_modules/cz-conventional-changelog"
9191
}
9292
},
93-
"packageManager": "pnpm@9.9.0"
93+
"packageManager": "pnpm@10.15.1"
9494
}

0 commit comments

Comments
 (0)