Repository navigation
chore(deps)!: compile with typescript 7 and support node 26 - #293
Conversation
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
|
rohit-sourcefuse
left a comment
There was a problem hiding this comment.
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, andnpm lsexits 0 on both.- The published package has the same file list, and the only manifest change is
enginesgaining 26. The.d.tschanges are type-only: the/// <reference types="express" />lines are gone andNonVoidnow 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/falsepicks the same branch as before for every input, including the AzureADelsepaths. The two removedno-misused-promisescomments 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=devgoes from 1 critical (cross-spawn) to 0. All lockfile entries resolve from registry.npmjs.org (plus the existing vendoredpassport-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_notesis excluded throughignorePatternshere and through.eslintignorein loopback4-authorization#172. Both work, since this repo has nosrc/.eslintrc.js. Using.eslintignorein both would keep them consistent.
Approving, with the release note to sort out at squash time.



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.
enginesnow 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:
@loopback/build13,@loopback/eslint-config17,@loopback/testlab9 and@types/node22.lb-tscruns on@typescript/native7.0.2. eslint and editors usetypescriptaliased to@typescript/typescript6.~8.72.2. From 8.73 it peers on the TypeScript 7.1 dev builds, which breaksnpm ls.enginesand the CI matrix add Node.js 26 (22 || 24 || 26).passReqToCallback, and the bearer provider drops twono-misused-promisesdisable 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 unlessengine-strictis 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
How has this been tested?
lb-tscbuilds with TypeScript 7.0.2. Build and lint are clean.npm testpasses with 126 tests on Node.js 22, 24 and 26.npm lsis clean.npm ciworks on npm 10 and npm 11.slCLI on Node.js 26 passes 16 end-to-end checks: login, token, refresh, logout, and bearer-protected APIs.Checklist