Skip to content

Commit

Permalink
feat: use esmodule (#5)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: use esmodule
  • Loading branch information
Himenon authored Feb 4, 2024
1 parent 2ee78ac commit 67e70da
Show file tree
Hide file tree
Showing 15 changed files with 3,187 additions and 3,021 deletions.
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

28 changes: 0 additions & 28 deletions .eslintrc.cjs

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ jobs:

strategy:
matrix:
node-version: [16]
node-version: [20.x]
os: [windows-latest, ubuntu-latest]

steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/initialize
- uses: pnpm/action-setup@v2.2.2
with:
version: 7.1.0
version: 8.15.1
- uses: actions/setup-node@v2
with:
node-version: "16"
node-version: "20.x"
cache: "pnpm"
- run: pnpm i --frozen-lockfile
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
- uses: ./.github/actions/initialize
- uses: pnpm/action-setup@v2.2.2
with:
version: 7.1.0
version: 8.15.1
- uses: actions/setup-node@v2
with:
node-version: "16"
node-version: "20.x"
registry-url: https://npm.pkg.github.com
scope: "@Himenon"
cache: "pnpm"
Expand All @@ -34,10 +34,10 @@ jobs:
- uses: ./.github/actions/initialize
- uses: pnpm/action-setup@v2.2.2
with:
version: 7.1.0
version: 8.15.1
- uses: actions/setup-node@v2
with:
node-version: "16"
node-version: "20.x"
registry-url: https://npm.pkg.github.com
scope: "@Himenon"
cache: "pnpm"
Expand All @@ -56,10 +56,10 @@ jobs:
ref: main
- uses: pnpm/action-setup@v2.2.2
with:
version: 7.1.0
version: 8.15.1
- uses: actions/setup-node@v2
with:
node-version: "16.x"
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
cache: "pnpm"
- run: pnpm install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/versionUp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
- uses: ./.github/actions/initialize
- uses: pnpm/action-setup@v2.2.2
with:
version: 7.1.0
version: 8.15.1
- uses: actions/setup-node@v2
with:
node-version: "16.x"
node-version: "20.x"
cache: "pnpm"
- run: pnpm i --frozen-lockfile
- name: Auto version update
Expand Down
6 changes: 0 additions & 6 deletions .prettierignore

This file was deleted.

11 changes: 0 additions & 11 deletions .prettierrc.cjs

This file was deleted.

29 changes: 29 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
"organizeImports": {
"enabled": true
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"lineWidth": 144
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noForEach": "off"
}
}
},
"files": {
"ignoreUnknown": true,
"ignore": ["dist", "src/__tests__"]
},
"javascript": {
"formatter": {
"arrowParentheses": "asNeeded"
}
}
}
47 changes: 21 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,16 @@
],
"scripts": {
"build": "tsup src/*.ts",
"clean": "pnpm ts ./scripts/clean.ts",
"format": "run-s prettier:format eslint:format",
"clean": "rimraf dist",
"lerna:version:up": "lerna version --yes",
"release:github:registry": "pnpm publish --registry https://npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}",
"release:npm:registry": "pnpm publish",
"test": "run-p test:vitest test:sample eslint:validate prettier:validate",
"prettier:format": "prettier \"**/*.{js,jsx,ts,tsx,json,yml,yaml,md,html}\" --write ./src",
"prettier:validate": "prettier --check \"**/*.{js,jsx,ts,tsx,json,yml,yaml,md,html}\"",
"eslint:format": "eslint \"**/*.{ts,tsx}\" --fix",
"eslint:validate": "eslint \"**/*.{ts,tsx}\"",
"test": "run-p test:vitest lint",
"lint": "biome lint .",
"format": "biome format --write .",
"validate": "biome check --apply .",
"test:vitest": "vitest",
"test:sample": "node --loader ts-node/esm ./example/sample.ts"
"ts": "node --no-warnings=ExperimentalWarning --experimental-specifier-resolution=node --loader ts-node/esm"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
Expand All @@ -74,29 +72,26 @@
]
},
"devDependencies": {
"@swc/core": "^1.2.197",
"@types/node": "17.0.40",
"@typescript-eslint/eslint-plugin": "5.27.0",
"@typescript-eslint/parser": "5.27.0",
"@biomejs/biome": "^1.5.3",
"@swc/core": "^1.3.107",
"@types/node": "20.11.16",
"@typescript-eslint/eslint-plugin": "6.20.0",
"@typescript-eslint/parser": "6.20.0",
"conventional-changelog-angular-all": "1.7.0",
"cross-env": "^7.0.3",
"eslint": "8.17.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
"lerna": "5.0.0",
"lint-staged": "13.0.0",
"lerna": "8.0.2",
"lint-staged": "15.2.1",
"npm-run-all": "4.1.5",
"prettier": "2.6.2",
"simple-git-hooks": "^2.8.0",
"sort-package-json": "1.57.0",
"ts-node": "^10.8.1",
"tsup": "^6.1.0",
"typescript": "4.7.3",
"vitest": "^0.14.0"
"rimraf": "^5.0.5",
"simple-git-hooks": "^2.9.0",
"ts-node": "^10.9.2",
"tsup": "^8.0.1",
"typescript": "5.3.3",
"vitest": "^1.2.2"
},
"engines": {
"pnpm": ">=7"
"node": ">=20",
"pnpm": ">=8"
},
"publishConfig": {
"access": "public"
Expand Down
Loading

0 comments on commit 67e70da

Please sign in to comment.