Skip to content

Commit 8fe6b76

Browse files
xuyushun441-syshotlongclaude
authored
chore(deps): upgrade @types/node to ^26.0.0 + fix createPublicKey under stricter crypto types (#2180)
Re-applies the @types/node 25→26 bump (originally #2160; reverted in #2177 to unbreak main). @types/node 26 narrowed `createPublicKey`'s input union to drop `KeyObject`, which broke the publisher self-check in `os plugin sign`: packages/cli/src/commands/plugin/sign.ts: createPublicKey(createPrivateKey(privateKeyPem)) // KeyObject input Derive the public half from the private-key PEM string instead — runtime-identical (verified: same SPKI, signature verifies) and `string` is still an accepted `createPublicKey` input under @types/node 26. Drops the now-unused `createPrivateKey` import. Verified: full workspace build green; @objectstack/cli and @objectstack/core build clean under @types/node 26. Co-authored-by: Jack Zhuang <zhuangjianguo@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 0df063e commit 8fe6b76

62 files changed

Lines changed: 332 additions & 476 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@tailwindcss/postcss": "^4.3.1",
2828
"@types/mdx": "^2.0.14",
2929
"@types/negotiator": "^0.6.4",
30-
"@types/node": "^25.9.3",
30+
"@types/node": "^26.0.0",
3131
"@types/react": "^19.2.17",
3232
"@types/react-dom": "^19.2.3",
3333
"negotiator": "^1.0.0",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"license": "Apache-2.0",
3939
"devDependencies": {
4040
"@changesets/cli": "^2.31.0",
41-
"@types/node": "^25.9.3",
41+
"@types/node": "^26.0.0",
4242
"@typescript-eslint/parser": "^8.61.1",
4343
"eslint": "^10.5.0",
4444
"tsup": "^8.5.1",

packages/apps/account/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@objectstack/spec": "workspace:*"
2222
},
2323
"devDependencies": {
24-
"@types/node": "^25.9.3",
24+
"@types/node": "^26.0.0",
2525
"tsup": "^8.5.1",
2626
"typescript": "^6.0.3",
2727
"vitest": "^4.1.9"

packages/apps/setup/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@objectstack/spec": "workspace:*"
2222
},
2323
"devDependencies": {
24-
"@types/node": "^25.9.3",
24+
"@types/node": "^26.0.0",
2525
"tsup": "^8.5.1",
2626
"typescript": "^6.0.3",
2727
"vitest": "^4.1.9"

packages/apps/studio/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@objectstack/spec": "workspace:*"
2222
},
2323
"devDependencies": {
24-
"@types/node": "^25.9.3",
24+
"@types/node": "^26.0.0",
2525
"tsup": "^8.5.1",
2626
"typescript": "^6.0.3",
2727
"vitest": "^4.1.9"

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
"devDependencies": {
104104
"@oclif/plugin-help": "^6.2.52",
105105
"@oclif/plugin-plugins": "^5.4.78",
106-
"@types/node": "^25.9.3",
106+
"@types/node": "^26.0.0",
107107
"tsup": "^8.5.1",
108108
"typescript": "^6.0.3",
109109
"vitest": "^4.1.9"

packages/cli/src/commands/plugin/sign.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import { readFile, writeFile } from 'node:fs/promises';
1717
import { existsSync } from 'node:fs';
18-
import { createPrivateKey, createPublicKey } from 'node:crypto';
18+
import { createPublicKey } from 'node:crypto';
1919
import { resolve as resolvePath } from 'node:path';
2020
import { Args, Command, Flags } from '@oclif/core';
2121
import { parseSignature, signPayload, verifyPayload } from '@objectstack/core';
@@ -89,7 +89,10 @@ export default class PluginSign extends Command {
8989
// Self-check: verify the freshly produced signature against the public
9090
// half so a bad key / wrong format never ships silently.
9191
try {
92-
const pub = createPublicKey(createPrivateKey(privateKeyPem));
92+
// Derive the public half from the private-key PEM string. (Passing a
93+
// KeyObject works at runtime but @types/node 26 narrowed createPublicKey's
94+
// input union to exclude KeyObject; the string form is equivalent.)
95+
const pub = createPublicKey(privateKeyPem);
9396
if (!verifyPayload(artifact, signature, pub)) {
9497
printError('Self-verification of the produced signature failed.');
9598
this.exit(1);

packages/cloud-connection/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@objectstack/types": "workspace:*"
2525
},
2626
"devDependencies": {
27-
"@types/node": "^25.9.3",
27+
"@types/node": "^26.0.0",
2828
"typescript": "^6.0.3",
2929
"vitest": "^4.1.9"
3030
},

packages/connectors/connector-mcp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
"devDependencies": {
2525
"@objectstack/service-automation": "workspace:*",
26-
"@types/node": "^25.9.3",
26+
"@types/node": "^26.0.0",
2727
"typescript": "^6.0.3",
2828
"vitest": "^4.1.9"
2929
},

packages/connectors/connector-openapi/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"devDependencies": {
2424
"@objectstack/service-automation": "workspace:*",
25-
"@types/node": "^25.9.3",
25+
"@types/node": "^26.0.0",
2626
"typescript": "^6.0.3",
2727
"vitest": "^4.1.9"
2828
},

0 commit comments

Comments
 (0)