diff --git a/.gitignore b/.gitignore index ee009a51..7acd1e99 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,8 @@ node_modules/ dist/ .env -<<<<<<< HEAD -__pycache__/ -*.log -.DS_Store -.vscode/ -.idea/ -coverage/ -*.swp -*.swo -======= *.log .DS_Store -coverage/ -.nyc_output/ ->>>>>>> pr-2-parker110-crypto-CDN +__pycache__/ +*.test.ts +*.spec.ts \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index d6a32fa0..05352381 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,13 +1,13 @@ { - "name": "cdn-file-service", + "name": "cdn-file-storage", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "node_modules/@esbuild/linux-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", "cpu": [ "x64" ], @@ -41,20 +41,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.43.0.tgz", - "integrity": "sha512-jAHr/S0iiBtFyzjhOkAics/2SrXE092qyqEg96e90L3t9Op8OTzS6+IX0Fy5wCt2+KqeHAkti+eitV0wvblEoQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", @@ -64,61 +50,78 @@ }, "node_modules/@types/chai": { "version": "4.3.20", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", - "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", "dev": true, "license": "MIT" }, "node_modules/@types/chai-subset": { "version": "1.3.6", - "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.6.tgz", - "integrity": "sha512-m8lERkkQj+uek18hXOZuec3W/fCRTrU4hrnXjH3qhHy96ytuPaPiWGgu7sJb7tZxZonO75vYAjCvpe/e4VUwRw==", "dev": true, "license": "MIT", "peerDependencies": { "@types/chai": "<5.2.0" } }, - "node_modules/@types/estree": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", - "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "node_modules/@types/fs-extra": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz", + "integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "@types/jsonfile": "*", + "@types/node": "*" + } + }, + "node_modules/@types/jsonfile": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.4.tgz", + "integrity": "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } }, "node_modules/@types/node": { - "version": "24.0.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.0.tgz", - "integrity": "sha512-yZQa2zm87aRVcqDyH5+4Hv9KYgSdgwX1rFnGvpbzMaC7YAljmhBET93TPiTd3ObwTL+gSpIzPKg5BqVxdCvxKg==", + "version": "20.19.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.1.tgz", + "integrity": "sha512-jJD50LtlD2dodAEO653i3YF04NWak6jN3ky+Ri3Em3mGR39/glWiboM/IePaRbgwSfqM1TpGXfAg8ohn/4dTgA==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~7.8.0" + "undici-types": "~6.21.0" } }, + "node_modules/@types/uuid": { + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", + "dev": true, + "license": "MIT" + }, "node_modules/@vitest/expect": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.34.6.tgz", - "integrity": "sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw==", + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.32.4.tgz", + "integrity": "sha512-m7EPUqmGIwIeoU763N+ivkFjTzbaBn0n9evsTOcde03ugy2avPs3kZbYmw3DkcH1j5mxhMhdamJkLQ6dM1bk/A==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "0.34.6", - "@vitest/utils": "0.34.6", - "chai": "^4.3.10" + "@vitest/spy": "0.32.4", + "@vitest/utils": "0.32.4", + "chai": "^4.3.7" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/runner": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.34.6.tgz", - "integrity": "sha512-1CUQgtJSLF47NnhN+F9X2ycxUP0kLHQ/JWvNHbeBfwW8CzEGgeskzNnHDyv1ieKTltuR6sdIHV+nmR6kPxQqzQ==", + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.32.4.tgz", + "integrity": "sha512-cHOVCkiRazobgdKLnczmz2oaKK9GJOw6ZyRcaPdssO1ej+wzHVIkWiCiNacb3TTYPdzMddYkCgMjZ4r8C0JFCw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "0.34.6", + "@vitest/utils": "0.32.4", "p-limit": "^4.0.0", "pathe": "^1.1.1" }, @@ -127,13 +130,13 @@ } }, "node_modules/@vitest/snapshot": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-0.34.6.tgz", - "integrity": "sha512-B3OZqYn6k4VaN011D+ve+AA4whM4QkcwcrwaKwAbyyvS/NB1hCWjFIBQxAQQSQir9/RtyAAGuq+4RJmbn2dH4w==", + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-0.32.4.tgz", + "integrity": "sha512-IRpyqn9t14uqsFlVI2d7DFMImGMs1Q9218of40bdQQgMePwVdmix33yMNnebXcTzDU5eiV3eUsoxxH5v0x/IQA==", "dev": true, "license": "MIT", "dependencies": { - "magic-string": "^0.30.1", + "magic-string": "^0.30.0", "pathe": "^1.1.1", "pretty-format": "^29.5.0" }, @@ -142,9 +145,9 @@ } }, "node_modules/@vitest/spy": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.34.6.tgz", - "integrity": "sha512-xaCvneSaeBw/cz8ySmF7ZwGvL0lBjfvqc1LpQ/vcdHEvpLn3Ff1vAvjw+CoGn0802l++5L/pxb7whwcWAw+DUQ==", + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.32.4.tgz", + "integrity": "sha512-oA7rCOqVOOpE6rEoXuCOADX7Lla1LIa4hljI2MSccbpec54q+oifhziZIJXxlE/CvI2E+ElhBHzVu0VEvJGQKQ==", "dev": true, "license": "MIT", "dependencies": { @@ -155,9 +158,9 @@ } }, "node_modules/@vitest/utils": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.34.6.tgz", - "integrity": "sha512-IG5aDD8S6zlvloDsnzHw0Ut5xczlF+kv2BOTo+iXfPr54Yhi5qbVOgGB1hZaVq4iJ4C/MZ2J0y15IlsV/ZcI0A==", + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.32.4.tgz", + "integrity": "sha512-Gwnl8dhd1uJ+HXrYyV0eRqfmk9ek1ASE/LWfTCuWMw+d07ogHqp4hEAV28NiecimK6UY9DpSEPh+pXBA5gtTBg==", "dev": true, "license": "MIT", "dependencies": { @@ -171,8 +174,6 @@ }, "node_modules/acorn": { "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", "bin": { @@ -184,8 +185,6 @@ }, "node_modules/acorn-walk": { "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", "dev": true, "license": "MIT", "dependencies": { @@ -309,9 +308,9 @@ } }, "node_modules/esbuild": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", - "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -322,29 +321,42 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, + "node_modules/fs-extra": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", + "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" } }, "node_modules/get-func-name": { @@ -357,10 +369,26 @@ "node": "*" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/local-pkg": { "version": "0.4.3", - "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.3.tgz", - "integrity": "sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==", "dev": true, "license": "MIT", "engines": { @@ -412,8 +440,6 @@ }, "node_modules/ms": { "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, "license": "MIT" }, @@ -496,9 +522,9 @@ "license": "MIT" }, "node_modules/postcss": { - "version": "8.5.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.5.tgz", - "integrity": "sha512-d/jtm+rdNT8tpXuHY5MMtcbJFBkhXE6593XVR9UoGCH8jSFGci7jGvMGH5RYd5PBJW+00NZQt6gf7CbagJCrhg==", + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", "dev": true, "funding": [ { @@ -547,49 +573,24 @@ "license": "MIT" }, "node_modules/rollup": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.43.0.tgz", - "integrity": "sha512-wdN2Kd3Twh8MAEOEJZsuxuLKCsBEo4PVNLK6tQWAn10VhsVewQLzcucMgLolRlhFybGxfclbPeEYBaP6RvUFGg==", + "version": "3.29.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz", + "integrity": "sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==", "dev": true, "license": "MIT", - "dependencies": { - "@types/estree": "1.0.7" - }, "bin": { "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=18.0.0", + "node": ">=14.18.0", "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.43.0", - "@rollup/rollup-android-arm64": "4.43.0", - "@rollup/rollup-darwin-arm64": "4.43.0", - "@rollup/rollup-darwin-x64": "4.43.0", - "@rollup/rollup-freebsd-arm64": "4.43.0", - "@rollup/rollup-freebsd-x64": "4.43.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.43.0", - "@rollup/rollup-linux-arm-musleabihf": "4.43.0", - "@rollup/rollup-linux-arm64-gnu": "4.43.0", - "@rollup/rollup-linux-arm64-musl": "4.43.0", - "@rollup/rollup-linux-loongarch64-gnu": "4.43.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.43.0", - "@rollup/rollup-linux-riscv64-gnu": "4.43.0", - "@rollup/rollup-linux-riscv64-musl": "4.43.0", - "@rollup/rollup-linux-s390x-gnu": "4.43.0", - "@rollup/rollup-linux-x64-gnu": "4.43.0", - "@rollup/rollup-linux-x64-musl": "4.43.0", - "@rollup/rollup-win32-arm64-msvc": "4.43.0", - "@rollup/rollup-win32-ia32-msvc": "4.43.0", - "@rollup/rollup-win32-x64-msvc": "4.43.0", "fsevents": "~2.3.2" } }, "node_modules/siginfo": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", "dev": true, "license": "ISC" }, @@ -605,22 +606,16 @@ }, "node_modules/stackback": { "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", "dev": true, "license": "MIT" }, "node_modules/std-env": { "version": "3.9.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", - "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", "dev": true, "license": "MIT" }, "node_modules/strip-literal": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.3.0.tgz", - "integrity": "sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==", "dev": true, "license": "MIT", "dependencies": { @@ -632,15 +627,13 @@ }, "node_modules/tinybench": { "version": "2.9.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", - "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", "dev": true, "license": "MIT" }, "node_modules/tinypool": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.7.0.tgz", - "integrity": "sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.5.0.tgz", + "integrity": "sha512-paHQtnrlS1QZYKF/GnLoOM/DN9fqaGOFbCbxzAhwniySnzl9Ebk8w73/dd34DAhe/obUbPAOldTyYXQZxnPBPQ==", "dev": true, "license": "MIT", "engines": { @@ -667,6 +660,20 @@ "node": ">=4" } }, + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/ufo": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz", @@ -675,41 +682,62 @@ "license": "MIT" }, "node_modules/undici-types": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", - "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "dev": true, "license": "MIT" }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/vite": { - "version": "5.4.19", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.19.tgz", - "integrity": "sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==", + "version": "4.5.14", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.14.tgz", + "integrity": "sha512-+v57oAaoYNnO3hIu5Z/tJRZjq5aHM2zDve9YZ8HngVHbhk66RStobhb1sqPMIPEleV6cNKYK4eGrAbE9Ulbl2g==", "dev": true, "license": "MIT", "dependencies": { - "esbuild": "^0.21.3", - "postcss": "^8.4.43", - "rollup": "^4.20.0" + "esbuild": "^0.18.10", + "postcss": "^8.4.27", + "rollup": "^3.27.1" }, "bin": { "vite": "bin/vite.js" }, "engines": { - "node": "^18.0.0 || >=20.0.0" + "node": "^14.18.0 || >=16.0.0" }, "funding": { "url": "https://github.com/vitejs/vite?sponsor=1" }, "optionalDependencies": { - "fsevents": "~2.3.3" + "fsevents": "~2.3.2" }, "peerDependencies": { - "@types/node": "^18.0.0 || >=20.0.0", + "@types/node": ">= 14", "less": "*", "lightningcss": "^1.21.0", "sass": "*", - "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.4.0" @@ -727,9 +755,6 @@ "sass": { "optional": true }, - "sass-embedded": { - "optional": true - }, "stylus": { "optional": true }, @@ -742,9 +767,9 @@ } }, "node_modules/vite-node": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.34.6.tgz", - "integrity": "sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==", + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.32.4.tgz", + "integrity": "sha512-L2gIw+dCxO0LK14QnUMoqSYpa9XRGnTTTDjW2h19Mr+GR0EFj4vx52W41gFXfMLqpA00eK4ZjOVYo1Xk//LFEw==", "dev": true, "license": "MIT", "dependencies": { @@ -753,7 +778,7 @@ "mlly": "^1.4.0", "pathe": "^1.1.1", "picocolors": "^1.0.0", - "vite": "^3.0.0 || ^4.0.0 || ^5.0.0-0" + "vite": "^3.0.0 || ^4.0.0" }, "bin": { "vite-node": "vite-node.mjs" @@ -766,35 +791,35 @@ } }, "node_modules/vitest": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.34.6.tgz", - "integrity": "sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==", + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.32.4.tgz", + "integrity": "sha512-3czFm8RnrsWwIzVDu/Ca48Y/M+qh3vOnF16czJm98Q/AN1y3B6PBsyV8Re91Ty5s7txKNjEhpgtGPcfdbh2MZg==", "dev": true, "license": "MIT", "dependencies": { "@types/chai": "^4.3.5", "@types/chai-subset": "^1.3.3", "@types/node": "*", - "@vitest/expect": "0.34.6", - "@vitest/runner": "0.34.6", - "@vitest/snapshot": "0.34.6", - "@vitest/spy": "0.34.6", - "@vitest/utils": "0.34.6", + "@vitest/expect": "0.32.4", + "@vitest/runner": "0.32.4", + "@vitest/snapshot": "0.32.4", + "@vitest/spy": "0.32.4", + "@vitest/utils": "0.32.4", "acorn": "^8.9.0", "acorn-walk": "^8.2.0", "cac": "^6.7.14", - "chai": "^4.3.10", + "chai": "^4.3.7", "debug": "^4.3.4", "local-pkg": "^0.4.3", - "magic-string": "^0.30.1", + "magic-string": "^0.30.0", "pathe": "^1.1.1", "picocolors": "^1.0.0", "std-env": "^3.3.3", "strip-literal": "^1.0.1", "tinybench": "^2.5.0", - "tinypool": "^0.7.0", - "vite": "^3.1.0 || ^4.0.0 || ^5.0.0-0", - "vite-node": "0.34.6", + "tinypool": "^0.5.0", + "vite": "^3.0.0 || ^4.0.0", + "vite-node": "0.32.4", "why-is-node-running": "^2.2.2" }, "bin": { @@ -845,8 +870,6 @@ }, "node_modules/why-is-node-running": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", - "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", "dev": true, "license": "MIT", "dependencies": { diff --git a/node_modules/@esbuild/linux-x64/bin/esbuild b/node_modules/@esbuild/linux-x64/bin/esbuild index 288f7689..f33a2e93 100755 Binary files a/node_modules/@esbuild/linux-x64/bin/esbuild and b/node_modules/@esbuild/linux-x64/bin/esbuild differ diff --git a/node_modules/@esbuild/linux-x64/package.json b/node_modules/@esbuild/linux-x64/package.json index b70b09ec..e1392a24 100644 --- a/node_modules/@esbuild/linux-x64/package.json +++ b/node_modules/@esbuild/linux-x64/package.json @@ -1,11 +1,8 @@ { "name": "@esbuild/linux-x64", - "version": "0.21.5", + "version": "0.18.20", "description": "The Linux 64-bit binary for esbuild, a JavaScript bundler.", - "repository": { - "type": "git", - "url": "git+https://github.com/evanw/esbuild.git" - }, + "repository": "https://github.com/evanw/esbuild", "license": "MIT", "preferUnplugged": true, "engines": { diff --git a/node_modules/@rollup/rollup-linux-x64-gnu/README.md b/node_modules/@rollup/rollup-linux-x64-gnu/README.md deleted file mode 100644 index cabe280f..00000000 --- a/node_modules/@rollup/rollup-linux-x64-gnu/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@rollup/rollup-linux-x64-gnu` - -This is the **x86_64-unknown-linux-gnu** binary for `rollup` diff --git a/node_modules/@rollup/rollup-linux-x64-gnu/package.json b/node_modules/@rollup/rollup-linux-x64-gnu/package.json deleted file mode 100644 index 730f1e74..00000000 --- a/node_modules/@rollup/rollup-linux-x64-gnu/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "@rollup/rollup-linux-x64-gnu", - "version": "4.43.0", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "files": [ - "rollup.linux-x64-gnu.node" - ], - "description": "Native bindings for Rollup", - "author": "Lukas Taegert-Atkinson", - "homepage": "https://rollupjs.org/", - "license": "MIT", - "repository": "rollup/rollup", - "libc": [ - "glibc" - ], - "main": "./rollup.linux-x64-gnu.node" -} \ No newline at end of file diff --git a/node_modules/@rollup/rollup-linux-x64-gnu/rollup.linux-x64-gnu.node b/node_modules/@rollup/rollup-linux-x64-gnu/rollup.linux-x64-gnu.node deleted file mode 100644 index 0db0b256..00000000 Binary files a/node_modules/@rollup/rollup-linux-x64-gnu/rollup.linux-x64-gnu.node and /dev/null differ diff --git a/node_modules/@types/estree/LICENSE b/node_modules/@types/estree/LICENSE deleted file mode 100644 index 9e841e7a..00000000 --- a/node_modules/@types/estree/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/estree/README.md b/node_modules/@types/estree/README.md deleted file mode 100644 index b0baf5f1..00000000 --- a/node_modules/@types/estree/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/estree` - -# Summary -This package contains type definitions for estree (https://github.com/estree/estree). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree. - -### Additional Details - * Last updated: Mon, 24 Mar 2025 07:34:10 GMT - * Dependencies: none - -# Credits -These definitions were written by [RReverser](https://github.com/RReverser). diff --git a/node_modules/@types/estree/flow.d.ts b/node_modules/@types/estree/flow.d.ts deleted file mode 100644 index 9d001a92..00000000 --- a/node_modules/@types/estree/flow.d.ts +++ /dev/null @@ -1,167 +0,0 @@ -declare namespace ESTree { - interface FlowTypeAnnotation extends Node {} - - interface FlowBaseTypeAnnotation extends FlowTypeAnnotation {} - - interface FlowLiteralTypeAnnotation extends FlowTypeAnnotation, Literal {} - - interface FlowDeclaration extends Declaration {} - - interface AnyTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface ArrayTypeAnnotation extends FlowTypeAnnotation { - elementType: FlowTypeAnnotation; - } - - interface BooleanLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {} - - interface BooleanTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface ClassImplements extends Node { - id: Identifier; - typeParameters?: TypeParameterInstantiation | null; - } - - interface ClassProperty { - key: Expression; - value?: Expression | null; - typeAnnotation?: TypeAnnotation | null; - computed: boolean; - static: boolean; - } - - interface DeclareClass extends FlowDeclaration { - id: Identifier; - typeParameters?: TypeParameterDeclaration | null; - body: ObjectTypeAnnotation; - extends: InterfaceExtends[]; - } - - interface DeclareFunction extends FlowDeclaration { - id: Identifier; - } - - interface DeclareModule extends FlowDeclaration { - id: Literal | Identifier; - body: BlockStatement; - } - - interface DeclareVariable extends FlowDeclaration { - id: Identifier; - } - - interface FunctionTypeAnnotation extends FlowTypeAnnotation { - params: FunctionTypeParam[]; - returnType: FlowTypeAnnotation; - rest?: FunctionTypeParam | null; - typeParameters?: TypeParameterDeclaration | null; - } - - interface FunctionTypeParam { - name: Identifier; - typeAnnotation: FlowTypeAnnotation; - optional: boolean; - } - - interface GenericTypeAnnotation extends FlowTypeAnnotation { - id: Identifier | QualifiedTypeIdentifier; - typeParameters?: TypeParameterInstantiation | null; - } - - interface InterfaceExtends extends Node { - id: Identifier | QualifiedTypeIdentifier; - typeParameters?: TypeParameterInstantiation | null; - } - - interface InterfaceDeclaration extends FlowDeclaration { - id: Identifier; - typeParameters?: TypeParameterDeclaration | null; - extends: InterfaceExtends[]; - body: ObjectTypeAnnotation; - } - - interface IntersectionTypeAnnotation extends FlowTypeAnnotation { - types: FlowTypeAnnotation[]; - } - - interface MixedTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface NullableTypeAnnotation extends FlowTypeAnnotation { - typeAnnotation: TypeAnnotation; - } - - interface NumberLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {} - - interface NumberTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface StringLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {} - - interface StringTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface TupleTypeAnnotation extends FlowTypeAnnotation { - types: FlowTypeAnnotation[]; - } - - interface TypeofTypeAnnotation extends FlowTypeAnnotation { - argument: FlowTypeAnnotation; - } - - interface TypeAlias extends FlowDeclaration { - id: Identifier; - typeParameters?: TypeParameterDeclaration | null; - right: FlowTypeAnnotation; - } - - interface TypeAnnotation extends Node { - typeAnnotation: FlowTypeAnnotation; - } - - interface TypeCastExpression extends Expression { - expression: Expression; - typeAnnotation: TypeAnnotation; - } - - interface TypeParameterDeclaration extends Node { - params: Identifier[]; - } - - interface TypeParameterInstantiation extends Node { - params: FlowTypeAnnotation[]; - } - - interface ObjectTypeAnnotation extends FlowTypeAnnotation { - properties: ObjectTypeProperty[]; - indexers: ObjectTypeIndexer[]; - callProperties: ObjectTypeCallProperty[]; - } - - interface ObjectTypeCallProperty extends Node { - value: FunctionTypeAnnotation; - static: boolean; - } - - interface ObjectTypeIndexer extends Node { - id: Identifier; - key: FlowTypeAnnotation; - value: FlowTypeAnnotation; - static: boolean; - } - - interface ObjectTypeProperty extends Node { - key: Expression; - value: FlowTypeAnnotation; - optional: boolean; - static: boolean; - } - - interface QualifiedTypeIdentifier extends Node { - qualification: Identifier | QualifiedTypeIdentifier; - id: Identifier; - } - - interface UnionTypeAnnotation extends FlowTypeAnnotation { - types: FlowTypeAnnotation[]; - } - - interface VoidTypeAnnotation extends FlowBaseTypeAnnotation {} -} diff --git a/node_modules/@types/estree/index.d.ts b/node_modules/@types/estree/index.d.ts deleted file mode 100644 index 1c132655..00000000 --- a/node_modules/@types/estree/index.d.ts +++ /dev/null @@ -1,694 +0,0 @@ -// This definition file follows a somewhat unusual format. ESTree allows -// runtime type checks based on the `type` parameter. In order to explain this -// to typescript we want to use discriminated union types: -// https://github.com/Microsoft/TypeScript/pull/9163 -// -// For ESTree this is a bit tricky because the high level interfaces like -// Node or Function are pulling double duty. We want to pass common fields down -// to the interfaces that extend them (like Identifier or -// ArrowFunctionExpression), but you can't extend a type union or enforce -// common fields on them. So we've split the high level interfaces into two -// types, a base type which passes down inherited fields, and a type union of -// all types which extend the base type. Only the type union is exported, and -// the union is how other types refer to the collection of inheriting types. -// -// This makes the definitions file here somewhat more difficult to maintain, -// but it has the notable advantage of making ESTree much easier to use as -// an end user. - -export interface BaseNodeWithoutComments { - // Every leaf interface that extends BaseNode must specify a type property. - // The type property should be a string literal. For example, Identifier - // has: `type: "Identifier"` - type: string; - loc?: SourceLocation | null | undefined; - range?: [number, number] | undefined; -} - -export interface BaseNode extends BaseNodeWithoutComments { - leadingComments?: Comment[] | undefined; - trailingComments?: Comment[] | undefined; -} - -export interface NodeMap { - AssignmentProperty: AssignmentProperty; - CatchClause: CatchClause; - Class: Class; - ClassBody: ClassBody; - Expression: Expression; - Function: Function; - Identifier: Identifier; - Literal: Literal; - MethodDefinition: MethodDefinition; - ModuleDeclaration: ModuleDeclaration; - ModuleSpecifier: ModuleSpecifier; - Pattern: Pattern; - PrivateIdentifier: PrivateIdentifier; - Program: Program; - Property: Property; - PropertyDefinition: PropertyDefinition; - SpreadElement: SpreadElement; - Statement: Statement; - Super: Super; - SwitchCase: SwitchCase; - TemplateElement: TemplateElement; - VariableDeclarator: VariableDeclarator; -} - -export type Node = NodeMap[keyof NodeMap]; - -export interface Comment extends BaseNodeWithoutComments { - type: "Line" | "Block"; - value: string; -} - -export interface SourceLocation { - source?: string | null | undefined; - start: Position; - end: Position; -} - -export interface Position { - /** >= 1 */ - line: number; - /** >= 0 */ - column: number; -} - -export interface Program extends BaseNode { - type: "Program"; - sourceType: "script" | "module"; - body: Array; - comments?: Comment[] | undefined; -} - -export interface Directive extends BaseNode { - type: "ExpressionStatement"; - expression: Literal; - directive: string; -} - -export interface BaseFunction extends BaseNode { - params: Pattern[]; - generator?: boolean | undefined; - async?: boolean | undefined; - // The body is either BlockStatement or Expression because arrow functions - // can have a body that's either. FunctionDeclarations and - // FunctionExpressions have only BlockStatement bodies. - body: BlockStatement | Expression; -} - -export type Function = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression; - -export type Statement = - | ExpressionStatement - | BlockStatement - | StaticBlock - | EmptyStatement - | DebuggerStatement - | WithStatement - | ReturnStatement - | LabeledStatement - | BreakStatement - | ContinueStatement - | IfStatement - | SwitchStatement - | ThrowStatement - | TryStatement - | WhileStatement - | DoWhileStatement - | ForStatement - | ForInStatement - | ForOfStatement - | Declaration; - -export interface BaseStatement extends BaseNode {} - -export interface EmptyStatement extends BaseStatement { - type: "EmptyStatement"; -} - -export interface BlockStatement extends BaseStatement { - type: "BlockStatement"; - body: Statement[]; - innerComments?: Comment[] | undefined; -} - -export interface StaticBlock extends Omit { - type: "StaticBlock"; -} - -export interface ExpressionStatement extends BaseStatement { - type: "ExpressionStatement"; - expression: Expression; -} - -export interface IfStatement extends BaseStatement { - type: "IfStatement"; - test: Expression; - consequent: Statement; - alternate?: Statement | null | undefined; -} - -export interface LabeledStatement extends BaseStatement { - type: "LabeledStatement"; - label: Identifier; - body: Statement; -} - -export interface BreakStatement extends BaseStatement { - type: "BreakStatement"; - label?: Identifier | null | undefined; -} - -export interface ContinueStatement extends BaseStatement { - type: "ContinueStatement"; - label?: Identifier | null | undefined; -} - -export interface WithStatement extends BaseStatement { - type: "WithStatement"; - object: Expression; - body: Statement; -} - -export interface SwitchStatement extends BaseStatement { - type: "SwitchStatement"; - discriminant: Expression; - cases: SwitchCase[]; -} - -export interface ReturnStatement extends BaseStatement { - type: "ReturnStatement"; - argument?: Expression | null | undefined; -} - -export interface ThrowStatement extends BaseStatement { - type: "ThrowStatement"; - argument: Expression; -} - -export interface TryStatement extends BaseStatement { - type: "TryStatement"; - block: BlockStatement; - handler?: CatchClause | null | undefined; - finalizer?: BlockStatement | null | undefined; -} - -export interface WhileStatement extends BaseStatement { - type: "WhileStatement"; - test: Expression; - body: Statement; -} - -export interface DoWhileStatement extends BaseStatement { - type: "DoWhileStatement"; - body: Statement; - test: Expression; -} - -export interface ForStatement extends BaseStatement { - type: "ForStatement"; - init?: VariableDeclaration | Expression | null | undefined; - test?: Expression | null | undefined; - update?: Expression | null | undefined; - body: Statement; -} - -export interface BaseForXStatement extends BaseStatement { - left: VariableDeclaration | Pattern; - right: Expression; - body: Statement; -} - -export interface ForInStatement extends BaseForXStatement { - type: "ForInStatement"; -} - -export interface DebuggerStatement extends BaseStatement { - type: "DebuggerStatement"; -} - -export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration; - -export interface BaseDeclaration extends BaseStatement {} - -export interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration { - type: "FunctionDeclaration"; - /** It is null when a function declaration is a part of the `export default function` statement */ - id: Identifier | null; - body: BlockStatement; -} - -export interface FunctionDeclaration extends MaybeNamedFunctionDeclaration { - id: Identifier; -} - -export interface VariableDeclaration extends BaseDeclaration { - type: "VariableDeclaration"; - declarations: VariableDeclarator[]; - kind: "var" | "let" | "const"; -} - -export interface VariableDeclarator extends BaseNode { - type: "VariableDeclarator"; - id: Pattern; - init?: Expression | null | undefined; -} - -export interface ExpressionMap { - ArrayExpression: ArrayExpression; - ArrowFunctionExpression: ArrowFunctionExpression; - AssignmentExpression: AssignmentExpression; - AwaitExpression: AwaitExpression; - BinaryExpression: BinaryExpression; - CallExpression: CallExpression; - ChainExpression: ChainExpression; - ClassExpression: ClassExpression; - ConditionalExpression: ConditionalExpression; - FunctionExpression: FunctionExpression; - Identifier: Identifier; - ImportExpression: ImportExpression; - Literal: Literal; - LogicalExpression: LogicalExpression; - MemberExpression: MemberExpression; - MetaProperty: MetaProperty; - NewExpression: NewExpression; - ObjectExpression: ObjectExpression; - SequenceExpression: SequenceExpression; - TaggedTemplateExpression: TaggedTemplateExpression; - TemplateLiteral: TemplateLiteral; - ThisExpression: ThisExpression; - UnaryExpression: UnaryExpression; - UpdateExpression: UpdateExpression; - YieldExpression: YieldExpression; -} - -export type Expression = ExpressionMap[keyof ExpressionMap]; - -export interface BaseExpression extends BaseNode {} - -export type ChainElement = SimpleCallExpression | MemberExpression; - -export interface ChainExpression extends BaseExpression { - type: "ChainExpression"; - expression: ChainElement; -} - -export interface ThisExpression extends BaseExpression { - type: "ThisExpression"; -} - -export interface ArrayExpression extends BaseExpression { - type: "ArrayExpression"; - elements: Array; -} - -export interface ObjectExpression extends BaseExpression { - type: "ObjectExpression"; - properties: Array; -} - -export interface PrivateIdentifier extends BaseNode { - type: "PrivateIdentifier"; - name: string; -} - -export interface Property extends BaseNode { - type: "Property"; - key: Expression | PrivateIdentifier; - value: Expression | Pattern; // Could be an AssignmentProperty - kind: "init" | "get" | "set"; - method: boolean; - shorthand: boolean; - computed: boolean; -} - -export interface PropertyDefinition extends BaseNode { - type: "PropertyDefinition"; - key: Expression | PrivateIdentifier; - value?: Expression | null | undefined; - computed: boolean; - static: boolean; -} - -export interface FunctionExpression extends BaseFunction, BaseExpression { - id?: Identifier | null | undefined; - type: "FunctionExpression"; - body: BlockStatement; -} - -export interface SequenceExpression extends BaseExpression { - type: "SequenceExpression"; - expressions: Expression[]; -} - -export interface UnaryExpression extends BaseExpression { - type: "UnaryExpression"; - operator: UnaryOperator; - prefix: true; - argument: Expression; -} - -export interface BinaryExpression extends BaseExpression { - type: "BinaryExpression"; - operator: BinaryOperator; - left: Expression | PrivateIdentifier; - right: Expression; -} - -export interface AssignmentExpression extends BaseExpression { - type: "AssignmentExpression"; - operator: AssignmentOperator; - left: Pattern | MemberExpression; - right: Expression; -} - -export interface UpdateExpression extends BaseExpression { - type: "UpdateExpression"; - operator: UpdateOperator; - argument: Expression; - prefix: boolean; -} - -export interface LogicalExpression extends BaseExpression { - type: "LogicalExpression"; - operator: LogicalOperator; - left: Expression; - right: Expression; -} - -export interface ConditionalExpression extends BaseExpression { - type: "ConditionalExpression"; - test: Expression; - alternate: Expression; - consequent: Expression; -} - -export interface BaseCallExpression extends BaseExpression { - callee: Expression | Super; - arguments: Array; -} -export type CallExpression = SimpleCallExpression | NewExpression; - -export interface SimpleCallExpression extends BaseCallExpression { - type: "CallExpression"; - optional: boolean; -} - -export interface NewExpression extends BaseCallExpression { - type: "NewExpression"; -} - -export interface MemberExpression extends BaseExpression, BasePattern { - type: "MemberExpression"; - object: Expression | Super; - property: Expression | PrivateIdentifier; - computed: boolean; - optional: boolean; -} - -export type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression; - -export interface BasePattern extends BaseNode {} - -export interface SwitchCase extends BaseNode { - type: "SwitchCase"; - test?: Expression | null | undefined; - consequent: Statement[]; -} - -export interface CatchClause extends BaseNode { - type: "CatchClause"; - param: Pattern | null; - body: BlockStatement; -} - -export interface Identifier extends BaseNode, BaseExpression, BasePattern { - type: "Identifier"; - name: string; -} - -export type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral; - -export interface SimpleLiteral extends BaseNode, BaseExpression { - type: "Literal"; - value: string | boolean | number | null; - raw?: string | undefined; -} - -export interface RegExpLiteral extends BaseNode, BaseExpression { - type: "Literal"; - value?: RegExp | null | undefined; - regex: { - pattern: string; - flags: string; - }; - raw?: string | undefined; -} - -export interface BigIntLiteral extends BaseNode, BaseExpression { - type: "Literal"; - value?: bigint | null | undefined; - bigint: string; - raw?: string | undefined; -} - -export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"; - -export type BinaryOperator = - | "==" - | "!=" - | "===" - | "!==" - | "<" - | "<=" - | ">" - | ">=" - | "<<" - | ">>" - | ">>>" - | "+" - | "-" - | "*" - | "/" - | "%" - | "**" - | "|" - | "^" - | "&" - | "in" - | "instanceof"; - -export type LogicalOperator = "||" | "&&" | "??"; - -export type AssignmentOperator = - | "=" - | "+=" - | "-=" - | "*=" - | "/=" - | "%=" - | "**=" - | "<<=" - | ">>=" - | ">>>=" - | "|=" - | "^=" - | "&=" - | "||=" - | "&&=" - | "??="; - -export type UpdateOperator = "++" | "--"; - -export interface ForOfStatement extends BaseForXStatement { - type: "ForOfStatement"; - await: boolean; -} - -export interface Super extends BaseNode { - type: "Super"; -} - -export interface SpreadElement extends BaseNode { - type: "SpreadElement"; - argument: Expression; -} - -export interface ArrowFunctionExpression extends BaseExpression, BaseFunction { - type: "ArrowFunctionExpression"; - expression: boolean; - body: BlockStatement | Expression; -} - -export interface YieldExpression extends BaseExpression { - type: "YieldExpression"; - argument?: Expression | null | undefined; - delegate: boolean; -} - -export interface TemplateLiteral extends BaseExpression { - type: "TemplateLiteral"; - quasis: TemplateElement[]; - expressions: Expression[]; -} - -export interface TaggedTemplateExpression extends BaseExpression { - type: "TaggedTemplateExpression"; - tag: Expression; - quasi: TemplateLiteral; -} - -export interface TemplateElement extends BaseNode { - type: "TemplateElement"; - tail: boolean; - value: { - /** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */ - cooked?: string | null | undefined; - raw: string; - }; -} - -export interface AssignmentProperty extends Property { - value: Pattern; - kind: "init"; - method: boolean; // false -} - -export interface ObjectPattern extends BasePattern { - type: "ObjectPattern"; - properties: Array; -} - -export interface ArrayPattern extends BasePattern { - type: "ArrayPattern"; - elements: Array; -} - -export interface RestElement extends BasePattern { - type: "RestElement"; - argument: Pattern; -} - -export interface AssignmentPattern extends BasePattern { - type: "AssignmentPattern"; - left: Pattern; - right: Expression; -} - -export type Class = ClassDeclaration | ClassExpression; -export interface BaseClass extends BaseNode { - superClass?: Expression | null | undefined; - body: ClassBody; -} - -export interface ClassBody extends BaseNode { - type: "ClassBody"; - body: Array; -} - -export interface MethodDefinition extends BaseNode { - type: "MethodDefinition"; - key: Expression | PrivateIdentifier; - value: FunctionExpression; - kind: "constructor" | "method" | "get" | "set"; - computed: boolean; - static: boolean; -} - -export interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration { - type: "ClassDeclaration"; - /** It is null when a class declaration is a part of the `export default class` statement */ - id: Identifier | null; -} - -export interface ClassDeclaration extends MaybeNamedClassDeclaration { - id: Identifier; -} - -export interface ClassExpression extends BaseClass, BaseExpression { - type: "ClassExpression"; - id?: Identifier | null | undefined; -} - -export interface MetaProperty extends BaseExpression { - type: "MetaProperty"; - meta: Identifier; - property: Identifier; -} - -export type ModuleDeclaration = - | ImportDeclaration - | ExportNamedDeclaration - | ExportDefaultDeclaration - | ExportAllDeclaration; -export interface BaseModuleDeclaration extends BaseNode {} - -export type ModuleSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier; -export interface BaseModuleSpecifier extends BaseNode { - local: Identifier; -} - -export interface ImportDeclaration extends BaseModuleDeclaration { - type: "ImportDeclaration"; - specifiers: Array; - attributes: ImportAttribute[]; - source: Literal; -} - -export interface ImportSpecifier extends BaseModuleSpecifier { - type: "ImportSpecifier"; - imported: Identifier | Literal; -} - -export interface ImportAttribute extends BaseNode { - type: "ImportAttribute"; - key: Identifier | Literal; - value: Literal; -} - -export interface ImportExpression extends BaseExpression { - type: "ImportExpression"; - source: Expression; - options?: Expression | null | undefined; -} - -export interface ImportDefaultSpecifier extends BaseModuleSpecifier { - type: "ImportDefaultSpecifier"; -} - -export interface ImportNamespaceSpecifier extends BaseModuleSpecifier { - type: "ImportNamespaceSpecifier"; -} - -export interface ExportNamedDeclaration extends BaseModuleDeclaration { - type: "ExportNamedDeclaration"; - declaration?: Declaration | null | undefined; - specifiers: ExportSpecifier[]; - attributes: ImportAttribute[]; - source?: Literal | null | undefined; -} - -export interface ExportSpecifier extends Omit { - type: "ExportSpecifier"; - local: Identifier | Literal; - exported: Identifier | Literal; -} - -export interface ExportDefaultDeclaration extends BaseModuleDeclaration { - type: "ExportDefaultDeclaration"; - declaration: MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration | Expression; -} - -export interface ExportAllDeclaration extends BaseModuleDeclaration { - type: "ExportAllDeclaration"; - exported: Identifier | Literal | null; - attributes: ImportAttribute[]; - source: Literal; -} - -export interface AwaitExpression extends BaseExpression { - type: "AwaitExpression"; - argument: Expression; -} diff --git a/node_modules/@types/estree/package.json b/node_modules/@types/estree/package.json deleted file mode 100644 index 61ce23a7..00000000 --- a/node_modules/@types/estree/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@types/estree", - "version": "1.0.7", - "description": "TypeScript definitions for estree", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree", - "license": "MIT", - "contributors": [ - { - "name": "RReverser", - "githubUsername": "RReverser", - "url": "https://github.com/RReverser" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/estree" - }, - "scripts": {}, - "dependencies": {}, - "peerDependencies": {}, - "typesPublisherContentHash": "1ab11f4e78319f80655b4ca20a073da0dc035be5f3290fb0bfa1e08a055d0c7d", - "typeScriptVersion": "5.0", - "nonNpm": true -} \ No newline at end of file diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md index c1b67edc..5d809438 100644 --- a/node_modules/@types/node/README.md +++ b/node_modules/@types/node/README.md @@ -5,11 +5,11 @@ This package contains type definitions for node (https://nodejs.org/). # Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v20. ### Additional Details - * Last updated: Tue, 10 Jun 2025 02:18:06 GMT + * Last updated: Mon, 16 Jun 2025 11:02:21 GMT * Dependencies: [undici-types](https://npmjs.com/package/undici-types) # Credits -These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), [Dmitry Semigradsky](https://github.com/Semigradsky), and [René](https://github.com/Renegade334). +These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky). diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts index 666682a9..85a759b6 100644 --- a/node_modules/@types/node/assert.d.ts +++ b/node_modules/@types/node/assert.d.ts @@ -1,7 +1,7 @@ /** * The `node:assert` module provides a set of assertion functions for verifying * invariants. - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/assert.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/assert.js) */ declare module "assert" { /** @@ -79,7 +79,9 @@ declare module "assert" { * @return A function that wraps `fn`. */ calls(exact?: number): () => void; - calls any>(fn?: Func, exact?: number): Func; + calls(fn: undefined, exact?: number): () => void; + calls any>(fn: Func, exact?: number): Func; + calls any>(fn?: Func, exact?: number): Func | (() => void); /** * Example: * @@ -796,7 +798,7 @@ declare module "assert" { * check that the promise is rejected. * * If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the - * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v24.x/api/errors.html#err_invalid_return_value) + * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v20.x/api/errors.html#err_invalid_return_value) * error. In both cases the error handler is skipped. * * Besides the async nature to await the completion behaves identically to {@link throws}. @@ -866,7 +868,7 @@ declare module "assert" { * * If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If * the function does not return a promise, `assert.doesNotReject()` will return a - * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v24.x/api/errors.html#err_invalid_return_value) error. In both cases + * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v20.x/api/errors.html#err_invalid_return_value) error. In both cases * the error handler is skipped. * * Using `assert.doesNotReject()` is actually not useful because there is little @@ -929,7 +931,7 @@ declare module "assert" { * If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal * to the value of the `message` parameter. If the `message` parameter is * undefined, a default error message is assigned. If the `message` parameter is an - * instance of an [Error](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. + * instance of an [Error](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. * @since v13.6.0, v12.16.0 */ function match(value: string, regExp: RegExp, message?: string | Error): void; @@ -952,22 +954,10 @@ declare module "assert" { * If the values do match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal * to the value of the `message` parameter. If the `message` parameter is * undefined, a default error message is assigned. If the `message` parameter is an - * instance of an [Error](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. + * instance of an [Error](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. * @since v13.6.0, v12.16.0 */ function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void; - /** - * Tests for partial deep equality between the `actual` and `expected` parameters. - * "Deep" equality means that the enumerable "own" properties of child objects - * are recursively evaluated also by the following rules. "Partial" equality means - * that only properties that exist on the `expected` parameter are going to be - * compared. - * - * This method always passes the same test cases as `assert.deepStrictEqual()`, - * behaving as a super set of it. - * @since v22.13.0 - */ - function partialDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; /** * In strict assertion mode, non-strict methods behave like their corresponding strict methods. For example, * {@link deepEqual} will behave like {@link deepStrictEqual}. @@ -978,7 +968,7 @@ declare module "assert" { * To use strict assertion mode: * * ```js - * import { strict as assert } from 'node:assert'; + * import { strict as assert } from 'node:assert';COPY * import assert from 'node:assert/strict'; * ``` * diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts index 2377689f..fd9d2aa3 100644 --- a/node_modules/@types/node/async_hooks.d.ts +++ b/node_modules/@types/node/async_hooks.d.ts @@ -2,8 +2,8 @@ * We strongly discourage the use of the `async_hooks` API. * Other APIs that can cover most of its use cases include: * - * * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-v24.x/api/async_context.html#class-asynclocalstorage) tracks async context - * * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v24.x/api/process.html#processgetactiveresourcesinfo) tracks active resources + * * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-v20.x/api/async_context.html#class-asynclocalstorage) tracks async context + * * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v20.x/api/process.html#processgetactiveresourcesinfo) tracks active resources * * The `node:async_hooks` module provides an API to track asynchronous resources. * It can be accessed using: @@ -12,7 +12,7 @@ * import async_hooks from 'node:async_hooks'; * ``` * @experimental - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/async_hooks.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/async_hooks.js) */ declare module "async_hooks" { /** @@ -44,7 +44,7 @@ declare module "async_hooks" { * ``` * * Promise contexts may not get precise `executionAsyncIds` by default. - * See the section on [promise execution tracking](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html#promise-execution-tracking). + * See the section on [promise execution tracking](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html#promise-execution-tracking). * @since v8.1.0 * @return The `asyncId` of the current execution context. Useful to track when something calls. */ @@ -77,7 +77,7 @@ declare module "async_hooks" { * executionAsyncId, * executionAsyncResource, * createHook, - * } from 'node:async_hooks'; + * } from 'async_hooks'; * const sym = Symbol('state'); // Private symbol to avoid pollution * * createHook({ @@ -117,7 +117,7 @@ declare module "async_hooks" { * ``` * * Promise contexts may not get valid `triggerAsyncId`s by default. See - * the section on [promise execution tracking](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html#promise-execution-tracking). + * the section on [promise execution tracking](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html#promise-execution-tracking). * @return The ID of the resource responsible for calling the callback that is currently being executed. */ function triggerAsyncId(): number; @@ -320,16 +320,6 @@ declare module "async_hooks" { */ triggerAsyncId(): number; } - interface AsyncLocalStorageOptions { - /** - * The default value to be used when no store is provided. - */ - defaultValue?: any; - /** - * A name for the `AsyncLocalStorage` value. - */ - name?: string | undefined; - } /** * This class creates stores that stay coherent through asynchronous operations. * @@ -368,8 +358,8 @@ declare module "async_hooks" { * http.get('http://localhost:8080'); * // Prints: * // 0: start - * // 0: finish * // 1: start + * // 0: finish * // 1: finish * ``` * @@ -379,14 +369,10 @@ declare module "async_hooks" { * @since v13.10.0, v12.17.0 */ class AsyncLocalStorage { - /** - * Creates a new instance of `AsyncLocalStorage`. Store is only provided within a - * `run()` call or after an `enterWith()` call. - */ - constructor(options?: AsyncLocalStorageOptions); /** * Binds the given function to the current execution context. * @since v19.8.0 + * @experimental * @param fn The function to bind to the current execution context. * @return A new function that calls `fn` within the captured execution context. */ @@ -417,6 +403,7 @@ declare module "async_hooks" { * console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123 * ``` * @since v19.8.0 + * @experimental * @return A new function with the signature `(fn: (...args) : R, ...args) : R`. */ static snapshot(): (fn: (...args: TArgs) => R, ...args: TArgs) => R; @@ -445,11 +432,6 @@ declare module "async_hooks" { * @since v13.10.0, v12.17.0 */ getStore(): T | undefined; - /** - * The name of the `AsyncLocalStorage` instance if provided. - * @since v24.0.0 - */ - readonly name: string; /** * Runs a function synchronously within a context and returns its * return value. The store is not accessible outside of the callback function. diff --git a/node_modules/@types/node/buffer.buffer.d.ts b/node_modules/@types/node/buffer.buffer.d.ts index b22f83a2..e6f977f4 100644 --- a/node_modules/@types/node/buffer.buffer.d.ts +++ b/node_modules/@types/node/buffer.buffer.d.ts @@ -176,8 +176,7 @@ declare module "buffer" { * * If `totalLength` is provided, it is coerced to an unsigned integer. If the * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is - * truncated to `totalLength`. If the combined length of the `Buffer`s in `list` is - * less than `totalLength`, the remaining space is filled with zeros. + * truncated to `totalLength`. * * ```js * import { Buffer } from 'node:buffer'; diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts index eae08be7..c4c12854 100644 --- a/node_modules/@types/node/buffer.d.ts +++ b/node_modules/@types/node/buffer.d.ts @@ -46,7 +46,7 @@ type _File = typeof globalThis extends { onmessage: any; File: any } ? {} : impo * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74]. * const buf7 = Buffer.from('tést', 'latin1'); * ``` - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/buffer.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/buffer.js) */ declare module "buffer" { import { BinaryLike } from "node:crypto"; @@ -118,6 +118,7 @@ declare module "buffer" { * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using * a prior call to `URL.createObjectURL()`. * @since v16.7.0 + * @experimental * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`. */ export function resolveObjectURL(id: string): Blob | undefined; @@ -128,7 +129,7 @@ declare module "buffer" { export interface BlobOptions { /** * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts - * will be converted to the platform native line-ending as specified by `import { EOL } from 'node:os'`. + * will be converted to the platform native line-ending as specified by `import { EOL } from 'node:node:os'`. */ endings?: "transparent" | "native"; /** @@ -178,6 +179,7 @@ declare module "buffer" { * console.log(bytes); // Outputs: Uint8Array(5) [ 104, 101, 108, 108, 111 ] * }); * ``` + * @since v20.16.0 */ bytes(): Promise; /** @@ -204,7 +206,7 @@ declare module "buffer" { export interface FileOptions { /** * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts will be - * converted to the platform native line-ending as specified by `import { EOL } from 'node:os'`. + * converted to the platform native line-ending as specified by `import { EOL } from 'node:node:os'`. */ endings?: "native" | "transparent"; /** The File content-type. */ @@ -1904,7 +1906,7 @@ declare module "buffer" { function btoa(data: string): string; interface Blob extends _Blob {} /** - * `Blob` class is a global reference for `import { Blob } from 'node:buffer'` + * `Blob` class is a global reference for `import { Blob } from 'node:node:buffer'` * https://nodejs.org/api/buffer.html#class-blob * @since v18.0.0 */ @@ -1912,7 +1914,7 @@ declare module "buffer" { : typeof import("buffer").Blob; interface File extends _File {} /** - * `File` class is a global reference for `import { File } from 'node:buffer'` + * `File` class is a global reference for `import { File } from 'node:node:buffer'` * https://nodejs.org/api/buffer.html#class-file * @since v20.0.0 */ diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts index 92b4cda3..5d07ef1a 100644 --- a/node_modules/@types/node/child_process.d.ts +++ b/node_modules/@types/node/child_process.d.ts @@ -63,7 +63,7 @@ * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however, * the synchronous methods can have significant impact on performance due to * stalling the event loop while spawned processes complete. - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/child_process.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/child_process.js) */ declare module "child_process" { import { ObjectEncodingOptions } from "node:fs"; @@ -374,12 +374,12 @@ declare module "child_process" { * a TCP server object to the child process as illustrated in the example below: * * ```js - * import { createServer } from 'node:net'; - * import { fork } from 'node:child_process'; - * const subprocess = fork('subprocess.js'); + * import child_process from 'node:child_process'; + * const subprocess = child_process.fork('subprocess.js'); * * // Open up the server object and send the handle. - * const server = createServer(); + * import net from 'node:net'; + * const server = net.createServer(); * server.on('connection', (socket) => { * socket.end('handled by parent'); * }); @@ -414,14 +414,14 @@ declare module "child_process" { * handle connections with "normal" or "special" priority: * * ```js - * import { createServer } from 'node:net'; * import { fork } from 'node:child_process'; * const normal = fork('subprocess.js', ['normal']); * const special = fork('subprocess.js', ['special']); * * // Open up the server and send sockets to child. Use pauseOnConnect to prevent * // the sockets from being read before they are sent to the child process. - * const server = createServer({ pauseOnConnect: true }); + * import net from 'node:net'; + * const server = net.createServer({ pauseOnConnect: true }); * server.on('connection', (socket) => { * * // If this is special priority... @@ -458,7 +458,7 @@ declare module "child_process" { * as the connection may have been closed during the time it takes to send the * connection to the child. * @since v0.5.9 - * @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v24.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v24.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v24.x/api/dgram.html#class-dgramsocket) object. + * @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v20.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v20.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v20.x/api/dgram.html#class-dgramsocket) object. * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties: */ send(message: Serializable, callback?: (error: Error | null) => void): boolean; @@ -1124,8 +1124,7 @@ declare module "child_process" { * * ```js * import util from 'node:util'; - * import child_process from 'node:child_process'; - * const execFile = util.promisify(child_process.execFile); + * const execFile = util.promisify(require('node:child_process').execFile); * async function getVersion() { * const { stdout } = await execFile('node', ['--version']); * console.log(stdout); diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts index fa25fdae..b78f52f8 100644 --- a/node_modules/@types/node/cluster.d.ts +++ b/node_modules/@types/node/cluster.d.ts @@ -1,7 +1,7 @@ /** * Clusters of Node.js processes can be used to run multiple instances of Node.js * that can distribute workloads among their application threads. When process isolation - * is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html) + * is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html) * module instead, which allows running multiple application threads within a single Node.js instance. * * The cluster module allows easy creation of child processes that all share @@ -50,7 +50,7 @@ * ``` * * On Windows, it is not yet possible to set up a named pipe server in a worker. - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/cluster.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/cluster.js) */ declare module "cluster" { import * as child from "node:child_process"; @@ -80,8 +80,8 @@ declare module "cluster" { silent?: boolean | undefined; /** * Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must - * contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#child_processspawncommand-args-options)'s - * [`stdio`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#optionsstdio). + * contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#child_processspawncommand-args-options)'s + * [`stdio`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#optionsstdio). */ stdio?: any[] | undefined; /** @@ -99,7 +99,7 @@ declare module "cluster" { inspectPort?: number | (() => number) | undefined; /** * Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`. - * See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#advanced-serialization) for more details. + * See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#advanced-serialization) for more details. * @default false */ serialization?: SerializationType | undefined; @@ -142,10 +142,10 @@ declare module "cluster" { */ id: number; /** - * All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object + * All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object * from this function is stored as `.process`. In a worker, the global `process` is stored. * - * See: [Child Process module](https://nodejs.org/docs/latest-v24.x/api/child_process.html#child_processforkmodulepath-args-options). + * See: [Child Process module](https://nodejs.org/docs/latest-v20.x/api/child_process.html#child_processforkmodulepath-args-options). * * Workers will call `process.exit(0)` if the `'disconnect'` event occurs * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against @@ -156,7 +156,7 @@ declare module "cluster" { /** * Send a message to a worker or primary, optionally with a handle. * - * In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback). + * In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback). * * In a worker, this sends a message to the primary. It is identical to `process.send()`. * @@ -198,7 +198,7 @@ declare module "cluster" { * This method is aliased as `worker.destroy()` for backwards compatibility. * * In a worker, `process.kill()` exists, but it is not this function; - * it is [`kill()`](https://nodejs.org/docs/latest-v24.x/api/process.html#processkillpid-signal). + * it is [`kill()`](https://nodejs.org/docs/latest-v20.x/api/process.html#processkillpid-signal). * @since v0.9.12 * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process. */ @@ -232,7 +232,6 @@ declare module "cluster" { * * ```js * import net from 'node:net'; - * * if (cluster.isPrimary) { * const worker = cluster.fork(); * let timeout; @@ -412,7 +411,7 @@ declare module "cluster" { readonly isWorker: boolean; /** * The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a - * global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clustersetupprimarysettings) + * global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clustersetupprimarysettings) * is called, whichever comes first. * * `SCHED_RR` is the default on all operating systems except Windows. Windows will change to `SCHED_RR` once libuv is able to effectively distribute @@ -423,24 +422,24 @@ declare module "cluster" { */ schedulingPolicy: number; /** - * After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clustersetupprimarysettings) - * (or [`.fork()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clusterforkenv)) this settings object will contain + * After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clustersetupprimarysettings) + * (or [`.fork()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clusterforkenv)) this settings object will contain * the settings, including the default values. * * This object is not intended to be changed or set manually. * @since v0.7.1 */ readonly settings: ClusterSettings; - /** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clustersetupprimarysettings) instead. */ + /** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clustersetupprimarysettings) instead. */ setupMaster(settings?: ClusterSettings): void; /** * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`. * - * Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clusterforkenv) + * Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clusterforkenv) * and have no effect on workers that are already running. * * The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to - * [`.fork()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clusterforkenv). + * [`.fork()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clusterforkenv). * * The defaults above apply to the first call only; the defaults for later calls are the current values at the time of * `cluster.setupPrimary()` is called. diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts index c923bd0a..206e3fc1 100644 --- a/node_modules/@types/node/console.d.ts +++ b/node_modules/@types/node/console.d.ts @@ -5,12 +5,12 @@ * The module exports two specific components: * * * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream. - * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and - * [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. + * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdout) and + * [`process.stderr`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. * * _**Warning**_: The global console object's methods are neither consistently * synchronous like the browser APIs they resemble, nor are they consistently - * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for + * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v20.x/api/process.html#a-note-on-process-io) for * more information. * * Example using the global `console`: @@ -54,7 +54,7 @@ * myConsole.warn(`Danger ${name}! Danger!`); * // Prints: Danger Will Robinson! Danger!, to err * ``` - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/console.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/console.js) */ declare module "console" { import console = require("node:console"); @@ -70,7 +70,7 @@ declare module "node:console" { * `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only * writes a message and does not otherwise affect execution. The output always * starts with `"Assertion failed"`. If provided, `message` is formatted using - * [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args). + * [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args). * * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens. * @@ -152,7 +152,7 @@ declare module "node:console" { */ debug(message?: any, ...optionalParams: any[]): void; /** - * Uses [`util.inspect()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilinspectobject-options) on `obj` and prints the resulting string to `stdout`. + * Uses [`util.inspect()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilinspectobject-options) on `obj` and prints the resulting string to `stdout`. * This function bypasses any custom `inspect()` function defined on `obj`. * @since v0.1.101 */ @@ -167,7 +167,7 @@ declare module "node:console" { * Prints to `stderr` with newline. Multiple arguments can be passed, with the * first used as the primary message and all additional used as substitution * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) - * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)). + * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args)). * * ```js * const code = 5; @@ -178,8 +178,8 @@ declare module "node:console" { * ``` * * If formatting elements (e.g. `%d`) are not found in the first string then - * [`util.inspect()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilinspectobject-options) is called on each argument and the - * resulting string values are concatenated. See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) + * [`util.inspect()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilinspectobject-options) is called on each argument and the + * resulting string values are concatenated. See [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args) * for more information. * @since v0.1.100 */ @@ -211,7 +211,7 @@ declare module "node:console" { * Prints to `stdout` with newline. Multiple arguments can be passed, with the * first used as the primary message and all additional used as substitution * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) - * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)). + * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args)). * * ```js * const count = 5; @@ -221,7 +221,7 @@ declare module "node:console" { * // Prints: count: 5, to stdout * ``` * - * See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information. + * See [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args) for more information. * @since v0.1.100 */ log(message?: any, ...optionalParams: any[]): void; @@ -297,7 +297,7 @@ declare module "node:console" { */ timeLog(label?: string, ...data: any[]): void; /** - * Prints to `stderr` the string `'Trace: '`, followed by the [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) + * Prints to `stderr` the string `'Trace: '`, followed by the [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args) * formatted message and stack trace to the current position in the code. * * ```js @@ -361,12 +361,12 @@ declare module "node:console" { * The module exports two specific components: * * * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream. - * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and - * [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. + * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdout) and + * [`process.stderr`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. * * _**Warning**_: The global console object's methods are neither consistently * synchronous like the browser APIs they resemble, nor are they consistently - * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for + * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v20.x/api/process.html#a-note-on-process-io) for * more information. * * Example using the global `console`: @@ -410,7 +410,7 @@ declare module "node:console" { * myConsole.warn(`Danger ${name}! Danger!`); * // Prints: Danger Will Robinson! Danger!, to err * ``` - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/console.js) + * @see [source](https://github.com/nodejs/node/blob/v20.11.1/lib/console.js) */ namespace console { interface ConsoleConstructorOptions { @@ -431,7 +431,7 @@ declare module "node:console" { colorMode?: boolean | "auto" | undefined; /** * Specifies options that are passed along to - * [`util.inspect()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilinspectobject-options). + * [`util.inspect()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilinspectobject-options). */ inspectOptions?: InspectOptions | undefined; /** diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts index df1f78ae..68518bcb 100644 --- a/node_modules/@types/node/crypto.d.ts +++ b/node_modules/@types/node/crypto.d.ts @@ -14,7 +14,7 @@ * // Prints: * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e * ``` - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/crypto.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/crypto.js) */ declare module "crypto" { import * as stream from "node:stream"; @@ -96,7 +96,7 @@ declare module "crypto" { verifySpkac(spkac: NodeJS.ArrayBufferView): boolean; } namespace constants { - // https://nodejs.org/dist/latest-v24.x/docs/api/crypto.html#crypto-constants + // https://nodejs.org/dist/latest-v20.x/docs/api/crypto.html#crypto-constants const OPENSSL_VERSION_NUMBER: number; /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */ const SSL_OP_ALL: number; @@ -662,19 +662,6 @@ declare module "crypto" { * @since v11.6.0 */ symmetricKeySize?: number | undefined; - /** - * Converts a `KeyObject` instance to a `CryptoKey`. - * @since 22.10.0 - */ - toCryptoKey( - algorithm: - | webcrypto.AlgorithmIdentifier - | webcrypto.RsaHashedImportParams - | webcrypto.EcKeyImportParams - | webcrypto.HmacImportParams, - extractable: boolean, - keyUsages: readonly webcrypto.KeyUsage[], - ): webcrypto.CryptoKey; /** * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys * or `'private'` for private (asymmetric) keys. @@ -701,6 +688,56 @@ declare module "crypto" { /** @default 16 */ authTagLength?: number | undefined; } + /** + * Creates and returns a `Cipher` object that uses the given `algorithm` and `password`. + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication + * tag that will be returned by `getAuthTag()` and defaults to 16 bytes. + * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms` will + * display the available cipher algorithms. + * + * The `password` is used to derive the cipher key and initialization vector (IV). + * The value must be either a `'latin1'` encoded string, a `Buffer`, a`TypedArray`, or a `DataView`. + * + * **This function is semantically insecure for all** + * **supported ciphers and fatally flawed for ciphers in counter mode (such as CTR,** + * **GCM, or CCM).** + * + * The implementation of `crypto.createCipher()` derives keys using the OpenSSL + * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) with the digest algorithm set to MD5, one + * iteration, and no salt. The lack of salt allows dictionary attacks as the same + * password always creates the same key. The low iteration count and + * non-cryptographically secure hash algorithm allow passwords to be tested very + * rapidly. + * + * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) it is recommended that + * developers derive a key and IV on + * their own using {@link scrypt} and to use {@link createCipheriv} to create the `Cipher` object. Users should not use ciphers with counter mode + * (e.g. CTR, GCM, or CCM) in `crypto.createCipher()`. A warning is emitted when + * they are used in order to avoid the risk of IV reuse that causes + * vulnerabilities. For the case when IV is reused in GCM, see [Nonce-Disrespecting Adversaries](https://github.com/nonce-disrespect/nonce-disrespect) for details. + * @since v0.1.94 + * @deprecated Since v10.0.0 - Use {@link createCipheriv} instead. + * @param options `stream.transform` options + */ + function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM; + /** @deprecated since v10.0.0 use `createCipheriv()` */ + function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM; + /** @deprecated since v10.0.0 use `createCipheriv()` */ + function createCipher(algorithm: CipherOCBTypes, password: BinaryLike, options: CipherOCBOptions): CipherOCB; + /** @deprecated since v10.0.0 use `createCipheriv()` */ + function createCipher( + algorithm: CipherChaCha20Poly1305Types, + password: BinaryLike, + options?: CipherChaCha20Poly1305Options, + ): CipherChaCha20Poly1305; + /** @deprecated since v10.0.0 use `createCipheriv()` */ + function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher; /** * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and * initialization vector (`iv`). @@ -760,9 +797,9 @@ declare module "crypto" { key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions, - ): Cipheriv; + ): Cipher; /** - * Instances of the `Cipheriv` class are used to encrypt data. The class can be + * Instances of the `Cipher` class are used to encrypt data. The class can be * used in one of two ways: * * * As a `stream` that is both readable and writable, where plain unencrypted @@ -770,11 +807,11 @@ declare module "crypto" { * * Using the `cipher.update()` and `cipher.final()` methods to produce * the encrypted data. * - * The {@link createCipheriv} method is - * used to create `Cipheriv` instances. `Cipheriv` objects are not to be created + * The {@link createCipher} or {@link createCipheriv} methods are + * used to create `Cipher` instances. `Cipher` objects are not to be created * directly using the `new` keyword. * - * Example: Using `Cipheriv` objects as streams: + * Example: Using `Cipher` objects as streams: * * ```js * const { @@ -809,7 +846,7 @@ declare module "crypto" { * }); * ``` * - * Example: Using `Cipheriv` and piped streams: + * Example: Using `Cipher` and piped streams: * * ```js * import { @@ -880,7 +917,7 @@ declare module "crypto" { * ``` * @since v0.1.94 */ - class Cipheriv extends stream.Transform { + class Cipher extends stream.Transform { private constructor(); /** * Updates the cipher with `data`. If the `inputEncoding` argument is given, @@ -901,7 +938,7 @@ declare module "crypto" { update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; /** - * Once the `cipher.final()` method has been called, the `Cipheriv` object can no + * Once the `cipher.final()` method has been called, the `Cipher` object can no * longer be used to encrypt data. Attempts to call `cipher.final()` more than * once will result in an error being thrown. * @since v0.1.94 @@ -911,7 +948,7 @@ declare module "crypto" { final(): Buffer; final(outputEncoding: BufferEncoding): string; /** - * When using block encryption algorithms, the `Cipheriv` class will automatically + * When using block encryption algorithms, the `Cipher` class will automatically * add padding to the input data to the appropriate block size. To disable the * default padding call `cipher.setAutoPadding(false)`. * @@ -927,7 +964,7 @@ declare module "crypto" { */ setAutoPadding(autoPadding?: boolean): this; } - interface CipherCCM extends Cipheriv { + interface CipherCCM extends Cipher { setAAD( buffer: NodeJS.ArrayBufferView, options: { @@ -936,7 +973,7 @@ declare module "crypto" { ): this; getAuthTag(): Buffer; } - interface CipherGCM extends Cipheriv { + interface CipherGCM extends Cipher { setAAD( buffer: NodeJS.ArrayBufferView, options?: { @@ -945,7 +982,7 @@ declare module "crypto" { ): this; getAuthTag(): Buffer; } - interface CipherOCB extends Cipheriv { + interface CipherOCB extends Cipher { setAAD( buffer: NodeJS.ArrayBufferView, options?: { @@ -954,7 +991,7 @@ declare module "crypto" { ): this; getAuthTag(): Buffer; } - interface CipherChaCha20Poly1305 extends Cipheriv { + interface CipherChaCha20Poly1305 extends Cipher { setAAD( buffer: NodeJS.ArrayBufferView, options: { @@ -964,7 +1001,46 @@ declare module "crypto" { getAuthTag(): Buffer; } /** - * Creates and returns a `Decipheriv` object that uses the given `algorithm`, `key` and initialization vector (`iv`). + * Creates and returns a `Decipher` object that uses the given `algorithm` and `password` (key). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the `authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. + * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. + * + * **This function is semantically insecure for all** + * **supported ciphers and fatally flawed for ciphers in counter mode (such as CTR,** + * **GCM, or CCM).** + * + * The implementation of `crypto.createDecipher()` derives keys using the OpenSSL + * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) with the digest algorithm set to MD5, one + * iteration, and no salt. The lack of salt allows dictionary attacks as the same + * password always creates the same key. The low iteration count and + * non-cryptographically secure hash algorithm allow passwords to be tested very + * rapidly. + * + * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) it is recommended that + * developers derive a key and IV on + * their own using {@link scrypt} and to use {@link createDecipheriv} to create the `Decipher` object. + * @since v0.1.94 + * @deprecated Since v10.0.0 - Use {@link createDecipheriv} instead. + * @param options `stream.transform` options + */ + function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM; + /** @deprecated since v10.0.0 use `createDecipheriv()` */ + function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM; + /** @deprecated since v10.0.0 use `createDecipheriv()` */ + function createDecipher(algorithm: CipherOCBTypes, password: BinaryLike, options: CipherOCBOptions): DecipherOCB; + /** @deprecated since v10.0.0 use `createDecipheriv()` */ + function createDecipher( + algorithm: CipherChaCha20Poly1305Types, + password: BinaryLike, + options?: CipherChaCha20Poly1305Options, + ): DecipherChaCha20Poly1305; + /** @deprecated since v10.0.0 use `createDecipheriv()` */ + function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher; + /** + * Creates and returns a `Decipher` object that uses the given `algorithm`, `key` and initialization vector (`iv`). * * The `options` argument controls stream behavior and is optional except when a * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the `authTagLength` option is required and specifies the length of the @@ -1021,9 +1097,9 @@ declare module "crypto" { key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions, - ): Decipheriv; + ): Decipher; /** - * Instances of the `Decipheriv` class are used to decrypt data. The class can be + * Instances of the `Decipher` class are used to decrypt data. The class can be * used in one of two ways: * * * As a `stream` that is both readable and writable, where plain encrypted @@ -1031,11 +1107,11 @@ declare module "crypto" { * * Using the `decipher.update()` and `decipher.final()` methods to * produce the unencrypted data. * - * The {@link createDecipheriv} method is - * used to create `Decipheriv` instances. `Decipheriv` objects are not to be created + * The {@link createDecipher} or {@link createDecipheriv} methods are + * used to create `Decipher` instances. `Decipher` objects are not to be created * directly using the `new` keyword. * - * Example: Using `Decipheriv` objects as streams: + * Example: Using `Decipher` objects as streams: * * ```js * import { Buffer } from 'node:buffer'; @@ -1074,7 +1150,7 @@ declare module "crypto" { * decipher.end(); * ``` * - * Example: Using `Decipheriv` and piped streams: + * Example: Using `Decipher` and piped streams: * * ```js * import { @@ -1130,7 +1206,7 @@ declare module "crypto" { * ``` * @since v0.1.94 */ - class Decipheriv extends stream.Transform { + class Decipher extends stream.Transform { private constructor(); /** * Updates the decipher with `data`. If the `inputEncoding` argument is given, @@ -1151,7 +1227,7 @@ declare module "crypto" { update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; /** - * Once the `decipher.final()` method has been called, the `Decipheriv` object can + * Once the `decipher.final()` method has been called, the `Decipher` object can * no longer be used to decrypt data. Attempts to call `decipher.final()` more * than once will result in an error being thrown. * @since v0.1.94 @@ -1174,7 +1250,7 @@ declare module "crypto" { */ setAutoPadding(auto_padding?: boolean): this; } - interface DecipherCCM extends Decipheriv { + interface DecipherCCM extends Decipher { setAuthTag(buffer: NodeJS.ArrayBufferView): this; setAAD( buffer: NodeJS.ArrayBufferView, @@ -1183,7 +1259,7 @@ declare module "crypto" { }, ): this; } - interface DecipherGCM extends Decipheriv { + interface DecipherGCM extends Decipher { setAuthTag(buffer: NodeJS.ArrayBufferView): this; setAAD( buffer: NodeJS.ArrayBufferView, @@ -1192,7 +1268,7 @@ declare module "crypto" { }, ): this; } - interface DecipherOCB extends Decipheriv { + interface DecipherOCB extends Decipher { setAuthTag(buffer: NodeJS.ArrayBufferView): this; setAAD( buffer: NodeJS.ArrayBufferView, @@ -1201,7 +1277,7 @@ declare module "crypto" { }, ): this; } - interface DecipherChaCha20Poly1305 extends Decipheriv { + interface DecipherChaCha20Poly1305 extends Decipher { setAuthTag(buffer: NodeJS.ArrayBufferView): this; setAAD( buffer: NodeJS.ArrayBufferView, @@ -2182,10 +2258,7 @@ declare module "crypto" { * be passed instead of a public key. * @since v0.11.14 */ - function publicEncrypt( - key: RsaPublicKey | RsaPrivateKey | KeyLike, - buffer: NodeJS.ArrayBufferView | string, - ): Buffer; + function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; /** * Decrypts `buffer` with `key`.`buffer` was previously encrypted using * the corresponding private key, for example using {@link privateEncrypt}. @@ -2197,10 +2270,7 @@ declare module "crypto" { * be passed instead of a public key. * @since v1.1.0 */ - function publicDecrypt( - key: RsaPublicKey | RsaPrivateKey | KeyLike, - buffer: NodeJS.ArrayBufferView | string, - ): Buffer; + function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; /** * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using * the corresponding public key, for example using {@link publicEncrypt}. @@ -2209,7 +2279,7 @@ declare module "crypto" { * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`. * @since v0.11.14 */ - function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView | string): Buffer; + function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; /** * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using * the corresponding public key, for example using {@link publicDecrypt}. @@ -2218,7 +2288,7 @@ declare module "crypto" { * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`. * @since v1.1.0 */ - function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView | string): Buffer; + function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; /** * ```js * const { @@ -3352,17 +3422,10 @@ declare module "crypto" { ): void; /** * Computes the Diffie-Hellman secret based on a `privateKey` and a `publicKey`. - * Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'` - * (for Diffie-Hellman), `'ec'`, `'x448'`, or `'x25519'` (for ECDH). - * - * If the `callback` function is provided this function uses libuv's threadpool. + * Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'` (for Diffie-Hellman), `'ec'` (for ECDH), `'x448'`, or `'x25519'` (for ECDH-ES). * @since v13.9.0, v12.17.0 */ function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer; - function diffieHellman( - options: { privateKey: KeyObject; publicKey: KeyObject }, - callback: (err: Error | null, secret: Buffer) => void, - ): void; /** * A utility for creating one-shot hash digests of data. It can be faster than the object-based `crypto.createHash()` when hashing a smaller amount of data * (<= 5MB) that's readily available. If the data can be big or if it is streamed, it's still recommended to use `crypto.createHash()` instead. The `algorithm` @@ -3389,7 +3452,7 @@ declare module "crypto" { * @since v21.7.0, v20.12.0 * @param data When `data` is a string, it will be encoded as UTF-8 before being hashed. If a different input encoding is desired for a string input, user * could encode the string into a `TypedArray` using either `TextEncoder` or `Buffer.from()` and passing the encoded `TypedArray` into this API instead. - * @param [outputEncoding='hex'] [Encoding](https://nodejs.org/docs/latest-v24.x/api/buffer.html#buffers-and-character-encodings) used to encode the returned digest. + * @param [outputEncoding='hex'] [Encoding](https://nodejs.org/docs/latest-v20.x/api/buffer.html#buffers-and-character-encodings) used to encode the returned digest. */ function hash(algorithm: string, data: BinaryLike, outputEncoding?: BinaryToTextEncoding): string; function hash(algorithm: string, data: BinaryLike, outputEncoding: "buffer"): Buffer; @@ -3704,21 +3767,11 @@ declare module "crypto" { * @since v15.6.0 */ readonly validFrom: string; - /** - * The date/time from which this certificate is valid, encapsulated in a `Date` object. - * @since v22.10.0 - */ - readonly validFromDate: Date; /** * The date/time until which this certificate is considered valid. * @since v15.6.0 */ readonly validTo: string; - /** - * The date/time until which this certificate is valid, encapsulated in a `Date` object. - * @since v22.10.0 - */ - readonly validToDate: Date; constructor(buffer: BinaryLike); /** * Checks whether the certificate matches the given email address. @@ -4228,13 +4281,9 @@ declare module "crypto" { * - `'PBKDF2'` * @since v15.0.0 */ + deriveBits(algorithm: EcdhKeyDeriveParams, baseKey: CryptoKey, length: number | null): Promise; deriveBits( - algorithm: EcdhKeyDeriveParams, - baseKey: CryptoKey, - length?: number | null, - ): Promise; - deriveBits( - algorithm: EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, + algorithm: AlgorithmIdentifier | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number, ): Promise; @@ -4256,9 +4305,14 @@ declare module "crypto" { * @since v15.0.0 */ deriveKey( - algorithm: EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, + algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, - derivedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | AesDerivedKeyParams, + derivedKeyAlgorithm: + | AlgorithmIdentifier + | AesDerivedKeyParams + | HmacImportParams + | HkdfParams + | Pbkdf2Params, extractable: boolean, keyUsages: readonly KeyUsage[], ): Promise; diff --git a/node_modules/@types/node/dgram.d.ts b/node_modules/@types/node/dgram.d.ts index 35239f92..625575e2 100644 --- a/node_modules/@types/node/dgram.d.ts +++ b/node_modules/@types/node/dgram.d.ts @@ -23,10 +23,10 @@ * server.bind(41234); * // Prints: server listening 0.0.0.0:41234 * ``` - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/dgram.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/dgram.js) */ declare module "dgram" { - import { AddressInfo, BlockList } from "node:net"; + import { AddressInfo } from "node:net"; import * as dns from "node:dns"; import { Abortable, EventEmitter } from "node:events"; interface RemoteInfo { @@ -45,7 +45,6 @@ declare module "dgram" { interface SocketOptions extends Abortable { type: SocketType; reuseAddr?: boolean | undefined; - reusePort?: boolean | undefined; /** * @default false */ @@ -59,8 +58,6 @@ declare module "dgram" { callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, ) => void) | undefined; - receiveBlockList?: BlockList | undefined; - sendBlockList?: BlockList | undefined; } /** * Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram diff --git a/node_modules/@types/node/diagnostics_channel.d.ts b/node_modules/@types/node/diagnostics_channel.d.ts index fa5ed691..f758aecc 100644 --- a/node_modules/@types/node/diagnostics_channel.d.ts +++ b/node_modules/@types/node/diagnostics_channel.d.ts @@ -20,7 +20,7 @@ * should generally include the module name to avoid collisions with data from * other modules. * @since v15.1.0, v14.17.0 - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/diagnostics_channel.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/diagnostics_channel.js) */ declare module "diagnostics_channel" { import { AsyncLocalStorage } from "node:async_hooks"; diff --git a/node_modules/@types/node/dns.d.ts b/node_modules/@types/node/dns.d.ts index 86942956..bd03730f 100644 --- a/node_modules/@types/node/dns.d.ts +++ b/node_modules/@types/node/dns.d.ts @@ -41,8 +41,8 @@ * }); * ``` * - * See the [Implementation considerations section](https://nodejs.org/docs/latest-v24.x/api/dns.html#implementation-considerations) for more information. - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/dns.js) + * See the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) for more information. + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/dns.js) */ declare module "dns" { import * as dnsPromises from "node:dns/promises"; @@ -71,7 +71,7 @@ declare module "dns" { */ family?: number | "IPv4" | "IPv6" | undefined; /** - * One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v24.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be + * One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v20.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be * passed by bitwise `OR`ing their values. */ hints?: number | undefined; @@ -84,17 +84,16 @@ declare module "dns" { * When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted * by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6 * addresses before IPv4 addresses. Default value is configurable using - * {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--dns-result-orderorder). + * {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). * @default `verbatim` (addresses are not reordered) - * @since v22.1.0 */ order?: "ipv4first" | "ipv6first" | "verbatim" | undefined; /** * When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4 * addresses are placed before IPv6 addresses. This option will be deprecated in favor of `order`. When both are specified, * `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder} + * or [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). * @default true (addresses are not reordered) - * @deprecated Please use `order` option */ verbatim?: boolean | undefined; } @@ -133,7 +132,7 @@ declare module "dns" { * The implementation uses an operating system facility that can associate names * with addresses and vice versa. This implementation can have subtle but * important consequences on the behavior of any Node.js program. Please take some - * time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v24.x/api/dns.html#implementation-considerations) + * time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) * before using `dns.lookup()`. * * Example usage: @@ -155,7 +154,7 @@ declare module "dns" { * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] * ``` * - * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v24.x/api/util.html#utilpromisifyoriginal) ed + * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v20.x/api/util.html#utilpromisifyoriginal) ed * version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties. * @since v0.1.90 */ @@ -195,7 +194,7 @@ declare module "dns" { * If `address` is not a valid IP address, a `TypeError` will be thrown. * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown. * - * On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) object, + * On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, * where `err.code` is the error code. * * ```js @@ -206,7 +205,7 @@ declare module "dns" { * }); * ``` * - * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v24.x/api/util.html#utilpromisifyoriginal) ed + * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v20.x/api/util.html#utilpromisifyoriginal) ed * version, it returns a `Promise` for an `Object` with `hostname` and `service` properties. * @since v0.11.14 */ @@ -323,7 +322,7 @@ declare module "dns" { * * * - * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) object, + * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, * where `err.code` is one of the `DNS error codes`. * @since v0.1.27 * @param hostname Host name to resolve. @@ -664,8 +663,8 @@ declare module "dns" { * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an * array of host names. * - * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) object, where `err.code` is - * one of the [DNS error codes](https://nodejs.org/docs/latest-v24.x/api/dns.html#error-codes). + * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is + * one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). * @since v0.1.16 */ export function reverse( @@ -673,7 +672,7 @@ declare module "dns" { callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void, ): void; /** - * Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v24.x/api/dns.html#dnspromiseslookuphostname-options). + * Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options). * The value could be: * * * `ipv4first`: for `order` defaulting to `ipv4first`. @@ -728,7 +727,7 @@ declare module "dns" { */ export function getServers(): string[]; /** - * Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v24.x/api/dns.html#dnspromiseslookuphostname-options). + * Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options). * The value could be: * * * `ipv4first`: sets default `order` to `ipv4first`. @@ -736,8 +735,8 @@ declare module "dns" { * * `verbatim`: sets default `order` to `verbatim`. * * The default is `verbatim` and {@link setDefaultResultOrder} have higher - * priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--dns-result-orderorder). When using - * [worker threads](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main + * priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). When using + * [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main * thread won't affect the default dns orders in workers. * @since v16.4.0, v14.18.0 * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. @@ -783,7 +782,7 @@ declare module "dns" { * An independent resolver for DNS requests. * * Creating a new resolver uses the default server settings. Setting - * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v24.x/api/dns.html#dnssetserversservers) does not affect + * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnssetserversservers) does not affect * other resolvers: * * ```js diff --git a/node_modules/@types/node/dns/promises.d.ts b/node_modules/@types/node/dns/promises.d.ts index 2b5dff02..6db6685e 100644 --- a/node_modules/@types/node/dns/promises.d.ts +++ b/node_modules/@types/node/dns/promises.d.ts @@ -1,7 +1,7 @@ /** * The `dns.promises` API provides an alternative set of asynchronous DNS methods * that return `Promise` objects rather than using callbacks. The API is accessible - * via `import { promises as dnsPromises } from 'node:dns'` or `import dnsPromises from 'node:dns/promises'`. + * via `import { promises } from 'node:dns'` or `import dnsPromises from 'node:dns/promises'`. * @since v10.6.0 */ declare module "dns/promises" { @@ -96,8 +96,8 @@ declare module "dns/promises" { * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code. * * ```js - * import dnsPromises from 'node:dns'; - * dnsPromises.lookupService('127.0.0.1', 22).then((result) => { + * import dns from 'node:dns'; + * dns.promises.lookupService('127.0.0.1', 22).then((result) => { * console.log(result.hostname, result.service); * // Prints: localhost ssh * }); @@ -394,8 +394,9 @@ declare module "dns/promises" { * other resolvers: * * ```js - * import { promises } from 'node:dns'; - * const resolver = new promises.Resolver(); + * import dns from 'node:dns'; + * const { Resolver } = dns.promises; + * const resolver = new Resolver(); * resolver.setServers(['4.4.4.4']); * * // This request will use the server at 4.4.4.4, independent of global settings. diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts index 4c641153..d83b0f0f 100644 --- a/node_modules/@types/node/domain.d.ts +++ b/node_modules/@types/node/domain.d.ts @@ -12,7 +12,7 @@ * will be notified, rather than losing the context of the error in the `process.on('uncaughtException')` handler, or causing the program to * exit immediately with an error code. * @deprecated Since v1.4.2 - Deprecated - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/domain.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/domain.js) */ declare module "domain" { import EventEmitter = require("node:events"); diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts index b79141f9..e4dd1bd5 100644 --- a/node_modules/@types/node/events.d.ts +++ b/node_modules/@types/node/events.d.ts @@ -32,7 +32,7 @@ * }); * myEmitter.emit('event'); * ``` - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/events.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/events.js) */ declare module "events" { import { AsyncResource, AsyncResourceOptions } from "node:async_hooks"; @@ -431,6 +431,7 @@ declare module "events" { * } * ``` * @since v20.5.0 + * @experimental * @return Disposable that removes the `abort` listener. */ static addAbortListener(signal: AbortSignal, resource: (event: Event) => void): Disposable; diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts index 9dde50dc..a198fdda 100644 --- a/node_modules/@types/node/fs.d.ts +++ b/node_modules/@types/node/fs.d.ts @@ -16,7 +16,7 @@ * * All file system operations have synchronous, callback, and promise-based * forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM). - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/fs.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/fs.js) */ declare module "fs" { import * as stream from "node:stream"; @@ -130,9 +130,7 @@ declare module "fs" { * ``` * @since v0.1.21 */ - export class Stats { - private constructor(); - } + export class Stats {} export interface StatsFsBase { /** Type of file system. */ type: T; @@ -243,10 +241,16 @@ declare module "fs" { */ name: Name; /** - * The path to the parent directory of the file this `fs.Dirent` object refers to. - * @since v20.12.0, v18.20.0 + * The base path that this `fs.Dirent` object refers to. + * @since v20.12.0 */ parentPath: string; + /** + * Alias for `dirent.parentPath`. + * @since v20.1.0 + * @deprecated Since v20.12.0 + */ + path: string; } /** * A class representing a directory stream. @@ -1844,7 +1848,7 @@ declare module "fs" { * The `fs.mkdtemp()` method will append the six randomly selected characters * directly to the `prefix` string. For instance, given a directory `/tmp`, if the * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator - * (`import { sep } from 'node:path'`). + * (`import { sep } from 'node:node:path'`). * * ```js * import { tmpdir } from 'node:os'; @@ -3195,7 +3199,7 @@ declare module "fs" { * stat object: * * ```js - * import { watchFile } from 'node:fs'; + * import { watchFile } from 'fs'; * * watchFile('message.text', (curr, prev) => { * console.log(`the current mtime is: ${curr.mtime}`); @@ -3884,6 +3888,9 @@ declare module "fs" { flush?: boolean | undefined; } /** + * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream + * returned by this method has a default `highWaterMark` of 64 KiB. + * * `options` can include `start` and `end` values to read a range of bytes from * the file instead of the entire file. Both `start` and `end` are inclusive and * start counting at 0, allowed values are in the @@ -4194,6 +4201,7 @@ declare module "fs" { * blob.stream(); * ``` * @since v19.8.0 + * @experimental */ export function openAsBlob(path: PathLike, options?: OpenAsBlobOptions): Promise; @@ -4348,98 +4356,6 @@ declare module "fs" { * @param dest destination path to copy to. */ export function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void; - - interface _GlobOptions { - /** - * Current working directory. - * @default process.cwd() - */ - cwd?: string | undefined; - /** - * `true` if the glob should return paths as `Dirent`s, `false` otherwise. - * @default false - * @since v22.2.0 - */ - withFileTypes?: boolean | undefined; - /** - * Function to filter out files/directories or a - * list of glob patterns to be excluded. If a function is provided, return - * `true` to exclude the item, `false` to include it. - * @default undefined - */ - exclude?: ((fileName: T) => boolean) | readonly string[] | undefined; - } - export interface GlobOptions extends _GlobOptions {} - export interface GlobOptionsWithFileTypes extends _GlobOptions { - withFileTypes: true; - } - export interface GlobOptionsWithoutFileTypes extends _GlobOptions { - withFileTypes?: false | undefined; - } - - /** - * Retrieves the files matching the specified pattern. - * - * ```js - * import { glob } from 'node:fs'; - * - * glob('*.js', (err, matches) => { - * if (err) throw err; - * console.log(matches); - * }); - * ``` - * @since v22.0.0 - */ - export function glob( - pattern: string | readonly string[], - callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void, - ): void; - export function glob( - pattern: string | readonly string[], - options: GlobOptionsWithFileTypes, - callback: ( - err: NodeJS.ErrnoException | null, - matches: Dirent[], - ) => void, - ): void; - export function glob( - pattern: string | readonly string[], - options: GlobOptionsWithoutFileTypes, - callback: ( - err: NodeJS.ErrnoException | null, - matches: string[], - ) => void, - ): void; - export function glob( - pattern: string | readonly string[], - options: GlobOptions, - callback: ( - err: NodeJS.ErrnoException | null, - matches: Dirent[] | string[], - ) => void, - ): void; - /** - * ```js - * import { globSync } from 'node:fs'; - * - * console.log(globSync('*.js')); - * ``` - * @since v22.0.0 - * @returns paths of files that match the pattern. - */ - export function globSync(pattern: string | readonly string[]): string[]; - export function globSync( - pattern: string | readonly string[], - options: GlobOptionsWithFileTypes, - ): Dirent[]; - export function globSync( - pattern: string | readonly string[], - options: GlobOptionsWithoutFileTypes, - ): string[]; - export function globSync( - pattern: string | readonly string[], - options: GlobOptions, - ): Dirent[] | string[]; } declare module "node:fs" { export * from "fs"; diff --git a/node_modules/@types/node/fs/promises.d.ts b/node_modules/@types/node/fs/promises.d.ts index 6e26d85a..628ac329 100644 --- a/node_modules/@types/node/fs/promises.d.ts +++ b/node_modules/@types/node/fs/promises.d.ts @@ -20,9 +20,6 @@ declare module "fs/promises" { CopyOptions, Dir, Dirent, - GlobOptions, - GlobOptionsWithFileTypes, - GlobOptionsWithoutFileTypes, MakeDirectoryOptions, Mode, ObjectEncodingOptions, @@ -71,7 +68,7 @@ declare module "fs/promises" { length?: number | null; position?: number | null; } - interface CreateReadStreamOptions extends Abortable { + interface CreateReadStreamOptions { encoding?: BufferEncoding | null | undefined; autoClose?: boolean | undefined; emitClose?: boolean | undefined; @@ -87,6 +84,13 @@ declare module "fs/promises" { highWaterMark?: number | undefined; flush?: boolean | undefined; } + interface ReadableWebStreamOptions { + /** + * Whether to open a normal or a `'bytes'` stream. + * @since v20.0.0 + */ + type?: "bytes" | undefined; + } // TODO: Add `EventEmitter` close interface FileHandle { /** @@ -231,14 +235,9 @@ declare module "fs/promises" { length?: number | null, position?: number | null, ): Promise>; - read( - buffer: T, - options?: FileReadOptions, - ): Promise>; read(options?: FileReadOptions): Promise>; /** - * Returns a byte-oriented `ReadableStream` that may be used to read the file's - * contents. + * Returns a `ReadableStream` that may be used to read the files data. * * An error will be thrown if this method is called more than once or is called * after the `FileHandle` is closed or closing. @@ -259,8 +258,9 @@ declare module "fs/promises" { * While the `ReadableStream` will read the file to completion, it will not * close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method. * @since v17.0.0 + * @experimental */ - readableWebStream(): ReadableStream; + readableWebStream(options?: ReadableWebStreamOptions): ReadableStream; /** * Asynchronously reads the entire contents of a file. * @@ -416,13 +416,6 @@ declare module "fs/promises" { bytesWritten: number; buffer: TBuffer; }>; - write( - buffer: TBuffer, - options?: { offset?: number; length?: number; position?: number }, - ): Promise<{ - bytesWritten: number; - buffer: TBuffer; - }>; write( data: string, position?: number | null, @@ -939,7 +932,7 @@ declare module "fs/promises" { * The `fsPromises.mkdtemp()` method will append the six randomly selected * characters directly to the `prefix` string. For instance, given a directory `/tmp`, if the intention is to create a temporary directory _within_ `/tmp`, the `prefix` must end with a trailing * platform-specific path separator - * (`import { sep } from 'node:path'`). + * (`import { sep } from 'node:node:path'`). * @since v10.0.0 * @return Fulfills with a string containing the file system path of the newly created temporary directory. */ @@ -1249,30 +1242,6 @@ declare module "fs/promises" { * @return Fulfills with `undefined` upon success. */ function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise; - /** - * ```js - * import { glob } from 'node:fs/promises'; - * - * for await (const entry of glob('*.js')) - * console.log(entry); - * ``` - * @since v22.0.0 - * @returns An AsyncIterator that yields the paths of files - * that match the pattern. - */ - function glob(pattern: string | readonly string[]): NodeJS.AsyncIterator; - function glob( - pattern: string | readonly string[], - options: GlobOptionsWithFileTypes, - ): NodeJS.AsyncIterator; - function glob( - pattern: string | readonly string[], - options: GlobOptionsWithoutFileTypes, - ): NodeJS.AsyncIterator; - function glob( - pattern: string | readonly string[], - options: GlobOptions, - ): NodeJS.AsyncIterator; } declare module "node:fs/promises" { export * from "fs/promises"; diff --git a/node_modules/@types/node/globals.d.ts b/node_modules/@types/node/globals.d.ts index 143ba4ea..ad492d68 100644 --- a/node_modules/@types/node/globals.d.ts +++ b/node_modules/@types/node/globals.d.ts @@ -2,7 +2,7 @@ export {}; // Make this a module // #region Fetch and friends // Conditional type aliases, used at the end of this file. -// Will either be empty if lib.dom (or lib.webworker) is included, or the undici version otherwise. +// Will either be empty if lib-dom is included, or the undici version otherwise. type _Request = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Request; type _Response = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Response; type _FormData = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").FormData; @@ -12,22 +12,9 @@ type _RequestInit = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").RequestInit; type _ResponseInit = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").ResponseInit; -type _WebSocket = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").WebSocket; type _EventSource = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").EventSource; -type _CloseEvent = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").CloseEvent; // #endregion Fetch and friends -// Conditional type definitions for webstorage interface, which conflicts with lib.dom otherwise. -type _Storage = typeof globalThis extends { onabort: any } ? {} : { - readonly length: number; - clear(): void; - getItem(key: string): string | null; - key(index: number): string | null; - removeItem(key: string): void; - setItem(key: string, value: string): void; - [key: string]: any; -}; - // #region DOMException type _DOMException = typeof globalThis extends { onmessage: any } ? {} : NodeDOMException; interface NodeDOMException extends Error { @@ -251,12 +238,14 @@ declare global { } /** An iterable iterator returned by the Node.js API. */ - interface Iterator extends IteratorObject { + // Default TReturn/TNext in v20 is `any`, for compatibility with the previously-used IterableIterator. + interface Iterator extends IteratorObject { [Symbol.iterator](): NodeJS.Iterator; } /** An async iterable iterator returned by the Node.js API. */ - interface AsyncIterator extends AsyncIteratorObject { + // Default TReturn/TNext in v20 is `any`, for compatibility with the previously-used AsyncIterableIterator. + interface AsyncIterator extends AsyncIteratorObject { [Symbol.asyncIterator](): NodeJS.AsyncIterator; } } @@ -294,19 +283,6 @@ declare global { }; // #endregion AbortController - // #region Storage - interface Storage extends _Storage {} - // Conditional on `onabort` rather than `onmessage`, in order to exclude lib.webworker - var Storage: typeof globalThis extends { onabort: any; Storage: infer T } ? T - : { - prototype: Storage; - new(): Storage; - }; - - var localStorage: Storage; - var sessionStorage: Storage; - // #endregion Storage - // #region fetch interface RequestInit extends _RequestInit {} @@ -352,16 +328,8 @@ declare global { } ? T : typeof import("undici-types").MessageEvent; - interface WebSocket extends _WebSocket {} - var WebSocket: typeof globalThis extends { onmessage: any; WebSocket: infer T } ? T - : typeof import("undici-types").WebSocket; - interface EventSource extends _EventSource {} var EventSource: typeof globalThis extends { onmessage: any; EventSource: infer T } ? T : typeof import("undici-types").EventSource; - - interface CloseEvent extends _CloseEvent {} - var CloseEvent: typeof globalThis extends { onmessage: any; CloseEvent: infer T } ? T - : typeof import("undici-types").CloseEvent; // #endregion fetch } diff --git a/node_modules/@types/node/globals.typedarray.d.ts b/node_modules/@types/node/globals.typedarray.d.ts index 6d5c9527..0c7280c3 100644 --- a/node_modules/@types/node/globals.typedarray.d.ts +++ b/node_modules/@types/node/globals.typedarray.d.ts @@ -12,7 +12,6 @@ declare global { | Int32Array | BigUint64Array | BigInt64Array - | Float16Array | Float32Array | Float64Array; type ArrayBufferView = diff --git a/node_modules/@types/node/http.d.ts b/node_modules/@types/node/http.d.ts index 03b80e39..74869ee9 100644 --- a/node_modules/@types/node/http.d.ts +++ b/node_modules/@types/node/http.d.ts @@ -37,7 +37,7 @@ * 'Host', 'example.com', * 'accepT', '*' ] * ``` - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/http.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/http.js) */ declare module "http" { import * as stream from "node:stream"; @@ -146,7 +146,6 @@ declare module "http" { "content-range"?: string | undefined; "content-security-policy"?: string | undefined; "content-security-policy-report-only"?: string | undefined; - "content-type"?: string | undefined; cookie?: string | string[] | undefined; dav?: string | string[] | undefined; dnt?: string | undefined; @@ -228,7 +227,6 @@ declare module "http" { path?: string | null | undefined; port?: number | string | null | undefined; protocol?: string | null | undefined; - setDefaultHeaders?: boolean | undefined; setHost?: boolean | undefined; signal?: AbortSignal | undefined; socketPath?: string | undefined; @@ -1505,7 +1503,7 @@ declare module "http" { * }); * ``` * - * `options` in [`socket.connect()`](https://nodejs.org/docs/latest-v24.x/api/net.html#socketconnectoptions-connectlistener) are also supported. + * `options` in [`socket.connect()`](https://nodejs.org/docs/latest-v20.x/api/net.html#socketconnectoptions-connectlistener) are also supported. * * To configure any of them, a custom {@link Agent} instance must be created. * @@ -1965,19 +1963,6 @@ declare module "http" { * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option. */ const maxHeaderSize: number; - /** - * A browser-compatible implementation of [WebSocket](https://nodejs.org/docs/latest/api/http.html#websocket). - * @since v22.5.0 - */ - const WebSocket: import("undici-types").WebSocket; - /** - * @since v22.5.0 - */ - const CloseEvent: import("undici-types").CloseEvent; - /** - * @since v22.5.0 - */ - const MessageEvent: import("undici-types").MessageEvent; } declare module "node:http" { export * from "http"; diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts index 36b870f8..ff4887be 100644 --- a/node_modules/@types/node/http2.d.ts +++ b/node_modules/@types/node/http2.d.ts @@ -6,7 +6,7 @@ * import http2 from 'node:http2'; * ``` * @since v8.4.0 - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/http2.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/http2.js) */ declare module "http2" { import EventEmitter = require("node:events"); @@ -965,10 +965,7 @@ declare module "http2" { * * `:path` \= `/` * @since v8.4.0 */ - request( - headers?: OutgoingHttpHeaders | readonly string[], - options?: ClientSessionRequestOptions, - ): ClientHttp2Stream; + request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream; addListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; addListener(event: "origin", listener: (origins: string[]) => void): this; addListener( @@ -1323,8 +1320,6 @@ declare module "http2" { Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, > extends SessionOptions { - streamResetBurst?: number | undefined; - streamResetRate?: number | undefined; Http1IncomingMessage?: Http1Request | undefined; Http1ServerResponse?: Http1Response | undefined; Http2ServerRequest?: Http2Request | undefined; @@ -1860,7 +1855,7 @@ declare module "http2" { * If there were no previous values for the header, this is equivalent to calling {@link setHeader}. * * Attempting to set a header field name or value that contains invalid characters will result in a - * [TypeError](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-typeerror) being thrown. + * [TypeError](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-typeerror) being thrown. * * ```js * // Returns headers including "set-cookie: a" and "set-cookie: b" diff --git a/node_modules/@types/node/https.d.ts b/node_modules/@types/node/https.d.ts index a40f06b2..bd7d9457 100644 --- a/node_modules/@types/node/https.d.ts +++ b/node_modules/@types/node/https.d.ts @@ -1,7 +1,7 @@ /** * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a * separate module. - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/https.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/https.js) */ declare module "https" { import { Duplex } from "node:stream"; @@ -16,13 +16,12 @@ declare module "https" { & http.RequestOptions & tls.SecureContextOptions & { - checkServerIdentity?: - | ((hostname: string, cert: tls.DetailedPeerCertificate) => Error | undefined) - | undefined; + checkServerIdentity?: typeof tls.checkServerIdentity | undefined; rejectUnauthorized?: boolean | undefined; // Defaults to true servername?: string | undefined; // SNI TLS Extension }; interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions { + rejectUnauthorized?: boolean | undefined; maxCachedSessions?: number | undefined; } /** diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts index 3b005c11..0649eb54 100644 --- a/node_modules/@types/node/index.d.ts +++ b/node_modules/@types/node/index.d.ts @@ -22,17 +22,15 @@ * IN THE SOFTWARE. */ -// NOTE: These definitions support Node.js and TypeScript 5.8+. +// NOTE: These definitions support Node.js and TypeScript 5.7+. -// Reference required TypeScript libraries: +// Reference required TypeScript libs: /// -/// -/// -// Iterator definitions required for compatibility with TypeScript <5.6: -/// +// TypeScript backwards-compatibility definitions: +/// -// Definitions for Node.js modules specific to TypeScript 5.7+: +// Definitions specific to TypeScript 5.7+: /// /// @@ -73,7 +71,6 @@ /// /// /// -/// /// /// /// diff --git a/node_modules/@types/node/inspector.d.ts b/node_modules/@types/node/inspector.d.ts index 9fa7d6eb..3303dbaa 100644 --- a/node_modules/@types/node/inspector.d.ts +++ b/node_modules/@types/node/inspector.d.ts @@ -6,7 +6,7 @@ /** * The `node:inspector` module provides an API for interacting with the V8 * inspector. - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/inspector.js) + * @see [source](https://github.com/nodejs/node/blob/v20.x/lib/inspector.js) */ declare module 'inspector' { import EventEmitter = require('node:events'); @@ -1720,38 +1720,6 @@ declare module 'inspector' { * Monotonically increasing time in seconds since an arbitrary point in the past. */ type MonotonicTime = number; - /** - * Information about the request initiator. - */ - interface Initiator { - /** - * Type of this initiator. - */ - type: string; - /** - * Initiator JavaScript stack trace, set for Script only. - * Requires the Debugger domain to be enabled. - */ - stack?: Runtime.StackTrace | undefined; - /** - * Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type. - */ - url?: string | undefined; - /** - * Initiator line number, set for Parser type or for Script type (when script is importing - * module) (0-based). - */ - lineNumber?: number | undefined; - /** - * Initiator column number, set for Parser type or for Script type (when script is importing - * module) (0-based). - */ - columnNumber?: number | undefined; - /** - * Set if another request triggered this request (e.g. preflight). - */ - requestId?: RequestId | undefined; - } /** * HTTP request data. */ @@ -1783,10 +1751,6 @@ declare module 'inspector' { * Request data. */ request: Request; - /** - * Request initiator. - */ - initiator: Initiator; /** * Timestamp. */ @@ -2865,7 +2829,7 @@ declare module 'inspector' { * If wait is `true`, will block until a client has connected to the inspect port * and flow control has been passed to the debugger client. * - * See the [security warning](https://nodejs.org/docs/latest-v24.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure) + * See the [security warning](https://nodejs.org/docs/latest-v20.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure) * regarding the `host` parameter usage. * @param port Port to listen on for inspector connections. Defaults to what was specified on the CLI. * @param host Host to listen on for inspector connections. Defaults to what was specified on the CLI. @@ -2901,7 +2865,7 @@ declare module 'inspector' { /** * Blocks until a client (existing or connected later) has sent `Runtime.runIfWaitingForDebugger` command. - * + * * An exception will be thrown if there is no active inspector. * @since v12.7.0 */ @@ -2948,6 +2912,7 @@ declare module 'inspector' { * Broadcasts the `Network.requestWillBeSent` event to connected frontends. This event indicates that * the application is about to send an HTTP request. * @since v22.6.0 + * @experimental */ function requestWillBeSent(params: RequestWillBeSentEventDataType): void; /** @@ -2956,6 +2921,7 @@ declare module 'inspector' { * Broadcasts the `Network.responseReceived` event to connected frontends. This event indicates that * HTTP response is available. * @since v22.6.0 + * @experimental */ function responseReceived(params: ResponseReceivedEventDataType): void; /** @@ -2964,6 +2930,7 @@ declare module 'inspector' { * Broadcasts the `Network.loadingFinished` event to connected frontends. This event indicates that * HTTP request has finished loading. * @since v22.6.0 + * @experimental */ function loadingFinished(params: LoadingFinishedEventDataType): void; /** @@ -2972,6 +2939,7 @@ declare module 'inspector' { * Broadcasts the `Network.loadingFailed` event to connected frontends. This event indicates that * HTTP request has failed to load. * @since v22.7.0 + * @experimental */ function loadingFailed(params: LoadingFailedEventDataType): void; } @@ -2988,7 +2956,7 @@ declare module 'node:inspector' { /** * The `node:inspector/promises` module provides an API for interacting with the V8 * inspector. - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/inspector/promises.js) + * @see [source](https://github.com/nodejs/node/blob/v20.x/lib/inspector/promises.js) * @since v19.0.0 */ declare module 'inspector/promises' { @@ -3055,7 +3023,7 @@ declare module 'inspector/promises' { * } catch (error) { * console.error(error); * } - * // Output: { result: { type: 'number', value: 4, description: '4' } } + * // Output: { result: { type: 'number', value: 4, description: '4' } } * ``` * * The latest version of the V8 inspector protocol is published on the diff --git a/node_modules/@types/node/module.d.ts b/node_modules/@types/node/module.d.ts index 68825596..36b86ffd 100644 --- a/node_modules/@types/node/module.d.ts +++ b/node_modules/@types/node/module.d.ts @@ -3,6 +3,7 @@ */ declare module "module" { import { URL } from "node:url"; + import { MessagePort } from "node:worker_threads"; class Module { constructor(id: string, parent?: Module); } @@ -26,156 +27,6 @@ declare module "module" { * string. */ function createRequire(path: string | URL): NodeJS.Require; - namespace constants { - /** - * The following constants are returned as the `status` field in the object returned by - * {@link enableCompileCache} to indicate the result of the attempt to enable the - * [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache). - * @since v22.8.0 - */ - namespace compileCacheStatus { - /** - * Node.js has enabled the compile cache successfully. The directory used to store the - * compile cache will be returned in the `directory` field in the - * returned object. - */ - const ENABLED: number; - /** - * The compile cache has already been enabled before, either by a previous call to - * {@link enableCompileCache}, or by the `NODE_COMPILE_CACHE=dir` - * environment variable. The directory used to store the - * compile cache will be returned in the `directory` field in the - * returned object. - */ - const ALREADY_ENABLED: number; - /** - * Node.js fails to enable the compile cache. This can be caused by the lack of - * permission to use the specified directory, or various kinds of file system errors. - * The detail of the failure will be returned in the `message` field in the - * returned object. - */ - const FAILED: number; - /** - * Node.js cannot enable the compile cache because the environment variable - * `NODE_DISABLE_COMPILE_CACHE=1` has been set. - */ - const DISABLED: number; - } - } - interface EnableCompileCacheResult { - /** - * One of the {@link constants.compileCacheStatus} - */ - status: number; - /** - * If Node.js cannot enable the compile cache, this contains - * the error message. Only set if `status` is `module.constants.compileCacheStatus.FAILED`. - */ - message?: string; - /** - * If the compile cache is enabled, this contains the directory - * where the compile cache is stored. Only set if `status` is - * `module.constants.compileCacheStatus.ENABLED` or - * `module.constants.compileCacheStatus.ALREADY_ENABLED`. - */ - directory?: string; - } - /** - * Enable [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache) - * in the current Node.js instance. - * - * If `cacheDir` is not specified, Node.js will either use the directory specified by the - * `NODE_COMPILE_CACHE=dir` environment variable if it's set, or use - * `path.join(os.tmpdir(), 'node-compile-cache')` otherwise. For general use cases, it's - * recommended to call `module.enableCompileCache()` without specifying the `cacheDir`, - * so that the directory can be overridden by the `NODE_COMPILE_CACHE` environment - * variable when necessary. - * - * Since compile cache is supposed to be a quiet optimization that is not required for the - * application to be functional, this method is designed to not throw any exception when the - * compile cache cannot be enabled. Instead, it will return an object containing an error - * message in the `message` field to aid debugging. - * If compile cache is enabled successfully, the `directory` field in the returned object - * contains the path to the directory where the compile cache is stored. The `status` - * field in the returned object would be one of the `module.constants.compileCacheStatus` - * values to indicate the result of the attempt to enable the - * [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache). - * - * This method only affects the current Node.js instance. To enable it in child worker threads, - * either call this method in child worker threads too, or set the - * `process.env.NODE_COMPILE_CACHE` value to compile cache directory so the behavior can - * be inherited into the child workers. The directory can be obtained either from the - * `directory` field returned by this method, or with {@link getCompileCacheDir}. - * @since v22.8.0 - * @param cacheDir Optional path to specify the directory where the compile cache - * will be stored/retrieved. - */ - function enableCompileCache(cacheDir?: string): EnableCompileCacheResult; - /** - * Flush the [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache) - * accumulated from modules already loaded - * in the current Node.js instance to disk. This returns after all the flushing - * file system operations come to an end, no matter they succeed or not. If there - * are any errors, this will fail silently, since compile cache misses should not - * interfere with the actual operation of the application. - * @since v22.10.0 - */ - function flushCompileCache(): void; - /** - * @since v22.8.0 - * @return Path to the [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache) - * directory if it is enabled, or `undefined` otherwise. - */ - function getCompileCacheDir(): string | undefined; - /** - * ```text - * /path/to/project - * ├ packages/ - * ├ bar/ - * ├ bar.js - * └ package.json // name = '@foo/bar' - * └ qux/ - * ├ node_modules/ - * └ some-package/ - * └ package.json // name = 'some-package' - * ├ qux.js - * └ package.json // name = '@foo/qux' - * ├ main.js - * └ package.json // name = '@foo' - * ``` - * ```js - * // /path/to/project/packages/bar/bar.js - * import { findPackageJSON } from 'node:module'; - * - * findPackageJSON('..', import.meta.url); - * // '/path/to/project/package.json' - * // Same result when passing an absolute specifier instead: - * findPackageJSON(new URL('../', import.meta.url)); - * findPackageJSON(import.meta.resolve('../')); - * - * findPackageJSON('some-package', import.meta.url); - * // '/path/to/project/packages/bar/node_modules/some-package/package.json' - * // When passing an absolute specifier, you might get a different result if the - * // resolved module is inside a subfolder that has nested `package.json`. - * findPackageJSON(import.meta.resolve('some-package')); - * // '/path/to/project/packages/bar/node_modules/some-package/some-subfolder/package.json' - * - * findPackageJSON('@foo/qux', import.meta.url); - * // '/path/to/project/packages/qux/package.json' - * ``` - * @since v22.14.0 - * @param specifier The specifier for the module whose `package.json` to - * retrieve. When passing a _bare specifier_, the `package.json` at the root of - * the package is returned. When passing a _relative specifier_ or an _absolute specifier_, - * the closest parent `package.json` is returned. - * @param base The absolute location (`file:` URL string or FS path) of the - * containing module. For CJS, use `__filename` (not `__dirname`!); for ESM, use - * `import.meta.url`. You do not need to pass it if `specifier` is an _absolute specifier_. - * @returns A path if the `package.json` is found. When `startLocation` - * is a package, the package's root `package.json`; when a relative or unresolved, the closest - * `package.json` to the `startLocation`. - */ - function findPackageJSON(specifier: string | URL, base?: string | URL): string | undefined; /** * @since v18.6.0, v16.17.0 */ @@ -194,7 +45,7 @@ declare module "module" { */ data?: Data | undefined; /** - * [Transferable objects](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html#portpostmessagevalue-transferlist) + * [Transferable objects](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html#portpostmessagevalue-transferlist) * to be passed into the `initialize` hook. */ transferList?: any[] | undefined; @@ -203,10 +54,7 @@ declare module "module" { /** * Register a module that exports hooks that customize Node.js module * resolution and loading behavior. See - * [Customization hooks](https://nodejs.org/docs/latest-v24.x/api/module.html#customization-hooks). - * - * This feature requires `--allow-worker` if used with the - * [Permission Model](https://nodejs.org/docs/latest-v24.x/api/permissions.html#permission-model). + * [Customization hooks](https://nodejs.org/docs/latest-v20.x/api/module.html#customization-hooks). * @since v20.6.0, v18.19.0 * @param specifier Customization hooks to be registered; this should be * the same string that would be passed to `import()`, except that if it is @@ -220,105 +68,6 @@ declare module "module" { options?: RegisterOptions, ): void; function register(specifier: string | URL, options?: RegisterOptions): void; - interface RegisterHooksOptions { - /** - * See [load hook](https://nodejs.org/docs/latest-v24.x/api/module.html#loadurl-context-nextload). - * @default undefined - */ - load?: LoadHookSync | undefined; - /** - * See [resolve hook](https://nodejs.org/docs/latest-v24.x/api/module.html#resolvespecifier-context-nextresolve). - * @default undefined - */ - resolve?: ResolveHookSync | undefined; - } - interface ModuleHooks { - /** - * Deregister the hook instance. - */ - deregister(): void; - } - /** - * Register [hooks](https://nodejs.org/docs/latest-v24.x/api/module.html#customization-hooks) - * that customize Node.js module resolution and loading behavior. - * @since v22.15.0 - * @experimental - */ - function registerHooks(options: RegisterHooksOptions): ModuleHooks; - interface StripTypeScriptTypesOptions { - /** - * Possible values are: - * * `'strip'` Only strip type annotations without performing the transformation of TypeScript features. - * * `'transform'` Strip type annotations and transform TypeScript features to JavaScript. - * @default 'strip' - */ - mode?: "strip" | "transform" | undefined; - /** - * Only when `mode` is `'transform'`, if `true`, a source map - * will be generated for the transformed code. - * @default false - */ - sourceMap?: boolean | undefined; - /** - * Specifies the source url used in the source map. - */ - sourceUrl?: string | undefined; - } - /** - * `module.stripTypeScriptTypes()` removes type annotations from TypeScript code. It - * can be used to strip type annotations from TypeScript code before running it - * with `vm.runInContext()` or `vm.compileFunction()`. - * By default, it will throw an error if the code contains TypeScript features - * that require transformation such as `Enums`, - * see [type-stripping](https://nodejs.org/docs/latest-v24.x/api/typescript.md#type-stripping) for more information. - * When mode is `'transform'`, it also transforms TypeScript features to JavaScript, - * see [transform TypeScript features](https://nodejs.org/docs/latest-v24.x/api/typescript.md#typescript-features) for more information. - * When mode is `'strip'`, source maps are not generated, because locations are preserved. - * If `sourceMap` is provided, when mode is `'strip'`, an error will be thrown. - * - * _WARNING_: The output of this function should not be considered stable across Node.js versions, - * due to changes in the TypeScript parser. - * - * ```js - * import { stripTypeScriptTypes } from 'node:module'; - * const code = 'const a: number = 1;'; - * const strippedCode = stripTypeScriptTypes(code); - * console.log(strippedCode); - * // Prints: const a = 1; - * ``` - * - * If `sourceUrl` is provided, it will be used appended as a comment at the end of the output: - * - * ```js - * import { stripTypeScriptTypes } from 'node:module'; - * const code = 'const a: number = 1;'; - * const strippedCode = stripTypeScriptTypes(code, { mode: 'strip', sourceUrl: 'source.ts' }); - * console.log(strippedCode); - * // Prints: const a = 1\n\n//# sourceURL=source.ts; - * ``` - * - * When `mode` is `'transform'`, the code is transformed to JavaScript: - * - * ```js - * import { stripTypeScriptTypes } from 'node:module'; - * const code = ` - * namespace MathUtil { - * export const add = (a: number, b: number) => a + b; - * }`; - * const strippedCode = stripTypeScriptTypes(code, { mode: 'transform', sourceMap: true }); - * console.log(strippedCode); - * // Prints: - * // var MathUtil; - * // (function(MathUtil) { - * // MathUtil.add = (a, b)=>a + b; - * // })(MathUtil || (MathUtil = {})); - * // # sourceMappingURL=data:application/json;base64, ... - * ``` - * @since v22.13.0 - * @param code The code to strip type annotations from. - * @returns The code with type annotations stripped. - */ - function stripTypeScriptTypes(code: string, options?: StripTypeScriptTypesOptions): string; /* eslint-enable @definitelytyped/no-unnecessary-generics */ /** * The `module.syncBuiltinESMExports()` method updates all the live bindings for @@ -356,18 +105,12 @@ declare module "module" { * @since v12.12.0 */ function syncBuiltinESMExports(): void; + /** @deprecated Use `ImportAttributes` instead */ + interface ImportAssertions extends ImportAttributes {} interface ImportAttributes extends NodeJS.Dict { type?: string | undefined; } - type ModuleFormat = - | "addon" - | "builtin" - | "commonjs" - | "commonjs-typescript" - | "json" - | "module" - | "module-typescript" - | "wasm"; + type ModuleFormat = "builtin" | "commonjs" | "json" | "module" | "wasm"; type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray; /** * The `initialize` hook provides a way to define a custom function that runs in @@ -385,6 +128,10 @@ declare module "module" { * Export conditions of the relevant `package.json` */ conditions: string[]; + /** + * @deprecated Use `importAttributes` instead + */ + importAssertions: ImportAttributes; /** * An object whose key-value pairs represent the assertions for the module to import */ @@ -396,9 +143,13 @@ declare module "module" { } interface ResolveFnOutput { /** - * A hint to the load hook (it might be ignored); can be an intermediary value. + * A hint to the load hook (it might be ignored) + */ + format?: ModuleFormat | null | undefined; + /** + * @deprecated Use `importAttributes` instead */ - format?: string | null | undefined; + importAssertions?: ImportAttributes | undefined; /** * The import attributes to use when caching the module (optional; if excluded the input will be used) */ @@ -430,23 +181,19 @@ declare module "module" { context?: Partial, ) => ResolveFnOutput | Promise, ) => ResolveFnOutput | Promise; - type ResolveHookSync = ( - specifier: string, - context: ResolveHookContext, - nextResolve: ( - specifier: string, - context?: Partial, - ) => ResolveFnOutput, - ) => ResolveFnOutput; interface LoadHookContext { /** * Export conditions of the relevant `package.json` */ conditions: string[]; /** - * The format optionally supplied by the `resolve` hook chain (can be an intermediary value). + * The format optionally supplied by the `resolve` hook chain */ - format: string | null | undefined; + format: ModuleFormat | null | undefined; + /** + * @deprecated Use `importAttributes` instead + */ + importAssertions: ImportAttributes; /** * An object whose key-value pairs represent the assertions for the module to import */ @@ -477,14 +224,18 @@ declare module "module" { context?: Partial, ) => LoadFnOutput | Promise, ) => LoadFnOutput | Promise; - type LoadHookSync = ( - url: string, - context: LoadHookContext, - nextLoad: ( - url: string, - context?: Partial, - ) => LoadFnOutput, - ) => LoadFnOutput; + interface GlobalPreloadContext { + port: MessagePort; + } + /** + * Sometimes it might be necessary to run some code inside of the same global + * scope that the application runs in. This hook allows the return of a string + * that is run as a sloppy-mode script on startup. + * @deprecated This hook will be removed in a future version. Use + * `initialize` instead. When a hooks module has an `initialize` export, + * `globalPreload` will be ignored. + */ + type GlobalPreloadHook = (context: GlobalPreloadContext) => string; /** * `path` is the resolved path for the file for which a corresponding source map * should be fetched. @@ -494,7 +245,7 @@ declare module "module" { function findSourceMap(path: string): SourceMap | undefined; interface SourceMapConstructorOptions { /** - * @since v21.0.0, v20.5.0 + * @since v20.5.0 */ lineLengths?: readonly number[] | undefined; } @@ -577,67 +328,34 @@ declare module "module" { global { interface ImportMeta { /** - * The directory name of the current module. - * - * This is the same as the ``path.dirname()` of the `import.meta.filename`. - * - * > **Caveat**: only present on `file:` modules. - * @since v21.2.0, v20.11.0 + * The directory name of the current module. This is the same as the `path.dirname()` of the `import.meta.filename`. + * **Caveat:** only present on `file:` modules. */ dirname: string; /** - * The full absolute path and filename of the current module, with - * symlinks resolved. - * + * The full absolute path and filename of the current module, with symlinks resolved. * This is the same as the `url.fileURLToPath()` of the `import.meta.url`. - * - * > **Caveat** only local modules support this property. Modules not using the - * > `file:` protocol will not provide it. - * @since v21.2.0, v20.11.0 + * **Caveat:** only local modules support this property. Modules not using the `file:` protocol will not provide it. */ filename: string; /** * The absolute `file:` URL of the module. - * - * This is defined exactly the same as it is in browsers providing the URL of the - * current module file. - * - * This enables useful patterns such as relative file loading: - * - * ```js - * import { readFileSync } from 'node:fs'; - * const buffer = readFileSync(new URL('./data.proto', import.meta.url)); - * ``` */ url: string; /** - * `import.meta.resolve` is a module-relative resolution function scoped to - * each module, returning the URL string. - * - * ```js - * const dependencyAsset = import.meta.resolve('component-lib/asset.css'); - * // file:///app/node_modules/component-lib/asset.css - * import.meta.resolve('./dep.js'); - * // file:///app/dep.js - * ``` + * Provides a module-relative resolution function scoped to each module, returning + * the URL string. * - * All features of the Node.js module resolution are supported. Dependency - * resolutions are subject to the permitted exports resolutions within the package. + * Second `parent` parameter is only used when the `--experimental-import-meta-resolve` + * command flag enabled. * - * **Caveats**: + * @since v20.6.0 * - * * This can result in synchronous file-system operations, which - * can impact performance similarly to `require.resolve`. - * * This feature is not available within custom loaders (it would - * create a deadlock). - * @since v13.9.0, v12.16.0 - * @param specifier The module specifier to resolve relative to the - * current module. - * @param parent An optional absolute parent module URL to resolve from. - * **Default:** `import.meta.url` - * @returns The absolute URL string that the specifier would resolve to. + * @param specifier The module specifier to resolve relative to `parent`. + * @param parent The absolute parent module URL to resolve from. + * @returns The absolute (`file:`) URL string for the resolved module. */ - resolve(specifier: string, parent?: string | URL): string; + resolve(specifier: string, parent?: string | URL | undefined): string; } namespace NodeJS { interface Module { @@ -712,7 +430,7 @@ declare module "module" { * Modules are cached in this object when they are required. By deleting a key * value from this object, the next `require` will reload the module. * This does not apply to - * [native addons](https://nodejs.org/docs/latest-v24.x/api/addons.html), + * [native addons](https://nodejs.org/docs/latest-v20.x/api/addons.html), * for which reloading will result in an error. * @since v0.3.0 */ @@ -746,7 +464,7 @@ declare module "module" { * Paths to resolve module location from. If present, these * paths are used instead of the default resolution paths, with the exception * of - * [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-v24.x/api/modules.html#loading-from-the-global-folders) + * [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-v20.x/api/modules.html#loading-from-the-global-folders) * like `$HOME/.node_modules`, which are * always included. Each of these paths is used as a starting point for * the module resolution algorithm, meaning that the `node_modules` hierarchy @@ -764,7 +482,7 @@ declare module "module" { * @since v0.3.0 * @param request The module path to resolve. */ - (request: string, options?: RequireResolveOptions): string; + (id: string, options?: RequireResolveOptions): string; /** * Returns an array containing the paths searched during resolution of `request` or * `null` if the `request` string references a core module, for example `http` or @@ -806,7 +524,6 @@ declare module "module" { */ var require: NodeJS.Require; // Global-scope aliases for backwards compatibility with @types/node <13.0.x - // TODO: consider removing in a future major version update /** @deprecated Use `NodeJS.Module` instead. */ interface NodeModule extends NodeJS.Module {} /** @deprecated Use `NodeJS.Require` instead. */ diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts index 7a4c5cb7..ffeab9a8 100644 --- a/node_modules/@types/node/net.d.ts +++ b/node_modules/@types/node/net.d.ts @@ -10,7 +10,7 @@ * ```js * import net from 'node:net'; * ``` - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/net.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/net.js) */ declare module "net" { import * as stream from "node:stream"; @@ -29,7 +29,6 @@ declare module "net" { interface SocketConstructorOpts { fd?: number | undefined; allowHalfOpen?: boolean | undefined; - onread?: OnReadOpts | undefined; readable?: boolean | undefined; writable?: boolean | undefined; signal?: AbortSignal; @@ -38,12 +37,20 @@ declare module "net" { buffer: Uint8Array | (() => Uint8Array); /** * This function is called for every chunk of incoming data. - * Two arguments are passed to it: the number of bytes written to `buffer` and a reference to `buffer`. - * Return `false` from this function to implicitly `pause()` the socket. + * Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer. + * Return false from this function to implicitly pause() the socket. + */ + callback(bytesWritten: number, buf: Uint8Array): boolean; + } + interface ConnectOpts { + /** + * If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket. + * Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will + * still be emitted as normal and methods like pause() and resume() will also behave as expected. */ - callback(bytesWritten: number, buffer: Uint8Array): boolean; + onread?: OnReadOpts | undefined; } - interface TcpSocketConnectOpts { + interface TcpSocketConnectOpts extends ConnectOpts { port: number; host?: string | undefined; localAddress?: string | undefined; @@ -62,9 +69,8 @@ declare module "net" { * @since v18.13.0 */ autoSelectFamilyAttemptTimeout?: number | undefined; - blockList?: BlockList | undefined; } - interface IpcSocketConnectOpts { + interface IpcSocketConnectOpts extends ConnectOpts { path: string; } type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; @@ -490,18 +496,17 @@ declare module "net" { prependOnceListener(event: "timeout", listener: () => void): this; } interface ListenOptions extends Abortable { + port?: number | undefined; + host?: string | undefined; backlog?: number | undefined; + path?: string | undefined; exclusive?: boolean | undefined; - host?: string | undefined; + readableAll?: boolean | undefined; + writableAll?: boolean | undefined; /** * @default false */ ipv6Only?: boolean | undefined; - reusePort?: boolean | undefined; - path?: string | undefined; - port?: number | undefined; - readableAll?: boolean | undefined; - writableAll?: boolean | undefined; } interface ServerOpts { /** @@ -535,19 +540,10 @@ declare module "net" { keepAliveInitialDelay?: number | undefined; /** * Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`. - * @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v24.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode). + * @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v20.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode). * @since v18.17.0, v20.1.0 */ highWaterMark?: number | undefined; - /** - * `blockList` can be used for disabling inbound - * access to specific IP addresses, IP ranges, or IP subnets. This does not - * work if the server is behind a reverse proxy, NAT, etc. because the address - * checked against the block list is the address of the proxy, or the one - * specified by the NAT. - * @since v22.13.0 - */ - blockList?: BlockList | undefined; } interface DropArgument { localAddress?: string; @@ -799,12 +795,6 @@ declare module "net" { * @since v15.0.0, v14.18.0 */ rules: readonly string[]; - /** - * Returns `true` if the `value` is a `net.BlockList`. - * @since v22.13.0 - * @param value Any JS value - */ - static isBlockList(value: unknown): value is BlockList; } interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts { timeout?: number | undefined; @@ -916,9 +906,6 @@ declare module "net" { function getDefaultAutoSelectFamily(): boolean; /** * Sets the default value of the `autoSelectFamily` option of `socket.connect(options)`. - * @param value The new default value. - * The initial default value is `true`, unless the command line option - * `--no-network-family-autoselection` is provided. * @since v19.4.0 */ function setDefaultAutoSelectFamily(value: boolean): void; @@ -1017,14 +1004,6 @@ declare module "net" { * @since v15.14.0, v14.18.0 */ readonly flowlabel: number; - /** - * @since v22.13.0 - * @param input An input string containing an IP address and optional port, - * e.g. `123.1.2.3:1234` or `[1::1]:1234`. - * @returns Returns a `SocketAddress` if parsing was successful. - * Otherwise returns `undefined`. - */ - static parse(input: string): SocketAddress | undefined; } } declare module "node:net" { diff --git a/node_modules/@types/node/os.d.ts b/node_modules/@types/node/os.d.ts index 77a63360..ed2d55c7 100644 --- a/node_modules/@types/node/os.d.ts +++ b/node_modules/@types/node/os.d.ts @@ -5,7 +5,7 @@ * ```js * import os from 'node:os'; * ``` - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/os.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/os.js) */ declare module "os" { interface CpuInfo { @@ -241,7 +241,7 @@ declare module "os" { * environment variables for the home directory before falling back to the * operating system response. * - * Throws a [`SystemError`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`. + * Throws a [`SystemError`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`. * @since v6.0.0 */ function userInfo(options: { encoding: "buffer" }): UserInfo; @@ -417,13 +417,13 @@ declare module "os" { const EOL: string; /** * Returns the operating system CPU architecture for which the Node.js binary was - * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, - * `'mips'`, `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`. + * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, + * and `'x64'`. * - * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v24.x/api/process.html#processarch). + * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v20.x/api/process.html#processarch). * @since v0.5.0 */ - function arch(): NodeJS.Architecture; + function arch(): string; /** * Returns a string identifying the kernel version. * @@ -445,8 +445,7 @@ declare module "os" { */ function platform(): NodeJS.Platform; /** - * Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`, - * `mips`, `mips64`, `ppc64`, `ppc64le`, `s390x`, `i386`, `i686`, `x86_64`. + * Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`, `mips`, `mips64`, `ppc64`, `ppc64le`, `s390`, `s390x`, `i386`, `i686`, `x86_64`. * * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json index c1da52ae..1c4a1590 100644 --- a/node_modules/@types/node/package.json +++ b/node_modules/@types/node/package.json @@ -1,6 +1,6 @@ { "name": "@types/node", - "version": "24.0.0", + "version": "20.19.1", "description": "TypeScript definitions for node", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", "license": "MIT", @@ -194,30 +194,15 @@ "name": "Dmitry Semigradsky", "githubUsername": "Semigradsky", "url": "https://github.com/Semigradsky" - }, - { - "name": "René", - "githubUsername": "Renegade334", - "url": "https://github.com/Renegade334" } ], "main": "", "types": "index.d.ts", "typesVersions": { - "<=5.1": { - "*": [ - "ts5.1/*" - ] - }, "<=5.6": { "*": [ "ts5.6/*" ] - }, - "<=5.7": { - "*": [ - "ts5.7/*" - ] } }, "repository": { @@ -227,9 +212,9 @@ }, "scripts": {}, "dependencies": { - "undici-types": "~7.8.0" + "undici-types": "~6.21.0" }, "peerDependencies": {}, - "typesPublisherContentHash": "8d6ceac3f0f5283bf419c4930f679c52f7a63cc3f0cc2bd866acff9fb14a8eba", + "typesPublisherContentHash": "cc9b44df0c3d7290cabaa4b43a7a43cb4eda0119a979750949d8687b20ded030", "typeScriptVersion": "5.1" } \ No newline at end of file diff --git a/node_modules/@types/node/path.d.ts b/node_modules/@types/node/path.d.ts index d363397f..7bdc7c5f 100644 --- a/node_modules/@types/node/path.d.ts +++ b/node_modules/@types/node/path.d.ts @@ -13,7 +13,7 @@ declare module "path/win32" { * ```js * import path from 'node:path'; * ``` - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/path.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/path.js) */ declare module "path" { namespace path { @@ -100,7 +100,7 @@ declare module "path" { * @param pattern The glob to check the path against. * @returns Whether or not the `path` matched the `pattern`. * @throws {TypeError} if `path` or `pattern` are not strings. - * @since v22.5.0 + * @since v20.17.0 */ matchesGlob(path: string, pattern: string): boolean; /** diff --git a/node_modules/@types/node/perf_hooks.d.ts b/node_modules/@types/node/perf_hooks.d.ts index d5ef9aec..e35aa451 100644 --- a/node_modules/@types/node/perf_hooks.d.ts +++ b/node_modules/@types/node/perf_hooks.d.ts @@ -27,7 +27,7 @@ * performance.measure('A to B', 'A', 'B'); * }); * ``` - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/perf_hooks.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/perf_hooks.js) */ declare module "perf_hooks" { import { AsyncResource } from "node:async_hooks"; @@ -138,7 +138,6 @@ declare module "perf_hooks" { * @since v8.5.0 */ class PerformanceNodeTiming extends PerformanceEntry { - readonly entryType: "node"; /** * The high resolution millisecond timestamp at which the Node.js process * completed bootstrapping. If bootstrapping has not yet finished, the property @@ -187,7 +186,7 @@ declare module "perf_hooks" { * It is recommended to use this property inside a function whose execution was * scheduled using `setImmediate` to avoid collecting metrics before finishing all * operations scheduled during the current loop iteration. - * @since v22.8.0, v20.18.0 + * @since v20.18.0 */ readonly uvMetricsInfo: UVMetrics; /** @@ -314,9 +313,6 @@ declare module "perf_hooks" { * @param initiatorType The initiator name, e.g: 'fetch' * @param global * @param cacheMode The cache mode must be an empty string ('') or 'local' - * @param bodyInfo [Fetch Response Body Info](https://fetch.spec.whatwg.org/#response-body-info) - * @param responseStatus The response's status code - * @param deliveryType The delivery type. Default: ''. * @since v18.2.0, v16.17.0 */ markResourceTiming( @@ -325,9 +321,6 @@ declare module "perf_hooks" { initiatorType: string, global: object, cacheMode: "" | "local", - bodyInfo: object, - responseStatus: number, - deliveryType?: string, ): PerformanceResourceTiming; /** * Creates a new PerformanceMeasure entry in the Performance Timeline. @@ -894,8 +887,8 @@ declare module "perf_hooks" { } from "perf_hooks"; global { /** - * `PerformanceEntry` is a global reference for `import { PerformanceEntry } from 'node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performanceentry + * `PerformanceEntry` is a global reference for `import { PerformanceEntry } from 'node:node:perf_hooks'` + * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceentry * @since v19.0.0 */ var PerformanceEntry: typeof globalThis extends { @@ -904,8 +897,8 @@ declare module "perf_hooks" { } ? T : typeof _PerformanceEntry; /** - * `PerformanceMark` is a global reference for `import { PerformanceMark } from 'node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performancemark + * `PerformanceMark` is a global reference for `import { PerformanceMark } from 'node:node:perf_hooks'` + * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performancemark * @since v19.0.0 */ var PerformanceMark: typeof globalThis extends { @@ -914,8 +907,8 @@ declare module "perf_hooks" { } ? T : typeof _PerformanceMark; /** - * `PerformanceMeasure` is a global reference for `import { PerformanceMeasure } from 'node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performancemeasure + * `PerformanceMeasure` is a global reference for `import { PerformanceMeasure } from 'node:node:perf_hooks'` + * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performancemeasure * @since v19.0.0 */ var PerformanceMeasure: typeof globalThis extends { @@ -924,8 +917,8 @@ declare module "perf_hooks" { } ? T : typeof _PerformanceMeasure; /** - * `PerformanceObserver` is a global reference for `import { PerformanceObserver } from 'node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performanceobserver + * `PerformanceObserver` is a global reference for `import { PerformanceObserver } from 'node:node:perf_hooks'` + * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceobserver * @since v19.0.0 */ var PerformanceObserver: typeof globalThis extends { @@ -934,8 +927,8 @@ declare module "perf_hooks" { } ? T : typeof _PerformanceObserver; /** - * `PerformanceObserverEntryList` is a global reference for `import { PerformanceObserverEntryList } from 'node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performanceobserverentrylist + * `PerformanceObserverEntryList` is a global reference for `import { PerformanceObserverEntryList } from 'node:node:perf_hooks'` + * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceobserverentrylist * @since v19.0.0 */ var PerformanceObserverEntryList: typeof globalThis extends { @@ -944,8 +937,8 @@ declare module "perf_hooks" { } ? T : typeof _PerformanceObserverEntryList; /** - * `PerformanceResourceTiming` is a global reference for `import { PerformanceResourceTiming } from 'node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performanceresourcetiming + * `PerformanceResourceTiming` is a global reference for `import { PerformanceResourceTiming } from 'node:node:perf_hooks'` + * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceresourcetiming * @since v19.0.0 */ var PerformanceResourceTiming: typeof globalThis extends { @@ -954,8 +947,8 @@ declare module "perf_hooks" { } ? T : typeof _PerformanceResourceTiming; /** - * `performance` is a global reference for `import { performance } from 'node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performance + * `performance` is a global reference for `import { performance } from 'node:node:perf_hooks'` + * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performance * @since v16.0.0 */ var performance: typeof globalThis extends { diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts index 7428b36a..7f67c3b4 100644 --- a/node_modules/@types/node/process.d.ts +++ b/node_modules/@types/node/process.d.ts @@ -74,7 +74,6 @@ declare module "process" { "repl": typeof import("repl"); "node:repl": typeof import("node:repl"); "node:sea": typeof import("node:sea"); - "node:sqlite": typeof import("node:sqlite"); "stream": typeof import("stream"); "node:stream": typeof import("node:stream"); "stream/consumers": typeof import("stream/consumers"); @@ -116,6 +115,7 @@ declare module "process" { "zlib": typeof import("zlib"); "node:zlib": typeof import("node:zlib"); } + global { var process: NodeJS.Process; namespace NodeJS { @@ -186,16 +186,13 @@ declare module "process" { readonly inspector: boolean; /** * A boolean value that is `true` if the current Node.js build includes support for IPv6. - * - * Since all Node.js builds have IPv6 support, this value is always `true`. * @since v0.5.3 - * @deprecated This property is always true, and any checks based on it are redundant. */ readonly ipv6: boolean; /** * A boolean value that is `true` if the current Node.js build supports - * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v24.x/api/modules.md#loading-ecmascript-modules-using-require). - * @since v22.10.0 + * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v20.x/api/modules.html#loading-ecmascript-modules-using-require). + * @since v20.19.0 */ readonly require_module: boolean; /** @@ -205,44 +202,22 @@ declare module "process" { readonly tls: boolean; /** * A boolean value that is `true` if the current Node.js build includes support for ALPN in TLS. - * - * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional ALPN support. - * This value is therefore identical to that of `process.features.tls`. * @since v4.8.0 - * @deprecated Use `process.features.tls` instead. */ readonly tls_alpn: boolean; /** * A boolean value that is `true` if the current Node.js build includes support for OCSP in TLS. - * - * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional OCSP support. - * This value is therefore identical to that of `process.features.tls`. * @since v0.11.13 - * @deprecated Use `process.features.tls` instead. */ readonly tls_ocsp: boolean; /** * A boolean value that is `true` if the current Node.js build includes support for SNI in TLS. - * - * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional SNI support. - * This value is therefore identical to that of `process.features.tls`. * @since v0.5.3 - * @deprecated Use `process.features.tls` instead. */ readonly tls_sni: boolean; - /** - * A value that is `"strip"` by default, - * `"transform"` if Node.js is run with `--experimental-transform-types`, and `false` if - * Node.js is run with `--no-experimental-strip-types`. - * @since v22.10.0 - */ - readonly typescript: "strip" | "transform" | false; /** * A boolean value that is `true` if the current Node.js build includes support for libuv. - * - * Since it's not possible to build Node.js without libuv, this value is always `true`. * @since v0.5.3 - * @deprecated This property is always true, and any checks based on it are redundant. */ readonly uv: boolean; } @@ -275,8 +250,10 @@ declare module "process" { | "loong64" | "mips" | "mipsel" + | "ppc" | "ppc64" | "riscv64" + | "s390" | "s390x" | "x64"; type Signals = @@ -747,7 +724,7 @@ declare module "process" { * should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()` * unless there are specific reasons such as custom dlopen flags or loading from ES modules. * - * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v24.x/api/os.html#dlopen-constants)` + * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v20.x/api/os.html#dlopen-constants)` * documentation for details. * * An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon @@ -1002,40 +979,6 @@ declare module "process" { * @since v0.11.8 */ exitCode?: number | string | number | undefined; - finalization: { - /** - * This function registers a callback to be called when the process emits the `exit` event if the `ref` object was not garbage collected. - * If the object `ref` was garbage collected before the `exit` event is emitted, the callback will be removed from the finalization registry, and it will not be called on process exit. - * - * Inside the callback you can release the resources allocated by the `ref` object. - * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function, - * this means that there is a possibility that the callback will not be called under special circumstances. - * - * The idea of ​​this function is to help you free up resources when the starts process exiting, but also let the object be garbage collected if it is no longer being used. - * @param ref The reference to the resource that is being tracked. - * @param callback The callback function to be called when the resource is finalized. - * @since v22.5.0 - * @experimental - */ - register(ref: T, callback: (ref: T, event: "exit") => void): void; - /** - * This function behaves exactly like the `register`, except that the callback will be called when the process emits the `beforeExit` event if `ref` object was not garbage collected. - * - * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function, this means that there is a possibility that the callback will not be called under special circumstances. - * @param ref The reference to the resource that is being tracked. - * @param callback The callback function to be called when the resource is finalized. - * @since v22.5.0 - * @experimental - */ - registerBeforeExit(ref: T, callback: (ref: T, event: "beforeExit") => void): void; - /** - * This function remove the register of the object from the finalization registry, so the callback will not be called anymore. - * @param ref The reference to the resource that was registered previously. - * @since v22.5.0 - * @experimental - */ - unregister(ref: object): void; - }; /** * The `process.getActiveResourcesInfo()` method returns an array of strings containing * the types of the active resources that are currently keeping the event loop alive. @@ -1057,6 +1000,7 @@ declare module "process" { /** * Provides a way to load built-in modules in a globally available function. * @param id ID of the built-in module being requested. + * @since v20.16.0 */ getBuiltinModule(id: ID): BuiltInModule[ID]; getBuiltinModule(id: string): object | undefined; @@ -1489,18 +1433,6 @@ declare module "process" { * @since v9.2.0, v8.10.0, v6.13.0 */ readonly ppid: number; - /** - * The `process.threadCpuUsage()` method returns the user and system CPU time usage of - * the current worker thread, in an object with properties `user` and `system`, whose - * values are microsecond values (millionth of a second). - * - * The result of a previous call to `process.threadCpuUsage()` can be passed as the - * argument to the function, to get a diff reading. - * @since v23.9.0 - * @param previousValue A previous return value from calling - * `process.threadCpuUsage()` - */ - threadCpuUsage(previousValue?: CpuUsage): CpuUsage; /** * The `process.title` property returns the current process title (i.e. returns * the current value of `ps`). Assigning a new value to `process.title` modifies @@ -1521,8 +1453,7 @@ declare module "process" { title: string; /** * The operating system CPU architecture for which the Node.js binary was compiled. - * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, - * `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`. + * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`. * * ```js * import { arch } from 'node:process'; @@ -1578,11 +1509,13 @@ declare module "process" { * See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more * information. * @since v19.6.0, v18.15.0 + * @experimental */ constrainedMemory(): number; /** * Gets the amount of free memory that is still available to the process (in bytes). - * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v24.x/api/process.html#processavailablememory) for more information. + * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v20.x/api/process.html#processavailablememory) for more information. + * @experimental * @since v20.13.0 */ availableMemory(): number; @@ -1703,7 +1636,7 @@ declare module "process" { */ nextTick(callback: Function, ...args: any[]): void; /** - * This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag. + * This API is available through the [--experimental-permission](https://nodejs.org/api/cli.html#--experimental-permission) flag. * * `process.permission` is an object whose methods are used to manage permissions for the current process. * Additional documentation is available in the [Permission Model](https://nodejs.org/api/permissions.html#permission-model). @@ -1855,7 +1788,7 @@ declare module "process" { allowedNodeEnvironmentFlags: ReadonlySet; /** * `process.report` is an object whose methods are used to generate diagnostic reports for the current process. - * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v24.x/api/report.html). + * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v20.x/api/report.html). * @since v11.8.0 */ report: ProcessReport; @@ -1920,56 +1853,6 @@ declare module "process" { * @since v0.8.0 */ traceDeprecation: boolean; - /** - * An object is "refable" if it implements the Node.js "Refable protocol". - * Specifically, this means that the object implements the `Symbol.for('nodejs.ref')` - * and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js - * event loop alive, while "unref'd" objects will not. Historically, this was - * implemented by using `ref()` and `unref()` methods directly on the objects. - * This pattern, however, is being deprecated in favor of the "Refable protocol" - * in order to better support Web Platform API types whose APIs cannot be modified - * to add `ref()` and `unref()` methods but still need to support that behavior. - * @since v22.14.0 - * @experimental - * @param maybeRefable An object that may be "refable". - */ - ref(maybeRefable: any): void; - /** - * An object is "unrefable" if it implements the Node.js "Refable protocol". - * Specifically, this means that the object implements the `Symbol.for('nodejs.ref')` - * and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js - * event loop alive, while "unref'd" objects will not. Historically, this was - * implemented by using `ref()` and `unref()` methods directly on the objects. - * This pattern, however, is being deprecated in favor of the "Refable protocol" - * in order to better support Web Platform API types whose APIs cannot be modified - * to add `ref()` and `unref()` methods but still need to support that behavior. - * @since v22.14.0 - * @experimental - * @param maybeRefable An object that may be "unref'd". - */ - unref(maybeRefable: any): void; - /** - * Replaces the current process with a new process. - * - * This is achieved by using the `execve` POSIX function and therefore no memory or other - * resources from the current process are preserved, except for the standard input, - * standard output and standard error file descriptor. - * - * All other resources are discarded by the system when the processes are swapped, without triggering - * any exit or close events and without running any cleanup handler. - * - * This function will never return, unless an error occurred. - * - * This function is not available on Windows or IBM i. - * @since v22.15.0 - * @experimental - * @param file The name or path of the executable file to run. - * @param args List of string arguments. No argument can contain a null-byte (`\u0000`). - * @param env Environment key-value pairs. - * No key or value can contain a null-byte (`\u0000`). - * **Default:** `process.env`. - */ - execve?(file: string, args?: readonly string[], env?: ProcessEnv): never; /* EventEmitter */ addListener(event: "beforeExit", listener: BeforeExitListener): this; addListener(event: "disconnect", listener: DisconnectListener): this; diff --git a/node_modules/@types/node/punycode.d.ts b/node_modules/@types/node/punycode.d.ts index 7ac26c82..394d6112 100644 --- a/node_modules/@types/node/punycode.d.ts +++ b/node_modules/@types/node/punycode.d.ts @@ -24,7 +24,7 @@ * made available to developers as a convenience. Fixes or other modifications to * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project. * @deprecated Since v7.0.0 - Deprecated - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/punycode.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/punycode.js) */ declare module "punycode" { /** diff --git a/node_modules/@types/node/querystring.d.ts b/node_modules/@types/node/querystring.d.ts index aaeefe8d..27eaed25 100644 --- a/node_modules/@types/node/querystring.d.ts +++ b/node_modules/@types/node/querystring.d.ts @@ -9,7 +9,7 @@ * `querystring` is more performant than `URLSearchParams` but is not a * standardized API. Use `URLSearchParams` when performance is not critical or * when compatibility with browser code is desirable. - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/querystring.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/querystring.js) */ declare module "querystring" { interface StringifyOptions { diff --git a/node_modules/@types/node/readline.d.ts b/node_modules/@types/node/readline.d.ts index 519b4a46..1504c26d 100644 --- a/node_modules/@types/node/readline.d.ts +++ b/node_modules/@types/node/readline.d.ts @@ -1,6 +1,6 @@ /** - * The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream - * (such as [`process.stdin`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdin)) one line at a time. + * The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/stream.html#readable-streams) stream + * (such as [`process.stdin`](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/process.html#processstdin)) one line at a time. * * To use the promise-based APIs: * @@ -31,7 +31,7 @@ * * Once this code is invoked, the Node.js application will not terminate until the `readline.Interface` is closed because the interface waits for data to be * received on the `input` stream. - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/readline.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/readline.js) */ declare module "readline" { import { Abortable, EventEmitter } from "node:events"; @@ -46,12 +46,12 @@ declare module "readline" { } /** * Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a - * single `input` [Readable](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v24.x/api/stream.html#writable-streams) stream. + * single `input` [Readable](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/stream.html#writable-streams) stream. * The `output` stream is used to print prompts for user input that arrives on, * and is read from, the `input` stream. * @since v0.1.104 */ - export class Interface extends EventEmitter implements Disposable { + export class Interface extends EventEmitter { readonly terminal: boolean; /** * The current input data being processed by node. @@ -100,7 +100,7 @@ declare module "readline" { * > Instances of the `readline.Interface` class are constructed using the * > `readline.createInterface()` method. * - * @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#class-interfaceconstructor + * @see https://nodejs.org/docs/latest-v20.x/api/readline.html#class-interfaceconstructor */ protected constructor( input: NodeJS.ReadableStream, @@ -114,7 +114,7 @@ declare module "readline" { * > Instances of the `readline.Interface` class are constructed using the * > `readline.createInterface()` method. * - * @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#class-interfaceconstructor + * @see https://nodejs.org/docs/latest-v20.x/api/readline.html#class-interfaceconstructor */ protected constructor(options: ReadLineOptions); /** @@ -208,11 +208,6 @@ declare module "readline" { * @since v0.1.98 */ close(): void; - /** - * Alias for `rl.close()`. - * @since v22.15.0 - */ - [Symbol.dispose](): void; /** * The `rl.write()` method will write either `data` or a key sequence identified * by `key` to the `output`. The `key` argument is supported only if `output` is @@ -320,11 +315,11 @@ declare module "readline" { export type CompleterResult = [string[], string]; export interface ReadLineOptions { /** - * The [`Readable`](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream to listen to + * The [`Readable`](https://nodejs.org/docs/latest-v20.x/api/stream.html#readable-streams) stream to listen to */ input: NodeJS.ReadableStream; /** - * The [`Writable`](https://nodejs.org/docs/latest-v24.x/api/stream.html#writable-streams) stream to write readline data to. + * The [`Writable`](https://nodejs.org/docs/latest-v20.x/api/stream.html#writable-streams) stream to write readline data to. */ output?: NodeJS.WritableStream | undefined; /** @@ -369,7 +364,7 @@ declare module "readline" { * `crlfDelay` will be coerced to a number no less than `100`. * It can be set to `Infinity`, in which case * `\r` followed by `\n` will always be considered a single newline - * (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v24.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter). + * (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v20.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter). * @default 100 */ crlfDelay?: number | undefined; @@ -557,7 +552,7 @@ declare module "readline" { cols: number; } /** - * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) stream + * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/tty.html) stream * in a specified direction identified by `dir`. * @since v0.7.7 * @param callback Invoked once the operation completes. @@ -565,7 +560,7 @@ declare module "readline" { */ export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean; /** - * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) stream from + * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/tty.html) stream from * the current position of the cursor down. * @since v0.7.7 * @param callback Invoked once the operation completes. @@ -574,7 +569,7 @@ declare module "readline" { export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean; /** * The `readline.cursorTo()` method moves cursor to the specified position in a - * given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) `stream`. + * given [TTY](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/tty.html) `stream`. * @since v0.7.7 * @param callback Invoked once the operation completes. * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. @@ -582,7 +577,7 @@ declare module "readline" { export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean; /** * The `readline.moveCursor()` method moves the cursor _relative_ to its current - * position in a given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) `stream`. + * position in a given [TTY](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/tty.html) `stream`. * @since v0.7.7 * @param callback Invoked once the operation completes. * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. diff --git a/node_modules/@types/node/readline/promises.d.ts b/node_modules/@types/node/readline/promises.d.ts index c0ebf4ba..86754bba 100644 --- a/node_modules/@types/node/readline/promises.d.ts +++ b/node_modules/@types/node/readline/promises.d.ts @@ -1,5 +1,6 @@ /** * @since v17.0.0 + * @experimental */ declare module "readline/promises" { import { Abortable } from "node:events"; diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts index 921b1ef9..8b1bb6bd 100644 --- a/node_modules/@types/node/repl.d.ts +++ b/node_modules/@types/node/repl.d.ts @@ -6,7 +6,7 @@ * ```js * import repl from 'node:repl'; * ``` - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/repl.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/repl.js) */ declare module "repl" { import { AsyncCompleter, Completer, Interface } from "node:readline"; @@ -37,10 +37,12 @@ declare module "repl" { terminal?: boolean | undefined; /** * The function to be used when evaluating each given line of input. - * **Default:** an async wrapper for the JavaScript `eval()` function. An `eval` function can + * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can * error with `repl.Recoverable` to indicate the input was incomplete and prompt for - * additional lines. See the [custom evaluation functions](https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#custom-evaluation-functions) - * section for more details. + * additional lines. + * + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_default_evaluation + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_custom_evaluation_functions */ eval?: REPLEval | undefined; /** @@ -72,13 +74,13 @@ declare module "repl" { * The function to invoke to format the output of each command before writing to `output`. * @default a wrapper for `util.inspect` * - * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_customizing_repl_output + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_customizing_repl_output */ writer?: REPLWriter | undefined; /** * An optional function used for custom Tab auto completion. * - * @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#readline_use_of_the_completer_function + * @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#readline_use_of_the_completer_function */ completer?: Completer | AsyncCompleter | undefined; /** @@ -166,33 +168,33 @@ declare module "repl" { /** * A value indicating whether the REPL is currently in "editor mode". * - * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_commands_and_special_keys + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_commands_and_special_keys */ readonly editorMode: boolean; /** * A value indicating whether the `_` variable has been assigned. * - * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable */ readonly underscoreAssigned: boolean; /** * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL). * - * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable */ readonly last: any; /** * A value indicating whether the `_error` variable has been assigned. * * @since v9.8.0 - * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable */ readonly underscoreErrAssigned: boolean; /** * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL). * * @since v9.8.0 - * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable */ readonly lastError: any; /** @@ -244,7 +246,7 @@ declare module "repl" { * * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS. * - * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_class_replserver + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_class_replserver */ private constructor(); /** @@ -289,7 +291,7 @@ declare module "repl" { * The `replServer.displayPrompt()` method readies the REPL instance for input * from the user, printing the configured `prompt` to a new line in the `output` and resuming the `input` to accept new input. * - * When multi-line input is being entered, a pipe `'|'` is printed rather than the + * When multi-line input is being entered, an ellipsis is printed rather than the * 'prompt'. * * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`. @@ -416,7 +418,7 @@ declare module "repl" { /** * Indicates a recoverable error that a `REPLServer` can use to support multi-line input. * - * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_recoverable_errors + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_recoverable_errors */ class Recoverable extends SyntaxError { err: Error; diff --git a/node_modules/@types/node/sea.d.ts b/node_modules/@types/node/sea.d.ts index 5119ede0..6f1d1eae 100644 --- a/node_modules/@types/node/sea.d.ts +++ b/node_modules/@types/node/sea.d.ts @@ -111,7 +111,7 @@ * ``` * @since v19.7.0, v18.16.0 * @experimental - * @see [source](https://github.com/nodejs/node/blob/v24.x/src/node_sea.cc) + * @see [source](https://github.com/nodejs/node/blob/v20.12.0/src/node_sea.cc) */ declare module "node:sea" { type AssetKey = string; @@ -149,5 +149,5 @@ declare module "node:sea" { * writes to the returned array buffer is likely to result in a crash. * @since v20.12.0 */ - function getRawAsset(key: AssetKey): ArrayBuffer; + function getRawAsset(key: AssetKey): string | ArrayBuffer; } diff --git a/node_modules/@types/node/sqlite.d.ts b/node_modules/@types/node/sqlite.d.ts deleted file mode 100644 index 45ddc985..00000000 --- a/node_modules/@types/node/sqlite.d.ts +++ /dev/null @@ -1,688 +0,0 @@ -/** - * The `node:sqlite` module facilitates working with SQLite databases. - * To access it: - * - * ```js - * import sqlite from 'node:sqlite'; - * ``` - * - * This module is only available under the `node:` scheme. The following will not - * work: - * - * ```js - * import sqlite from 'sqlite'; - * ``` - * - * The following example shows the basic usage of the `node:sqlite` module to open - * an in-memory database, write data to the database, and then read the data back. - * - * ```js - * import { DatabaseSync } from 'node:sqlite'; - * const database = new DatabaseSync(':memory:'); - * - * // Execute SQL statements from strings. - * database.exec(` - * CREATE TABLE data( - * key INTEGER PRIMARY KEY, - * value TEXT - * ) STRICT - * `); - * // Create a prepared statement to insert data into the database. - * const insert = database.prepare('INSERT INTO data (key, value) VALUES (?, ?)'); - * // Execute the prepared statement with bound values. - * insert.run(1, 'hello'); - * insert.run(2, 'world'); - * // Create a prepared statement to read data from the database. - * const query = database.prepare('SELECT * FROM data ORDER BY key'); - * // Execute the prepared statement and log the result set. - * console.log(query.all()); - * // Prints: [ { key: 1, value: 'hello' }, { key: 2, value: 'world' } ] - * ``` - * @since v22.5.0 - * @experimental - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/sqlite.js) - */ -declare module "node:sqlite" { - type SQLInputValue = null | number | bigint | string | NodeJS.ArrayBufferView; - type SQLOutputValue = null | number | bigint | string | Uint8Array; - /** @deprecated Use `SQLInputValue` or `SQLOutputValue` instead. */ - type SupportedValueType = SQLOutputValue; - interface DatabaseSyncOptions { - /** - * If `true`, the database is opened by the constructor. When - * this value is `false`, the database must be opened via the `open()` method. - * @since v22.5.0 - * @default true - */ - open?: boolean | undefined; - /** - * If `true`, foreign key constraints - * are enabled. This is recommended but can be disabled for compatibility with - * legacy database schemas. The enforcement of foreign key constraints can be - * enabled and disabled after opening the database using - * [`PRAGMA foreign_keys`](https://www.sqlite.org/pragma.html#pragma_foreign_keys). - * @since v22.10.0 - * @default true - */ - enableForeignKeyConstraints?: boolean | undefined; - /** - * If `true`, SQLite will accept - * [double-quoted string literals](https://www.sqlite.org/quirks.html#dblquote). - * This is not recommended but can be - * enabled for compatibility with legacy database schemas. - * @since v22.10.0 - * @default false - */ - enableDoubleQuotedStringLiterals?: boolean | undefined; - /** - * If `true`, the database is opened in read-only mode. - * If the database does not exist, opening it will fail. - * @since v22.12.0 - * @default false - */ - readOnly?: boolean | undefined; - /** - * If `true`, the `loadExtension` SQL function - * and the `loadExtension()` method are enabled. - * You can call `enableLoadExtension(false)` later to disable this feature. - * @since v22.13.0 - * @default false - */ - allowExtension?: boolean | undefined; - /** - * The [busy timeout](https://sqlite.org/c3ref/busy_timeout.html) in milliseconds. This is the maximum amount of - * time that SQLite will wait for a database lock to be released before - * returning an error. - * @since v24.0.0 - * @default 0 - */ - timeout?: number | undefined; - } - interface CreateSessionOptions { - /** - * A specific table to track changes for. By default, changes to all tables are tracked. - * @since v22.12.0 - */ - table?: string | undefined; - /** - * Name of the database to track. This is useful when multiple databases have been added using - * [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html). - * @since v22.12.0 - * @default 'main' - */ - db?: string | undefined; - } - interface ApplyChangesetOptions { - /** - * Skip changes that, when targeted table name is supplied to this function, return a truthy value. - * By default, all changes are attempted. - * @since v22.12.0 - */ - filter?: ((tableName: string) => boolean) | undefined; - /** - * A function that determines how to handle conflicts. The function receives one argument, - * which can be one of the following values: - * - * * `SQLITE_CHANGESET_DATA`: A `DELETE` or `UPDATE` change does not contain the expected "before" values. - * * `SQLITE_CHANGESET_NOTFOUND`: A row matching the primary key of the `DELETE` or `UPDATE` change does not exist. - * * `SQLITE_CHANGESET_CONFLICT`: An `INSERT` change results in a duplicate primary key. - * * `SQLITE_CHANGESET_FOREIGN_KEY`: Applying a change would result in a foreign key violation. - * * `SQLITE_CHANGESET_CONSTRAINT`: Applying a change results in a `UNIQUE`, `CHECK`, or `NOT NULL` constraint - * violation. - * - * The function should return one of the following values: - * - * * `SQLITE_CHANGESET_OMIT`: Omit conflicting changes. - * * `SQLITE_CHANGESET_REPLACE`: Replace existing values with conflicting changes (only valid with - `SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT` conflicts). - * * `SQLITE_CHANGESET_ABORT`: Abort on conflict and roll back the database. - * - * When an error is thrown in the conflict handler or when any other value is returned from the handler, - * applying the changeset is aborted and the database is rolled back. - * - * **Default**: A function that returns `SQLITE_CHANGESET_ABORT`. - * @since v22.12.0 - */ - onConflict?: ((conflictType: number) => number) | undefined; - } - interface FunctionOptions { - /** - * If `true`, the [`SQLITE_DETERMINISTIC`](https://www.sqlite.org/c3ref/c_deterministic.html) flag is - * set on the created function. - * @default false - */ - deterministic?: boolean | undefined; - /** - * If `true`, the [`SQLITE_DIRECTONLY`](https://www.sqlite.org/c3ref/c_directonly.html) flag is set on - * the created function. - * @default false - */ - directOnly?: boolean | undefined; - /** - * If `true`, integer arguments to `function` - * are converted to `BigInt`s. If `false`, integer arguments are passed as - * JavaScript numbers. - * @default false - */ - useBigIntArguments?: boolean | undefined; - /** - * If `true`, `function` may be invoked with any number of - * arguments (between zero and - * [`SQLITE_MAX_FUNCTION_ARG`](https://www.sqlite.org/limits.html#max_function_arg)). If `false`, - * `function` must be invoked with exactly `function.length` arguments. - * @default false - */ - varargs?: boolean | undefined; - } - interface AggregateOptions extends FunctionOptions { - /** - * The identity value for the aggregation function. This value is used when the aggregation - * function is initialized. When a `Function` is passed the identity will be its return value. - */ - start: T | (() => T); - /** - * The function to call for each row in the aggregation. The - * function receives the current state and the row value. The return value of - * this function should be the new state. - */ - step: (accumulator: T, ...args: SQLOutputValue[]) => T; - /** - * The function to call to get the result of the - * aggregation. The function receives the final state and should return the - * result of the aggregation. - */ - result?: ((accumulator: T) => SQLInputValue) | undefined; - /** - * When this function is provided, the `aggregate` method will work as a window function. - * The function receives the current state and the dropped row value. The return value of this function should be the - * new state. - */ - inverse?: ((accumulator: T, ...args: SQLOutputValue[]) => T) | undefined; - } - /** - * This class represents a single [connection](https://www.sqlite.org/c3ref/sqlite3.html) to a SQLite database. All APIs - * exposed by this class execute synchronously. - * @since v22.5.0 - */ - class DatabaseSync implements Disposable { - /** - * Constructs a new `DatabaseSync` instance. - * @param path The path of the database. - * A SQLite database can be stored in a file or completely [in memory](https://www.sqlite.org/inmemorydb.html). - * To use a file-backed database, the path should be a file path. - * To use an in-memory database, the path should be the special name `':memory:'`. - * @param options Configuration options for the database connection. - */ - constructor(path: string | Buffer | URL, options?: DatabaseSyncOptions); - /** - * Registers a new aggregate function with the SQLite database. This method is a wrapper around - * [`sqlite3_create_window_function()`](https://www.sqlite.org/c3ref/create_function.html). - * - * When used as a window function, the `result` function will be called multiple times. - * - * ```js - * import { DatabaseSync } from 'node:sqlite'; - * - * const db = new DatabaseSync(':memory:'); - * db.exec(` - * CREATE TABLE t3(x, y); - * INSERT INTO t3 VALUES ('a', 4), - * ('b', 5), - * ('c', 3), - * ('d', 8), - * ('e', 1); - * `); - * - * db.aggregate('sumint', { - * start: 0, - * step: (acc, value) => acc + value, - * }); - * - * db.prepare('SELECT sumint(y) as total FROM t3').get(); // { total: 21 } - * ``` - * @since v24.0.0 - * @param name The name of the SQLite function to create. - * @param options Function configuration settings. - */ - aggregate(name: string, options: AggregateOptions): void; - aggregate(name: string, options: AggregateOptions): void; - /** - * Closes the database connection. An exception is thrown if the database is not - * open. This method is a wrapper around [`sqlite3_close_v2()`](https://www.sqlite.org/c3ref/close.html). - * @since v22.5.0 - */ - close(): void; - /** - * Loads a shared library into the database connection. This method is a wrapper - * around [`sqlite3_load_extension()`](https://www.sqlite.org/c3ref/load_extension.html). It is required to enable the - * `allowExtension` option when constructing the `DatabaseSync` instance. - * @since v22.13.0 - * @param path The path to the shared library to load. - */ - loadExtension(path: string): void; - /** - * Enables or disables the `loadExtension` SQL function, and the `loadExtension()` - * method. When `allowExtension` is `false` when constructing, you cannot enable - * loading extensions for security reasons. - * @since v22.13.0 - * @param allow Whether to allow loading extensions. - */ - enableLoadExtension(allow: boolean): void; - /** - * This method is a wrapper around [`sqlite3_db_filename()`](https://sqlite.org/c3ref/db_filename.html) - * @since v24.0.0 - * @param dbName Name of the database. This can be `'main'` (the default primary database) or any other - * database that has been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) **Default:** `'main'`. - * @returns The location of the database file. When using an in-memory database, - * this method returns null. - */ - location(dbName?: string): string | null; - /** - * This method allows one or more SQL statements to be executed without returning - * any results. This method is useful when executing SQL statements read from a - * file. This method is a wrapper around [`sqlite3_exec()`](https://www.sqlite.org/c3ref/exec.html). - * @since v22.5.0 - * @param sql A SQL string to execute. - */ - exec(sql: string): void; - /** - * This method is used to create SQLite user-defined functions. This method is a - * wrapper around [`sqlite3_create_function_v2()`](https://www.sqlite.org/c3ref/create_function.html). - * @since v22.13.0 - * @param name The name of the SQLite function to create. - * @param options Optional configuration settings for the function. - * @param func The JavaScript function to call when the SQLite - * function is invoked. The return value of this function should be a valid - * SQLite data type: see - * [Type conversion between JavaScript and SQLite](https://nodejs.org/docs/latest-v24.x/api/sqlite.html#type-conversion-between-javascript-and-sqlite). - * The result defaults to `NULL` if the return value is `undefined`. - */ - function( - name: string, - options: FunctionOptions, - func: (...args: SQLOutputValue[]) => SQLInputValue, - ): void; - function(name: string, func: (...args: SQLOutputValue[]) => SQLInputValue): void; - /** - * Whether the database is currently open or not. - * @since v22.15.0 - */ - readonly isOpen: boolean; - /** - * Whether the database is currently within a transaction. This method - * is a wrapper around [`sqlite3_get_autocommit()`](https://sqlite.org/c3ref/get_autocommit.html). - * @since v24.0.0 - */ - readonly isTransaction: boolean; - /** - * Opens the database specified in the `path` argument of the `DatabaseSync`constructor. This method should only be used when the database is not opened via - * the constructor. An exception is thrown if the database is already open. - * @since v22.5.0 - */ - open(): void; - /** - * Compiles a SQL statement into a [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This method is a wrapper - * around [`sqlite3_prepare_v2()`](https://www.sqlite.org/c3ref/prepare.html). - * @since v22.5.0 - * @param sql A SQL string to compile to a prepared statement. - * @return The prepared statement. - */ - prepare(sql: string): StatementSync; - /** - * Creates and attaches a session to the database. This method is a wrapper around - * [`sqlite3session_create()`](https://www.sqlite.org/session/sqlite3session_create.html) and - * [`sqlite3session_attach()`](https://www.sqlite.org/session/sqlite3session_attach.html). - * @param options The configuration options for the session. - * @returns A session handle. - * @since v22.12.0 - */ - createSession(options?: CreateSessionOptions): Session; - /** - * An exception is thrown if the database is not - * open. This method is a wrapper around - * [`sqlite3changeset_apply()`](https://www.sqlite.org/session/sqlite3changeset_apply.html). - * - * ```js - * const sourceDb = new DatabaseSync(':memory:'); - * const targetDb = new DatabaseSync(':memory:'); - * - * sourceDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)'); - * targetDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)'); - * - * const session = sourceDb.createSession(); - * - * const insert = sourceDb.prepare('INSERT INTO data (key, value) VALUES (?, ?)'); - * insert.run(1, 'hello'); - * insert.run(2, 'world'); - * - * const changeset = session.changeset(); - * targetDb.applyChangeset(changeset); - * // Now that the changeset has been applied, targetDb contains the same data as sourceDb. - * ``` - * @param changeset A binary changeset or patchset. - * @param options The configuration options for how the changes will be applied. - * @returns Whether the changeset was applied successfully without being aborted. - * @since v22.12.0 - */ - applyChangeset(changeset: Uint8Array, options?: ApplyChangesetOptions): boolean; - /** - * Closes the database connection. If the database connection is already closed - * then this is a no-op. - * @since v22.15.0 - * @experimental - */ - [Symbol.dispose](): void; - } - /** - * @since v22.12.0 - */ - interface Session { - /** - * Retrieves a changeset containing all changes since the changeset was created. Can be called multiple times. - * An exception is thrown if the database or the session is not open. This method is a wrapper around - * [`sqlite3session_changeset()`](https://www.sqlite.org/session/sqlite3session_changeset.html). - * @returns Binary changeset that can be applied to other databases. - * @since v22.12.0 - */ - changeset(): Uint8Array; - /** - * Similar to the method above, but generates a more compact patchset. See - * [Changesets and Patchsets](https://www.sqlite.org/sessionintro.html#changesets_and_patchsets) - * in the documentation of SQLite. An exception is thrown if the database or the session is not open. This method is a - * wrapper around - * [`sqlite3session_patchset()`](https://www.sqlite.org/session/sqlite3session_patchset.html). - * @returns Binary patchset that can be applied to other databases. - * @since v22.12.0 - */ - patchset(): Uint8Array; - /** - * Closes the session. An exception is thrown if the database or the session is not open. This method is a - * wrapper around - * [`sqlite3session_delete()`](https://www.sqlite.org/session/sqlite3session_delete.html). - */ - close(): void; - } - interface StatementColumnMetadata { - /** - * The unaliased name of the column in the origin - * table, or `null` if the column is the result of an expression or subquery. - * This property is the result of [`sqlite3_column_origin_name()`](https://www.sqlite.org/c3ref/column_database_name.html). - */ - column: string | null; - /** - * The unaliased name of the origin database, or - * `null` if the column is the result of an expression or subquery. This - * property is the result of [`sqlite3_column_database_name()`](https://www.sqlite.org/c3ref/column_database_name.html). - */ - database: string | null; - /** - * The name assigned to the column in the result set of a - * `SELECT` statement. This property is the result of - * [`sqlite3_column_name()`](https://www.sqlite.org/c3ref/column_name.html). - */ - name: string; - /** - * The unaliased name of the origin table, or `null` if - * the column is the result of an expression or subquery. This property is the - * result of [`sqlite3_column_table_name()`](https://www.sqlite.org/c3ref/column_database_name.html). - */ - table: string | null; - /** - * The declared data type of the column, or `null` if the - * column is the result of an expression or subquery. This property is the - * result of [`sqlite3_column_decltype()`](https://www.sqlite.org/c3ref/column_decltype.html). - */ - type: string | null; - } - interface StatementResultingChanges { - /** - * The number of rows modified, inserted, or deleted by the most recently completed `INSERT`, `UPDATE`, or `DELETE` statement. - * This field is either a number or a `BigInt` depending on the prepared statement's configuration. - * This property is the result of [`sqlite3_changes64()`](https://www.sqlite.org/c3ref/changes.html). - */ - changes: number | bigint; - /** - * The most recently inserted rowid. - * This field is either a number or a `BigInt` depending on the prepared statement's configuration. - * This property is the result of [`sqlite3_last_insert_rowid()`](https://www.sqlite.org/c3ref/last_insert_rowid.html). - */ - lastInsertRowid: number | bigint; - } - /** - * This class represents a single [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This class cannot be - * instantiated via its constructor. Instead, instances are created via the`database.prepare()` method. All APIs exposed by this class execute - * synchronously. - * - * A prepared statement is an efficient binary representation of the SQL used to - * create it. Prepared statements are parameterizable, and can be invoked multiple - * times with different bound values. Parameters also offer protection against [SQL injection](https://en.wikipedia.org/wiki/SQL_injection) attacks. For these reasons, prepared statements are - * preferred - * over hand-crafted SQL strings when handling user input. - * @since v22.5.0 - */ - class StatementSync { - private constructor(); - /** - * This method executes a prepared statement and returns all results as an array of - * objects. If the prepared statement does not return any results, this method - * returns an empty array. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using - * the values in `namedParameters` and `anonymousParameters`. - * @since v22.5.0 - * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. - * @param anonymousParameters Zero or more values to bind to anonymous parameters. - * @return An array of objects. Each object corresponds to a row returned by executing the prepared statement. The keys and values of each object correspond to the column names and values of - * the row. - */ - all(...anonymousParameters: SQLInputValue[]): Record[]; - all( - namedParameters: Record, - ...anonymousParameters: SQLInputValue[] - ): Record[]; - /** - * This method is used to retrieve information about the columns returned by the - * prepared statement. - * @since v23.11.0 - * @returns An array of objects. Each object corresponds to a column - * in the prepared statement, and contains the following properties: - */ - columns(): StatementColumnMetadata[]; - /** - * The source SQL text of the prepared statement with parameter - * placeholders replaced by the values that were used during the most recent - * execution of this prepared statement. This property is a wrapper around - * [`sqlite3_expanded_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html). - * @since v22.5.0 - */ - readonly expandedSQL: string; - /** - * This method executes a prepared statement and returns the first result as an - * object. If the prepared statement does not return any results, this method - * returns `undefined`. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the - * values in `namedParameters` and `anonymousParameters`. - * @since v22.5.0 - * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. - * @param anonymousParameters Zero or more values to bind to anonymous parameters. - * @return An object corresponding to the first row returned by executing the prepared statement. The keys and values of the object correspond to the column names and values of the row. If no - * rows were returned from the database then this method returns `undefined`. - */ - get(...anonymousParameters: SQLInputValue[]): Record | undefined; - get( - namedParameters: Record, - ...anonymousParameters: SQLInputValue[] - ): Record | undefined; - /** - * This method executes a prepared statement and returns an iterator of - * objects. If the prepared statement does not return any results, this method - * returns an empty iterator. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using - * the values in `namedParameters` and `anonymousParameters`. - * @since v22.13.0 - * @param namedParameters An optional object used to bind named parameters. - * The keys of this object are used to configure the mapping. - * @param anonymousParameters Zero or more values to bind to anonymous parameters. - * @returns An iterable iterator of objects. Each object corresponds to a row - * returned by executing the prepared statement. The keys and values of each - * object correspond to the column names and values of the row. - */ - iterate(...anonymousParameters: SQLInputValue[]): NodeJS.Iterator>; - iterate( - namedParameters: Record, - ...anonymousParameters: SQLInputValue[] - ): NodeJS.Iterator>; - /** - * This method executes a prepared statement and returns an object summarizing the - * resulting changes. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the - * values in `namedParameters` and `anonymousParameters`. - * @since v22.5.0 - * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. - * @param anonymousParameters Zero or more values to bind to anonymous parameters. - */ - run(...anonymousParameters: SQLInputValue[]): StatementResultingChanges; - run( - namedParameters: Record, - ...anonymousParameters: SQLInputValue[] - ): StatementResultingChanges; - /** - * The names of SQLite parameters begin with a prefix character. By default,`node:sqlite` requires that this prefix character is present when binding - * parameters. However, with the exception of dollar sign character, these - * prefix characters also require extra quoting when used in object keys. - * - * To improve ergonomics, this method can be used to also allow bare named - * parameters, which do not require the prefix character in JavaScript code. There - * are several caveats to be aware of when enabling bare named parameters: - * - * * The prefix character is still required in SQL. - * * The prefix character is still allowed in JavaScript. In fact, prefixed names - * will have slightly better binding performance. - * * Using ambiguous named parameters, such as `$k` and `@k`, in the same prepared - * statement will result in an exception as it cannot be determined how to bind - * a bare name. - * @since v22.5.0 - * @param enabled Enables or disables support for binding named parameters without the prefix character. - */ - setAllowBareNamedParameters(enabled: boolean): void; - /** - * By default, if an unknown name is encountered while binding parameters, an - * exception is thrown. This method allows unknown named parameters to be ignored. - * @since v22.15.0 - * @param enabled Enables or disables support for unknown named parameters. - */ - setAllowUnknownNamedParameters(enabled: boolean): void; - /** - * When reading from the database, SQLite `INTEGER`s are mapped to JavaScript - * numbers by default. However, SQLite `INTEGER`s can store values larger than - * JavaScript numbers are capable of representing. In such cases, this method can - * be used to read `INTEGER` data using JavaScript `BigInt`s. This method has no - * impact on database write operations where numbers and `BigInt`s are both - * supported at all times. - * @since v22.5.0 - * @param enabled Enables or disables the use of `BigInt`s when reading `INTEGER` fields from the database. - */ - setReadBigInts(enabled: boolean): void; - /** - * The source SQL text of the prepared statement. This property is a - * wrapper around [`sqlite3_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html). - * @since v22.5.0 - */ - readonly sourceSQL: string; - } - interface BackupOptions { - /** - * Name of the source database. This can be `'main'` (the default primary database) or any other - * database that have been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) - * @default 'main' - */ - source?: string | undefined; - /** - * Name of the target database. This can be `'main'` (the default primary database) or any other - * database that have been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) - * @default 'main' - */ - target?: string | undefined; - /** - * Number of pages to be transmitted in each batch of the backup. - * @default 100 - */ - rate?: number | undefined; - /** - * Callback function that will be called with the number of pages copied and the total number of - * pages. - */ - progress?: ((progressInfo: BackupProgressInfo) => void) | undefined; - } - interface BackupProgressInfo { - totalPages: number; - remainingPages: number; - } - /** - * This method makes a database backup. This method abstracts the - * [`sqlite3_backup_init()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupinit), - * [`sqlite3_backup_step()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupstep) - * and [`sqlite3_backup_finish()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupfinish) functions. - * - * The backed-up database can be used normally during the backup process. Mutations coming from the same connection - same - * `DatabaseSync` - object will be reflected in the backup right away. However, mutations from other connections will cause - * the backup process to restart. - * - * ```js - * import { backup, DatabaseSync } from 'node:sqlite'; - * - * const sourceDb = new DatabaseSync('source.db'); - * const totalPagesTransferred = await backup(sourceDb, 'backup.db', { - * rate: 1, // Copy one page at a time. - * progress: ({ totalPages, remainingPages }) => { - * console.log('Backup in progress', { totalPages, remainingPages }); - * }, - * }); - * - * console.log('Backup completed', totalPagesTransferred); - * ``` - * @since v23.8.0 - * @param sourceDb The database to backup. The source database must be open. - * @param path The path where the backup will be created. If the file already exists, - * the contents will be overwritten. - * @param options Optional configuration for the backup. The - * following properties are supported: - * @returns A promise that resolves when the backup is completed and rejects if an error occurs. - */ - function backup(sourceDb: DatabaseSync, path: string | Buffer | URL, options?: BackupOptions): Promise; - /** - * @since v22.13.0 - */ - namespace constants { - /** - * The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is present in the database, but one or more other (non primary-key) fields modified by the update do not contain the expected "before" values. - * @since v22.14.0 - */ - const SQLITE_CHANGESET_DATA: number; - /** - * The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is not present in the database. - * @since v22.14.0 - */ - const SQLITE_CHANGESET_NOTFOUND: number; - /** - * This constant is passed to the conflict handler while processing an INSERT change if the operation would result in duplicate primary key values. - * @since v22.14.0 - */ - const SQLITE_CHANGESET_CONFLICT: number; - /** - * If foreign key handling is enabled, and applying a changeset leaves the database in a state containing foreign key violations, the conflict handler is invoked with this constant exactly once before the changeset is committed. If the conflict handler returns `SQLITE_CHANGESET_OMIT`, the changes, including those that caused the foreign key constraint violation, are committed. Or, if it returns `SQLITE_CHANGESET_ABORT`, the changeset is rolled back. - * @since v22.14.0 - */ - const SQLITE_CHANGESET_FOREIGN_KEY: number; - /** - * Conflicting changes are omitted. - * @since v22.12.0 - */ - const SQLITE_CHANGESET_OMIT: number; - /** - * Conflicting changes replace existing values. Note that this value can only be returned when the type of conflict is either `SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT`. - * @since v22.12.0 - */ - const SQLITE_CHANGESET_REPLACE: number; - /** - * Abort when a change encounters a conflict and roll back database. - * @since v22.12.0 - */ - const SQLITE_CHANGESET_ABORT: number; - } -} diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts index 1feab819..4c5fc86a 100644 --- a/node_modules/@types/node/stream.d.ts +++ b/node_modules/@types/node/stream.d.ts @@ -2,10 +2,10 @@ * A stream is an abstract interface for working with streaming data in Node.js. * The `node:stream` module provides an API for implementing the stream interface. * - * There are many stream objects provided by Node.js. For instance, a [request to an HTTP server](https://nodejs.org/docs/latest-v24.x/api/http.html#class-httpincomingmessage) - * and [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) are both stream instances. + * There are many stream objects provided by Node.js. For instance, a [request to an HTTP server](https://nodejs.org/docs/latest-v20.x/api/http.html#class-httpincomingmessage) + * and [`process.stdout`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdout) are both stream instances. * - * Streams can be readable, writable, or both. All streams are instances of [`EventEmitter`](https://nodejs.org/docs/latest-v24.x/api/events.html#class-eventemitter). + * Streams can be readable, writable, or both. All streams are instances of [`EventEmitter`](https://nodejs.org/docs/latest-v20.x/api/events.html#class-eventemitter). * * To access the `node:stream` module: * @@ -15,7 +15,7 @@ * * The `node:stream` module is useful for creating new types of stream instances. * It is usually not necessary to use the `node:stream` module to consume streams. - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/stream.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/stream.js) */ declare module "stream" { import { Abortable, EventEmitter } from "node:events"; @@ -76,6 +76,7 @@ declare module "stream" { /** * A utility method for creating a `Readable` from a web `ReadableStream`. * @since v17.0.0 + * @experimental */ static fromWeb( readableStream: streamWeb.ReadableStream, @@ -84,6 +85,7 @@ declare module "stream" { /** * A utility method for creating a web `ReadableStream` from a `Readable`. * @since v17.0.0 + * @experimental */ static toWeb( streamReadable: Readable, @@ -99,6 +101,7 @@ declare module "stream" { /** * Returns whether the stream was destroyed or errored before emitting `'end'`. * @since v16.8.0 + * @experimental */ readonly readableAborted: boolean; /** @@ -110,6 +113,7 @@ declare module "stream" { /** * Returns whether `'data'` has been emitted. * @since v16.7.0, v14.18.0 + * @experimental */ readonly readableDidRead: boolean; /** @@ -118,13 +122,13 @@ declare module "stream" { */ readonly readableEncoding: BufferEncoding | null; /** - * Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v24.x/api/stream.html#event-end) event is emitted. + * Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v20.x/api/stream.html#event-end) event is emitted. * @since v12.9.0 */ readonly readableEnded: boolean; /** * This property reflects the current state of a `Readable` stream as described - * in the [Three states](https://nodejs.org/docs/latest-v24.x/api/stream.html#three-states) section. + * in the [Three states](https://nodejs.org/docs/latest-v20.x/api/stream.html#three-states) section. * @since v9.4.0 */ readonly readableFlowing: boolean | null; @@ -715,6 +719,7 @@ declare module "stream" { /** * A utility method for creating a `Writable` from a web `WritableStream`. * @since v17.0.0 + * @experimental */ static fromWeb( writableStream: streamWeb.WritableStream, @@ -723,6 +728,7 @@ declare module "stream" { /** * A utility method for creating a web `WritableStream` from a `Writable`. * @since v17.0.0 + * @experimental */ static toWeb(streamWritable: Writable): streamWeb.WritableStream; /** @@ -734,6 +740,7 @@ declare module "stream" { /** * Returns whether the stream was destroyed or errored before emitting `'finish'`. * @since v18.0.0, v16.17.0 + * @experimental */ readonly writableAborted: boolean; /** @@ -1083,6 +1090,7 @@ declare module "stream" { /** * A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`. * @since v17.0.0 + * @experimental */ static toWeb(streamDuplex: Duplex): { readable: streamWeb.ReadableStream; @@ -1091,6 +1099,7 @@ declare module "stream" { /** * A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`. * @since v17.0.0 + * @experimental */ static fromWeb( duplexStream: { @@ -1219,7 +1228,7 @@ declare module "stream" { * difference in behavior. * @param options A value to pass to both {@link Duplex} constructors, * to set options such as buffering. - * @since v22.6.0 + * @since v20.17.0 */ function duplexPair(options?: DuplexOptions): [Duplex, Duplex]; type TransformCallback = (error?: Error | null, data?: any) => void; @@ -1330,7 +1339,7 @@ declare module "stream" { function addAbortSignal(signal: AbortSignal, stream: T): T; /** * Returns the default highWaterMark used by streams. - * Defaults to `65536` (64 KiB), or `16` for `objectMode`. + * Defaults to `16384` (16 KiB), or `16` for `objectMode`. * @since v19.9.0 */ function getDefaultHighWaterMark(objectMode: boolean): number; @@ -1371,7 +1380,7 @@ declare module "stream" { * Especially useful in error handling scenarios where a stream is destroyed * prematurely (like an aborted HTTP request), and will not emit `'end'` or `'finish'`. * - * The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-v24.x/api/stream.html#streamfinishedstream-options). + * The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-v20.x/api/stream.html#streamfinishedstream-options). * * `stream.finished()` leaves dangling event listeners (in particular `'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been * invoked. The reason for this is so that unexpected `'error'` events (due to @@ -1459,7 +1468,7 @@ declare module "stream" { * ); * ``` * - * The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-v24.x/api/stream.html#streampipelinesource-transforms-destination-options). + * The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-v20.x/api/stream.html#streampipelinesource-transforms-destination-options). * * `stream.pipeline()` will call `stream.destroy(err)` on all streams except: * @@ -1641,11 +1650,13 @@ declare module "stream" { /** * Returns whether the stream has encountered an error. * @since v17.3.0, v16.14.0 + * @experimental */ function isErrored(stream: Readable | Writable | NodeJS.ReadableStream | NodeJS.WritableStream): boolean; /** * Returns whether the stream is readable. * @since v17.4.0, v16.14.0 + * @experimental */ function isReadable(stream: Readable | NodeJS.ReadableStream): boolean; } diff --git a/node_modules/@types/node/stream/web.d.ts b/node_modules/@types/node/stream/web.d.ts index 2f444da6..a6e6b577 100644 --- a/node_modules/@types/node/stream/web.d.ts +++ b/node_modules/@types/node/stream/web.d.ts @@ -425,21 +425,11 @@ declare module "stream/web" { global { interface ByteLengthQueuingStrategy extends _ByteLengthQueuingStrategy {} - /** - * `ByteLengthQueuingStrategy` class is a global reference for `import { ByteLengthQueuingStrategy } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-bytelengthqueuingstrategy - * @since v18.0.0 - */ var ByteLengthQueuingStrategy: typeof globalThis extends { onmessage: any; ByteLengthQueuingStrategy: infer T } ? T : typeof import("stream/web").ByteLengthQueuingStrategy; interface CompressionStream extends _CompressionStream {} - /** - * `CompressionStream` class is a global reference for `import { CompressionStream } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-compressionstream - * @since v18.0.0 - */ var CompressionStream: typeof globalThis extends { onmessage: any; // CompressionStream, DecompressionStream and ReportingObserver was introduced in the same commit. @@ -455,26 +445,16 @@ declare module "stream/web" { : typeof import("stream/web").CompressionStream; interface CountQueuingStrategy extends _CountQueuingStrategy {} - /** - * `CountQueuingStrategy` class is a global reference for `import { CountQueuingStrategy } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-countqueuingstrategy - * @since v18.0.0 - */ var CountQueuingStrategy: typeof globalThis extends { onmessage: any; CountQueuingStrategy: infer T } ? T : typeof import("stream/web").CountQueuingStrategy; interface DecompressionStream extends _DecompressionStream {} - /** - * `DecompressionStream` class is a global reference for `import { DecompressionStream } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-decompressionstream - * @since v18.0.0 - */ var DecompressionStream: typeof globalThis extends { onmessage: any; // CompressionStream, DecompressionStream and ReportingObserver was introduced in the same commit. // If ReportingObserver check is removed, the type here will form a circular reference in TS5.0+lib.dom.d.ts ReportingObserver: any; - DecompressionStream: infer T extends object; + DecompressionStream: infer T; } ? T // TS 4.8, 4.9, 5.0 : typeof globalThis extends { onmessage: any; TransformStream: { prototype: infer T } } ? { @@ -484,126 +464,61 @@ declare module "stream/web" { : typeof import("stream/web").DecompressionStream; interface ReadableByteStreamController extends _ReadableByteStreamController {} - /** - * `ReadableByteStreamController` class is a global reference for `import { ReadableByteStreamController } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-readablebytestreamcontroller - * @since v18.0.0 - */ var ReadableByteStreamController: typeof globalThis extends { onmessage: any; ReadableByteStreamController: infer T } ? T : typeof import("stream/web").ReadableByteStreamController; interface ReadableStream extends _ReadableStream {} - /** - * `ReadableStream` class is a global reference for `import { ReadableStream } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-readablestream - * @since v18.0.0 - */ var ReadableStream: typeof globalThis extends { onmessage: any; ReadableStream: infer T } ? T : typeof import("stream/web").ReadableStream; interface ReadableStreamBYOBReader extends _ReadableStreamBYOBReader {} - /** - * `ReadableStreamBYOBReader` class is a global reference for `import { ReadableStreamBYOBReader } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-readablestreambyobreader - * @since v18.0.0 - */ var ReadableStreamBYOBReader: typeof globalThis extends { onmessage: any; ReadableStreamBYOBReader: infer T } ? T : typeof import("stream/web").ReadableStreamBYOBReader; interface ReadableStreamBYOBRequest extends _ReadableStreamBYOBRequest {} - /** - * `ReadableStreamBYOBRequest` class is a global reference for `import { ReadableStreamBYOBRequest } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-readablestreambyobrequest - * @since v18.0.0 - */ var ReadableStreamBYOBRequest: typeof globalThis extends { onmessage: any; ReadableStreamBYOBRequest: infer T } ? T : typeof import("stream/web").ReadableStreamBYOBRequest; interface ReadableStreamDefaultController extends _ReadableStreamDefaultController {} - /** - * `ReadableStreamDefaultController` class is a global reference for `import { ReadableStreamDefaultController } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-readablestreamdefaultcontroller - * @since v18.0.0 - */ var ReadableStreamDefaultController: typeof globalThis extends { onmessage: any; ReadableStreamDefaultController: infer T } ? T : typeof import("stream/web").ReadableStreamDefaultController; interface ReadableStreamDefaultReader extends _ReadableStreamDefaultReader {} - /** - * `ReadableStreamDefaultReader` class is a global reference for `import { ReadableStreamDefaultReader } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-readablestreamdefaultreader - * @since v18.0.0 - */ var ReadableStreamDefaultReader: typeof globalThis extends { onmessage: any; ReadableStreamDefaultReader: infer T } ? T : typeof import("stream/web").ReadableStreamDefaultReader; interface TextDecoderStream extends _TextDecoderStream {} - /** - * `TextDecoderStream` class is a global reference for `import { TextDecoderStream } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-textdecoderstream - * @since v18.0.0 - */ var TextDecoderStream: typeof globalThis extends { onmessage: any; TextDecoderStream: infer T } ? T : typeof import("stream/web").TextDecoderStream; interface TextEncoderStream extends _TextEncoderStream {} - /** - * `TextEncoderStream` class is a global reference for `import { TextEncoderStream } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-textencoderstream - * @since v18.0.0 - */ var TextEncoderStream: typeof globalThis extends { onmessage: any; TextEncoderStream: infer T } ? T : typeof import("stream/web").TextEncoderStream; interface TransformStream extends _TransformStream {} - /** - * `TransformStream` class is a global reference for `import { TransformStream } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-transformstream - * @since v18.0.0 - */ var TransformStream: typeof globalThis extends { onmessage: any; TransformStream: infer T } ? T : typeof import("stream/web").TransformStream; interface TransformStreamDefaultController extends _TransformStreamDefaultController {} - /** - * `TransformStreamDefaultController` class is a global reference for `import { TransformStreamDefaultController } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-transformstreamdefaultcontroller - * @since v18.0.0 - */ var TransformStreamDefaultController: typeof globalThis extends { onmessage: any; TransformStreamDefaultController: infer T } ? T : typeof import("stream/web").TransformStreamDefaultController; interface WritableStream extends _WritableStream {} - /** - * `WritableStream` class is a global reference for `import { WritableStream } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-writablestream - * @since v18.0.0 - */ var WritableStream: typeof globalThis extends { onmessage: any; WritableStream: infer T } ? T : typeof import("stream/web").WritableStream; interface WritableStreamDefaultController extends _WritableStreamDefaultController {} - /** - * `WritableStreamDefaultController` class is a global reference for `import { WritableStreamDefaultController } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-writablestreamdefaultcontroller - * @since v18.0.0 - */ var WritableStreamDefaultController: typeof globalThis extends { onmessage: any; WritableStreamDefaultController: infer T } ? T : typeof import("stream/web").WritableStreamDefaultController; interface WritableStreamDefaultWriter extends _WritableStreamDefaultWriter {} - /** - * `WritableStreamDefaultWriter` class is a global reference for `import { WritableStreamDefaultWriter } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-writablestreamdefaultwriter - * @since v18.0.0 - */ var WritableStreamDefaultWriter: typeof globalThis extends { onmessage: any; WritableStreamDefaultWriter: infer T } ? T : typeof import("stream/web").WritableStreamDefaultWriter; diff --git a/node_modules/@types/node/string_decoder.d.ts b/node_modules/@types/node/string_decoder.d.ts index 3632c163..4a366eef 100644 --- a/node_modules/@types/node/string_decoder.d.ts +++ b/node_modules/@types/node/string_decoder.d.ts @@ -36,7 +36,7 @@ * decoder.write(Buffer.from([0x82])); * console.log(decoder.end(Buffer.from([0xAC]))); // Prints: € * ``` - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/string_decoder.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/string_decoder.js) */ declare module "string_decoder" { class StringDecoder { diff --git a/node_modules/@types/node/test.d.ts b/node_modules/@types/node/test.d.ts index 32705d61..18872dd0 100644 --- a/node_modules/@types/node/test.d.ts +++ b/node_modules/@types/node/test.d.ts @@ -10,7 +10,7 @@ * work: * * ```js - * import test from 'node:test'; + * import test from 'test'; * ``` * * Tests created via the `test` module consist of a single function that is @@ -76,7 +76,7 @@ * * If any tests fail, the process exit code is set to `1`. * @since v18.0.0, v16.17.0 - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/test.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/test.js) */ declare module "node:test" { import { Readable } from "node:stream"; @@ -144,23 +144,7 @@ declare module "node:test" { function test(options?: TestOptions, fn?: TestFn): Promise; function test(fn?: TestFn): Promise; namespace test { - export { - after, - afterEach, - assert, - before, - beforeEach, - describe, - it, - mock, - only, - run, - skip, - snapshot, - suite, - test, - todo, - }; + export { after, afterEach, before, beforeEach, describe, it, mock, only, run, skip, suite, test, todo }; } /** * The `suite()` function is imported from the `node:test` module. @@ -320,17 +304,9 @@ declare module "node:test" { * @default false */ concurrency?: number | boolean | undefined; - /** - * Specifies the current working directory to be used by the test runner. - * Serves as the base path for resolving files according to the - * [test runner execution model](https://nodejs.org/docs/latest-v24.x/api/test.html#test-runner-execution-model). - * @since v23.0.0 - * @default process.cwd() - */ - cwd?: string | undefined; /** * An array containing the list of files to run. If omitted, files are run according to the - * [test runner execution model](https://nodejs.org/docs/latest-v24.x/api/test.html#test-runner-execution-model). + * [test runner execution model](https://nodejs.org/docs/latest-v20.x/api/test.html#test-runner-execution-model). */ files?: readonly string[] | undefined; /** @@ -340,31 +316,13 @@ declare module "node:test" { * @default false */ forceExit?: boolean | undefined; - /** - * An array containing the list of glob patterns to match test files. - * This option cannot be used together with `files`. If omitted, files are run according to the - * [test runner execution model](https://nodejs.org/docs/latest-v24.x/api/test.html#test-runner-execution-model). - * @since v22.6.0 - */ - globPatterns?: readonly string[] | undefined; /** * Sets inspector port of test child process. - * This can be a number, or a function that takes no arguments and returns a - * number. If a nullish value is provided, each process gets its own port, - * incremented from the primary's `process.debugPort`. This option is ignored - * if the `isolation` option is set to `'none'` as no child processes are - * spawned. + * If a nullish value is provided, each process gets its own port, + * incremented from the primary's `process.debugPort`. * @default undefined */ inspectPort?: number | (() => number) | undefined; - /** - * Configures the type of test isolation. If set to - * `'process'`, each test file is run in a separate child process. If set to - * `'none'`, all test files run in the current process. - * @default 'process' - * @since v22.8.0 - */ - isolation?: "process" | "none" | undefined; /** * If truthy, the test context will only run tests that have the `only` option set */ @@ -374,20 +332,6 @@ declare module "node:test" { * @default undefined */ setup?: ((reporter: TestsStream) => void | Promise) | undefined; - /** - * An array of CLI flags to pass to the `node` executable when - * spawning the subprocesses. This option has no effect when `isolation` is `'none`'. - * @since v22.10.0 - * @default [] - */ - execArgv?: readonly string[] | undefined; - /** - * An array of CLI flags to pass to each test file when spawning the - * subprocesses. This option has no effect when `isolation` is `'none'`. - * @since v22.10.0 - * @default [] - */ - argv?: readonly string[] | undefined; /** * Allows aborting an in-progress test execution. */ @@ -398,15 +342,6 @@ declare module "node:test" { * @default undefined */ testNamePatterns?: string | RegExp | ReadonlyArray | undefined; - /** - * A String, RegExp or a RegExp Array, that can be used to exclude running tests whose - * name matches the provided pattern. Test name patterns are interpreted as JavaScript - * regular expressions. For each test that is executed, any corresponding test hooks, - * such as `beforeEach()`, are also run. - * @default undefined - * @since v22.1.0 - */ - testSkipPatterns?: string | RegExp | ReadonlyArray | undefined; /** * The number of milliseconds after which the test execution will fail. * If unspecified, subtests inherit this value from their parent. @@ -423,53 +358,6 @@ declare module "node:test" { * @default undefined */ shard?: TestShard | undefined; - /** - * enable [code coverage](https://nodejs.org/docs/latest-v24.x/api/test.html#collecting-code-coverage) collection. - * @since v22.10.0 - * @default false - */ - coverage?: boolean | undefined; - /** - * Excludes specific files from code coverage - * using a glob pattern, which can match both absolute and relative file paths. - * This property is only applicable when `coverage` was set to `true`. - * If both `coverageExcludeGlobs` and `coverageIncludeGlobs` are provided, - * files must meet **both** criteria to be included in the coverage report. - * @since v22.10.0 - * @default undefined - */ - coverageExcludeGlobs?: string | readonly string[] | undefined; - /** - * Includes specific files in code coverage - * using a glob pattern, which can match both absolute and relative file paths. - * This property is only applicable when `coverage` was set to `true`. - * If both `coverageExcludeGlobs` and `coverageIncludeGlobs` are provided, - * files must meet **both** criteria to be included in the coverage report. - * @since v22.10.0 - * @default undefined - */ - coverageIncludeGlobs?: string | readonly string[] | undefined; - /** - * Require a minimum percent of covered lines. If code - * coverage does not reach the threshold specified, the process will exit with code `1`. - * @since v22.10.0 - * @default 0 - */ - lineCoverage?: number | undefined; - /** - * Require a minimum percent of covered branches. If code - * coverage does not reach the threshold specified, the process will exit with code `1`. - * @since v22.10.0 - * @default 0 - */ - branchCoverage?: number | undefined; - /** - * Require a minimum percent of covered functions. If code - * coverage does not reach the threshold specified, the process will exit with code `1`. - * @since v22.10.0 - * @default 0 - */ - functionCoverage?: number | undefined; } /** * A successful call to `run()` will return a new `TestsStream` object, streaming a series of events representing the execution of the tests. @@ -489,7 +377,6 @@ declare module "node:test" { addListener(event: "test:start", listener: (data: TestStart) => void): this; addListener(event: "test:stderr", listener: (data: TestStderr) => void): this; addListener(event: "test:stdout", listener: (data: TestStdout) => void): this; - addListener(event: "test:summary", listener: (data: TestSummary) => void): this; addListener(event: "test:watch:drained", listener: () => void): this; addListener(event: string, listener: (...args: any[]) => void): this; emit(event: "test:coverage", data: TestCoverage): boolean; @@ -503,7 +390,6 @@ declare module "node:test" { emit(event: "test:start", data: TestStart): boolean; emit(event: "test:stderr", data: TestStderr): boolean; emit(event: "test:stdout", data: TestStdout): boolean; - emit(event: "test:summary", data: TestSummary): boolean; emit(event: "test:watch:drained"): boolean; emit(event: string | symbol, ...args: any[]): boolean; on(event: "test:coverage", listener: (data: TestCoverage) => void): this; @@ -517,7 +403,6 @@ declare module "node:test" { on(event: "test:start", listener: (data: TestStart) => void): this; on(event: "test:stderr", listener: (data: TestStderr) => void): this; on(event: "test:stdout", listener: (data: TestStdout) => void): this; - on(event: "test:summary", listener: (data: TestSummary) => void): this; on(event: "test:watch:drained", listener: () => void): this; on(event: string, listener: (...args: any[]) => void): this; once(event: "test:coverage", listener: (data: TestCoverage) => void): this; @@ -531,7 +416,6 @@ declare module "node:test" { once(event: "test:start", listener: (data: TestStart) => void): this; once(event: "test:stderr", listener: (data: TestStderr) => void): this; once(event: "test:stdout", listener: (data: TestStdout) => void): this; - once(event: "test:summary", listener: (data: TestSummary) => void): this; once(event: "test:watch:drained", listener: () => void): this; once(event: string, listener: (...args: any[]) => void): this; prependListener(event: "test:coverage", listener: (data: TestCoverage) => void): this; @@ -545,7 +429,6 @@ declare module "node:test" { prependListener(event: "test:start", listener: (data: TestStart) => void): this; prependListener(event: "test:stderr", listener: (data: TestStderr) => void): this; prependListener(event: "test:stdout", listener: (data: TestStdout) => void): this; - prependListener(event: "test:summary", listener: (data: TestSummary) => void): this; prependListener(event: "test:watch:drained", listener: () => void): this; prependListener(event: string, listener: (...args: any[]) => void): this; prependOnceListener(event: "test:coverage", listener: (data: TestCoverage) => void): this; @@ -559,7 +442,6 @@ declare module "node:test" { prependOnceListener(event: "test:start", listener: (data: TestStart) => void): this; prependOnceListener(event: "test:stderr", listener: (data: TestStderr) => void): this; prependOnceListener(event: "test:stdout", listener: (data: TestStdout) => void): this; - prependOnceListener(event: "test:summary", listener: (data: TestSummary) => void): this; prependOnceListener(event: "test:watch:drained", listener: () => void): this; prependOnceListener(event: string, listener: (...args: any[]) => void): this; } @@ -590,7 +472,7 @@ declare module "node:test" { * t.assert.deepStrictEqual(actual, expected); // Error: 't' needs an explicit type annotation. * }); * ``` - * @since v22.2.0, v20.15.0 + * @since v20.15.0 */ readonly assert: TestContextAssert; /** @@ -639,15 +521,9 @@ declare module "node:test" { * @param message Message to be reported. */ diagnostic(message: string): void; - /** - * The absolute path of the test file that created the current test. If a test file imports - * additional modules that generate tests, the imported tests will return the path of the root test file. - * @since v22.6.0 - */ - readonly filePath: string | undefined; /** * The name of the test and each of its ancestors, separated by `>`. - * @since v22.3.0 + * @since v20.16.0 */ readonly fullName: string; /** @@ -656,12 +532,11 @@ declare module "node:test" { */ readonly name: string; /** - * This function is used to set the number of assertions and subtests that are expected to run - * within the test. If the number of assertions and subtests that run does not match the - * expected count, the test will fail. - * - * > Note: To make sure assertions are tracked, `t.assert` must be used instead of `assert` directly. + * Used to set the number of assertions and subtests that are expected to run within the test. + * If the number of assertions and subtests that run does not match the expected count, the test will fail. * + * To make sure assertions are tracked, the assert functions on `context.assert` must be used, + * instead of importing from the `node:assert` module. * ```js * test('top level test', (t) => { * t.plan(2); @@ -670,9 +545,7 @@ declare module "node:test" { * }); * ``` * - * When working with asynchronous code, the `plan` function can be used to ensure that the - * correct number of assertions are run: - * + * When working with asynchronous code, the `plan` function can be used to ensure that the correct number of assertions are run: * ```js * test('planning with streams', (t, done) => { * function* generate() { @@ -686,35 +559,14 @@ declare module "node:test" { * stream.on('data', (chunk) => { * t.assert.strictEqual(chunk, expected.shift()); * }); - * * stream.on('end', () => { * done(); * }); * }); * ``` - * - * When using the `wait` option, you can control how long the test will wait for the expected assertions. - * For example, setting a maximum wait time ensures that the test will wait for asynchronous assertions - * to complete within the specified timeframe: - * - * ```js - * test('plan with wait: 2000 waits for async assertions', (t) => { - * t.plan(1, { wait: 2000 }); // Waits for up to 2 seconds for the assertion to complete. - * - * const asyncActivity = () => { - * setTimeout(() => { - * * t.assert.ok(true, 'Async assertion completed within the wait time'); - * }, 1000); // Completes after 1 second, within the 2-second wait time. - * }; - * - * asyncActivity(); // The test will pass because the assertion is completed in time. - * }); - * ``` - * - * Note: If a `wait` timeout is specified, it begins counting down only after the test function finishes executing. - * @since v22.2.0 + * @since v20.15.0 */ - plan(count: number, options?: TestContextPlanOptions): void; + plan(count: number): void; /** * If `shouldRunOnlyTests` is truthy, the test context will only run tests that * have the `only` option set. Otherwise, all tests are run. If Node.js was not @@ -786,18 +638,6 @@ declare module "node:test" { * @returns A {@link Promise} resolved with `undefined` once the test completes. */ test: typeof test; - /** - * This method polls a `condition` function until that function either returns - * successfully or the operation times out. - * @since v22.14.0 - * @param condition An assertion function that is invoked - * periodically until it completes successfully or the defined polling timeout - * elapses. Successful completion is defined as not throwing or rejecting. This - * function does not accept any arguments, and is allowed to return any value. - * @param options An optional configuration object for the polling operation. - * @returns Fulfilled with the value returned by `condition`. - */ - waitFor(condition: () => T, options?: TestContextWaitForOptions): Promise>; /** * Each test provides its own MockTracker instance. */ @@ -820,104 +660,11 @@ declare module "node:test" { | "notEqual" | "notStrictEqual" | "ok" - | "partialDeepStrictEqual" | "rejects" | "strictEqual" | "throws" > - { - /** - * This function serializes `value` and writes it to the file specified by `path`. - * - * ```js - * test('snapshot test with default serialization', (t) => { - * t.assert.fileSnapshot({ value1: 1, value2: 2 }, './snapshots/snapshot.json'); - * }); - * ``` - * - * This function differs from `context.assert.snapshot()` in the following ways: - * - * * The snapshot file path is explicitly provided by the user. - * * Each snapshot file is limited to a single snapshot value. - * * No additional escaping is performed by the test runner. - * - * These differences allow snapshot files to better support features such as syntax - * highlighting. - * @since v22.14.0 - * @param value A value to serialize to a string. If Node.js was started with - * the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--test-update-snapshots) - * flag, the serialized value is written to - * `path`. Otherwise, the serialized value is compared to the contents of the - * existing snapshot file. - * @param path The file where the serialized `value` is written. - * @param options Optional configuration options. - */ - fileSnapshot(value: any, path: string, options?: AssertSnapshotOptions): void; - /** - * This function implements assertions for snapshot testing. - * ```js - * test('snapshot test with default serialization', (t) => { - * t.assert.snapshot({ value1: 1, value2: 2 }); - * }); - * - * test('snapshot test with custom serialization', (t) => { - * t.assert.snapshot({ value3: 3, value4: 4 }, { - * serializers: [(value) => JSON.stringify(value)] - * }); - * }); - * ``` - * @since v22.3.0 - * @param value A value to serialize to a string. If Node.js was started with - * the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--test-update-snapshots) - * flag, the serialized value is written to - * the snapshot file. Otherwise, the serialized value is compared to the - * corresponding value in the existing snapshot file. - */ - snapshot(value: any, options?: AssertSnapshotOptions): void; - /** - * A custom assertion function registered with `assert.register()`. - */ - [name: string]: (...args: any[]) => void; - } - interface AssertSnapshotOptions { - /** - * An array of synchronous functions used to serialize `value` into a string. - * `value` is passed as the only argument to the first serializer function. - * The return value of each serializer is passed as input to the next serializer. - * Once all serializers have run, the resulting value is coerced to a string. - * - * If no serializers are provided, the test runner's default serializers are used. - */ - serializers?: ReadonlyArray<(value: any) => any> | undefined; - } - interface TestContextPlanOptions { - /** - * The wait time for the plan: - * * If `true`, the plan waits indefinitely for all assertions and subtests to run. - * * If `false`, the plan performs an immediate check after the test function completes, - * without waiting for any pending assertions or subtests. - * Any assertions or subtests that complete after this check will not be counted towards the plan. - * * If a number, it specifies the maximum wait time in milliseconds - * before timing out while waiting for expected assertions and subtests to be matched. - * If the timeout is reached, the test will fail. - * @default false - */ - wait?: boolean | number | undefined; - } - interface TestContextWaitForOptions { - /** - * The number of milliseconds to wait after an unsuccessful - * invocation of `condition` before trying again. - * @default 50 - */ - interval?: number | undefined; - /** - * The poll timeout in milliseconds. If `condition` has not - * succeeded by the time this elapses, an error occurs. - * @default 1000 - */ - timeout?: number | undefined; - } + {} /** * An instance of `SuiteContext` is passed to each suite function in order to @@ -926,12 +673,6 @@ declare module "node:test" { * @since v18.7.0, v16.17.0 */ class SuiteContext { - /** - * The absolute path of the test file that created the current suite. If a test file imports - * additional modules that generate suites, the imported suites will return the path of the root test file. - * @since v22.6.0 - */ - readonly filePath: string | undefined; /** * The name of the suite. * @since v18.8.0, v16.18.0 @@ -988,7 +729,7 @@ declare module "node:test" { * If the number of assertions run in the test does not match the number * specified in the plan, the test will fail. * @default undefined - * @since v22.2.0 + * @since v20.15.0 */ plan?: number | undefined; } @@ -1300,44 +1041,11 @@ declare module "node:test" { ): Mock<((value: MockedObject[MethodName]) => void) | Implementation>; /** - * This function is used to mock the exports of ECMAScript modules, CommonJS modules, JSON modules, and - * Node.js builtin modules. Any references to the original module prior to mocking are not impacted. In - * order to enable module mocking, Node.js must be started with the - * [`--experimental-test-module-mocks`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--experimental-test-module-mocks) - * command-line flag. - * - * The following example demonstrates how a mock is created for a module. - * - * ```js - * test('mocks a builtin module in both module systems', async (t) => { - * // Create a mock of 'node:readline' with a named export named 'fn', which - * // does not exist in the original 'node:readline' module. - * const mock = t.mock.module('node:readline', { - * namedExports: { fn() { return 42; } }, - * }); - * - * let esmImpl = await import('node:readline'); - * let cjsImpl = require('node:readline'); - * - * // cursorTo() is an export of the original 'node:readline' module. - * assert.strictEqual(esmImpl.cursorTo, undefined); - * assert.strictEqual(cjsImpl.cursorTo, undefined); - * assert.strictEqual(esmImpl.fn(), 42); - * assert.strictEqual(cjsImpl.fn(), 42); - * - * mock.restore(); + * This function is used to mock the exports of ECMAScript modules, CommonJS modules, and Node.js builtin modules. + * Any references to the original module prior to mocking are not impacted. * - * // The mock is restored, so the original builtin module is returned. - * esmImpl = await import('node:readline'); - * cjsImpl = require('node:readline'); - * - * assert.strictEqual(typeof esmImpl.cursorTo, 'function'); - * assert.strictEqual(typeof cjsImpl.cursorTo, 'function'); - * assert.strictEqual(esmImpl.fn, undefined); - * assert.strictEqual(cjsImpl.fn, undefined); - * }); - * ``` - * @since v22.3.0 + * Only available through the [--experimental-test-module-mocks](https://nodejs.org/api/cli.html#--experimental-test-module-mocks) flag. + * @since v20.18.0 * @experimental * @param specifier A string identifying the module to mock. * @param options Optional configuration options for the mock module. @@ -1362,7 +1070,6 @@ declare module "node:test" { * @since v19.1.0, v18.13.0 */ restoreAll(): void; - timers: MockTimers; } const mock: MockTracker; @@ -1504,18 +1211,19 @@ declare module "node:test" { restore(): void; } /** - * @since v22.3.0 + * @since v20.18.0 * @experimental */ class MockModuleContext { /** * Resets the implementation of the mock module. - * @since v22.3.0 + * @since v20.18.0 */ restore(): void; } type Timer = "setInterval" | "setTimeout" | "setImmediate" | "Date"; + interface MockTimersOptions { apis: Timer[]; now?: number | Date | undefined; @@ -1531,6 +1239,7 @@ declare module "node:test" { * The `MockTracker` provides a top-level `timers` export * which is a `MockTimers` instance. * @since v20.4.0 + * @experimental */ class MockTimers { /** @@ -1735,56 +1444,9 @@ declare module "node:test" { */ [Symbol.dispose](): void; } - /** - * An object whose methods are used to configure available assertions on the - * `TestContext` objects in the current process. The methods from `node:assert` - * and snapshot testing functions are available by default. - * - * It is possible to apply the same configuration to all files by placing common - * configuration code in a module - * preloaded with `--require` or `--import`. - * @since v22.14.0 - */ - namespace assert { - /** - * Defines a new assertion function with the provided name and function. If an - * assertion already exists with the same name, it is overwritten. - * @since v22.14.0 - */ - function register(name: string, fn: (this: TestContext, ...args: any[]) => void): void; - } - /** - * @since v22.3.0 - */ - namespace snapshot { - /** - * This function is used to customize the default serialization mechanism used by the test runner. - * - * By default, the test runner performs serialization by calling `JSON.stringify(value, null, 2)` on the provided value. - * `JSON.stringify()` does have limitations regarding circular structures and supported data types. - * If a more robust serialization mechanism is required, this function should be used to specify a list of custom serializers. - * - * Serializers are called in order, with the output of the previous serializer passed as input to the next. - * The final result must be a string value. - * @since v22.3.0 - * @param serializers An array of synchronous functions used as the default serializers for snapshot tests. - */ - function setDefaultSnapshotSerializers(serializers: ReadonlyArray<(value: any) => any>): void; - /** - * This function is used to set a custom resolver for the location of the snapshot file used for snapshot testing. - * By default, the snapshot filename is the same as the entry point filename with `.snapshot` appended. - * @since v22.3.0 - * @param fn A function used to compute the location of the snapshot file. - * The function receives the path of the test file as its only argument. If the - * test is not associated with a file (for example in the REPL), the input is - * undefined. `fn()` must return a string specifying the location of the snapshot file. - */ - function setResolveSnapshotPath(fn: (path: string | undefined) => string): void; - } export { after, afterEach, - assert, before, beforeEach, describe, @@ -1794,7 +1456,6 @@ declare module "node:test" { only, run, skip, - snapshot, suite, SuiteContext, test, @@ -1925,25 +1586,6 @@ interface TestCoverage { count: number; }>; }>; - /** - * An object containing whether or not the coverage for - * each coverage type. - * @since v22.9.0 - */ - thresholds: { - /** - * The function coverage threshold. - */ - function: number; - /** - * The branch coverage threshold. - */ - branch: number; - /** - * The line coverage threshold. - */ - line: number; - }; /** * An object containing a summary of coverage for all files. */ @@ -2049,11 +1691,6 @@ interface TestDequeue extends TestLocationInfo { * The nesting level of the test. */ nesting: number; - /** - * The test type. Either `'suite'` or `'test'`. - * @since v22.15.0 - */ - type: "suite" | "test"; } interface TestEnqueue extends TestLocationInfo { /** @@ -2064,11 +1701,6 @@ interface TestEnqueue extends TestLocationInfo { * The nesting level of the test. */ nesting: number; - /** - * The test type. Either `'suite'` or `'test'`. - * @since v22.15.0 - */ - type: "suite" | "test"; } interface TestFail extends TestLocationInfo { /** @@ -2186,57 +1818,6 @@ interface TestStdout { */ message: string; } -interface TestSummary { - /** - * An object containing the counts of various test results. - */ - counts: { - /** - * The total number of cancelled tests. - */ - cancelled: number; - /** - * The total number of passed tests. - */ - passed: number; - /** - * The total number of skipped tests. - */ - skipped: number; - /** - * The total number of suites run. - */ - suites: number; - /** - * The total number of tests run, excluding suites. - */ - tests: number; - /** - * The total number of TODO tests. - */ - todo: number; - /** - * The total number of top level tests and suites. - */ - topLevel: number; - }; - /** - * The duration of the test run in milliseconds. - */ - duration_ms: number; - /** - * The path of the test file that generated the - * summary. If the summary corresponds to multiple files, this value is - * `undefined`. - */ - file: string | undefined; - /** - * Indicates whether or not the test run is considered - * successful or not. If any error condition occurs, such as a failing test or - * unmet coverage threshold, this value will be set to `false`. - */ - success: boolean; -} /** * The `node:test/reporters` module exposes the builtin-reporters for `node:test`. @@ -2250,10 +1831,10 @@ interface TestSummary { * work: * * ```js - * import test from 'node:test/reporters'; + * import test from 'test/reporters'; * ``` * @since v19.9.0 - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/test/reporters.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/test/reporters.js) */ declare module "node:test/reporters" { import { Transform, TransformOptions } from "node:stream"; @@ -2270,15 +1851,9 @@ declare module "node:test/reporters" { | { type: "test:start"; data: TestStart } | { type: "test:stderr"; data: TestStderr } | { type: "test:stdout"; data: TestStdout } - | { type: "test:summary"; data: TestSummary } | { type: "test:watch:drained"; data: undefined }; type TestEventGenerator = AsyncGenerator; - interface ReporterConstructorWrapper Transform> { - new(...args: ConstructorParameters): InstanceType; - (...args: ConstructorParameters): InstanceType; - } - /** * The `dot` reporter outputs the test results in a compact format, * where each passing test is represented by a `.`, @@ -2291,14 +1866,13 @@ declare module "node:test/reporters" { * @since v20.0.0 */ function tap(source: TestEventGenerator): AsyncGenerator; - class SpecReporter extends Transform { - constructor(); - } /** * The `spec` reporter outputs the test results in a human-readable format. * @since v20.0.0 */ - const spec: ReporterConstructorWrapper; + class SpecReporter extends Transform { + constructor(); + } /** * The `junit` reporter outputs test results in a jUnit XML format. * @since v21.0.0 @@ -2309,10 +1883,10 @@ declare module "node:test/reporters" { } /** * The `lcov` reporter outputs test coverage when used with the - * [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--experimental-test-coverage) flag. + * [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--experimental-test-coverage) flag. * @since v22.0.0 */ - const lcov: ReporterConstructorWrapper; + const lcov: LcovReporter; - export { dot, junit, lcov, spec, tap, TestEvent }; + export { dot, junit, lcov, SpecReporter as spec, tap, TestEvent }; } diff --git a/node_modules/@types/node/timers.d.ts b/node_modules/@types/node/timers.d.ts index d75788b7..57a8d9f9 100644 --- a/node_modules/@types/node/timers.d.ts +++ b/node_modules/@types/node/timers.d.ts @@ -6,7 +6,7 @@ * The timer functions within Node.js implement a similar API as the timers API * provided by Web Browsers but use a different internal implementation that is * built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout). - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/timers.js) + * @see [source](https://github.com/nodejs/node/blob/v20.x/lib/timers.js) */ declare module "timers" { import { Abortable } from "node:events"; @@ -66,7 +66,6 @@ declare module "timers" { _onImmediate(...args: any[]): void; } // Legacy interface used in Node.js v9 and prior - // TODO: remove in a future major version bump /** @deprecated Use `NodeJS.Timeout` instead. */ interface Timer extends RefCounted { hasRef(): boolean; @@ -182,8 +181,8 @@ declare module "timers" { /** * Schedules repeated execution of `callback` every `delay` milliseconds. * - * When `delay` is larger than `2147483647` or less than `1` or `NaN`, the `delay` - * will be set to `1`. Non-integer delays are truncated to an integer. + * When `delay` is larger than `2147483647` or less than `1`, the `delay` will be + * set to `1`. Non-integer delays are truncated to an integer. * * If `callback` is not a function, a `TypeError` will be thrown. * diff --git a/node_modules/@types/node/timers/promises.d.ts b/node_modules/@types/node/timers/promises.d.ts index 7ad2b297..29d7ff04 100644 --- a/node_modules/@types/node/timers/promises.d.ts +++ b/node_modules/@types/node/timers/promises.d.ts @@ -11,7 +11,7 @@ * } from 'node:timers/promises'; * ``` * @since v15.0.0 - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/timers/promises.js) + * @see [source](https://github.com/nodejs/node/blob/v20.x/lib/timers/promises.js) */ declare module "timers/promises" { import { TimerOptions } from "node:timers"; diff --git a/node_modules/@types/node/tls.d.ts b/node_modules/@types/node/tls.d.ts index b9c4f244..66e915f0 100644 --- a/node_modules/@types/node/tls.d.ts +++ b/node_modules/@types/node/tls.d.ts @@ -6,7 +6,7 @@ * ```js * import tls from 'node:tls'; * ``` - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/tls.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/tls.js) */ declare module "tls" { import { X509Certificate } from "node:crypto"; @@ -797,6 +797,13 @@ declare module "tls" { prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; } + /** + * @deprecated since v0.11.3 Use `tls.TLSSocket` instead. + */ + interface SecurePair { + encrypted: TLSSocket; + cleartext: TLSSocket; + } type SecureVersion = "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1"; interface SecureContextOptions { /** @@ -850,7 +857,6 @@ declare module "tls" { ciphers?: string | undefined; /** * Name of an OpenSSL engine which can provide the client certificate. - * @deprecated */ clientCertEngine?: string | undefined; /** @@ -893,14 +899,12 @@ declare module "tls" { /** * Name of an OpenSSL engine to get private key from. Should be used * together with privateKeyIdentifier. - * @deprecated */ privateKeyEngine?: string | undefined; /** * Identifier of a private key managed by an OpenSSL engine. Should be * used together with privateKeyEngine. Should not be set together with * key, because both options define a private key in different ways. - * @deprecated */ privateKeyIdentifier?: string | undefined; /** @@ -1095,6 +1099,45 @@ declare module "tls" { secureConnectListener?: () => void, ): TLSSocket; function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + /** + * Creates a new secure pair object with two streams, one of which reads and writes + * the encrypted data and the other of which reads and writes the cleartext data. + * Generally, the encrypted stream is piped to/from an incoming encrypted data + * stream and the cleartext one is used as a replacement for the initial encrypted + * stream. + * + * `tls.createSecurePair()` returns a `tls.SecurePair` object with `cleartext` and `encrypted` stream properties. + * + * Using `cleartext` has the same API as {@link TLSSocket}. + * + * The `tls.createSecurePair()` method is now deprecated in favor of`tls.TLSSocket()`. For example, the code: + * + * ```js + * pair = tls.createSecurePair(// ... ); + * pair.encrypted.pipe(socket); + * socket.pipe(pair.encrypted); + * ``` + * + * can be replaced by: + * + * ```js + * secureSocket = tls.TLSSocket(socket, options); + * ``` + * + * where `secureSocket` has the same API as `pair.cleartext`. + * @since v0.3.2 + * @deprecated Since v0.11.3 - Use {@link TLSSocket} instead. + * @param context A secure context object as returned by `tls.createSecureContext()` + * @param isServer `true` to specify that this TLS connection should be opened as a server. + * @param requestCert `true` to specify whether a server should request a certificate from a connecting client. Only applies when `isServer` is `true`. + * @param rejectUnauthorized If not `false` a server automatically reject clients with invalid certificates. Only applies when `isServer` is `true`. + */ + function createSecurePair( + context?: SecureContext, + isServer?: boolean, + requestCert?: boolean, + rejectUnauthorized?: boolean, + ): SecurePair; /** * `{@link createServer}` sets the default value of the `honorCipherOrder` option * to `true`, other APIs that create secure contexts leave it unset. @@ -1120,38 +1163,13 @@ declare module "tls" { * @since v0.11.13 */ function createSecureContext(options?: SecureContextOptions): SecureContext; - /** - * Returns an array containing the CA certificates from various sources, depending on `type`: - * - * * `"default"`: return the CA certificates that will be used by the Node.js TLS clients by default. - * * When `--use-bundled-ca` is enabled (default), or `--use-openssl-ca` is not enabled, - * this would include CA certificates from the bundled Mozilla CA store. - * * When `--use-system-ca` is enabled, this would also include certificates from the system's - * trusted store. - * * When `NODE_EXTRA_CA_CERTS` is used, this would also include certificates loaded from the specified - * file. - * * `"system"`: return the CA certificates that are loaded from the system's trusted store, according - * to rules set by `--use-system-ca`. This can be used to get the certificates from the system - * when `--use-system-ca` is not enabled. - * * `"bundled"`: return the CA certificates from the bundled Mozilla CA store. This would be the same - * as `tls.rootCertificates`. - * * `"extra"`: return the CA certificates loaded from `NODE_EXTRA_CA_CERTS`. It's an empty array if - * `NODE_EXTRA_CA_CERTS` is not set. - * @since v22.15.0 - * @param type The type of CA certificates that will be returned. Valid values - * are `"default"`, `"system"`, `"bundled"` and `"extra"`. - * **Default:** `"default"`. - * @returns An array of PEM-encoded certificates. The array may contain duplicates - * if the same certificate is repeatedly stored in multiple sources. - */ - function getCACertificates(type?: "default" | "system" | "bundled" | "extra"): string[]; /** * Returns an array with the names of the supported TLS ciphers. The names are * lower-case for historical reasons, but must be uppercased to be used in * the `ciphers` option of `{@link createSecureContext}`. * * Not all supported ciphers are enabled by default. See - * [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-v24.x/api/tls.html#modifying-the-default-tls-cipher-suite). + * [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-v20.x/api/tls.html#modifying-the-default-tls-cipher-suite). * * Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for * TLSv1.2 and below. diff --git a/node_modules/@types/node/trace_events.d.ts b/node_modules/@types/node/trace_events.d.ts index 56e46209..6d4aece8 100644 --- a/node_modules/@types/node/trace_events.d.ts +++ b/node_modules/@types/node/trace_events.d.ts @@ -9,8 +9,8 @@ * The available categories are: * * * `node`: An empty placeholder. - * * `node.async_hooks`: Enables capture of detailed [`async_hooks`](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html) trace data. - * The [`async_hooks`](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html) events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property. + * * `node.async_hooks`: Enables capture of detailed [`async_hooks`](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html) trace data. + * The [`async_hooks`](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html) events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property. * * `node.bootstrap`: Enables capture of Node.js bootstrap milestones. * * `node.console`: Enables capture of `console.time()` and `console.count()` output. * * `node.threadpoolwork.sync`: Enables capture of trace data for threadpool synchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`. @@ -22,7 +22,7 @@ * * `node.fs_dir.sync`: Enables capture of trace data for file system sync directory methods. * * `node.fs.async`: Enables capture of trace data for file system async methods. * * `node.fs_dir.async`: Enables capture of trace data for file system async directory methods. - * * `node.perf`: Enables capture of [Performance API](https://nodejs.org/docs/latest-v24.x/api/perf_hooks.html) measurements. + * * `node.perf`: Enables capture of [Performance API](https://nodejs.org/docs/latest-v20.x/api/perf_hooks.html) measurements. * * `node.perf.usertiming`: Enables capture of only Performance API User Timing * measures and marks. * * `node.perf.timerify`: Enables capture of only Performance API timerify @@ -30,7 +30,7 @@ * * `node.promises.rejections`: Enables capture of trace data tracking the number * of unhandled Promise rejections and handled-after-rejections. * * `node.vm.script`: Enables capture of trace data for the `node:vm` module's `runInNewContext()`, `runInContext()`, and `runInThisContext()` methods. - * * `v8`: The [V8](https://nodejs.org/docs/latest-v24.x/api/v8.html) events are GC, compiling, and execution related. + * * `v8`: The [V8](https://nodejs.org/docs/latest-v20.x/api/v8.html) events are GC, compiling, and execution related. * * `node.http`: Enables capture of trace data for http request / response. * * By default the `node`, `node.async_hooks`, and `v8` categories are enabled. @@ -88,9 +88,9 @@ * However the trace-event timestamps are expressed in microseconds, * unlike `process.hrtime()` which returns nanoseconds. * - * The features from this module are not available in [`Worker`](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html#class-worker) threads. + * The features from this module are not available in [`Worker`](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html#class-worker) threads. * @experimental - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/trace_events.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/trace_events.js) */ declare module "trace_events" { /** diff --git a/node_modules/@types/node/ts5.1/compatibility/disposable.d.ts b/node_modules/@types/node/ts5.1/compatibility/disposable.d.ts deleted file mode 100644 index bcedc52b..00000000 --- a/node_modules/@types/node/ts5.1/compatibility/disposable.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -interface SymbolConstructor { - readonly dispose: unique symbol; - readonly asyncDispose: unique symbol; -} - -interface Disposable { - [Symbol.dispose](): void; -} - -interface AsyncDisposable { - [Symbol.asyncDispose](): PromiseLike; -} diff --git a/node_modules/@types/node/ts5.1/index.d.ts b/node_modules/@types/node/ts5.1/index.d.ts deleted file mode 100644 index 1b1f88a5..00000000 --- a/node_modules/@types/node/ts5.1/index.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -/** - * License for programmatically and manually incorporated - * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc - * - * Copyright Node.js contributors. All rights reserved. - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -// NOTE: These definitions support Node.js and TypeScript 5.1. - -// Reference required TypeScript libraries: -/// - -// TypeScript library polyfills required for TypeScript <=5.1: -/// - -// TypeScript library polyfills required for TypeScript <=5.6: -/// - -// Iterator definitions required for compatibility with TypeScript <5.6: -/// - -// Definitions for Node.js modules specific to TypeScript <=5.6: -/// -/// - -// Definitions for Node.js modules that are not specific to any version of TypeScript: -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts b/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts deleted file mode 100644 index f148cc4f..00000000 --- a/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -// Interface declaration for Float16Array, required in @types/node v24+. -// These definitions are specific to TS <=5.6. - -// This needs all of the "common" properties/methods of the TypedArrays, -// otherwise the type unions `TypedArray` and `ArrayBufferView` will be -// empty objects. -interface Float16Array extends Pick { - readonly BYTES_PER_ELEMENT: number; - readonly buffer: ArrayBufferLike; - readonly byteLength: number; - readonly byteOffset: number; - readonly length: number; - readonly [Symbol.toStringTag]: "Float16Array"; - at(index: number): number | undefined; - copyWithin(target: number, start: number, end?: number): this; - every(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): boolean; - fill(value: number, start?: number, end?: number): this; - filter(predicate: (value: number, index: number, array: Float16Array) => any, thisArg?: any): Float16Array; - find(predicate: (value: number, index: number, obj: Float16Array) => boolean, thisArg?: any): number | undefined; - findIndex(predicate: (value: number, index: number, obj: Float16Array) => boolean, thisArg?: any): number; - findLast( - predicate: (value: number, index: number, array: Float16Array) => value is S, - thisArg?: any, - ): S | undefined; - findLast( - predicate: (value: number, index: number, array: Float16Array) => unknown, - thisArg?: any, - ): number | undefined; - findLastIndex(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): number; - forEach(callbackfn: (value: number, index: number, array: Float16Array) => void, thisArg?: any): void; - includes(searchElement: number, fromIndex?: number): boolean; - indexOf(searchElement: number, fromIndex?: number): number; - join(separator?: string): string; - lastIndexOf(searchElement: number, fromIndex?: number): number; - map(callbackfn: (value: number, index: number, array: Float16Array) => number, thisArg?: any): Float16Array; - reduce( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, - ): number; - reduce( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, - initialValue: number, - ): number; - reduce( - callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float16Array) => U, - initialValue: U, - ): U; - reduceRight( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, - ): number; - reduceRight( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, - initialValue: number, - ): number; - reduceRight( - callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float16Array) => U, - initialValue: U, - ): U; - reverse(): Float16Array; - set(array: ArrayLike, offset?: number): void; - slice(start?: number, end?: number): Float16Array; - some(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): boolean; - sort(compareFn?: (a: number, b: number) => number): this; - subarray(begin?: number, end?: number): Float16Array; - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; - toReversed(): Float16Array; - toSorted(compareFn?: (a: number, b: number) => number): Float16Array; - toString(): string; - valueOf(): Float16Array; - with(index: number, value: number): Float16Array; - [index: number]: number; -} diff --git a/node_modules/@types/node/ts5.6/globals.typedarray.d.ts b/node_modules/@types/node/ts5.6/globals.typedarray.d.ts index 255e2048..0e4633b9 100644 --- a/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +++ b/node_modules/@types/node/ts5.6/globals.typedarray.d.ts @@ -12,7 +12,6 @@ declare global { | Int32Array | BigUint64Array | BigInt64Array - | Float16Array | Float32Array | Float64Array; type ArrayBufferView = TypedArray | DataView; diff --git a/node_modules/@types/node/ts5.6/index.d.ts b/node_modules/@types/node/ts5.6/index.d.ts index b98cc67d..886b8a84 100644 --- a/node_modules/@types/node/ts5.6/index.d.ts +++ b/node_modules/@types/node/ts5.6/index.d.ts @@ -22,19 +22,15 @@ * IN THE SOFTWARE. */ -// NOTE: These definitions support Node.js and TypeScript 5.2 through 5.6. +// NOTE: These definitions support Node.js and TypeScript 4.9 through 5.6. -// Reference required TypeScript libraries: +// Reference required TypeScript libs: /// -/// -// TypeScript library polyfills required for TypeScript <=5.6: -/// +// TypeScript backwards-compatibility definitions: +/// -// Iterator definitions required for compatibility with TypeScript <5.6: -/// - -// Definitions for Node.js modules specific to TypeScript <=5.6: +// Definitions specific to TypeScript 4.9 through 5.6: /// /// @@ -75,7 +71,6 @@ /// /// /// -/// /// /// /// diff --git a/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts b/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts deleted file mode 100644 index 110b1ebb..00000000 --- a/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -// Interface declaration for Float16Array, required in @types/node v24+. -// These definitions are specific to TS 5.7. - -// This needs all of the "common" properties/methods of the TypedArrays, -// otherwise the type unions `TypedArray` and `ArrayBufferView` will be -// empty objects. -interface Float16Array { - readonly BYTES_PER_ELEMENT: number; - readonly buffer: TArrayBuffer; - readonly byteLength: number; - readonly byteOffset: number; - readonly length: number; - readonly [Symbol.toStringTag]: "Float16Array"; - at(index: number): number | undefined; - copyWithin(target: number, start: number, end?: number): this; - entries(): ArrayIterator<[number, number]>; - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - fill(value: number, start?: number, end?: number): this; - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float16Array; - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - findLast( - predicate: (value: number, index: number, array: this) => value is S, - thisArg?: any, - ): S | undefined; - findLast(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): number | undefined; - findLastIndex(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): number; - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - includes(searchElement: number, fromIndex?: number): boolean; - indexOf(searchElement: number, fromIndex?: number): number; - join(separator?: string): string; - keys(): ArrayIterator; - lastIndexOf(searchElement: number, fromIndex?: number): number; - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float16Array; - reduce( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, - ): number; - reduce( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, - initialValue: number, - ): number; - reduce( - callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, - initialValue: U, - ): U; - reduceRight( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, - ): number; - reduceRight( - callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, - initialValue: number, - ): number; - reduceRight( - callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, - initialValue: U, - ): U; - reverse(): this; - set(array: ArrayLike, offset?: number): void; - slice(start?: number, end?: number): Float16Array; - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - sort(compareFn?: (a: number, b: number) => number): this; - subarray(begin?: number, end?: number): Float16Array; - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; - toReversed(): Float16Array; - toSorted(compareFn?: (a: number, b: number) => number): Float16Array; - toString(): string; - valueOf(): this; - values(): ArrayIterator; - with(index: number, value: number): Float16Array; - [Symbol.iterator](): ArrayIterator; - [index: number]: number; -} diff --git a/node_modules/@types/node/ts5.7/index.d.ts b/node_modules/@types/node/ts5.7/index.d.ts deleted file mode 100644 index 9793c72e..00000000 --- a/node_modules/@types/node/ts5.7/index.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -/** - * License for programmatically and manually incorporated - * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc - * - * Copyright Node.js contributors. All rights reserved. - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -// NOTE: These definitions support Node.js and TypeScript 5.7. - -// Reference required TypeScript libraries: -/// -/// - -// TypeScript library polyfills required for TypeScript 5.7: -/// - -// Iterator definitions required for compatibility with TypeScript <5.6: -/// - -// Definitions for Node.js modules specific to TypeScript 5.7+: -/// -/// - -// Definitions for Node.js modules that are not specific to any version of TypeScript: -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/node_modules/@types/node/tty.d.ts b/node_modules/@types/node/tty.d.ts index 602324ab..d4b93139 100644 --- a/node_modules/@types/node/tty.d.ts +++ b/node_modules/@types/node/tty.d.ts @@ -21,7 +21,7 @@ * * In most cases, there should be little to no reason for an application to * manually create instances of the `tty.ReadStream` and `tty.WriteStream` classes. - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/tty.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/tty.js) */ declare module "tty" { import * as net from "node:net"; diff --git a/node_modules/@types/node/url.d.ts b/node_modules/@types/node/url.d.ts index 9fcdfd55..4bbfd6b6 100644 --- a/node_modules/@types/node/url.d.ts +++ b/node_modules/@types/node/url.d.ts @@ -5,7 +5,7 @@ * ```js * import url from 'node:url'; * ``` - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/url.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/url.js) */ declare module "url" { import { Blob as NodeBlob } from "node:buffer"; @@ -50,18 +50,10 @@ declare module "url" { /** * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default. * @default undefined - * @since v22.1.0 - */ - windows?: boolean | undefined; - } - interface PathToFileUrlOptions { - /** - * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default. - * @default undefined - * @since v22.1.0 */ windows?: boolean | undefined; } + interface PathToFileUrlOptions extends FileUrlToPathOptions {} /** * The `url.parse()` method takes a URL string, parses it, and returns a URL * object. @@ -420,12 +412,14 @@ declare module "url" { * Threads, `Blob` objects registered within one Worker will not be available * to other workers or the main thread. * @since v16.7.0 + * @experimental */ static createObjectURL(blob: NodeBlob): string; /** * Removes the stored `Blob` identified by the given ID. Attempting to revoke a * ID that isn't registered will silently fail. * @since v16.7.0 + * @experimental * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`. */ static revokeObjectURL(id: string): void; @@ -449,7 +443,7 @@ declare module "url" { * @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is * `converted to a string` first. * @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first. - * @since v22.1.0 + * @since v20.18.0 */ static parse(input: string, base?: string): URL | null; constructor(input: string | { toString: () => string }, base?: string | URL); @@ -755,45 +749,6 @@ declare module "url" { */ toJSON(): string; } - interface URLPatternComponentResult { - input: string; - groups: Record; - } - interface URLPatternInit { - protocol?: string; - username?: string; - password?: string; - hostname?: string; - port?: string; - pathname?: string; - search?: string; - hash?: string; - baseURL?: string; - } - interface URLPatternOptions { - ignoreCase?: boolean; - } - interface URLPatternResult { - inputs: (string | URLPatternInit)[]; - protocol: URLPatternComponentResult; - username: URLPatternComponentResult; - password: URLPatternComponentResult; - hostname: URLPatternComponentResult; - port: URLPatternComponentResult; - pathname: URLPatternComponentResult; - search: URLPatternComponentResult; - hash: URLPatternComponentResult; - } - /** - * @since v23.8.0 - * @experimental - */ - class URLPattern { - constructor(input: string | URLPatternInit, baseURL: string, options?: URLPatternOptions); - constructor(input?: string | URLPatternInit, options?: URLPatternOptions); - exec(input: string | URLPatternInit, baseURL?: string): URLPatternResult | null; - test(input: string | URLPatternInit, baseURL?: string): boolean; - } interface URLSearchParamsIterator extends NodeJS.Iterator { [Symbol.iterator](): URLSearchParamsIterator; } @@ -974,30 +929,34 @@ declare module "url" { values(): URLSearchParamsIterator; [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; } - import { - URL as _URL, - URLPattern as _URLPattern, - URLPatternInit as _URLPatternInit, - URLPatternResult as _URLPatternResult, - URLSearchParams as _URLSearchParams, - } from "url"; + import { URL as _URL, URLSearchParams as _URLSearchParams } from "url"; global { + interface URLSearchParams extends _URLSearchParams {} interface URL extends _URL {} + interface Global { + URL: typeof _URL; + URLSearchParams: typeof _URLSearchParams; + } + /** + * `URL` class is a global reference for `import { URL } from 'node:url'` + * https://nodejs.org/api/url.html#the-whatwg-url-api + * @since v10.0.0 + */ var URL: typeof globalThis extends { onmessage: any; URL: infer T; } ? T : typeof _URL; - interface URLSearchParams extends _URLSearchParams {} + /** + * `URLSearchParams` class is a global reference for `import { URLSearchParams } from 'node:url'` + * https://nodejs.org/api/url.html#class-urlsearchparams + * @since v10.0.0 + */ var URLSearchParams: typeof globalThis extends { onmessage: any; URLSearchParams: infer T; } ? T : typeof _URLSearchParams; - interface URLPatternInit extends _URLPatternInit {} - interface URLPatternResult extends _URLPatternResult {} - interface URLPattern extends _URLPattern {} - var URLPattern: typeof _URLPattern; } } declare module "node:url" { diff --git a/node_modules/@types/node/util.d.ts b/node_modules/@types/node/util.d.ts index c1eb7a0f..3e898931 100644 --- a/node_modules/@types/node/util.d.ts +++ b/node_modules/@types/node/util.d.ts @@ -6,7 +6,7 @@ * ```js * import util from 'node:util'; * ``` - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/util.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/util.js) */ declare module "util" { import * as types from "node:util/types"; @@ -108,83 +108,6 @@ declare module "util" { export interface InspectOptionsStylized extends InspectOptions { stylize(text: string, styleType: Style): string; } - export interface CallSiteObject { - /** - * Returns the name of the function associated with this call site. - */ - functionName: string; - /** - * Returns the name of the resource that contains the script for the - * function for this call site. - */ - scriptName: string; - /** - * Returns the unique id of the script, as in Chrome DevTools protocol - * [`Runtime.ScriptId`](https://chromedevtools.github.io/devtools-protocol/1-3/Runtime/#type-ScriptId). - * @since v22.14.0 - */ - scriptId: string; - /** - * Returns the number, 1-based, of the line for the associate function call. - */ - lineNumber: number; - /** - * Returns the 1-based column offset on the line for the associated function call. - */ - columnNumber: number; - } - export type DiffEntry = [operation: -1 | 0 | 1, value: string]; - /** - * `util.diff()` compares two string or array values and returns an array of difference entries. - * It uses the Myers diff algorithm to compute minimal differences, which is the same algorithm - * used internally by assertion error messages. - * - * If the values are equal, an empty array is returned. - * - * ```js - * const { diff } = require('node:util'); - * - * // Comparing strings - * const actualString = '12345678'; - * const expectedString = '12!!5!7!'; - * console.log(diff(actualString, expectedString)); - * // [ - * // [0, '1'], - * // [0, '2'], - * // [1, '3'], - * // [1, '4'], - * // [-1, '!'], - * // [-1, '!'], - * // [0, '5'], - * // [1, '6'], - * // [-1, '!'], - * // [0, '7'], - * // [1, '8'], - * // [-1, '!'], - * // ] - * // Comparing arrays - * const actualArray = ['1', '2', '3']; - * const expectedArray = ['1', '3', '4']; - * console.log(diff(actualArray, expectedArray)); - * // [ - * // [0, '1'], - * // [1, '2'], - * // [0, '3'], - * // [-1, '4'], - * // ] - * // Equal values return empty array - * console.log(diff('same', 'same')); - * // [] - * ``` - * @since v22.15.0 - * @experimental - * @param actual The first value to compare - * @param expected The second value to compare - * @returns An array of difference entries. Each entry is an array with two elements: - * * Index 0: `number` Operation code: `-1` for delete, `0` for no-op/unchanged, `1` for insert - * * Index 1: `string` The value associated with the operation - */ - export function diff(actual: string | readonly string[], expected: string | readonly string[]): DiffEntry[]; /** * The `util.format()` method returns a formatted string using the first argument * as a `printf`-like format string which can contain zero or more format @@ -243,87 +166,6 @@ declare module "util" { * @since v10.0.0 */ export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string; - interface GetCallSitesOptions { - /** - * Reconstruct the original location in the stacktrace from the source-map. - * Enabled by default with the flag `--enable-source-maps`. - */ - sourceMap?: boolean | undefined; - } - /** - * Returns an array of call site objects containing the stack of - * the caller function. - * - * ```js - * import { getCallSites } from 'node:util'; - * - * function exampleFunction() { - * const callSites = getCallSites(); - * - * console.log('Call Sites:'); - * callSites.forEach((callSite, index) => { - * console.log(`CallSite ${index + 1}:`); - * console.log(`Function Name: ${callSite.functionName}`); - * console.log(`Script Name: ${callSite.scriptName}`); - * console.log(`Line Number: ${callSite.lineNumber}`); - * console.log(`Column Number: ${callSite.column}`); - * }); - * // CallSite 1: - * // Function Name: exampleFunction - * // Script Name: /home/example.js - * // Line Number: 5 - * // Column Number: 26 - * - * // CallSite 2: - * // Function Name: anotherFunction - * // Script Name: /home/example.js - * // Line Number: 22 - * // Column Number: 3 - * - * // ... - * } - * - * // A function to simulate another stack layer - * function anotherFunction() { - * exampleFunction(); - * } - * - * anotherFunction(); - * ``` - * - * It is possible to reconstruct the original locations by setting the option `sourceMap` to `true`. - * If the source map is not available, the original location will be the same as the current location. - * When the `--enable-source-maps` flag is enabled, for example when using `--experimental-transform-types`, - * `sourceMap` will be true by default. - * - * ```ts - * import { getCallSites } from 'node:util'; - * - * interface Foo { - * foo: string; - * } - * - * const callSites = getCallSites({ sourceMap: true }); - * - * // With sourceMap: - * // Function Name: '' - * // Script Name: example.js - * // Line Number: 7 - * // Column Number: 26 - * - * // Without sourceMap: - * // Function Name: '' - * // Script Name: example.js - * // Line Number: 2 - * // Column Number: 26 - * ``` - * @param frameCount Number of frames to capture as call site objects. - * **Default:** `10`. Allowable range is between 1 and 200. - * @return An array of call site objects - * @since v22.9.0 - */ - export function getCallSites(frameCount?: number, options?: GetCallSitesOptions): CallSiteObject[]; - export function getCallSites(options: GetCallSitesOptions): CallSiteObject[]; /** * Returns the string name for a numeric error code that comes from a Node.js API. * The mapping between error codes and error names is platform-dependent. @@ -354,19 +196,18 @@ declare module "util" { */ export function getSystemErrorMap(): Map; /** - * Returns the string message for a numeric error code that comes from a Node.js - * API. - * The mapping between error codes and string messages is platform-dependent. + * The `util.log()` method prints the given `string` to `stdout` with an included + * timestamp. * * ```js - * fs.access('file/that/does/not/exist', (err) => { - * const message = util.getSystemErrorMessage(err.errno); - * console.error(message); // no such file or directory - * }); + * import util from 'node:util'; + * + * util.log('Timestamped message.'); * ``` - * @since v22.12.0 + * @since v0.3.0 + * @deprecated Since v6.0.0 - Use a third party module instead. */ - export function getSystemErrorMessage(err: number): string; + export function log(string: string): void; /** * Returns the `string` after replacing any surrogate code points * (or equivalently, any unpaired surrogate code units) with the @@ -378,6 +219,7 @@ declare module "util" { * Creates and returns an `AbortController` instance whose `AbortSignal` is marked * as transferable and can be used with `structuredClone()` or `postMessage()`. * @since v18.11.0 + * @experimental * @returns A transferable AbortController */ export function transferableAbortController(): AbortController; @@ -390,48 +232,40 @@ declare module "util" { * channel.port2.postMessage(signal, [signal]); * ``` * @since v18.11.0 + * @experimental * @param signal The AbortSignal * @returns The same AbortSignal */ export function transferableAbortSignal(signal: AbortSignal): AbortSignal; /** - * Listens to abort event on the provided `signal` and returns a promise that resolves when the `signal` is aborted. - * If `resource` is provided, it weakly references the operation's associated object, - * so if `resource` is garbage collected before the `signal` aborts, - * then returned promise shall remain pending. - * This prevents memory leaks in long-running or non-cancelable operations. + * Listens to abort event on the provided `signal` and + * returns a promise that is fulfilled when the `signal` is + * aborted. If the passed `resource` is garbage collected before the `signal` is + * aborted, the returned promise shall remain pending indefinitely. * * ```js * import { aborted } from 'node:util'; * - * // Obtain an object with an abortable signal, like a custom resource or operation. * const dependent = obtainSomethingAbortable(); * - * // Pass `dependent` as the resource, indicating the promise should only resolve - * // if `dependent` is still in memory when the signal is aborted. * aborted(dependent.signal, dependent).then(() => { - * // This code runs when `dependent` is aborted. - * console.log('Dependent resource was aborted.'); + * // Do something when dependent is aborted. * }); * - * // Simulate an event that triggers the abort. * dependent.on('event', () => { - * dependent.abort(); // This will cause the `aborted` promise to resolve. + * dependent.abort(); * }); * ``` * @since v19.7.0 - * @param resource Any non-null object tied to the abortable operation and held weakly. - * If `resource` is garbage collected before the `signal` aborts, the promise remains pending, - * allowing Node.js to stop tracking it. - * This helps prevent memory leaks in long-running or non-cancelable operations. + * @experimental + * @param resource Any non-null entity, reference to which is held weakly. */ export function aborted(signal: AbortSignal, resource: any): Promise; /** * The `util.inspect()` method returns a string representation of `object` that is * intended for debugging. The output of `util.inspect` may change at any time * and should not be depended upon programmatically. Additional `options` may be - * passed that alter the result. - * `util.inspect()` will use the constructor's name and/or `@@toStringTag` to make + * passed that alter the result. `util.inspect()` will use the constructor's name and/or `@@toStringTag` to make * an identifiable tag for an inspected value. * * ```js @@ -479,7 +313,7 @@ declare module "util" { * The following example highlights the effect of the `compact` option: * * ```js - * import { inspect } from 'node:util'; + * import util from 'node:util'; * * const o = { * a: [1, 2, [[ @@ -489,7 +323,7 @@ declare module "util" { * 'foo']], 4], * b: new Map([['za', 1], ['zb', 'test']]), * }; - * console.log(inspect(o, { compact: true, depth: 5, breakLength: 80 })); + * console.log(util.inspect(o, { compact: true, depth: 5, breakLength: 80 })); * * // { a: * // [ 1, @@ -501,7 +335,7 @@ declare module "util" { * // b: Map(2) { 'za' => 1, 'zb' => 'test' } } * * // Setting `compact` to false or an integer creates more reader friendly output. - * console.log(inspect(o, { compact: false, depth: 5, breakLength: 80 })); + * console.log(util.inspect(o, { compact: false, depth: 5, breakLength: 80 })); * * // { * // a: [ @@ -528,10 +362,11 @@ declare module "util" { * // single line. * ``` * - * The `showHidden` option allows `WeakMap` and `WeakSet` entries to be + * The `showHidden` option allows [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) and + * [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries to be * inspected. If there are more entries than `maxArrayLength`, there is no - * guarantee which entries are displayed. That means retrieving the same - * `WeakSet` entries twice may result in different output. Furthermore, entries + * guarantee which entries are displayed. That means retrieving the same [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries twice may + * result in different output. Furthermore, entries * with no remaining strong references may be garbage collected at any time. * * ```js @@ -579,10 +414,10 @@ declare module "util" { * ```js * import { inspect } from 'node:util'; * - * const thousand = 1000; - * const million = 1000000; - * const bigNumber = 123456789n; - * const bigDecimal = 1234.12345; + * const thousand = 1_000; + * const million = 1_000_000; + * const bigNumber = 123_456_789n; + * const bigDecimal = 1_234.123_45; * * console.log(inspect(thousand, { numericSeparator: true })); * // 1_000 @@ -638,23 +473,84 @@ declare module "util" { */ export function isArray(object: unknown): object is unknown[]; /** - * Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and - * `extends` keywords to get language level inheritance support. Also note + * Returns `true` if the given `object` is a `RegExp`. Otherwise, returns `false`. + * + * ```js + * import util from 'node:util'; + * + * util.isRegExp(/some regexp/); + * // Returns: true + * util.isRegExp(new RegExp('another regexp')); + * // Returns: true + * util.isRegExp({}); + * // Returns: false + * ``` + * @since v0.6.0 + * @deprecated Since v4.0.0 - Deprecated + */ + export function isRegExp(object: unknown): object is RegExp; + /** + * Returns `true` if the given `object` is a `Date`. Otherwise, returns `false`. + * + * ```js + * import util from 'node:util'; + * + * util.isDate(new Date()); + * // Returns: true + * util.isDate(Date()); + * // false (without 'new' returns a String) + * util.isDate({}); + * // Returns: false + * ``` + * @since v0.6.0 + * @deprecated Since v4.0.0 - Use {@link types.isDate} instead. + */ + export function isDate(object: unknown): object is Date; + /** + * Returns `true` if the given `object` is an `Error`. Otherwise, returns `false`. + * + * ```js + * import util from 'node:util'; + * + * util.isError(new Error()); + * // Returns: true + * util.isError(new TypeError()); + * // Returns: true + * util.isError({ name: 'Error', message: 'an error occurred' }); + * // Returns: false + * ``` + * + * This method relies on `Object.prototype.toString()` behavior. It is + * possible to obtain an incorrect result when the `object` argument manipulates `@@toStringTag`. + * + * ```js + * import util from 'node:util'; + * const obj = { name: 'Error', message: 'an error occurred' }; + * + * util.isError(obj); + * // Returns: false + * obj[Symbol.toStringTag] = 'Error'; + * util.isError(obj); + * // Returns: true + * ``` + * @since v0.6.0 + * @deprecated Since v4.0.0 - Use {@link types.isNativeError} instead. + */ + export function isError(object: unknown): object is Error; + /** + * Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and `extends` keywords to get language level inheritance support. Also note * that the two styles are [semantically incompatible](https://github.com/nodejs/node/issues/4179). * - * Inherit the prototype methods from one - * [constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) into another. The - * prototype of `constructor` will be set to a new object created from - * `superConstructor`. + * Inherit the prototype methods from one [constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) into another. The + * prototype of `constructor` will be set to a new object created from `superConstructor`. * - * This mainly adds some input validation on top of - * `Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`. + * This mainly adds some input validation on top of`Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`. * As an additional convenience, `superConstructor` will be accessible * through the `constructor.super_` property. * * ```js - * const util = require('node:util'); - * const EventEmitter = require('node:events'); + * import util from 'node:util'; + * import EventEmitter from 'node:events'; * * function MyStream() { * EventEmitter.call(this); @@ -701,42 +597,18 @@ declare module "util" { export function inherits(constructor: unknown, superConstructor: unknown): void; export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void; export interface DebugLogger extends DebugLoggerFunction { - /** - * The `util.debuglog().enabled` getter is used to create a test that can be used - * in conditionals based on the existence of the `NODE_DEBUG` environment variable. - * If the `section` name appears within the value of that environment variable, - * then the returned value will be `true`. If not, then the returned value will be - * `false`. - * - * ```js - * import { debuglog } from 'node:util'; - * const enabled = debuglog('foo').enabled; - * if (enabled) { - * console.log('hello from foo [%d]', 123); - * } - * ``` - * - * If this program is run with `NODE_DEBUG=foo` in the environment, then it will - * output something like: - * - * ```console - * hello from foo [123] - * ``` - */ enabled: boolean; } /** * The `util.debuglog()` method is used to create a function that conditionally - * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG` - * environment variable. If the `section` name appears within the value of that - * environment variable, then the returned function operates similar to - * `console.error()`. If not, then the returned function is a no-op. + * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG`environment variable. If the `section` name appears within the value of that + * environment variable, then the returned function operates similar to `console.error()`. If not, then the returned function is a no-op. * * ```js - * import { debuglog } from 'node:util'; - * const log = debuglog('foo'); + * import util from 'node:util'; + * const debuglog = util.debuglog('foo'); * - * log('hello from foo [%d]', 123); + * debuglog('hello from foo [%d]', 123); * ``` * * If this program is run with `NODE_DEBUG=foo` in the environment, then @@ -752,10 +624,10 @@ declare module "util" { * The `section` supports wildcard also: * * ```js - * import { debuglog } from 'node:util'; - * const log = debuglog('foo'); + * import util from 'node:util'; + * const debuglog = util.debuglog('foo-bar'); * - * log('hi there, it\'s foo-bar [%d]', 2333); + * debuglog('hi there, it\'s foo-bar [%d]', 2333); * ``` * * if it is run with `NODE_DEBUG=foo*` in the environment, then it will output @@ -765,19 +637,18 @@ declare module "util" { * FOO-BAR 3257: hi there, it's foo-bar [2333] * ``` * - * Multiple comma-separated `section` names may be specified in the `NODE_DEBUG` - * environment variable: `NODE_DEBUG=fs,net,tls`. + * Multiple comma-separated `section` names may be specified in the `NODE_DEBUG`environment variable: `NODE_DEBUG=fs,net,tls`. * * The optional `callback` argument can be used to replace the logging function * with a different function that doesn't have any initialization or * unnecessary wrapping. * * ```js - * import { debuglog } from 'node:util'; - * let log = debuglog('internals', (debug) => { + * import util from 'node:util'; + * let debuglog = util.debuglog('internals', (debug) => { * // Replace with a logging function that optimizes out * // testing if the section is enabled - * log = debug; + * debuglog = debug; * }); * ``` * @since v0.11.3 @@ -786,21 +657,231 @@ declare module "util" { * @return The logging function */ export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger; - export { debuglog as debug }; + export const debug: typeof debuglog; + /** + * Returns `true` if the given `object` is a `Boolean`. Otherwise, returns `false`. + * + * ```js + * import util from 'node:util'; + * + * util.isBoolean(1); + * // Returns: false + * util.isBoolean(0); + * // Returns: false + * util.isBoolean(false); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'boolean'` instead. + */ + export function isBoolean(object: unknown): object is boolean; + /** + * Returns `true` if the given `object` is a `Buffer`. Otherwise, returns `false`. + * + * ```js + * import util from 'node:util'; + * + * util.isBuffer({ length: 0 }); + * // Returns: false + * util.isBuffer([]); + * // Returns: false + * util.isBuffer(Buffer.from('hello world')); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `isBuffer` instead. + */ + export function isBuffer(object: unknown): object is Buffer; + /** + * Returns `true` if the given `object` is a `Function`. Otherwise, returns `false`. + * + * ```js + * import util from 'node:util'; + * + * function Foo() {} + * const Bar = () => {}; + * + * util.isFunction({}); + * // Returns: false + * util.isFunction(Foo); + * // Returns: true + * util.isFunction(Bar); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'function'` instead. + */ + export function isFunction(object: unknown): boolean; + /** + * Returns `true` if the given `object` is strictly `null`. Otherwise, returns`false`. + * + * ```js + * import util from 'node:util'; + * + * util.isNull(0); + * // Returns: false + * util.isNull(undefined); + * // Returns: false + * util.isNull(null); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `value === null` instead. + */ + export function isNull(object: unknown): object is null; + /** + * Returns `true` if the given `object` is `null` or `undefined`. Otherwise, + * returns `false`. + * + * ```js + * import util from 'node:util'; + * + * util.isNullOrUndefined(0); + * // Returns: false + * util.isNullOrUndefined(undefined); + * // Returns: true + * util.isNullOrUndefined(null); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `value === undefined || value === null` instead. + */ + export function isNullOrUndefined(object: unknown): object is null | undefined; + /** + * Returns `true` if the given `object` is a `Number`. Otherwise, returns `false`. + * + * ```js + * import util from 'node:util'; + * + * util.isNumber(false); + * // Returns: false + * util.isNumber(Infinity); + * // Returns: true + * util.isNumber(0); + * // Returns: true + * util.isNumber(NaN); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'number'` instead. + */ + export function isNumber(object: unknown): object is number; + /** + * Returns `true` if the given `object` is strictly an `Object`**and** not a`Function` (even though functions are objects in JavaScript). + * Otherwise, returns `false`. + * + * ```js + * import util from 'node:util'; + * + * util.isObject(5); + * // Returns: false + * util.isObject(null); + * // Returns: false + * util.isObject({}); + * // Returns: true + * util.isObject(() => {}); + * // Returns: false + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `value !== null && typeof value === 'object'` instead. + */ + export function isObject(object: unknown): boolean; + /** + * Returns `true` if the given `object` is a primitive type. Otherwise, returns`false`. + * + * ```js + * import util from 'node:util'; + * + * util.isPrimitive(5); + * // Returns: true + * util.isPrimitive('foo'); + * // Returns: true + * util.isPrimitive(false); + * // Returns: true + * util.isPrimitive(null); + * // Returns: true + * util.isPrimitive(undefined); + * // Returns: true + * util.isPrimitive({}); + * // Returns: false + * util.isPrimitive(() => {}); + * // Returns: false + * util.isPrimitive(/^$/); + * // Returns: false + * util.isPrimitive(new Date()); + * // Returns: false + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead. + */ + export function isPrimitive(object: unknown): boolean; + /** + * Returns `true` if the given `object` is a `string`. Otherwise, returns `false`. + * + * ```js + * import util from 'node:util'; + * + * util.isString(''); + * // Returns: true + * util.isString('foo'); + * // Returns: true + * util.isString(String('foo')); + * // Returns: true + * util.isString(5); + * // Returns: false + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'string'` instead. + */ + export function isString(object: unknown): object is string; + /** + * Returns `true` if the given `object` is a `Symbol`. Otherwise, returns `false`. + * + * ```js + * import util from 'node:util'; + * + * util.isSymbol(5); + * // Returns: false + * util.isSymbol('foo'); + * // Returns: false + * util.isSymbol(Symbol('foo')); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'symbol'` instead. + */ + export function isSymbol(object: unknown): object is symbol; + /** + * Returns `true` if the given `object` is `undefined`. Otherwise, returns `false`. + * + * ```js + * import util from 'node:util'; + * + * const foo = undefined; + * util.isUndefined(5); + * // Returns: false + * util.isUndefined(foo); + * // Returns: true + * util.isUndefined(null); + * // Returns: false + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `value === undefined` instead. + */ + export function isUndefined(object: unknown): object is undefined; /** * The `util.deprecate()` method wraps `fn` (which may be a function or class) in * such a way that it is marked as deprecated. * * ```js - * import { deprecate } from 'node:util'; + * import util from 'node:util'; * - * export const obsoleteFunction = deprecate(() => { + * exports.obsoleteFunction = util.deprecate(() => { * // Do something here. * }, 'obsoleteFunction() is deprecated. Use newShinyFunction() instead.'); * ``` * - * When called, `util.deprecate()` will return a function that will emit a - * `DeprecationWarning` using the `'warning'` event. The warning will + * When called, `util.deprecate()` will return a function that will emit a `DeprecationWarning` using the `'warning'` event. The warning will * be emitted and printed to `stderr` the first time the returned function is * called. After the warning is emitted, the wrapped function is called without * emitting a warning. @@ -809,24 +890,16 @@ declare module "util" { * the warning will be emitted only once for that `code`. * * ```js - * import { deprecate } from 'node:util'; + * import util from 'node:util'; * - * const fn1 = deprecate( - * () => 'a value', - * 'deprecation message', - * 'DEP0001', - * ); - * const fn2 = deprecate( - * () => 'a different value', - * 'other dep message', - * 'DEP0001', - * ); + * const fn1 = util.deprecate(someFunction, someMessage, 'DEP0001'); + * const fn2 = util.deprecate(someOtherFunction, someOtherMessage, 'DEP0001'); * fn1(); // Emits a deprecation warning with code DEP0001 * fn2(); // Does not emit a deprecation warning because it has the same code * ``` * * If either the `--no-deprecation` or `--no-warnings` command-line flags are - * used, or if the `process.noDeprecation` property is set to `true` _prior_ to + * used, or if the `process.noDeprecation` property is set to `true`_prior_ to * the first deprecation warning, the `util.deprecate()` method does nothing. * * If the `--trace-deprecation` or `--trace-warnings` command-line flags are set, @@ -834,13 +907,10 @@ declare module "util" { * stack trace are printed to `stderr` the first time the deprecated function is * called. * - * If the `--throw-deprecation` command-line flag is set, or the - * `process.throwDeprecation` property is set to `true`, then an exception will be + * If the `--throw-deprecation` command-line flag is set, or the `process.throwDeprecation` property is set to `true`, then an exception will be * thrown when the deprecated function is called. * - * The `--throw-deprecation` command-line flag and `process.throwDeprecation` - * property take precedence over `--trace-deprecation` and - * `process.traceDeprecation`. + * The `--throw-deprecation` command-line flag and `process.throwDeprecation` property take precedence over `--trace-deprecation` and `process.traceDeprecation`. * @since v0.8.0 * @param fn The function that is being deprecated. * @param msg A warning message to display when the deprecated function is invoked. @@ -871,16 +941,15 @@ declare module "util" { * Takes an `async` function (or a function that returns a `Promise`) and returns a * function following the error-first callback style, i.e. taking * an `(err, value) => ...` callback as the last argument. In the callback, the - * first argument will be the rejection reason (or `null` if the `Promise` - * resolved), and the second argument will be the resolved value. + * first argument will be the rejection reason (or `null` if the `Promise` resolved), and the second argument will be the resolved value. * * ```js - * import { callbackify } from 'node:util'; + * import util from 'node:util'; * * async function fn() { * return 'hello world'; * } - * const callbackFunction = callbackify(fn); + * const callbackFunction = util.callbackify(fn); * * callbackFunction((err, ret) => { * if (err) throw err; @@ -895,13 +964,11 @@ declare module "util" { * ``` * * The callback is executed asynchronously, and will have a limited stack trace. - * If the callback throws, the process will emit an `'uncaughtException'` - * event, and if not handled will exit. + * If the callback throws, the process will emit an `'uncaughtException'` event, and if not handled will exit. * * Since `null` has a special meaning as the first argument to a callback, if a * wrapped function rejects a `Promise` with a falsy value as a reason, the value - * is wrapped in an `Error` with the original value stored in a field named - * `reason`. + * is wrapped in an `Error` with the original value stored in a field named `reason`. * * ```js * function fn() { @@ -912,7 +979,7 @@ declare module "util" { * callbackFunction((err, ret) => { * // When the Promise was rejected with `null` it is wrapped with an Error and * // the original value is stored in `reason`. - * err && Object.hasOwn(err, 'reason') && err.reason === null; // true + * err && Object.hasOwn(err, 'reason') && err.reason === null; // true * }); * ``` * @since v8.2.0 @@ -1003,11 +1070,11 @@ declare module "util" { * that returns promises. * * ```js - * import { promisify } from 'node:util'; - * import { stat } from 'node:fs'; + * import util from 'node:util'; + * import fs from 'node:fs'; * - * const promisifiedStat = promisify(stat); - * promisifiedStat('.').then((stats) => { + * const stat = util.promisify(fs.stat); + * stat('.').then((stats) => { * // Do something with `stats` * }).catch((error) => { * // Handle the error. @@ -1017,25 +1084,23 @@ declare module "util" { * Or, equivalently using `async function`s: * * ```js - * import { promisify } from 'node:util'; - * import { stat } from 'node:fs'; + * import util from 'node:util'; + * import fs from 'node:fs'; * - * const promisifiedStat = promisify(stat); + * const stat = util.promisify(fs.stat); * * async function callStat() { - * const stats = await promisifiedStat('.'); + * const stats = await stat('.'); * console.log(`This directory is owned by ${stats.uid}`); * } * * callStat(); * ``` * - * If there is an `original[util.promisify.custom]` property present, `promisify` - * will return its value, see [Custom promisified functions](https://nodejs.org/docs/latest-v24.x/api/util.html#custom-promisified-functions). + * If there is an `original[util.promisify.custom]` property present, `promisify` will return its value, see `Custom promisified functions`. * * `promisify()` assumes that `original` is a function taking a callback as its - * final argument in all cases. If `original` is not a function, `promisify()` - * will throw an error. If `original` is a function but its last argument is not + * final argument in all cases. If `original` is not a function, `promisify()` will throw an error. If `original` is a function but its last argument is not * an error-first callback, it will still be passed an error-first * callback as its last argument. * @@ -1043,7 +1108,7 @@ declare module "util" { * work as expected unless handled specially: * * ```js - * import { promisify } from 'node:util'; + * import util from 'node:util'; * * class Foo { * constructor() { @@ -1057,8 +1122,8 @@ declare module "util" { * * const foo = new Foo(); * - * const naiveBar = promisify(foo.bar); - * // TypeError: Cannot read properties of undefined (reading 'a') + * const naiveBar = util.promisify(foo.bar); + * // TypeError: Cannot read property 'a' of undefined * // naiveBar().then(a => console.log(a)); * * naiveBar.call(foo).then((a) => console.log(a)); // '42' @@ -1189,29 +1254,17 @@ declare module "util" { stream?: NodeJS.WritableStream | undefined; } /** - * This function returns a formatted text considering the `format` passed - * for printing in a terminal. It is aware of the terminal's capabilities - * and acts according to the configuration set via `NO_COLOR`, - * `NODE_DISABLE_COLORS` and `FORCE_COLOR` environment variables. + * Stability: 1.1 - Active development + * + * This function returns a formatted text considering the `format` passed. * * ```js * import { styleText } from 'node:util'; - * import { stderr } from 'node:process'; - * - * const successMessage = styleText('green', 'Success!'); - * console.log(successMessage); - * - * const errorMessage = styleText( - * 'red', - * 'Error! Error!', - * // Validate if process.stderr has TTY - * { stream: stderr }, - * ); - * console.error(errorMessage); + * const errorMessage = styleText('red', 'Error! Error!'); + * console.log(errorMessage); * ``` * - * `util.inspect.colors` also provides text formats such as `italic`, and - * `underline` and you can combine both: + * `util.inspect.colors` also provides text formats such as `italic`, and `underline` and you can combine both: * * ```js * console.log( @@ -1219,8 +1272,8 @@ declare module "util" { * ); * ``` * - * When passing an array of formats, the order of the format applied - * is left to right so the following style might overwrite the previous one. + * When passing an array of formats, the order of the format applied is left to right so the following style + * might overwrite the previous one. * * ```js * console.log( @@ -1228,7 +1281,7 @@ declare module "util" { * ); * ``` * - * The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v24.x/api/util.html#modifiers). + * The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v20.x/api/util.html#modifiers). * @param format A text format or an Array of text formats defined in `util.inspect.colors`. * @param text The text to to be formatted. * @since v20.12.0 @@ -1394,17 +1447,11 @@ declare module "util" { * @return The parsed command line arguments: */ export function parseArgs(config?: T): ParsedResults; - - /** - * Type of argument used in {@link parseArgs}. - */ - export type ParseArgsOptionsType = "boolean" | "string"; - - export interface ParseArgsOptionDescriptor { + interface ParseArgsOptionConfig { /** * Type of argument. */ - type: ParseArgsOptionsType; + type: "string" | "boolean"; /** * Whether this option can be provided multiple times. * If `true`, all values will be collected in an array. @@ -1417,16 +1464,15 @@ declare module "util" { */ short?: string | undefined; /** - * The default value to - * be used if (and only if) the option does not appear in the arguments to be - * parsed. It must be of the same type as the `type` property. When `multiple` - * is `true`, it must be an array. + * The default option value when it is not set by args. + * It must be of the same type as the the `type` property. + * When `multiple` is `true`, it must be an array. * @since v18.11.0 */ default?: string | boolean | string[] | boolean[] | undefined; } - export interface ParseArgsOptionsConfig { - [longOption: string]: ParseArgsOptionDescriptor; + interface ParseArgsOptionsConfig { + [longOption: string]: ParseArgsOptionConfig; } export interface ParseArgsConfig { /** @@ -1450,7 +1496,7 @@ declare module "util" { /** * If `true`, allows explicitly setting boolean options to `false` by prefixing the option name with `--no-`. * @default false - * @since v22.4.0 + * @since v20.16.0 */ allowNegative?: boolean | undefined; /** @@ -1478,7 +1524,7 @@ declare module "util" { : T extends true ? IfTrue : IfFalse; - type ExtractOptionValue = IfDefaultsTrue< + type ExtractOptionValue = IfDefaultsTrue< T["strict"], O["type"] extends "string" ? string : O["type"] extends "boolean" ? boolean : string | boolean, string | boolean @@ -1511,7 +1557,7 @@ declare module "util" { type PreciseTokenForOptions< K extends string, - O extends ParseArgsOptionDescriptor, + O extends ParseArgsOptionConfig, > = O["type"] extends "string" ? { kind: "option"; index: number; @@ -1601,6 +1647,7 @@ declare module "util" { * components. When parsed, a `MIMEType` object is returned containing * properties for each of these components. * @since v19.1.0, v18.13.0 + * @experimental */ export class MIMEType { /** @@ -1899,9 +1946,7 @@ declare module "util/types" { * A native `External` value is a special type of object that contains a * raw C++ pointer (`void*`) for access from native code, and has no other * properties. Such objects are created either by Node.js internals or native - * addons. In JavaScript, they are - * [frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) objects with a - * `null` prototype. + * addons. In JavaScript, they are [frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) objects with a`null` prototype. * * ```c * #include @@ -1909,7 +1954,7 @@ declare module "util/types" { * napi_value result; * static napi_value MyNapi(napi_env env, napi_callback_info info) { * int* raw = (int*) malloc(1024); - * napi_status status = napi_create_external(env, (void*) raw, NULL, NULL, &result); + * napi_status status = napi_create_external(env, (void*) raw, NULL, NULL, &result); * if (status != napi_ok) { * napi_throw_error(env, NULL, "napi_create_external failed"); * return NULL; @@ -1922,31 +1967,17 @@ declare module "util/types" { * ``` * * ```js - * import native from 'napi_addon.node'; - * import { types } from 'node:util'; - * + * const native =require('napi_addon.node'); * const data = native.myNapi(); - * types.isExternal(data); // returns true - * types.isExternal(0); // returns false - * types.isExternal(new String('foo')); // returns false + * util.types.isExternal(data); // returns true + * util.types.isExternal(0); // returns false + * util.types.isExternal(new String('foo')); // returns false * ``` * - * For further information on `napi_create_external`, refer to - * [`napi_create_external()`](https://nodejs.org/docs/latest-v24.x/api/n-api.html#napi_create_external). + * For further information on `napi_create_external`, refer to `napi_create_external()`. * @since v10.0.0 */ function isExternal(object: unknown): boolean; - /** - * Returns `true` if the value is a built-in [`Float16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float16Array) instance. - * - * ```js - * util.types.isFloat16Array(new ArrayBuffer()); // Returns false - * util.types.isFloat16Array(new Float16Array()); // Returns true - * util.types.isFloat16Array(new Float32Array()); // Returns false - * ``` - * @since v24.0.0 - */ - function isFloat16Array(object: unknown): object is Float16Array; /** * Returns `true` if the value is a built-in [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) instance. * @@ -2067,8 +2098,7 @@ declare module "util/types" { */ function isModuleNamespaceObject(value: unknown): boolean; /** - * Returns `true` if the value was returned by the constructor of a - * [built-in `Error` type](https://tc39.es/ecma262/#sec-error-objects). + * Returns `true` if the value was returned by the constructor of a [built-in `Error` type](https://tc39.es/ecma262/#sec-error-objects). * * ```js * console.log(util.types.isNativeError(new Error())); // true @@ -2083,18 +2113,14 @@ declare module "util/types" { * console.log(util.types.isNativeError(new MyError())); // true * ``` * - * A value being `instanceof` a native error class is not equivalent to `isNativeError()` - * returning `true` for that value. `isNativeError()` returns `true` for errors - * which come from a different [realm](https://tc39.es/ecma262/#realm) while `instanceof Error` returns `false` - * for these errors: + * A value being `instanceof` a native error class is not equivalent to `isNativeError()` returning `true` for that value. `isNativeError()` returns `true` for errors + * which come from a different [realm](https://tc39.es/ecma262/#realm) while `instanceof Error` returns `false` for these errors: * * ```js - * import { createContext, runInContext } from 'node:vm'; - * import { types } from 'node:util'; - * - * const context = createContext({}); - * const myError = runInContext('new Error()', context); - * console.log(types.isNativeError(myError)); // true + * import vm from 'node:vm'; + * const context = vm.createContext({}); + * const myError = vm.runInContext('new Error()', context); + * console.log(util.types.isNativeError(myError)); // true * console.log(myError instanceof Error); // false * ``` * diff --git a/node_modules/@types/node/v8.d.ts b/node_modules/@types/node/v8.d.ts index 55998c8f..6822e88a 100644 --- a/node_modules/@types/node/v8.d.ts +++ b/node_modules/@types/node/v8.d.ts @@ -4,7 +4,7 @@ * ```js * import v8 from 'node:v8'; * ``` - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/v8.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/v8.js) */ declare module "v8" { import { Readable } from "node:stream"; @@ -113,87 +113,6 @@ declare module "v8" { * @since v1.0.0 */ function getHeapStatistics(): HeapInfo; - /** - * It returns an object with a structure similar to the - * [`cppgc::HeapStatistics`](https://v8docs.nodesource.com/node-22.4/d7/d51/heap-statistics_8h_source.html) - * object. See the [V8 documentation](https://v8docs.nodesource.com/node-22.4/df/d2f/structcppgc_1_1_heap_statistics.html) - * for more information about the properties of the object. - * - * ```js - * // Detailed - * ({ - * committed_size_bytes: 131072, - * resident_size_bytes: 131072, - * used_size_bytes: 152, - * space_statistics: [ - * { - * name: 'NormalPageSpace0', - * committed_size_bytes: 0, - * resident_size_bytes: 0, - * used_size_bytes: 0, - * page_stats: [{}], - * free_list_stats: {}, - * }, - * { - * name: 'NormalPageSpace1', - * committed_size_bytes: 131072, - * resident_size_bytes: 131072, - * used_size_bytes: 152, - * page_stats: [{}], - * free_list_stats: {}, - * }, - * { - * name: 'NormalPageSpace2', - * committed_size_bytes: 0, - * resident_size_bytes: 0, - * used_size_bytes: 0, - * page_stats: [{}], - * free_list_stats: {}, - * }, - * { - * name: 'NormalPageSpace3', - * committed_size_bytes: 0, - * resident_size_bytes: 0, - * used_size_bytes: 0, - * page_stats: [{}], - * free_list_stats: {}, - * }, - * { - * name: 'LargePageSpace', - * committed_size_bytes: 0, - * resident_size_bytes: 0, - * used_size_bytes: 0, - * page_stats: [{}], - * free_list_stats: {}, - * }, - * ], - * type_names: [], - * detail_level: 'detailed', - * }); - * ``` - * - * ```js - * // Brief - * ({ - * committed_size_bytes: 131072, - * resident_size_bytes: 131072, - * used_size_bytes: 128864, - * space_statistics: [], - * type_names: [], - * detail_level: 'brief', - * }); - * ``` - * @since v22.15.0 - * @param detailLevel **Default:** `'detailed'`. Specifies the level of detail in the returned statistics. - * Accepted values are: - * * `'brief'`: Brief statistics contain only the top-level - * allocated and used - * memory statistics for the entire heap. - * * `'detailed'`: Detailed statistics also contain a break - * down per space and page, as well as freelist statistics - * and object type histograms. - */ - function getCppHeapStatistics(detailLevel?: "brief" | "detailed"): object; /** * Returns statistics about the V8 heap spaces, i.e. the segments which make up * the V8 heap. Neither the ordering of heap spaces, nor the availability of a @@ -547,7 +466,8 @@ declare module "v8" { function stopCoverage(): void; /** * The API is a no-op if `--heapsnapshot-near-heap-limit` is already set from the command line or the API is called more than once. - * `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information. + * `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information. + * @experimental * @since v18.10.0, v16.18.0 */ function setHeapSnapshotNearHeapLimit(limit: number): void; @@ -773,6 +693,33 @@ declare module "v8" { */ const promiseHooks: PromiseHooks; type StartupSnapshotCallbackFn = (args: any) => any; + interface StartupSnapshot { + /** + * Add a callback that will be called when the Node.js instance is about to get serialized into a snapshot and exit. + * This can be used to release resources that should not or cannot be serialized or to convert user data into a form more suitable for serialization. + * @since v18.6.0, v16.17.0 + */ + addSerializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; + /** + * Add a callback that will be called when the Node.js instance is deserialized from a snapshot. + * The `callback` and the `data` (if provided) will be serialized into the snapshot, they can be used to re-initialize the state of the application or + * to re-acquire resources that the application needs when the application is restarted from the snapshot. + * @since v18.6.0, v16.17.0 + */ + addDeserializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; + /** + * This sets the entry point of the Node.js application when it is deserialized from a snapshot. This can be called only once in the snapshot building script. + * If called, the deserialized application no longer needs an additional entry point script to start up and will simply invoke the callback along with the deserialized + * data (if provided), otherwise an entry point script still needs to be provided to the deserialized application. + * @since v18.6.0, v16.17.0 + */ + setDeserializeMainFunction(callback: StartupSnapshotCallbackFn, data?: any): void; + /** + * Returns true if the Node.js instance is run to build a snapshot. + * @since v18.6.0, v16.17.0 + */ + isBuildingSnapshot(): boolean; + } /** * The `v8.startupSnapshot` interface can be used to add serialization and deserialization hooks for custom startup snapshots. * @@ -851,35 +798,10 @@ declare module "v8" { * * Currently the application deserialized from a user-land snapshot cannot be snapshotted again, so these APIs are only available to applications that are not deserialized from a user-land snapshot. * + * @experimental * @since v18.6.0, v16.17.0 */ - namespace startupSnapshot { - /** - * Add a callback that will be called when the Node.js instance is about to get serialized into a snapshot and exit. - * This can be used to release resources that should not or cannot be serialized or to convert user data into a form more suitable for serialization. - * @since v18.6.0, v16.17.0 - */ - function addSerializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; - /** - * Add a callback that will be called when the Node.js instance is deserialized from a snapshot. - * The `callback` and the `data` (if provided) will be serialized into the snapshot, they can be used to re-initialize the state of the application or - * to re-acquire resources that the application needs when the application is restarted from the snapshot. - * @since v18.6.0, v16.17.0 - */ - function addDeserializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; - /** - * This sets the entry point of the Node.js application when it is deserialized from a snapshot. This can be called only once in the snapshot building script. - * If called, the deserialized application no longer needs an additional entry point script to start up and will simply invoke the callback along with the deserialized - * data (if provided), otherwise an entry point script still needs to be provided to the deserialized application. - * @since v18.6.0, v16.17.0 - */ - function setDeserializeMainFunction(callback: StartupSnapshotCallbackFn, data?: any): void; - /** - * Returns true if the Node.js instance is run to build a snapshot. - * @since v18.6.0, v16.17.0 - */ - function isBuildingSnapshot(): boolean; - } + const startupSnapshot: StartupSnapshot; } declare module "node:v8" { export * from "v8"; diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts index bba2e0ba..6b6f9e19 100644 --- a/node_modules/@types/node/vm.d.ts +++ b/node_modules/@types/node/vm.d.ts @@ -34,7 +34,7 @@ * * console.log(x); // 1; y is not defined. * ``` - * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/vm.js) + * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/vm.js) */ declare module "vm" { import { ImportAttributes } from "node:module"; @@ -60,7 +60,6 @@ declare module "vm" { specifier: string, referrer: T, importAttributes: ImportAttributes, - phase: "source" | "evaluation", ) => Module | Promise; interface ScriptOptions extends BaseOptions { /** @@ -72,8 +71,7 @@ declare module "vm" { /** * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see - * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis). - * @experimental + * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v20.x/api/vm.html#support-of-dynamic-import-in-compilation-apis). */ importModuleDynamically?: | DynamicModuleLoader