From 3c34db0a7638ca202e3930315cd281d96bea5750 Mon Sep 17 00:00:00 2001 From: Stephen Belanger Date: Fri, 27 Mar 2026 05:30:09 +0800 Subject: [PATCH 1/4] fix(auto-instrumentation): Prepare for @apm-js-collab/code-transformer v0.11.0 JS rewrite - Bump version range to >=0.9.0 to pick up v0.11.0 when released - Fix ESM loader hook to pass correct module type (esm/cjs/unknown) from Node.js loader format instead of always passing "unknown", which caused CJS require() to be injected into ESM files - Remove tracePromise assertions from transformation tests (implementation detail of old WASM output; new JS version uses runStores instead) - Clean up "WASM transformer" wording in comments Tested against nodejs/orchestrion-js main branch. The browser-mode tests (dc-browser) require apm-js-collab/dc-browser#3 to be merged and released first, since dc-browser was missing a default export to match node:diagnostics_channel's CJS-ESM interop behaviour. Co-Authored-By: Claude Sonnet 4.6 --- js/package.json | 2 +- .../auto-instrumentations/bundler/plugin.ts | 2 +- .../bundler/webpack-loader.ts | 2 +- .../auto-instrumentations/loader/cjs-patch.ts | 2 +- .../auto-instrumentations/loader/esm-hook.mts | 10 ++++-- .../transformation.test.ts | 5 --- pnpm-lock.yaml | 34 ++++++++++++++++--- 7 files changed, 41 insertions(+), 16 deletions(-) diff --git a/js/package.json b/js/package.json index 0f4d8ae90..950ca31df 100644 --- a/js/package.json +++ b/js/package.json @@ -199,7 +199,7 @@ }, "dependencies": { "@ai-sdk/provider": "^1.1.3", - "@apm-js-collab/code-transformer": "^0.9.0", + "@apm-js-collab/code-transformer": "^0.11.0", "@next/env": "^14.2.3", "@vercel/functions": "^1.0.2", "ajv": "^8.17.1", diff --git a/js/src/auto-instrumentations/bundler/plugin.ts b/js/src/auto-instrumentations/bundler/plugin.ts index 29a25eec0..bfb150eb0 100644 --- a/js/src/auto-instrumentations/bundler/plugin.ts +++ b/js/src/auto-instrumentations/bundler/plugin.ts @@ -125,7 +125,7 @@ export const unplugin = createUnplugin((options = {}) => { } // Try to get a transformer for this file - // Normalize the module path for Windows compatibility (WASM transformer expects forward slashes) + // Normalize the module path for Windows compatibility (transformer expects forward slashes) const normalizedModulePath = moduleDetails.path.replace(/\\/g, "/"); const transformer = instrumentationMatcher.getTransformer( moduleName, diff --git a/js/src/auto-instrumentations/bundler/webpack-loader.ts b/js/src/auto-instrumentations/bundler/webpack-loader.ts index 3c2f8caec..a0f82054f 100644 --- a/js/src/auto-instrumentations/bundler/webpack-loader.ts +++ b/js/src/auto-instrumentations/bundler/webpack-loader.ts @@ -143,7 +143,7 @@ function codeTransformerLoader( return callback(null, code, inputSourceMap); } - // Normalize the module path for Windows compatibility (WASM transformer expects forward slashes) + // Normalize the module path for Windows compatibility (transformer expects forward slashes) const normalizedModulePath = moduleDetails.path.replace(/\\/g, "/"); const matcher = getMatcher(options); diff --git a/js/src/auto-instrumentations/loader/cjs-patch.ts b/js/src/auto-instrumentations/loader/cjs-patch.ts index a29014e8e..6abdc8000 100644 --- a/js/src/auto-instrumentations/loader/cjs-patch.ts +++ b/js/src/auto-instrumentations/loader/cjs-patch.ts @@ -52,7 +52,7 @@ export class ModulePatch { const version = getPackageVersion(resolvedModule.basedir); - // Normalize module path for WASM transformer (expects forward slashes) + // Normalize module path for transformer (expects forward slashes) const normalizedModulePath = resolvedModule.path.replace(/\\/g, "/"); const transformer = self.instrumentator.getTransformer( diff --git a/js/src/auto-instrumentations/loader/esm-hook.mts b/js/src/auto-instrumentations/loader/esm-hook.mts index fceeff60d..862aa19c3 100644 --- a/js/src/auto-instrumentations/loader/esm-hook.mts +++ b/js/src/auto-instrumentations/loader/esm-hook.mts @@ -47,7 +47,7 @@ export async function resolve( if (resolvedModule && packages?.has(resolvedModule.name)) { const version = getPackageVersion(resolvedModule.basedir); - // Normalize module path for WASM transformer (expects forward slashes) + // Normalize module path for transformer (expects forward slashes) const normalizedModulePath = resolvedModule.path.replace(/\\/g, "/"); const transformer = instrumentator.getTransformer( @@ -81,9 +81,15 @@ export async function load(url: string, context: any, nextLoad: Function) { if (code) { const transformer = transformers.get(url); try { + const moduleType = + result.format === "module" + ? "esm" + : result.format === "commonjs" + ? "cjs" + : "unknown"; const transformedCode = transformer.transform( code.toString("utf8"), - "unknown", + moduleType, ); result.source = transformedCode?.code; result.shortCircuit = true; diff --git a/js/tests/auto-instrumentations/transformation.test.ts b/js/tests/auto-instrumentations/transformation.test.ts index dee079bcf..c51f12758 100644 --- a/js/tests/auto-instrumentations/transformation.test.ts +++ b/js/tests/auto-instrumentations/transformation.test.ts @@ -68,7 +68,6 @@ describe("Orchestrion Transformation Tests", () => { // Verify orchestrion transformed the code expect(output).toContain("tracingChannel"); expect(output).toContain("orchestrion:openai:chat.completions.create"); - expect(output).toContain("tracePromise"); }); it("should bundle dc-browser module when browser: true", async () => { @@ -149,7 +148,6 @@ describe("Orchestrion Transformation Tests", () => { // Verify orchestrion transformed the code expect(output).toContain("tracingChannel"); expect(output).toContain("orchestrion:openai:chat.completions.create"); - expect(output).toContain("tracePromise"); }); it("should bundle dc-browser module when browser: true", async () => { @@ -244,7 +242,6 @@ describe("Orchestrion Transformation Tests", () => { expect(errors).toHaveLength(0); expect(output).toContain("tracingChannel"); expect(output).toContain("orchestrion:openai:chat.completions.create"); - expect(output).toContain("tracePromise"); }); it("should bundle dc-browser module when browser: true", async () => { @@ -334,7 +331,6 @@ describe("Orchestrion Transformation Tests", () => { expect(errors).toHaveLength(0); expect(output).toContain("tracingChannel"); expect(output).toContain("orchestrion:openai:chat.completions.create"); - expect(output).toContain("tracePromise"); }); it("should bundle dc-browser polyfill when browser: true (turbopack loader-only mode)", async () => { @@ -418,7 +414,6 @@ describe("Orchestrion Transformation Tests", () => { // Verify orchestrion transformed the code expect(output).toContain("tracingChannel"); expect(output).toContain("orchestrion:openai:chat.completions.create"); - expect(output).toContain("tracePromise"); }); it("should bundle dc-browser module when browser: true", async () => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 93c8da126..00fe2efb7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -280,8 +280,8 @@ importers: specifier: ^1.1.3 version: 1.1.3 '@apm-js-collab/code-transformer': - specifier: ^0.9.0 - version: 0.9.0 + specifier: ^0.11.0 + version: 0.11.0 '@next/env': specifier: ^14.2.3 version: 14.2.3 @@ -680,8 +680,8 @@ packages: peerDependencies: openapi-types: '>=7' - '@apm-js-collab/code-transformer@0.9.0': - resolution: {integrity: sha512-cfHtufVUBKJz6se/tQBJqizgoot5AOxhVy5B9Cuo493p6b7hXKBEIi6tcZEbr4XwN1VnV9JZOu52MMTCOCSBMw==} + '@apm-js-collab/code-transformer@0.11.0': + resolution: {integrity: sha512-tQe79kYHdKyLReqpkWa+mWvGGla2qoDb23RdEh6J8RPWc9G+Rty5fYNxSecAT/u2naTZy792exYbDKlvNzUJYQ==} '@babel/code-frame@7.24.7': resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} @@ -2986,6 +2986,10 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} + astring@1.9.0: + resolution: {integrity: sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==} + hasBin: true + async@3.2.5: resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} @@ -4474,6 +4478,10 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} + meriyah@6.1.4: + resolution: {integrity: sha512-Sz8FzjzI0kN13GK/6MVEsVzMZEPvOhnmmI1lU5+/1cGOiK3QUahntrNNtdVeihrO7t9JpoH75iMNXg6R6uWflQ==} + engines: {node: '>=18.0.0'} + methods@1.1.2: resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} engines: {node: '>= 0.6'} @@ -5088,6 +5096,9 @@ packages: secure-json-parse@2.7.0: resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==} + semifies@1.0.0: + resolution: {integrity: sha512-xXR3KGeoxTNWPD4aBvL5NUpMTT7WMANr3EWnaS190QVkY52lqqcVRD7Q05UVbBhiWDGWMlJEUam9m7uFFGVScw==} + semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -6147,7 +6158,14 @@ snapshots: call-me-maybe: 1.0.2 openapi-types: 12.1.3 - '@apm-js-collab/code-transformer@0.9.0': {} + '@apm-js-collab/code-transformer@0.11.0': + dependencies: + '@types/estree': 1.0.8 + astring: 1.9.0 + esquery: 1.7.0 + meriyah: 6.1.4 + semifies: 1.0.0 + source-map: 0.6.1 '@babel/code-frame@7.24.7': dependencies: @@ -8864,6 +8882,8 @@ snapshots: assertion-error@2.0.1: {} + astring@1.9.0: {} + async@3.2.5: {} asynckit@0.4.0: {} @@ -10816,6 +10836,8 @@ snapshots: merge2@1.4.1: {} + meriyah@6.1.4: {} + methods@1.1.2: {} micromatch@4.0.8: @@ -11564,6 +11586,8 @@ snapshots: secure-json-parse@2.7.0: {} + semifies@1.0.0: {} + semver@6.3.1: {} semver@7.6.2: {} From 00917856c843ffc0acaf7b49afa2f42dc8e71d64 Mon Sep 17 00:00:00 2001 From: Stephen Belanger Date: Tue, 31 Mar 2026 10:01:14 +0800 Subject: [PATCH 2/4] chore: Bump dc-browser to v1.0.4 v1.0.4 adds a default export to match Node.js CJS-ESM interop behaviour, which is required for the diagnostics_channel-based wrappers to work correctly in mixed ESM/CJS projects. Co-Authored-By: Claude Sonnet 4.6 --- js/package.json | 2 +- pnpm-lock.yaml | 107 ++++++++++++++++++++++++++---------------------- 2 files changed, 58 insertions(+), 51 deletions(-) diff --git a/js/package.json b/js/package.json index 950ca31df..5a073cb65 100644 --- a/js/package.json +++ b/js/package.json @@ -209,7 +209,7 @@ "cli-progress": "^3.12.0", "cli-table3": "^0.6.5", "cors": "^2.8.5", - "dc-browser": "^1.0.3", + "dc-browser": "^1.0.4", "dotenv": "^16.4.5", "esbuild": "^0.27.0", "eventsource-parser": "^1.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 00fe2efb7..44840a721 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -310,8 +310,8 @@ importers: specifier: ^2.8.5 version: 2.8.5 dc-browser: - specifier: ^1.0.3 - version: 1.0.3 + specifier: ^1.0.4 + version: 1.0.4 dotenv: specifier: ^16.4.5 version: 16.4.5 @@ -417,10 +417,10 @@ importers: version: 9.0.7 '@typescript-eslint/eslint-plugin': specifier: ^8.49.0 - version: 8.50.0(@typescript-eslint/parser@8.50.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.4.4))(eslint@9.39.3(jiti@2.6.1))(typescript@5.4.4) + version: 8.50.0(@typescript-eslint/parser@8.50.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.4.4))(eslint@9.39.4(jiti@2.6.1))(typescript@5.4.4) '@typescript-eslint/parser': specifier: ^8.49.0 - version: 8.50.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.4.4) + version: 8.50.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.4.4) ai: specifier: ^6.0.0 version: 6.0.37(zod@3.25.76) @@ -435,7 +435,7 @@ importers: version: 7.0.3 eslint-plugin-node-import: specifier: ^1.0.5 - version: 1.0.5(eslint@9.39.3(jiti@2.6.1)) + version: 1.0.5(eslint@9.39.4(jiti@2.6.1)) jiti: specifier: ^2.6.1 version: 2.6.1 @@ -1533,8 +1533,8 @@ packages: resolution: {integrity: sha512-q1mjIoW1VX4IvSocvM/vbTiveKC4k9eLrajNEuSsmjymSDEbpGddtpfOoN7YGAqBK3NG+uqo8ia4PDTt8buCYA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.39.3': - resolution: {integrity: sha512-1B1VkCq6FuUNlQvlBYb+1jDu/gV297TIs/OeiaSR9l1H27SVW55ONE1e1Vp16NqP683+xEGzxYtv4XCiDPaQiw==} + '@eslint/js@9.39.4': + resolution: {integrity: sha512-nE7DEIchvtiFTwBw4Lfbu59PG+kCofhjsKaCWzxTpt4lfRjRMqG6uMBzKXuEcyXhOHoUp9riAm7/aWYGhXZ9cw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.7': @@ -2560,6 +2560,9 @@ packages: '@types/node@20.19.16': resolution: {integrity: sha512-VS6TTONVdgwJwtJr7U+ghEjpfmQdqehLLpg/iMYGOd1+ilaFjdBJwFuPggJ4EAYPDCzWfDUHoIxyVnu+tOWVuQ==} + '@types/node@20.19.37': + resolution: {integrity: sha512-8kzdPJ3FsNsVIurqBs7oodNnCEVbni9yUEkaHbgptDACOPW04jimGagZ51E6+lXUwJjgnBw+hyko/lkFWCldqw==} + '@types/node@20.19.9': resolution: {integrity: sha512-cuVNgarYWZqxRJDQHEB58GEONhOK79QVR/qYx4S7kcUObQvUwvFnYxJuuHUKm2aieN9X3yZB4LZsuYNU1Qphsw==} @@ -2659,8 +2662,8 @@ packages: resolution: {integrity: sha512-iX1mgmGrXdANhhITbpp2QQM2fGehBse9LbTf0sidWK6yg/NE+uhV5dfU1g6EYPlcReYmkE9QLPq/2irKAmtS9w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.57.1': - resolution: {integrity: sha512-S29BOBPJSFUiblEl6RzPPjJt6w25A6XsBqRVDt53tA/tlL8q7ceQNZHTjPeONt/3S7KRI4quk+yP9jK2WjBiPQ==} + '@typescript-eslint/types@8.58.0': + resolution: {integrity: sha512-O9CjxypDT89fbHxRfETNoAnHj/i6IpRK0CvbVN3qibxlLdo5p5hcLmUuCCrHMpxiWSwKyI8mCP7qRNYuOJ0Uww==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/typescript-estree@8.50.0': @@ -3337,8 +3340,8 @@ packages: csstype@3.2.3: resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} - dc-browser@1.0.3: - resolution: {integrity: sha512-B2PJFzWouEPzc+jLo+yTgUXaVz0eZjVsfKX9CnUDzezsluxOKOjllBpw0EJJ1KNJGnNzKpZ4dDYtd+jVp0KRNA==} + dc-browser@1.0.4: + resolution: {integrity: sha512-7oEtnzNlcE+hr4OvO3GR6Gndgw8BhW+wKOEwMqSleyY7N29jbAxzyW5BaJl7qBCw+6OIxfMWtY0T+6dxq8RWLw==} debug@2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} @@ -3553,8 +3556,8 @@ packages: jiti: optional: true - eslint@9.39.3: - resolution: {integrity: sha512-VmQ+sifHUbI/IcSopBCF/HO3YiHQx/AVd3UVyYL6weuwW+HvON9VYn5l6Zl1WZzPWXPNZrSQpxwkkZ/VuvJZzg==} + eslint@9.39.4: + resolution: {integrity: sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -7012,14 +7015,14 @@ snapshots: eslint: 9.39.2(jiti@2.6.1) eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.9.0(eslint@9.39.3(jiti@2.6.1))': + '@eslint-community/eslint-utils@4.9.0(eslint@9.39.4(jiti@2.6.1))': dependencies: - eslint: 9.39.3(jiti@2.6.1) + eslint: 9.39.4(jiti@2.6.1) eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.9.1(eslint@9.39.3(jiti@2.6.1))': + '@eslint-community/eslint-utils@4.9.1(eslint@9.39.4(jiti@2.6.1))': dependencies: - eslint: 9.39.3(jiti@2.6.1) + eslint: 9.39.4(jiti@2.6.1) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.2': {} @@ -7078,7 +7081,7 @@ snapshots: '@eslint/js@9.39.2': {} - '@eslint/js@9.39.3': {} + '@eslint/js@9.39.4': {} '@eslint/object-schema@2.1.7': {} @@ -7306,7 +7309,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 22.19.1 + '@types/node': 20.19.37 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -7319,14 +7322,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.19.1 + '@types/node': 20.19.37 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.19.1)(ts-node@10.9.2(@swc/core@1.15.8)(@types/node@20.10.5)(typescript@5.4.4)) + jest-config: 29.7.0(@types/node@20.19.37)(ts-node@10.9.2(@swc/core@1.15.8)(@types/node@20.10.5)(typescript@5.4.4)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -7391,7 +7394,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.31 - '@types/node': 22.19.1 + '@types/node': 20.19.37 chalk: 4.1.2 collect-v8-coverage: 1.0.3 exit: 0.1.2 @@ -8330,6 +8333,10 @@ snapshots: dependencies: undici-types: 6.21.0 + '@types/node@20.19.37': + dependencies: + undici-types: 6.21.0 + '@types/node@20.19.9': dependencies: undici-types: 6.21.0 @@ -8386,15 +8393,15 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.50.0(@typescript-eslint/parser@8.50.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.4.4))(eslint@9.39.3(jiti@2.6.1))(typescript@5.4.4)': + '@typescript-eslint/eslint-plugin@8.50.0(@typescript-eslint/parser@8.50.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.4.4))(eslint@9.39.4(jiti@2.6.1))(typescript@5.4.4)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.50.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.4.4) + '@typescript-eslint/parser': 8.50.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.4.4) '@typescript-eslint/scope-manager': 8.50.0 - '@typescript-eslint/type-utils': 8.50.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.4.4) - '@typescript-eslint/utils': 8.50.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.4.4) + '@typescript-eslint/type-utils': 8.50.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.4.4) + '@typescript-eslint/utils': 8.50.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.4.4) '@typescript-eslint/visitor-keys': 8.50.0 - eslint: 9.39.3(jiti@2.6.1) + eslint: 9.39.4(jiti@2.6.1) ignore: 7.0.5 natural-compare: 1.4.0 ts-api-utils: 2.1.0(typescript@5.4.4) @@ -8402,14 +8409,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.50.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.4.4)': + '@typescript-eslint/parser@8.50.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.4.4)': dependencies: '@typescript-eslint/scope-manager': 8.50.0 '@typescript-eslint/types': 8.50.0 '@typescript-eslint/typescript-estree': 8.50.0(typescript@5.4.4) '@typescript-eslint/visitor-keys': 8.50.0 debug: 4.4.3 - eslint: 9.39.3(jiti@2.6.1) + eslint: 9.39.4(jiti@2.6.1) typescript: 5.4.4 transitivePeerDependencies: - supports-color @@ -8432,13 +8439,13 @@ snapshots: dependencies: typescript: 5.4.4 - '@typescript-eslint/type-utils@8.50.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.4.4)': + '@typescript-eslint/type-utils@8.50.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.4.4)': dependencies: '@typescript-eslint/types': 8.50.0 '@typescript-eslint/typescript-estree': 8.50.0(typescript@5.4.4) - '@typescript-eslint/utils': 8.50.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.4.4) + '@typescript-eslint/utils': 8.50.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.4.4) debug: 4.4.3 - eslint: 9.39.3(jiti@2.6.1) + eslint: 9.39.4(jiti@2.6.1) ts-api-utils: 2.1.0(typescript@5.4.4) typescript: 5.4.4 transitivePeerDependencies: @@ -8446,7 +8453,7 @@ snapshots: '@typescript-eslint/types@8.50.0': {} - '@typescript-eslint/types@8.57.1': {} + '@typescript-eslint/types@8.58.0': {} '@typescript-eslint/typescript-estree@8.50.0(typescript@5.4.4)': dependencies: @@ -8463,13 +8470,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.50.0(eslint@9.39.3(jiti@2.6.1))(typescript@5.4.4)': + '@typescript-eslint/utils@8.50.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.4.4)': dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.3(jiti@2.6.1)) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.4(jiti@2.6.1)) '@typescript-eslint/scope-manager': 8.50.0 '@typescript-eslint/types': 8.50.0 '@typescript-eslint/typescript-estree': 8.50.0(typescript@5.4.4) - eslint: 9.39.3(jiti@2.6.1) + eslint: 9.39.4(jiti@2.6.1) typescript: 5.4.4 transitivePeerDependencies: - supports-color @@ -9357,7 +9364,7 @@ snapshots: csstype@3.2.3: {} - dc-browser@1.0.3: {} + dc-browser@1.0.4: {} debug@2.6.9: dependencies: @@ -9550,9 +9557,9 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-plugin-node-import@1.0.5(eslint@9.39.3(jiti@2.6.1)): + eslint-plugin-node-import@1.0.5(eslint@9.39.4(jiti@2.6.1)): dependencies: - eslint: 9.39.3(jiti@2.6.1) + eslint: 9.39.4(jiti@2.6.1) eslint-scope@5.1.1: dependencies: @@ -9609,15 +9616,15 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@9.39.3(jiti@2.6.1): + eslint@9.39.4(jiti@2.6.1): dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.3(jiti@2.6.1)) + '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.4(jiti@2.6.1)) '@eslint-community/regexpp': 4.12.2 '@eslint/config-array': 0.21.2 '@eslint/config-helpers': 0.4.2 '@eslint/core': 0.17.0 '@eslint/eslintrc': 3.3.5 - '@eslint/js': 9.39.3 + '@eslint/js': 9.39.4 '@eslint/plugin-kit': 0.4.1 '@humanfs/node': 0.16.7 '@humanwhocodes/module-importer': 1.0.1 @@ -9671,7 +9678,7 @@ snapshots: esrap@2.2.4: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 - '@typescript-eslint/types': 8.57.1 + '@typescript-eslint/types': 8.58.0 esrecurse@4.3.0: dependencies: @@ -10256,7 +10263,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.19.1 + '@types/node': 20.19.37 chalk: 4.1.2 co: 4.6.0 dedent: 1.7.2 @@ -10326,7 +10333,7 @@ snapshots: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@22.19.1)(ts-node@10.9.2(@swc/core@1.15.8)(@types/node@20.10.5)(typescript@5.4.4)): + jest-config@29.7.0(@types/node@20.19.37)(ts-node@10.9.2(@swc/core@1.15.8)(@types/node@20.10.5)(typescript@5.4.4)): dependencies: '@babel/core': 7.29.0 '@jest/test-sequencer': 29.7.0 @@ -10351,7 +10358,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 22.19.1 + '@types/node': 20.19.37 ts-node: 10.9.2(@swc/core@1.15.8)(@types/node@20.10.5)(typescript@5.4.4) transitivePeerDependencies: - babel-plugin-macros @@ -10381,7 +10388,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.19.1 + '@types/node': 20.19.37 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -10465,7 +10472,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.19.1 + '@types/node': 20.19.37 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -10493,7 +10500,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.19.1 + '@types/node': 20.19.37 chalk: 4.1.2 cjs-module-lexer: 1.4.3 collect-v8-coverage: 1.0.3 @@ -10558,7 +10565,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.19.1 + '@types/node': 20.19.37 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 From 3d5c151b4a50b381255f9fdb1eff37e89a5e117e Mon Sep 17 00:00:00 2001 From: Stephen Belanger Date: Fri, 3 Apr 2026 03:42:11 +0800 Subject: [PATCH 3/4] chore: exclude dc-browser from pnpm min-release-age constraint dc-browser is an internal package we control. Publishing new versions should not cause CI to fail for 3 days due to the release age check. Co-Authored-By: Claude Sonnet 4.6 --- .npmrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.npmrc b/.npmrc index 8d842b5e9..8ef3fc08b 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,3 @@ min-release-age=3 +min-release-age-exclude=dc-browser engine-strict=true From 56e2433bb589e52748e306bade411ba70d7bbf68 Mon Sep 17 00:00:00 2001 From: Stephen Belanger Date: Fri, 3 Apr 2026 05:10:47 +0800 Subject: [PATCH 4/4] chore: exclude dc-browser from pnpm minimumReleaseAge constraint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dc-browser is an internal package we control — the release age guard is meant for third-party supply-chain protection, not our own packages. The exclude belongs in pnpm-workspace.yaml where the constraint lives. Co-Authored-By: Claude Sonnet 4.6 --- .npmrc | 1 - pnpm-workspace.yaml | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.npmrc b/.npmrc index 8ef3fc08b..8d842b5e9 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,2 @@ min-release-age=3 -min-release-age-exclude=dc-browser engine-strict=true diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 93fe0f4ab..c9d024eb7 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -7,6 +7,8 @@ packages: blockExoticSubdeps: true minimumReleaseAge: 4320 # 3 days (in minutes) +minimumReleaseAgeExclude: + - dc-browser # internal package we control trustPolicy: no-downgrade # Ignore the check for packages published more than 30 days ago (pnpm 10.27+) # Useful for older packages that pre-date provenance support