Skip to content

Commit

Permalink
refactor: remove support to fastify 3 and eslint
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Remove support to Fastify 3
  • Loading branch information
matteovivona committed Feb 20, 2025
1 parent f39ab24 commit 1551e25
Show file tree
Hide file tree
Showing 17 changed files with 5,369 additions and 11,622 deletions.
25 changes: 0 additions & 25 deletions .eslintrc.js

This file was deleted.

26 changes: 17 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
- master
merge_group:

env:
PNPM_VERSION: 10.4.1

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -23,7 +26,6 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check commit message
uses: wagoid/commitlint-github-action@v6
with:
Expand All @@ -43,12 +45,14 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install with npm
run: npm install
- name: Lint code
run: npm run lint
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
name: Install pnpm
with:
version: ${{ env.PNPM_VERSION }}
- name: Install with pnpm
run: pnpm install
- name: Build
run: npm run build
run: pnpm build

test:
runs-on: ubuntu-latest
Expand All @@ -62,7 +66,11 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install with npm
run: npm install
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
name: Install pnpm
with:
version: ${{ env.PNPM_VERSION }}
- name: Install
run: pnpm install
- name: Test
run: npm run test
run: pnpm test
15 changes: 11 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}

env:
NPM_CONFIG_PROVENANCE: true
PNPM_VERSION: 10.4.1
NODE_VERSION: 20

jobs:
release:
Expand All @@ -26,13 +28,18 @@ jobs:
- uses: actions/setup-node@v4
name: Install Node
with:
node-version: 20
node-version: ${{ env.NODE_VERSION }}

- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
name: Install pnpm
with:
version: ${{ env.PNPM_VERSION }}

- name: Install dependencies
run: npm install
run: pnpm install

- name: Build
run: npm run build
run: pnpm build

- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
Expand All @@ -41,4 +48,4 @@ jobs:
env:
GH_TOKEN: ${{ secrets.DUCKTORS_PAT }}
NPM_TOKEN: ${{ secrets.DUCKTORS_NPM_TOKEN }}
run: npm run semantic-release
run: pnpm semantic-release
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint --edit "$1"
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run build
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<div align="center">

[![CI](https://github.com/ducktors/arecibo/actions/workflows/ci.yaml/badge.svg)](https://github.com/ducktors/arecibo/actions/workflows/ci.yaml)
[![CI](https://github.com/ducktors/arecibo/actions/workflows/ci.yaml/badge.svg)](https://github.com/ducktors/arecibo/actions/workflows/ci.yaml) ![[email protected]](https://img.shields.io/badge/pnpm-10.4.1-yellow)
[![NPM version](https://img.shields.io/npm/v/arecibo.svg?style=flat)](https://www.npmjs.com/package/arecibo)
[![NPM downloads](https://img.shields.io/npm/dm/arecibo.svg?style=flat)](https://www.npmjs.com/package/arecibo)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
Expand All @@ -21,16 +21,20 @@
</div>

## Installation
__Note: Arecibo version 1 supports version 2 of Fastify. Arecibo version 2 supports version 3 of Fastify.__
__Note: Please refer to the table below to find the correct version of Arecibo for your Fastify version.__


| Arecibo version | Fastify version | Branch |
| -- | -- | -- |
| [v3](https://github.com/ducktors/arecibo/releases/tag/v3.1.0) | Fastify 3, 4, 5 | [master](https://github.com/ducktors/arecibo/tree/master) |
| [v1.1.0](https://github.com/ducktors/arecibo/releases/tag/v1.1.0) | Fastify 2 | deprecated |
| [v4](https://github.com/ducktors/arecibo/releases/tag/v4.0.0) | Fastify 4, 5 | [master](https://github.com/ducktors/arecibo/tree/master) |
| [v3](https://github.com/ducktors/arecibo/releases/tag/v3.1.1) | Fastify 3, 4, 5 | not maintained |
| [v1.1.0](https://github.com/ducktors/arecibo/releases/tag/v1.1.0) | Fastify 2 | deprecated |


```bash
npm i arecibo
pnpm add arecibo
npm install arecibo
yarn add arecibo
```

## Usage in Node.js
Expand All @@ -50,7 +54,7 @@ fastify.register(arecibo, {
})

```
### Note for typescript users
### Note for TypeScript users

If you set `"esModuleInterop": true` you must import this module using `import arecibo from 'arecibo'`.

Expand Down
21 changes: 21 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://biomejs.dev/schemas/1.1.2/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"formatter": {
"indentStyle": "space"
},
"javascript": {
"formatter": {
"semicolons": "asNeeded",
"quoteStyle": "single"
}
}
}
2 changes: 1 addition & 1 deletion commitlint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ module.exports = {
'footer-max-line-length': [0, 'always'],
'body-max-line-length': [0, 'always'],
},
};
}
Loading

0 comments on commit 1551e25

Please sign in to comment.