22 KiB
Deprecation disable inventory for PR #40168
Source: https://github.com/n8n-io/n8n/pull/40168
PR #40168 enables typescript/no-deprecated and adds a baseline for existing use of deprecated APIs. This document groups that baseline into ticket-sized migrations and records the related Linear issues.
Linear tracking
- Parent: DEVP-1225 Remove the typescript no-deprecated baseline
- DEVP-1231 Migrate license checks to LicenseState
- DEVP-1230 Replace deprecated database transaction and query APIs
- DEVP-1233 Replace deprecated execution and workflow state fields
- DEVP-1226 Retire legacy HTTP request and URL APIs
- DEVP-1232 Update Agent runtime and MCP dependency APIs
- DEVP-1227 Replace deprecated list-query and controller APIs
- DEVP-1228 Remove persisted compatibility formats after support windows
- DEVP-1229 Replace remaining deprecated platform and tooling APIs
Baseline summary
The PR adds 214 typescript/no-deprecated disable directives across 108 files. A file-level directive can hide more than one deprecated use, so these numbers count directives, not diagnostics.
| Package | Directives | Files | Default owner |
|---|---|---|---|
packages/cli |
146 | 66 | @n8n-io/catalysts, with path-specific owners |
packages/core |
26 | 12 | @n8n-io/catalysts |
packages/@n8n/agents |
20 | 12 | @n8n-io/ai |
packages/@n8n/backend-network |
8 | 6 | @n8n-io/catalysts |
packages/@n8n/db |
5 | 5 | @n8n-io/catalysts |
packages/@n8n/ai-workflow-builder.ee |
3 | 1 | @n8n-io/ai |
packages/@n8n/instance-ai |
2 | 2 | @n8n-io/ai-assistant |
packages/@n8n/errors |
1 | 1 | @n8n-io/catalysts |
packages/@n8n/mcp-browser |
1 | 1 | @n8n-io/nodes |
packages/@n8n/node-cli |
1 | 1 | @n8n-io/nodes |
packages/@n8n/workflow-sdk |
1 | 1 | @n8n-io/ai-assistant |
The package totals do not describe the best ticket boundaries. Most CLI disables belong to four cross-package themes: license access, execution state, workflow publication state, and transactions.
Recommended tickets
1. Migrate CLI license checks from License to LicenseState
Suggested owner: @n8n-io/iam, with reviews from affected feature owners
Why one ticket: The deprecated methods are compatibility wrappers around LicenseState. Replacing them consistently avoids a partial migration in FrontendService, which currently concentrates many of the disables.
Main scope:
packages/cli/src/services/frontend.service.tspackages/cli/src/license.tspackages/cli/src/license/license.service.ts- Authentication, password reset, user, execution, workflow, source-control, community-package, and orchestration call sites under
packages/cli/src - Instance AI adapter call sites that use
License.isSharingEnabled()
Deprecated surface: isSharingEnabled, isLogStreamingEnabled, isLdapEnabled, isSamlEnabled, isAiAssistantEnabled, isAskAiEnabled, isAiCreditsEnabled, isAdvancedExecutionFiltersEnabled, isAdvancedPermissionsLicensed, isDebugInEditorLicensed, isBinaryDataS3Licensed, isMultiMainLicensed, isVariablesEnabled, isSourceControlLicensed, isExternalSecretsEnabled, isWorkerViewLicensed, isCustomNpmRegistryEnabled, isFoldersEnabled, quota getters, and isWithinUsersLimit.
Plan:
- Map each deprecated wrapper to its
LicenseStateequivalent. - Define how quota values and unlimited quotas are represented in
LicenseState. - Migrate
FrontendServicefirst and verify the complete frontend settings payload. - Migrate feature-owned call sites in small commits or stacked PRs.
- Remove wrappers from
Licenseonly after all consumers are migrated.
Acceptance criteria:
- No
typescript/no-deprecateddisables remain forLicensemethods. FrontendServiceproduces the same settings for licensed, unlicensed, and unlimited plans.- User quota, active workflow quota, variable quota, team project quota, and Gateway credits behavior have focused tests.
- The deprecated wrappers can be removed or have no internal consumers.
Risk: Medium. Several wrappers do more than rename a check, and the note on getTriggerLimit() says that a direct migration currently breaks tests.
2. Replace data-table withTransaction use with TransactionRunner
Suggested owner: @n8n-io/adore
Why one ticket: This is a contained module migration with 24 disables across its repository and DDL files.
Scope:
packages/cli/src/modules/data-table/data-table-column.repository.tspackages/cli/src/modules/data-table/data-table-ddl.service.tspackages/cli/src/modules/data-table/data-table-rows.repository.tspackages/cli/src/modules/data-table/data-table.repository.ts
Plan:
- Move transaction orchestration to
TransactionRunner. - Replace optional
EntityManagerarguments withOperationContext. - Make repositories extend
BaseRepositorywhere required and usemanagerFor(ctx). - Thread one context through compound table, column, and row operations.
- Preserve DDL transaction behavior for SQLite and PostgreSQL.
Acceptance criteria:
- The module does not call deprecated
withTransaction. - Public service methods accept domain inputs and do not expose TypeORM transaction types.
- Existing transaction rollback tests pass for table creation, schema changes, row writes, and deletion.
- Package lint and typecheck pass without related disables.
Risk: Medium-high. DDL support and dynamic row tables use lower-level database APIs.
3. Replace remaining CLI withTransaction use by feature owner
Suggested owners: @n8n-io/ai for Chat Hub and @n8n-io/iam for API keys; Catalysts for shared persistence guidance
Scope:
packages/cli/src/modules/chat-hub/chat-hub-tool.service.tspackages/cli/src/modules/chat-hub/chat-message.repository.tspackages/cli/src/services/public-api-key.service.ts
Plan: Use the same TransactionRunner and OperationContext pattern as the persistence boundary guidance. Keep Chat Hub and IAM changes as separate implementation PRs if ownership or release timing differs.
Acceptance criteria:
- No deprecated
withTransactioncalls remain outside migrations. - Nested operations join an existing transaction instead of opening a second transaction.
- Rollback behavior has focused tests.
Risk: Medium.
4. Replace the deprecated execution finished field with execution status
Suggested owner: @n8n-io/catalysts; coordinate Public API changes with @n8n-io/ligo and Chat Hub changes with @n8n-io/ai
Why one ticket: finished is read and written throughout execution persistence, runners, webhooks, scaling, telemetry, public API mapping, and agent resumption. A local replacement can create inconsistent terminal-state behavior.
Main scope:
packages/@n8n/db/src/repositories/execution.repository.tspackages/cli/src/execution-lifecycle/packages/cli/src/executions/packages/cli/src/scaling/packages/cli/src/webhooks/packages/cli/src/workflow-runner.tspackages/cli/src/workflow-execute-additional-data.tspackages/cli/src/wait-tracker.ts- Execution event relays and Public API response mappers
packages/core/src/execution-engine/workflow-execute.ts- Agent and Chat Hub execution watchers
Plan:
- Define the canonical terminal-state predicate from
ExecutionStatus. - Replace internal reads of
finishedwith that predicate. - Stop writing
finishedwhen status already expresses the state. - Preserve
finishedonly at external compatibility boundaries that still require it. - Migrate repository filters such as
requireNotFinishedto status-based filters. - Decide the Public API compatibility and removal timeline separately from the internal migration.
Acceptance criteria:
- Internal execution lifecycle decisions use status, not
finished. - Waiting, canceled, crashed, errored, and successful executions have explicit tests.
- Queue-mode and regular-mode execution behavior is equivalent.
- Public API responses remain compatible until a separately approved API change.
- Remaining disables, if any, exist only on documented compatibility serialization boundaries.
Risk: High. The old Boolean does not map one-to-one to all execution statuses.
5. Remove internal use of deprecated workflow active
Suggested owner: @n8n-io/catalysts; coordinate Public API changes with @n8n-io/ligo and AI-owned consumers with their owners
Why one ticket: Workflow publication now uses active versions, but creation, execution, rollback, deletion, list responses, and AI workflows still read or assign workflow.active.
Main scope:
packages/@n8n/db/src/repositories/workflow-published-version.repository.tspackages/cli/src/workflows/packages/cli/src/node-execution/execute-node.service.tspackages/cli/src/modules/chat-hub/chat-hub-workflow.service.tspackages/cli/src/executions/execution.service.tspackages/cli/src/public-api/v1/controllers/workflows.public.controller.tspackages/cli/src/modules/instance-ai/eval/thread-restore.service.ts
Plan:
- Define the canonical internal published-state check from
activeVersionIdand publication data. - Remove assignments to
activewhen creating temporary, archived, retry, and Chat Hub workflows. - Return explicit compatibility values at API boundaries instead of mutating entities.
- Update rollback, delete, deactivate, and publication flows together.
- Decide the persistence-column migration separately if the database field remains for compatibility.
Acceptance criteria:
- Internal business logic does not depend on
WorkflowEntity.active. - Publish, deactivate, rollback, delete, retry, and temporary workflow tests pass.
- Public API compatibility is maintained or versioned explicitly.
- Related disables are removed from CLI and DB repositories.
Risk: High. Publication is an active area and has required ownership review.
6. Replace deprecated list-query types and controller middleware
Suggested owner: @n8n-io/catalysts, with feature-owner reviews
Scope:
ListQuery.Optionsaliases in credential, folder, and workflow repositorieslistQueryMiddlewareuse in workflow, credential, MCP, and test-run controllerspackages/cli/src/workflows/workflow-finder.service.ts
Plan:
- Identify the supported request DTO and repository query types.
- Keep HTTP parsing in controllers and pass domain-shaped filters to repositories.
- Replace legacy middleware on each endpoint.
- Remove repository dependencies on the deprecated shared
ListQuery.Optionstype.
Acceptance criteria:
- No repository accepts the legacy HTTP list-query type.
- Pagination, filtering, field selection, sorting, and relation loading remain covered.
- Controllers do not use deprecated list-query middleware.
Risk: Medium. Query behavior differs across workflows, credentials, folders, MCP, and evaluations.
7. Retire the legacy request and OAuth request stack
Suggested owner: @n8n-io/catalysts
Why one ticket: Whole-file disables in the adapters hide the largest unknown number of deprecated references. The compatibility stack spans backend-network and core and must preserve community-node behavior.
Scope:
packages/@n8n/backend-network/src/http/legacy-request.tspackages/@n8n/backend-network/src/http/axios/legacy.ts- Related request, utility, outbound HTTP, and testing helpers
packages/core/src/execution-engine/node-execution-context/utils/request-helpers/packages/core/src/execution-engine/eval-mock-helpers.ts- Credential test request helpers
Deprecated surface: IRequestOptions, proxyRequestToAxios, legacy request, requestOAuth1, requestOAuth2, pagination adapters, and associated Axios compatibility types.
Plan:
- Inventory external and community-node contracts that still expose
helpers.request. - Keep one explicit compatibility adapter at the public node boundary.
- Convert internal code to
IHttpRequestOptionsand the supported HTTP client. - Move OAuth transformations to the supported request path.
- Remove whole-file disables before removing the adapter itself.
Acceptance criteria:
- Internal callers use the current HTTP request API.
- OAuth1, OAuth2, proxy, pagination, binary response, redirect, and error behavior have parity tests.
- The compatibility API for shipped community nodes remains documented and tested.
- Whole-file
typescript/no-deprecateddisables are removed.
Risk: High. This is a shipped extension boundary and needs backward compatibility.
8. Migrate @n8n/agents to current AI SDK response APIs
Suggested owner: @n8n-io/ai
Scope:
runtime/loop/agent-runtime.ts:onStepFinishcompatibility- Generate and stream sinks: deprecated response messages and provider metadata
- Observation, episodic memory, title generation, and tool-result memory
- Content tool-result part types in tool guards
Plan:
- Replace
onStepFinishfallback withonStepEndat the package API boundary. - Use the AI SDK's final-step response and metadata fields consistently for generated and streamed results.
- Update token-usage conversion to the current provider metadata location.
- Migrate deprecated content tool-result shapes to the current output model.
- Update fixtures and recorded integration cassettes only where request or response shapes change.
Acceptance criteria:
- No AI SDK deprecation disables remain in
@n8n/agentsruntime code. - Generate and stream paths report equivalent messages, usage, finish reasons, and provider metadata.
- Observation memory and title generation tests cover provider metadata.
- Tool results preserve text, media, truncation, and offloading behavior.
Risk: Medium-high. A comment records that switching episodic memory to finalStep.providerMetadata currently breaks tests.
9. Replace deprecated MCP SSE transport in @n8n/agents
Suggested owner: @n8n-io/ai
Scope:
packages/@n8n/agents/src/runtime/mcp/mcp-connection.tspackages/@n8n/agents/src/__tests__/integration/mcp-server-helpers.ts
Plan: Prefer Streamable HTTP for supported servers. Keep SSE only as an explicit compatibility fallback if the MCP SDK still supports that negotiation path.
Acceptance criteria:
- New connections use Streamable HTTP.
- Legacy SSE behavior has an explicit support decision and test.
- The
SSEClientTransportdisable is removed, or the remaining fallback has a time-bound removal issue.
Risk: Medium. Removing SSE without negotiation can disconnect existing MCP servers.
10. Migrate deprecated AI tool execution-context mutation methods
Suggested owner: @n8n-io/catalysts, with @n8n-io/ai review
Scope:
packages/core/src/execution-engine/node-execution-context/supply-data-context.tspackages/cli/src/scaling/job-processor.ts
Deprecated surface: addInputData and addOutputData.
Plan: Replace direct run-data mutation with the current execution-context result and input APIs. Preserve the cloned supply-data context behavior and worker error reporting.
Acceptance criteria:
- AI tool input, success output, and error output appear correctly in execution data.
- Cloned supply-data contexts retain replacement input data.
- Main mode and worker mode have parity tests.
- All related disables are removed.
Risk: Medium-high. The PR review called out edge cases in SupplyDataContext.cloneWith().
11. Complete Code Builder checkpoint migration
Suggested owner: @n8n-io/ai
Scope: packages/@n8n/ai-workflow-builder.ee/src/code-builder/utils/code-builder-session.ts
Deprecated surface: Legacy userMessages checkpoints migrated to conversationEntries on load.
Plan:
- Measure whether legacy checkpoints still exist in supported deployments.
- Define a retention or minimum-version boundary.
- Backfill checkpoints or keep one isolated decoder until the boundary passes.
- Remove
userMessagesfrom the steady-state session type.
Acceptance criteria:
- Current checkpoints use
conversationEntriesonly. - Legacy data has a tested migration or an approved end-of-support boundary.
- The three disables are removed after the compatibility window closes.
Risk: Low for code, medium for persisted data. Do not remove this compatibility path without a concrete data-retention decision.
12. Remove deprecated cron recurrence support
Suggested owner: @n8n-io/catalysts
Scope:
packages/core/src/execution-engine/node-execution-context/utils/scheduling-helper-functions.tspackages/core/src/execution-engine/scheduled-task-manager.ts
Plan: Convert callers to the supported cron expression representation. Remove CronContext['recurrence'] from scheduled task state when no shipped node requires it.
Acceptance criteria:
- Cron registration uses the supported schedule shape.
- Existing interval, timezone, activation, and restart tests pass.
- Both recurrence disables are removed.
Risk: Medium. Existing workflows can contain older schedule parameter shapes.
Small standalone tickets
These are valid cleanups but should not block the larger migrations or be combined into one miscellaneous PR.
| Ticket | Owner | Sites | Exit condition |
|---|---|---|---|
| Replace deprecated OpenTelemetry proxy-provider APIs | @n8n-io/ligo, with AI review |
packages/cli/src/modules/otel/otel.service.ts, Agents OTel test provider |
Global-provider detection and no-op detection use supported public APIs; four disables removed. |
| Replace deprecated Node URL parsing | @n8n-io/iam and AI |
SAML referer parsing, Chat server URL parsing, auth request URL parsing | Use URL or URLSearchParams; preserve relative URL and query behavior. |
| Replace deprecated SAML relay-state mutation | @n8n-io/iam |
packages/cli/src/modules/sso-saml/saml.service.ee.ts |
Pass relay state through the supported library API; add redirect and POST binding tests. |
Replace TypeORM .onConflict() |
MCP Registry owner | packages/cli/src/modules/mcp-registry/registry/mcp-registry-server.repository.ts |
Preserve the conditional timestamp upsert without a deprecated query-builder API. |
| Replace generic user repository updates | @n8n-io/iam |
MFA, token exchange, E2E ownership transfer | Add use-case-named repository methods; remove three disables from production code. |
| Remove legacy config-schema type traversal | @n8n-io/catalysts |
packages/cli/src/config/types.ts |
Move remaining consumers to @n8n/config; remove both type-level disables. |
Remove CLI execute --file compatibility path |
@n8n-io/catalysts |
packages/cli/src/commands/execute.ts |
Confirm replacement and removal policy; remove the deprecated flag reference. |
| Remove scaling job-finished V1 compatibility | @n8n-io/catalysts |
packages/cli/src/scaling/scaling.types.ts |
All supported workers send V2; remove V1 union and disable after compatibility window. |
Remove workflow SDK embeddings alias |
@n8n-io/ai-assistant |
packages/@n8n/workflow-sdk/src/workflow-builder/subnode-utils.ts |
Generated and handwritten consumers use embedding; keep a release-note or compatibility decision. |
| Remove Instance AI legacy verification and tarball aliases | @n8n-io/ai-assistant |
prepare-run.ts, pack-workspace-sdk.ts |
Migrate verificationPinData and WorkspaceSdkTarball consumers; remove two disables. |
Replace deprecated Document.write() in MCP browser test |
@n8n-io/nodes |
packages/@n8n/mcp-browser/src/sensitivity/html-probe.test.ts |
Build iframe test content through supported DOM APIs without changing probe coverage. |
| Remove deprecated ESLint config usage from node CLI | @n8n-io/nodes |
packages/@n8n/node-cli/src/configs/eslint.ts |
Complete the planned Oxlint replacement and remove the disable. |
| Stop re-exporting the deprecated compatibility error | @n8n-io/catalysts |
packages/@n8n/errors/src/index.ts |
Confirm external compatibility policy; remove the internal export or isolate it in a compatibility entry point. |
| Replace deprecated Axios error helper import | @n8n-io/catalysts |
Core error reporter and workflow execution | Import the supported helper from its owning package or use the shared HTTP error guard; preserve sanitization behavior. |
Explicit non-ticket baseline
packages/@n8n/db/oxlint.config.mts disables the rule for database migrations. Historical migrations must remain immutable and can intentionally use APIs that were current when the migration shipped. Keep this scoped override unless migration policy changes.
Suggested order
- Data-table and remaining
TransactionRunnermigrations. - License-to-
LicenseStatemigration. - List-query migration.
- Agent AI SDK migration and MCP transport migration.
- Execution
finishedmigration. - Workflow
activemigration. - Legacy request stack retirement.
- AI tool execution-context migration.
- Cron recurrence migration.
- Persisted compatibility cleanup after retention boundaries are agreed.
The execution, workflow publication, and request-stack tickets should each use a short design note before implementation. They cross package or compatibility boundaries and are not safe mechanical replacements.
Ticket template
Use this body when the plans move to Linear:
## Context
PR #40168 enabled `typescript/no-deprecated` and added baseline disables for this deprecated API.
## Scope
- <paths and API surface>
## Plan
1. <migration step>
## Acceptance criteria
- The affected `typescript/no-deprecated` disables are removed.
- Focused tests cover old and new behavior.
- Package lint and typecheck pass.
## Compatibility and risk
<persisted data, public API, extension, or mixed-version deployment constraints>