Context
Raygun4Node currently builds with TypeScript 6.0.x, emits ES5 CommonJS, and declares Node.js >=14.17.0. Dependabot PR #530 attempted to update TypeScript from 6.0.3 to 7.0.2, but that cannot be treated as a dependency-only upgrade:
- TypeScript 7 removes
target: "es5"; TypeScript 6 only preserves it behind ignoreDeprecations: "6.0".
- The current
typescript-eslint toolchain supports TypeScript >=4.8.4 <6.1.0, so the automated PR fails during npm ci.
- TypeScript 7 is a native compiler with different configuration defaults and hard removals for options deprecated in TypeScript 6.
- The SDK is published as CommonJS and is consumed by the AWS Lambda provider. Module-format compatibility must not change accidentally as part of a compiler update.
PR #530 was intentionally closed and TypeScript 7 Dependabot updates were ignored for the current compatibility line. This issue is the durable record for adopting TypeScript 7 deliberately.
Official migration context:
- TypeScript 6 deprecates ES5 output and recommends a newer target or an external downlevel compiler.
- TypeScript 7 turns that deprecation into a hard error and uses ES2015 as its minimum output target.
Decisions required before implementation
-
Minimum supported Node.js version
- Confirm whether
>=14.17.0 remains a real customer requirement.
- Review Node.js end-of-life status, actual SDK usage, and the CI support matrix.
- Treat raising the runtime floor as an explicit compatibility/release decision, not a compiler side effect.
-
Emitted JavaScript target
- Select and document a target supported by every retained Node.js runtime (at least ES2015; potentially ES2019/ES2020 depending on policy).
- Decide whether TypeScript should emit the final target directly or whether an external downlevel compiler is required.
-
Module format
- Preserve CommonJS unless a separately scoped package-format migration is approved.
- Do not combine an ESM-only transition with the compiler upgrade by default.
-
Toolchain readiness
- Use versions of
typescript-eslint, ESLint integrations, ts-node, and test tooling that officially support TypeScript 7.
- Do not bypass peer dependency checks with
--force or --legacy-peer-deps.
-
Configuration defaults
- Audit explicit
target, module, moduleResolution, rootDir, types, lib, declaration, and interoperability settings against TypeScript 7 defaults.
- Remove
ignoreDeprecations only after all deprecated behavior has been replaced.
Proposed implementation sequence
- Document/approve the Node.js runtime support policy and chosen JavaScript target.
- Upgrade the TypeScript-adjacent lint/test toolchain to releases with official TS 7 support while still on TS 6 where possible.
- Add a fixture or retained artifact comparison for the public JS/declaration package surface.
- Change the output target as its own reviewable compatibility change and validate it across every supported Node version.
- Upgrade TypeScript to 7 and address only compiler/configuration differences in that change.
- Validate the AWS Lambda provider against a packed build of this package before release.
Acceptance criteria
Non-goals
Context
Raygun4Node currently builds with TypeScript 6.0.x, emits ES5 CommonJS, and declares Node.js
>=14.17.0. Dependabot PR #530 attempted to update TypeScript from 6.0.3 to 7.0.2, but that cannot be treated as a dependency-only upgrade:target: "es5"; TypeScript 6 only preserves it behindignoreDeprecations: "6.0".typescript-eslinttoolchain supports TypeScript>=4.8.4 <6.1.0, so the automated PR fails duringnpm ci.PR #530 was intentionally closed and TypeScript 7 Dependabot updates were ignored for the current compatibility line. This issue is the durable record for adopting TypeScript 7 deliberately.
Official migration context:
Decisions required before implementation
Minimum supported Node.js version
>=14.17.0remains a real customer requirement.Emitted JavaScript target
Module format
Toolchain readiness
typescript-eslint, ESLint integrations,ts-node, and test tooling that officially support TypeScript 7.--forceor--legacy-peer-deps.Configuration defaults
target,module,moduleResolution,rootDir,types,lib, declaration, and interoperability settings against TypeScript 7 defaults.ignoreDeprecationsonly after all deprecated behavior has been replaced.Proposed implementation sequence
Acceptance criteria
tsconfig.jsoncontains explicit settings needed to prevent default-driven output/layout changes.require("raygun")works on every supported Node.js version.npm packcontains the expectedbuild/JS and declaration entry points.Non-goals