Skip to content

chore(deps)!: compile with typescript 7 and support node 26 - #293

Merged
rohit-sourcefuse merged 1 commit into
masterfrom
GH-292
Dec 3, 2026
Merged

rohit-sourcefuse merged 1 commit into
masterfrom
GH-292

Conversation

@piyushsinghgaur1

Copy link
Copy Markdown
Contributor

Description

Fixes #292

This compiles the package with the TypeScript 7 native compiler and adds Node.js 26 to the supported engines and the CI matrix.

The runtime stays on LoopBack 7. The LoopBack 8 packages still peer on @loopback/core ^7, so moving now would nest a second LoopBack copy in every LoopBack 7 app. The LoopBack 8 move comes in a separate release.

BREAKING CHANGE: Yes

Consumers see two changes. engines now includes Node.js 26, and the package is built with TypeScript 7. The published declaration files stay usable from TypeScript 5.9 consumers.

What changes:

  • Dev tooling moves to @loopback/build 13, @loopback/eslint-config 17, @loopback/testlab 9 and @types/node 22.
  • lb-tsc runs on @typescript/native 7.0.2. eslint and editors use typescript aliased to @typescript/typescript6.
  • typescript-eslint is pinned to ~8.72.2. From 8.73 it peers on the TypeScript 7.1 dev builds, which breaks npm ls.
  • engines and the CI matrix add Node.js 26 (22 || 24 || 26).
  • Two lint-only source changes, with no behaviour change. The SAML and Azure AD strategy providers use optional chaining for passReqToCallback, and the bearer provider drops two no-misused-promises disable comments that were no longer needed.

Known limitation

LoopBack 7 declares engines: 20 || 22 || 24, so npm on Node.js 26 prints EBADENGINE warnings for the @loopback/* packages. These are warnings only. Install, build and tests work, and nothing fails unless engine-strict is set. Any LoopBack 7 app on Node.js 26 sees the same warnings from its own dependencies. They go away with LoopBack 8.

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How has this been tested?

  • lb-tsc builds with TypeScript 7.0.2. Build and lint are clean.
  • npm test passes with 126 tests on Node.js 22, 24 and 26.
  • npm ls is clean. npm ci works on npm 10 and npm 11.
  • The packed tarball was installed into loopback4-microservice-catalog through overrides. All 19 packages and services build. The service and package test suites pass on Node.js 24 and 26, for example authentication-service (181 tests), audit-service (33) and user-tenant-service (56). oidc-service has no test result because no tests ran there.
  • A monorepo auth service generated with the sl CLI on Node.js 26 passes 16 end-to-end checks: login, token, refresh, logout, and bearer-protected APIs.

Checklist

  • npm test passes on your machine
  • Performed a self-review of my own code
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Any dependent changes have been merged and published in downstream modules

move dev tooling to @loopback/build 13, eslint-config 17, testlab 9,
@types/node 22 and typescript-eslint ~8.72.2. lb-tsc compiles with
typescript 7 (@typescript/native) and typescript is aliased to the
typescript 6 api for eslint.

add node 26 to engines and the ci matrix. runtime stays on loopback 7.

use optional chaining for passReqToCallback in the saml and azure ad
providers and drop two unused no-misused-promises disable comments in
the bearer provider. no behaviour change.

GH-292

BREAKING CHANGE: Yes
@sonarqubecloud

sonarqubecloud Bot commented Dec 2, 2026

Copy link
Copy Markdown

@rohit-sourcefuse rohit-sourcefuse left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Piyush. I checked it out and ran it against master.

What I verified

  • npm ci --ignore-scripts, build, lint and the 126 tests pass on master and on this branch, and npm ls exits 0 on both.
  • The published package has the same file list, and the only manifest change is engines gaining 26. The .d.ts changes are type-only: the /// <reference types="express" /> lines are gone and NonVoid now comes from @loopback/context, which is already a dependency. I compiled a small consumer against the master and branch builds with TypeScript 5.9 and 6 (skipLibCheck: false) and got the same result from both.
  • The source edits do not change behaviour. options?.passReqToCallback === true/false picks the same branch as before for every input, including the AzureAD else paths. The two removed no-misused-promises comments are required: with the new typescript-eslint they are reported as unused disable directives, and the compiled bearer provider differs from master only by those comments.
  • npm audit --omit=dev goes from 1 critical (cross-spawn) to 0. All lockfile entries resolve from registry.npmjs.org (plus the existing vendored passport-apple), and no new package has an install script.

Before merging: release version and notes

Same as audit-log#180. The repo squash-merges with the commit messages as the body, and I ran that message through the repo's semantic-release config: with the ! title and the BREAKING CHANGE: Yes footer it releases 15.0.0, and the BREAKING CHANGES section says Yes.

Since nothing a consumer installs changes in a breaking way, I don't think this needs a major. @sourceloop/core and authentication-service depend on ^14.0.0, so 15.0.0 would need a catalog bump before anyone gets it. My suggestion is to squash as chore(deps): ... and delete the BREAKING CHANGE: Yes line. If the team does want a major, please replace Yes with a real note.

Non-blocking

  • src/release_notes is excluded through ignorePatterns here and through .eslintignore in loopback4-authorization#172. Both work, since this repo has no src/.eslintrc.js. Using .eslintignore in both would keep them consistent.

Approving, with the release note to sort out at squash time.

@rohit-sourcefuse
rohit-sourcefuse merged commit 45ce19a into master Dec 3, 2026
7 checks passed
@rohit-sourcefuse
rohit-sourcefuse deleted the GH-292 branch December 3, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compile with TypeScript 7 and support Node.js 26

2 participants