Skip to content

dep cleanup #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 10 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"repository": "vercel/fun",
"scripts": {
"build": "rm -rf dist && tsc && cpy --parents src test '!**/*.ts' dist",
"test": "echo \"Node.js version: $(node -v)\\n\" && pnpm build && jest --detectOpenHandles --forceExit --runInBand --verbose dist/test/test.js",
"test": "echo \"Node.js version: $(node -v)\\n\" && pnpm build && vitest run",
"test-codecov": "nyc pnpm test",
"report-codecov": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
"lint:staged": "lint-staged",
Expand All @@ -22,8 +22,6 @@
"@tootallnate/once": "2.0.0",
"async-listen": "1.2.0",
"debug": "4.3.4",
"execa": "3.2.0",
"fs-extra": "8.1.0",
"generic-pool": "3.4.2",
"micro": "9.3.5-canary.3",
"ms": "2.1.1",
Expand All @@ -34,6 +32,7 @@
"stat-mode": "0.3.0",
"stream-to-promise": "2.2.0",
"tar": "4.4.18",
"tinyexec": "0.3.2",
"tree-kill": "1.2.2",
"uid-promise": "1.0.0",
"uuid": "3.3.2",
Expand All @@ -42,37 +41,25 @@
},
"devDependencies": {
"@types/debug": "4.1.9",
"@types/fs-extra": "8.1.0",
"@types/generic-pool": "3.1.9",
"@types/jest": "27.0.2",
"@types/micro": "7.3.6",
"@types/node": "16.18.122",
"@types/node-fetch": "2.5.0",
"@types/tar": "4.0.0",
"@types/uuid": "8.3.1",
"@types/yauzl-promise": "2.1.0",
"@ungap/structured-clone": "^1.3.0",
"codecov": "3.7.1",
"cpy-cli": "2.0.0",
"jest": "27.3.1",
"lint-staged": "9.2.5",
"nyc": "14.1.1",
"pre-commit": "1.2.2",
"prettier": "1.15.3",
"source-map-support": "0.5.10",
"ts-jest": "27.0.7",
"typescript": "4.9.3"
"typescript": "4.9.3",
"vitest": "3.0.4"
},
"pre-commit": "lint:staged",
"jest": {
"preset": "ts-jest",
"globals": {
"ts-jest": {
"diagnostics": false,
"isolatedModules": true
}
},
"testEnvironment": "node"
},
"lint-staged": {
"*.ts": [
"prettier --write --single-quote",
Expand All @@ -82,5 +69,10 @@
"packageManager": "[email protected]",
"engines": {
"node": ">= 16"
},
"pnpm": {
"patchedDependencies": {
"[email protected]": "patches/[email protected]"
}
}
}
13 changes: 13 additions & 0 deletions patches/[email protected]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had to apply a patch to Vite because on node 16 getRandomValues is inside webcrypto and not require('crypto')

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/dist/node/chunks/dep-M1IYMR16.js b/dist/node/chunks/dep-M1IYMR16.js
index 6de6e61108137b1c9491e37dad7834815d247ed2..b4c6bd9a8dfab8e0150b1bcb19b16c14fbfbf75b 100644
--- a/dist/node/chunks/dep-M1IYMR16.js
+++ b/dist/node/chunks/dep-M1IYMR16.js
@@ -53775,7 +53775,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
// at least 64bits is recommended
// https://owasp.org/www-community/vulnerabilities/Insufficient_Session-ID_Length
webSocketToken: Buffer.from(
- crypto$2.getRandomValues(new Uint8Array(9))
+ crypto$2.webcrypto.getRandomValues(new Uint8Array(9))
).toString("base64url"),
getSortedPlugins: undefined,
getSortedPluginHooks: undefined,
Loading
Loading