@samitouri / QOSami-HFS / commits / 7e24933f

bundle node 20

Massimo Melina committed Mar 29, 2025 at 13:01 UTC 7e24933f49adc8c215798408fab037d054986011
4 files changed +13 -21
README.md
+1 -1
@@ -53,7 +53,7 @@ This is a full rewrite of [the Delphi version](https://github.com/rejetto/hfs2).
53
54 If you need [Docker installation](https://github.com/damienzonly/hfs-docker) or [Service installation](https://github.com/rejetto/hfs/wiki/Service-installation), click the links.
55
56 -NB: minimum Windows version required is 8.1 , Windows Server 2012 R2
56 +Minimum Windows version required is 10 or Server 2019. If you have a previous version, you can still follow instructions for [Other systems](#other-systems)
57
58 1. go to https://github.com/rejetto/hfs/releases
59 2. click on `Assets`
package.json
+10 -10
@@ -25,10 +25,10 @@
25 "dist-bin": "npm run dist-modules && npm run dist-bin-win && npm run dist-bin-linux && npm run dist-bin-mac && npm run dist-bin-mac-arm",
26 "dist-modules": "cp package*.json central.json dist && cd dist && npm ci --omit=dev && cd .. && node prune_modules",
27 "dist-pre": "cd dist && rm -rf node_modules/@node-rs/crc32-*",
28 - "dist-bin-win": "npm run dist-pre && cd dist && npm i -f --no-save --omit=dev @node-rs/crc32-win32-x64-msvc && pkg . --public -C gzip -t node18-win-x64 && npx resedit-cli --in hfs.exe --icon 1,../hfs.ico --out hfs.exe && zip hfs-windows-x64-$(jq -r .version ../package.json).zip hfs.exe -r plugins && cd ..",
29 - "dist-bin-mac-arm": "npm run dist-pre && cd dist && npm i -f --no-save --omit=dev @node-rs/crc32-darwin-arm64 && pkg . --public -C gzip -t node18-macos-arm64 && zip hfs-mac-arm64-$(jq -r .version ../package.json).zip hfs -r plugins && cd ..",
30 - "dist-bin-mac": "npm run dist-pre && cd dist && npm i -f --no-save --omit=dev @node-rs/crc32-darwin-x64 && pkg . --public -C gzip -t node18-macos-x64 && zip hfs-mac-x64-$(jq -r .version ../package.json).zip hfs -r plugins && cd ..",
31 - "dist-bin-linux": "npm run dist-pre && cd dist && npm i -f --no-save --omit=dev @node-rs/crc32-linux-x64-gnu && pkg . --public -C gzip -t node18-linux-x64 && zip hfs-linux-x64-$(jq -r .version ../package.json).zip hfs -r plugins && cd ..",
28 + "dist-bin-win": "npm run dist-pre && cd dist && npm i -f --no-save --omit=dev @node-rs/crc32-win32-x64-msvc && pkg . --public -C gzip -t node20-win-x64 && npx resedit-cli --in hfs.exe --icon 1,../hfs.ico --out hfs.exe && zip hfs-windows-x64-$(jq -r .version ../package.json).zip hfs.exe -r plugins && cd ..",
29 + "dist-bin-mac-arm": "npm run dist-pre && cd dist && npm i -f --no-save --omit=dev @node-rs/crc32-darwin-arm64 && pkg . --public -C gzip -t node20-macos-arm64 && zip hfs-mac-arm64-$(jq -r .version ../package.json).zip hfs -r plugins && cd ..",
30 + "dist-bin-mac": "npm run dist-pre && cd dist && npm i -f --no-save --omit=dev @node-rs/crc32-darwin-x64 && pkg . --public -C gzip -t node20-macos-x64 && zip hfs-mac-x64-$(jq -r .version ../package.json).zip hfs -r plugins && cd ..",
31 + "dist-bin-linux": "npm run dist-pre && cd dist && npm i -f --no-save --omit=dev @node-rs/crc32-linux-x64-gnu && pkg . --public -C gzip -t node20-linux-x64 && zip hfs-linux-x64-$(jq -r .version ../package.json).zip hfs -r plugins && cd ..",
32 "dist-win": "npm run dist-modules && npm run dist-bin-win",
33 "dist-mac-arm": "npm run dist-modules && npm run dist-bin-mac-arm",
34 "dist-mac": "npm run dist-modules && npm run dist-bin-mac",
@@ -61,10 +61,10 @@
61 "**/node_modules/axios/dist/node/*"
62 ],
63 "targets": [
64 - "node18-win-x64",
65 - "node18-mac-x64",
66 - "node18-mac-arm64",
67 - "node18-linux-x64"
64 + "node20-win-x64",
65 + "node20-mac-x64",
66 + "node20-mac-arm64",
67 + "node20-linux-x64"
68 ]
69 },
70 "dependencies": {
@@ -111,12 +111,12 @@
111 "@types/mime-types": "^2.1.1",
112 "@types/minimist": "^1.2.2",
113 "@types/mocha": "^10.0.10",
114 - "@types/node": "^18.17.14",
114 + "@types/node": "^20.17.30",
115 "@types/node-forge": "^1.3.11",
116 "@types/picomatch": "^2.3.3",
117 "@types/tough-cookie": "^4.0.2",
118 "@types/unzipper": "^0.10.5",
119 - "@yao-pkg/pkg": "^5.15.0",
119 + "@yao-pkg/pkg": "^6.3.2",
120 "cross-env": "^7.0.3",
121 "koa-better-http-proxy": "^0.2.9",
122 "mocha": "^10.8.2",
src/plugins.ts
+1 -1
@@ -115,7 +115,7 @@ export function getPluginConfigFields(id: string) {
115
116 async function initPlugin(pl: any, morePassedToInit?: { id: string } & Dict<any>) {
117 const undoEvents: any[] = []
118 - const timeouts: NodeJS.Timer[] = []
118 + const timeouts: NodeJS.Timeout[] = []
119 const res = await pl.init?.({
120 Const,
121 require,
tests/test.ts
+1 -9
@@ -235,15 +235,7 @@ describe('after-login', () => {
235 it('reupload', reqUpload(UPLOAD_DEST, 200))
236 it('delete.method', req(UPLOAD_DEST, 200, { method: 'DELETE' }))
237 it('delete.miss deleted', req(UPLOAD_DEST, 404, { method: 'delete' }))
238 - it('upload.too much', async () => {
239 - const fn = 'temp/tooMuch'
240 - const wrongSize = BIG_CONTENT.length / 2
241 - // the 200 is the result when nodejs doesn't intercept the mismatch (sending 400), and the case is handled by the application layer. Nodejs intervention can vary with the version and the declared size.
242 - await reqUpload(UPLOAD_ROOT + fn, 200, BIG_CONTENT, wrongSize)()
243 - const { size } = statSync(ROOT + fn)
244 - if (size !== wrongSize)
245 - throw Error(`wrote ${size}`)
246 - })
238 + it('upload.too much', reqUpload(UPLOAD_ROOT + 'temp/tooMuch', 400, BIG_CONTENT, BIG_CONTENT.length / 2)) // 400 is caused by nodejs itself, intercepting the mismatch
239 it('max_dl.account', async () => {
240 const uri = UPLOAD_ROOT + 'temp/big'
241 await reqUpload(uri, 200, BIG_CONTENT)()