Skip to content

Commit

Permalink
fix: update dependencies, switch from eslint + prettier to biome,
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Support for Node.js 16 is dropped, as it is End of Life.
Our code is tested against Node.js LTS release version 18 and 20.

There are a lot of changes in this commit, because of formatting changes (e.g. tabs instead of spaces).

Configured vitest to generate a junit test report, which is uploaded to CircleCI. The CI will now run biome check, which checks the code for linting and formatting issues.

Signed-off-by: Pascal Sthamer <10992664+P4sca1@users.noreply.github.com>
  • Loading branch information
P4sca1 committed Apr 29, 2024
1 parent b8d5ce4 commit 43c2868
Show file tree
Hide file tree
Showing 130 changed files with 3,359 additions and 3,422 deletions.
10 changes: 6 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ orbs:
jobs:
release:
docker:
- image: cimg/node:20.11
- image: cimg/node:20.12
steps:
- checkout
- restore_cache:
Expand All @@ -30,12 +30,14 @@ workflows:
jobs:
- node/test:
override-ci-command: pnpm install
run-command: test:run
run-command: test:ci
test-results-for: jest
test-results-path: test-report.xml
matrix:
parameters:
version:
- '18.19'
- '20.11'
- '18.20'
- '20.12'
- release:
requires:
- node/test
2 changes: 1 addition & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"enabled": true,
"baseBranches": ["next"],
"extends": ["github>IPS-Hosting/renovate-config"]
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules/
dist/
coverage/
.DS_Store
test-report.xml
5 changes: 0 additions & 5 deletions .idea/.gitignore

This file was deleted.

64 changes: 0 additions & 64 deletions .idea/codeStyles/Project.xml

This file was deleted.

5 changes: 0 additions & 5 deletions .idea/codeStyles/codeStyleConfig.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/cron-schedule.iml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/jsLinters/eslint.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

2 changes: 0 additions & 2 deletions .prettierignore

This file was deleted.

13 changes: 0 additions & 13 deletions .prettierrc

This file was deleted.

7 changes: 2 additions & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
"recommendations": ["biomejs.biome"]
}
16 changes: 9 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"eslint.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
}
"[javascript][typescript][json]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/keyv-npm-4.5.4-4c8e2cf7f7-74a24395b1.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/mlly-npm-1.4.2-75e10242a0-ad0813eca1.zip
Binary file not shown.
Binary file removed .yarn/cache/open-npm-9.1.0-d104a17ec5-3993c0f61d.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ufo-npm-1.3.2-dcaf8105d0-f1180bb715.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Via pnpm:

`$ pnpm add cron-schedule`

**We test our code against the following Node.js releases (`18.19`, `20.11`).**
**We test our code against the following Node.js releases (`18.20`, `20.12`).**
Other versions of node.js may also work, but this is not tested.

##### Usage
Expand Down
24 changes: 24 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"$schema": "https://biomejs.dev/schemas/1.7.1/schema.json",
"files": {
"ignore": ["dist", "node_modules", "coverage"]
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"formatter": {
"enabled": true
},
"organizeImports": {
"enabled": true
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "asNeeded"
}
}
}
15 changes: 0 additions & 15 deletions eslint.config.js

This file was deleted.

16 changes: 8 additions & 8 deletions jsr.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@p4sca1/cron-schedule",
"version": "4.0.0",
"exports": {
".": "./src/index.ts",
"./schedulers/interval-based": "./src/schedulers/interval-based.ts",
"./schedulers/timer-based": "./src/schedulers/timer-based.ts"
}
}
"name": "@p4sca1/cron-schedule",
"version": "4.0.0",
"exports": {
".": "./src/index.ts",
"./schedulers/interval-based": "./src/schedulers/interval-based.ts",
"./schedulers/timer-based": "./src/schedulers/timer-based.ts"
}
}
Loading

0 comments on commit 43c2868

Please sign in to comment.