From 9e5cb2e28d6701ec2b5686875d0c8b0c9af030c8 Mon Sep 17 00:00:00 2001 From: larabr <7375870+larabr@users.noreply.github.com> Date: Fri, 15 Aug 2025 15:28:39 +0200 Subject: [PATCH 1/3] Tests: TS: add back missing type checking tsx does not run any type checking, hence a separate tsc step is needed . --- package.json | 3 ++- test/tsconfig.es5.json | 9 --------- test/tsconfig.es5.test.json | 6 ++++++ test/tsconfig.test.json | 8 ++++++++ 4 files changed, 16 insertions(+), 10 deletions(-) delete mode 100644 test/tsconfig.es5.json create mode 100644 test/tsconfig.es5.test.json create mode 100644 test/tsconfig.test.json diff --git a/package.json b/package.json index 6f03748..977d6df 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,8 @@ } }, "scripts": { - "test-type-definitions": "tsx test/typescript.test.ts && tsx --tsconfig test/tsconfig.es5.json test/typescript.test.ts", + "test-type-definitions": "tsc --project test/tsconfig.test.json && tsx test/typescript.test.ts", + "test-type-definitions-es5": "tsc --project test/tsconfig.es5.json && tsx --tsconfig test/tsconfig.es5.json test/typescript.test.ts", "test-browser": "karma start karma.conf.cjs", "test-node": "ts-mocha -n loader=ts-node/esm ./test/node.test.ts ./test/common.test.ts", "lint": "eslint lib test", diff --git a/test/tsconfig.es5.json b/test/tsconfig.es5.json deleted file mode 100644 index d35825e..0000000 --- a/test/tsconfig.es5.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "target": "es5" - }, - "exclude": [ - "node_modules", - ] -} diff --git a/test/tsconfig.es5.test.json b/test/tsconfig.es5.test.json new file mode 100644 index 0000000..aa77e2b --- /dev/null +++ b/test/tsconfig.es5.test.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.test.json", + "compilerOptions": { + "target": "es5" + } +} diff --git a/test/tsconfig.test.json b/test/tsconfig.test.json new file mode 100644 index 0000000..20aaa51 --- /dev/null +++ b/test/tsconfig.test.json @@ -0,0 +1,8 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "noEmit": true // code tested by tsx + }, + "files": ["typescript.test.ts"] + +} From 38c37dabe3b5b2547e648a2d94c255db920b8df3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Aug 2025 07:13:52 +0000 Subject: [PATCH 2/3] Bump typescript from 5.5.2 to 5.9.2 Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.5.2 to 5.9.2. - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.5.2...v5.9.2) --- updated-dependencies: - dependency-name: typescript dependency-version: 5.9.2 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 76b9038..c53dbc3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "ts-mocha": "^10.0.0", "ts-node": "^10.9.2", "tsx": "^4.7.0", - "typescript": "^5.5.2", + "typescript": "^5.9.2", "web-streams-polyfill": "^4.0.0" }, "engines": { @@ -6075,9 +6075,9 @@ } }, "node_modules/typescript": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", - "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", + "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -10937,9 +10937,9 @@ } }, "typescript": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", - "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", + "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", "dev": true }, "ua-parser-js": { diff --git a/package.json b/package.json index 977d6df..8cc2e82 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "ts-mocha": "^10.0.0", "ts-node": "^10.9.2", "tsx": "^4.7.0", - "typescript": "^5.5.2", + "typescript": "^5.9.2", "web-streams-polyfill": "^4.0.0" }, "peerDependencies": { From 98741a148228b4e41086cd2e7fee05a67aeb9ccd Mon Sep 17 00:00:00 2001 From: larabr <7375870+larabr@users.noreply.github.com> Date: Mon, 18 Aug 2025 13:21:50 +0200 Subject: [PATCH 3/3] Tests: TS: update Node and web-streams-polyfill types To match updated TS dom types. --- package-lock.json | 54 +++++++++++++++++++++++++++-------------------- package.json | 8 +++---- 2 files changed, 35 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index c53dbc3..0ab4e40 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@openpgp/jsdoc": "^3.6.11", "@types/chai": "^4.3.11", "@types/mocha": "^10.0.6", - "@types/node": "^20.11.4", + "@types/node": "^20.19.11", "@typescript-eslint/eslint-plugin": "^5.59.6", "@typescript-eslint/parser": "^5.59.6", "chai": "^4.3.7", @@ -29,7 +29,7 @@ "ts-node": "^10.9.2", "tsx": "^4.7.0", "typescript": "^5.9.2", - "web-streams-polyfill": "^4.0.0" + "web-streams-polyfill": "^4.2.0" }, "engines": { "node": ">= 18.0.0" @@ -874,12 +874,13 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.4.tgz", - "integrity": "sha512-6I0fMH8Aoy2lOejL3s4LhyIYX34DPwY8bl5xlNjBvUEk8OHrcuzsFt+Ied4LvJihbtXPM+8zUqdydfIti86v9g==", + "version": "20.19.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.11.tgz", + "integrity": "sha512-uug3FEEGv0r+jrecvUUpbY8lLisvIjg6AAic6a2bSP5OEOLeJsDSnvhCDov7ipFFMXS3orMpzlmi0ZcuGkBbow==", "dev": true, + "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.21.0" } }, "node_modules/@types/semver": { @@ -6135,10 +6136,11 @@ "dev": true }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true + "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": "0.1.2", @@ -6251,10 +6253,16 @@ } }, "node_modules/web-streams-polyfill": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0.tgz", - "integrity": "sha512-0zJXHRAYEjM2tUfZ2DiSOHAa2aw1tisnnhU3ufD57R8iefL+DcdJyRBRyJpG+NUimDgbTI/lH+gAE1PAvV3Cgw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.2.0.tgz", + "integrity": "sha512-0rYDzGOh9EZpig92umN5g5D/9A1Kff7k0/mzPSSCY8jEQeYkgRMoY7LhbXtUCWzLCMX0TUE9aoHkjFNB7D9pfA==", "dev": true, + "license": "MIT", + "workspaces": [ + "test/benchmark-test", + "test/rollup-test", + "test/webpack-test" + ], "engines": { "node": ">= 8" } @@ -7103,12 +7111,12 @@ "dev": true }, "@types/node": { - "version": "20.11.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.4.tgz", - "integrity": "sha512-6I0fMH8Aoy2lOejL3s4LhyIYX34DPwY8bl5xlNjBvUEk8OHrcuzsFt+Ied4LvJihbtXPM+8zUqdydfIti86v9g==", + "version": "20.19.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.11.tgz", + "integrity": "sha512-uug3FEEGv0r+jrecvUUpbY8lLisvIjg6AAic6a2bSP5OEOLeJsDSnvhCDov7ipFFMXS3orMpzlmi0ZcuGkBbow==", "dev": true, "requires": { - "undici-types": "~5.26.4" + "undici-types": "~6.21.0" } }, "@types/semver": { @@ -10974,9 +10982,9 @@ "dev": true }, "undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "dev": true }, "universalify": { @@ -11052,9 +11060,9 @@ } }, "web-streams-polyfill": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0.tgz", - "integrity": "sha512-0zJXHRAYEjM2tUfZ2DiSOHAa2aw1tisnnhU3ufD57R8iefL+DcdJyRBRyJpG+NUimDgbTI/lH+gAE1PAvV3Cgw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.2.0.tgz", + "integrity": "sha512-0rYDzGOh9EZpig92umN5g5D/9A1Kff7k0/mzPSSCY8jEQeYkgRMoY7LhbXtUCWzLCMX0TUE9aoHkjFNB7D9pfA==", "dev": true }, "webpack": { diff --git a/package.json b/package.json index 8cc2e82..6905f91 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@openpgp/jsdoc": "^3.6.11", "@types/chai": "^4.3.11", "@types/mocha": "^10.0.6", - "@types/node": "^20.11.4", + "@types/node": "^20.19.11", "@typescript-eslint/eslint-plugin": "^5.59.6", "@typescript-eslint/parser": "^5.59.6", "chai": "^4.3.7", @@ -47,7 +47,7 @@ "ts-node": "^10.9.2", "tsx": "^4.7.0", "typescript": "^5.9.2", - "web-streams-polyfill": "^4.0.0" + "web-streams-polyfill": "^4.2.0" }, "peerDependencies": { "typescript": ">=4.2" @@ -58,8 +58,8 @@ } }, "scripts": { - "test-type-definitions": "tsc --project test/tsconfig.test.json && tsx test/typescript.test.ts", - "test-type-definitions-es5": "tsc --project test/tsconfig.es5.json && tsx --tsconfig test/tsconfig.es5.json test/typescript.test.ts", + "test-type-definitions": "tsc --project test/tsconfig.test.json && tsx test/typescript.test.ts && npm run test-type-definitions-es5", + "test-type-definitions-es5": "tsc --project test/tsconfig.es5.test.json && tsx --tsconfig test/tsconfig.es5.test.json test/typescript.test.ts", "test-browser": "karma start karma.conf.cjs", "test-node": "ts-mocha -n loader=ts-node/esm ./test/node.test.ts ./test/common.test.ts", "lint": "eslint lib test",