-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor to work with latest fastify version
* first commit * more changes * update * fix * fix
- Loading branch information
Showing
35 changed files
with
303 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,3 +61,4 @@ typings/ | |
.next | ||
dist | ||
package-lock.json | ||
.zed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[submodule "tests/fastify/module"] | ||
path = tests/fastify/module | ||
url = [email protected]:fastify/fastify.git | ||
branch = main | ||
branch = 4.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package-lock=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,3 @@ | ||
{ | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports.biome": "explicit", | ||
"quickfix.biome": "explicit" | ||
}, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "biomejs.biome" | ||
}, | ||
"[json]": { | ||
"editor.defaultFormatter": "biomejs.biome" | ||
} | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { standard } from 'eslint-config-standard-ext' | ||
|
||
export default standard({}, { | ||
ignores: [ | ||
'dist/', | ||
'tests/fastify/module/', | ||
'example.js', | ||
'types/', | ||
], | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,26 @@ | ||
{ | ||
"name": "@geut/fastify-uws", | ||
"type": "module", | ||
"version": "4.0.0", | ||
"description": "uWebSockets.js for fastify", | ||
"type": "module", | ||
"author": { | ||
"name": "GEUT", | ||
"email": "[email protected]" | ||
}, | ||
"license": "MIT", | ||
"homepage": "https://github.com/geut/fastify-uws#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/geut/fastify-uws.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/geut/fastify-uws/issues" | ||
}, | ||
"keywords": [ | ||
"fastify", | ||
"uWebSockets.js", | ||
"fastify-plugin" | ||
], | ||
"exports": { | ||
".": { | ||
"types": "./types/server.d.ts", | ||
|
@@ -20,67 +38,50 @@ | |
"tests/fastify/module" | ||
], | ||
"files": [ | ||
"types", | ||
"dist", | ||
"src" | ||
"src", | ||
"types" | ||
], | ||
"engines": { | ||
"node": ">=18" | ||
}, | ||
"scripts": { | ||
"start": "node index.js", | ||
"build": "rm -rf dist && tsup src/server.js src/plugin.js --splitting", | ||
"test": "uvu --ignore tests/fastify", | ||
"posttest": "npm run lint && tsc", | ||
"lint": "biome check .", | ||
"lint:fix": "biome check --apply .", | ||
"lint": "eslint .", | ||
"lint:fix": "npm run lint -- --fix", | ||
"prepublishOnly": "npm test && npm run build && npm run types", | ||
"types": "node scripts/generate-dts.js" | ||
}, | ||
"dependencies": { | ||
"fastify-plugin": "^4.5.1", | ||
"fastq": "^1.13.0", | ||
"ipaddr.js": "^2.0.1", | ||
"fastq": "^1.17.1", | ||
"ipaddr.js": "^2.2.0", | ||
"nanoerror": "^2.0.0", | ||
"streamx": "^2.12.5", | ||
"tempy": "^1.0.1", | ||
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.42.0" | ||
"streamx": "^2.18.0", | ||
"tempy": "^3.1.0", | ||
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.44.0" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "^1.7.3", | ||
"@fastify/static": "^7.0.3", | ||
"@fastify/static": "^7.0.4", | ||
"@types/events": "^3.0.2", | ||
"@types/node": "^20.8.10", | ||
"@types/streamx": "^2.9.3", | ||
"eslint": "^8.57.0", | ||
"eslint-config-standard-ext": "^0.0.27", | ||
"execa": "^8.0.1", | ||
"fastify": "^4.24.3", | ||
"fastify": "^4.28.1", | ||
"require-inject": "^1.4.4", | ||
"simple-get": "^4.0.1", | ||
"tap": "^16.3.0", | ||
"tsup": "^7.2.0", | ||
"typescript": "^5.2.2", | ||
"typescript": "^5.5.3", | ||
"uvu": "^0.5.3", | ||
"ws": "^8.9.0" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/geut/fastify-uws.git" | ||
}, | ||
"keywords": [ | ||
"fastify", | ||
"uWebSockets.js", | ||
"fastify-plugin" | ||
], | ||
"author": { | ||
"name": "GEUT", | ||
"email": "[email protected]" | ||
}, | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/geut/fastify-uws/issues" | ||
}, | ||
"homepage": "https://github.com/geut/fastify-uws#readme", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"engines": { | ||
"node": ">=18" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import * as fs from 'node:fs' | ||
|
||
import { $ } from 'execa' | ||
|
||
await $`tsc src/server.js src/plugin.js --declaration --allowJs --emitDeclarationOnly --outDir types` | ||
|
||
const types = fs.readFileSync('types/plugin.d.ts', 'utf-8') | ||
fs.writeFileSync( | ||
'types/plugin.d.ts', | ||
types + 'import "./fastify-overload.d.ts"', | ||
types + 'import "./fastify-overload.d.ts"' | ||
) |
Oops, something went wrong.