Skip to content

Commit 67e70da

Browse files
authored
feat: use esmodule (#5)
BREAKING CHANGE: use esmodule
1 parent 2ee78ac commit 67e70da

File tree

15 files changed

+3187
-3021
lines changed

15 files changed

+3187
-3021
lines changed

.eslintignore

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

.eslintrc.cjs

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

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
node-version: [16]
12+
node-version: [20.x]
1313
os: [windows-latest, ubuntu-latest]
1414

1515
steps:
1616
- uses: actions/checkout@v3
1717
- uses: ./.github/actions/initialize
1818
- uses: pnpm/action-setup@v2.2.2
1919
with:
20-
version: 7.1.0
20+
version: 8.15.1
2121
- uses: actions/setup-node@v2
2222
with:
23-
node-version: "16"
23+
node-version: "20.x"
2424
cache: "pnpm"
2525
- run: pnpm i --frozen-lockfile
2626
- name: Use Node.js ${{ matrix.node-version }}

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
- uses: ./.github/actions/initialize
1515
- uses: pnpm/action-setup@v2.2.2
1616
with:
17-
version: 7.1.0
17+
version: 8.15.1
1818
- uses: actions/setup-node@v2
1919
with:
20-
node-version: "16"
20+
node-version: "20.x"
2121
registry-url: https://npm.pkg.github.com
2222
scope: "@Himenon"
2323
cache: "pnpm"
@@ -34,10 +34,10 @@ jobs:
3434
- uses: ./.github/actions/initialize
3535
- uses: pnpm/action-setup@v2.2.2
3636
with:
37-
version: 7.1.0
37+
version: 8.15.1
3838
- uses: actions/setup-node@v2
3939
with:
40-
node-version: "16"
40+
node-version: "20.x"
4141
registry-url: https://npm.pkg.github.com
4242
scope: "@Himenon"
4343
cache: "pnpm"
@@ -56,10 +56,10 @@ jobs:
5656
ref: main
5757
- uses: pnpm/action-setup@v2.2.2
5858
with:
59-
version: 7.1.0
59+
version: 8.15.1
6060
- uses: actions/setup-node@v2
6161
with:
62-
node-version: "16.x"
62+
node-version: "20.x"
6363
registry-url: "https://registry.npmjs.org"
6464
cache: "pnpm"
6565
- run: pnpm install

.github/workflows/versionUp.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
- uses: ./.github/actions/initialize
1616
- uses: pnpm/action-setup@v2.2.2
1717
with:
18-
version: 7.1.0
18+
version: 8.15.1
1919
- uses: actions/setup-node@v2
2020
with:
21-
node-version: "16.x"
21+
node-version: "20.x"
2222
cache: "pnpm"
2323
- run: pnpm i --frozen-lockfile
2424
- name: Auto version update

.prettierignore

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

.prettierrc.cjs

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

biome.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
3+
"organizeImports": {
4+
"enabled": true
5+
},
6+
"formatter": {
7+
"enabled": true,
8+
"indentStyle": "space",
9+
"lineWidth": 144
10+
},
11+
"linter": {
12+
"enabled": true,
13+
"rules": {
14+
"recommended": true,
15+
"complexity": {
16+
"noForEach": "off"
17+
}
18+
}
19+
},
20+
"files": {
21+
"ignoreUnknown": true,
22+
"ignore": ["dist", "src/__tests__"]
23+
},
24+
"javascript": {
25+
"formatter": {
26+
"arrowParentheses": "asNeeded"
27+
}
28+
}
29+
}

package.json

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,16 @@
4545
],
4646
"scripts": {
4747
"build": "tsup src/*.ts",
48-
"clean": "pnpm ts ./scripts/clean.ts",
49-
"format": "run-s prettier:format eslint:format",
48+
"clean": "rimraf dist",
5049
"lerna:version:up": "lerna version --yes",
5150
"release:github:registry": "pnpm publish --registry https://npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}",
5251
"release:npm:registry": "pnpm publish",
53-
"test": "run-p test:vitest test:sample eslint:validate prettier:validate",
54-
"prettier:format": "prettier \"**/*.{js,jsx,ts,tsx,json,yml,yaml,md,html}\" --write ./src",
55-
"prettier:validate": "prettier --check \"**/*.{js,jsx,ts,tsx,json,yml,yaml,md,html}\"",
56-
"eslint:format": "eslint \"**/*.{ts,tsx}\" --fix",
57-
"eslint:validate": "eslint \"**/*.{ts,tsx}\"",
52+
"test": "run-p test:vitest lint",
53+
"lint": "biome lint .",
54+
"format": "biome format --write .",
55+
"validate": "biome check --apply .",
5856
"test:vitest": "vitest",
59-
"test:sample": "node --loader ts-node/esm ./example/sample.ts"
57+
"ts": "node --no-warnings=ExperimentalWarning --experimental-specifier-resolution=node --loader ts-node/esm"
6058
},
6159
"simple-git-hooks": {
6260
"pre-commit": "pnpm lint-staged"
@@ -74,29 +72,26 @@
7472
]
7573
},
7674
"devDependencies": {
77-
"@swc/core": "^1.2.197",
78-
"@types/node": "17.0.40",
79-
"@typescript-eslint/eslint-plugin": "5.27.0",
80-
"@typescript-eslint/parser": "5.27.0",
75+
"@biomejs/biome": "^1.5.3",
76+
"@swc/core": "^1.3.107",
77+
"@types/node": "20.11.16",
78+
"@typescript-eslint/eslint-plugin": "6.20.0",
79+
"@typescript-eslint/parser": "6.20.0",
8180
"conventional-changelog-angular-all": "1.7.0",
8281
"cross-env": "^7.0.3",
83-
"eslint": "8.17.0",
84-
"eslint-config-prettier": "8.5.0",
85-
"eslint-plugin-import": "2.26.0",
86-
"eslint-plugin-simple-import-sort": "^7.0.0",
87-
"lerna": "5.0.0",
88-
"lint-staged": "13.0.0",
82+
"lerna": "8.0.2",
83+
"lint-staged": "15.2.1",
8984
"npm-run-all": "4.1.5",
90-
"prettier": "2.6.2",
91-
"simple-git-hooks": "^2.8.0",
92-
"sort-package-json": "1.57.0",
93-
"ts-node": "^10.8.1",
94-
"tsup": "^6.1.0",
95-
"typescript": "4.7.3",
96-
"vitest": "^0.14.0"
85+
"rimraf": "^5.0.5",
86+
"simple-git-hooks": "^2.9.0",
87+
"ts-node": "^10.9.2",
88+
"tsup": "^8.0.1",
89+
"typescript": "5.3.3",
90+
"vitest": "^1.2.2"
9791
},
9892
"engines": {
99-
"pnpm": ">=7"
93+
"node": ">=20",
94+
"pnpm": ">=8"
10095
},
10196
"publishConfig": {
10297
"access": "public"

0 commit comments

Comments
 (0)