refactor: Upgrade to TypeScript 6.0.2 - #27673
Conversation
Bundle ReportChanges will increase total bundle size by 26.75kB (0.06%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: editor-ui-esmAssets Changed:
|
There was a problem hiding this comment.
No issues found across 19 files
Architecture diagram
sequenceDiagram
participant CI as CI / Developer
participant TSC as TypeScript Compiler (v6.0.2)
participant Bundler as Bundler (Vite / tsdown)
participant BE as Node.js Backend
participant FE as Browser / Editor UI
participant WS as WebSocket API
Note over CI,TSC: Build Time: Configuration Phase
CI->>TSC: Run type checking (tsc)
TSC->>TSC: Resolve tsconfig.common.json
Note right of TSC: CHANGED: Set ignoreDeprecations "6.0"<br/>CHANGED: Disable noUncheckedSideEffectImports
alt Frontend Packages (@n8n/design-system, editor-ui)
TSC->>TSC: Perform type validation
Note right of TSC: CHANGED: noEmit: true (TSC no longer writes files)
CI->>Bundler: Generate runtime assets
Bundler-->>FE: Load bundled assets
else Backend/Shared Packages (@n8n/json-schema-to-zod, nodes-base)
TSC->>TSC: CHANGED: Resolve types from "node", "jest"
TSC->>BE: CHANGED: Emit JS to /dist (Explicit rootDir: "src")
end
Note over FE,WS: Runtime: Frontend & Communication
FE->>FE: NEW: Polyfill IntersectionObserver.scrollMargin
FE->>FE: NEW: Polyfill PointerEvent.persistentDeviceId
Note over FE,WS: @n8n/crdt Transport
FE->>WS: CHANGED: send(data as Uint8Array<ArrayBuffer>)
Note right of FE: TS 6.0 compatibility: explicit narrowing<br/>to ArrayBuffer variant of Uint8Array
Note over BE: Runtime: Backend Logic
BE->>BE: Execute transpiled code
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Chromatic is unrelated and advisory so disregarding |
…n code node worker
|
One more please, the e2e issue was legit |
|
Unit test issue is unrelated, fixing at #27738 |
# Conflicts: # pnpm-lock.yaml
There was a problem hiding this comment.
CVE-2026-33532 in yaml - medium severity
yaml is a YAML parser and serialiser for JavaScript. Parsing a YAML document with a version of yaml on the 1.x branch prior to 1.10.3 or on the 2.x branch prior to 2.8.3 may throw a RangeError due to a stack overflow. The node resolution/composition phase uses recursive function calls without a depth bound. An attacker who can supply YAML for parsing can trigger a RangeError: Maximum call stack size exceeded with a small payload (~2–10 KB). The RangeError is not a YAMLParseError, so applications that only catch YAML-specific errors will encounter an unexpected exception type. Depending on the host application's exception handling, this can fail requests or terminate the Node.js process. Flow sequences allow deep nesting with minimal bytes (2 bytes per level: one [ and one ]). On the default Node.js stack, approximately 1,000–5,000 levels of nesting (2–10 KB input) exhaust the call stack. The exact threshold is environment-dependent (Node.js version, stack size, call stack depth at invocation). Note: the library's Parser (CST phase) uses a stack-based iterative approach and is not affected. Only the compose/resolve phase uses actual call-stack recursion. All three public parsing APIs are affected: YAML.parse(), YAML.parseDocument(), and YAML.parseAllDocuments(). Versions 1.10.3 and 2.8.3 contain a patch.
Details
Remediation Aikido suggests bumping this package to version 2.8.3 to resolve this issue
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
|
Once more please, bounced back from the queue due to a flaky test and accumulated conflicts with master |
|
Got released with |
Summary
typesdefaults to[]instead of auto-including all@types/*types: ["node", "jest"]to codemirror-lang and stylelint-config packages (longer term, these FE packages should stop using Jest!). Switched@n8n/json-schema-to-zodto extendtsconfig.backend.jsonwhich already carries them. Excluded test helper dirs from nodes-base's build tsconfig. Addedtsconfig.scripts.jsonto@n8n/extension-sdkto cover the orphanedscripts/directory that uses Node built-ins.rootDirdefaults to the tsconfig dir instead of being inferred from sourcesrootDir: "src"to the three standalone@n8n/json-schema-to-zodbuild configs. AddedrootDir: "."to ts-jest's inline tsconfig in the rootjest.config.jsto fix TS5011 when ts-jest compiles a single file (e.g.globalSetup.ts) in isolation.outDiris set withoutrootDiroutDir: "dist"withnoEmit: trueindesign-system,rest-api-client,editor-ui, andstorybooktsconfigs (all use Vite/tsdown for building, never tsc)noUncheckedSideEffectImportsenabled by default understrictfalsein both basetsconfig.common.jsonandmodern/tsconfig.json(will need to be a separate dedicated effort)moduleResolution: nodeandmodule: umdare deprecatedignoreDeprecations: "6.0"to the two shared base configs and two standalone configs that use these settings (will need to be a separate dedicated effort)editor-ui/__tests__/setup.tsUint8Arrayis nowUint8Array<ArrayBufferLike>;WebSocket.send()requiresUint8Array<ArrayBuffer>@n8n/crdt(will need to be a separate dedicated to propagate through Y.js call sites, best done by folks who know this package)neveris now a type errorbodyin thedefaultbranch of an exhaustive switch inlog-streaming.controller.tsRelated Linear tickets, Github issues, and Community forum posts
Separate dedicated efforts are tracked here:
Review / Merge checklist
Backport to Beta,Backport to Stable, orBackport to v1(if the PR is an urgent fix that needs to be backported)