Skip to content

Commit

Permalink
Merge pull request #24 from jonnydgreen/chore/support-fastify-v5
Browse files Browse the repository at this point in the history
Add support for Fastify v5
  • Loading branch information
jonnydgreen authored Oct 12, 2024
2 parents 79e19ec + 3ada436 commit 23cb241
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2,356 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,19 @@ name: Node.js CI
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18.x, 20.x]

node-version: [20.x, 22.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm test
- name: Install Dependencies
run: npm install --ignore-scripts
- name: Test
run: npm test
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
.nyc_output
dist
dist
package-lock.json
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const mercuriusGQLUpload: FastifyPluginCallback<UploadOptions> = (
options,
done,
) => {
fastify.addContentTypeParser('multipart', (req, _payload, done) => {
fastify.addContentTypeParser('multipart/form-data', (req, _payload, done) => {
req.mercuriusUploadMultipart = true
done(null)
})
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@
"test": "tap --ts --100 test/*.test.ts"
},
"dependencies": {
"fastify-plugin": "^4.2.0",
"graphql-upload-minimal": "^1.5.5"
"fastify-plugin": "^5.0.1",
"graphql-upload-minimal": "^1.6.1"
},
"devDependencies": {
"@types/node": "^20.5.0",
"@types/tap": "^15.0.7",
"cross-env": "^7.0.3",
"fastify": "^4.0.1",
"form-data": "^4.0.0",
"fastify": "^5.0.0",
"form-data": "^4.0.1",
"graphql": "^16.5.0",
"mercurius": "^13.0.0",
"prettier": "^3.0.0",
"mercurius": "^15.0.0",
"prettier": "^3.3.3",
"tap": "^16.2.0",
"ts-node": "^10.8.1",
"typescript": "^5.2.2"
"ts-node": "^10.9.2",
"typescript": "^5.6.3"
},
"peerDependencies": {
"graphql": "^16.3.0"
Expand Down
Loading

0 comments on commit 23cb241

Please sign in to comment.