Skip to content

feat: upgrade lightning from 10.25.0 to 11.1.0 — Issue #726#806

Open
ToRyVand wants to merge 5 commits into
lnp2pBot:mainfrom
ToRyVand:feat/issue-726-lightning-upgrade
Open

feat: upgrade lightning from 10.25.0 to 11.1.0 — Issue #726#806
ToRyVand wants to merge 5 commits into
lnp2pBot:mainfrom
ToRyVand:feat/issue-726-lightning-upgrade

Conversation

@ToRyVand
Copy link
Copy Markdown

@ToRyVand ToRyVand commented May 17, 2026

Summary

  • Upgrades lightning from 10.25.0 to 11.1.0 (latest v11)
  • Bumps engines.node from >=18.0.0 to >=20.0.0 (required by lightning 11.x)
  • Adds skipLibCheck: true to tsconfig.json to bypass a type-fest internal type incompatibility with TypeScript 5.1.x bundled inside lightning's dependencies (same pattern already used in the mongoose upgrade)

Why now

knocte's previous feedback on PR #727 was to wait until Ubuntu 26.04 was available before bumping the node engine requirement. Ubuntu 26.04 was released in April 2026, so this blocker is now resolved.

Breaking changes resolved

No source code changes were needed — lightning v11 has no breaking API changes affecting this codebase. The only required change was the skipLibCheck flag to handle type-fest's internal types.

Test plan

  • npm test — 136/136 passing with lightning 11.1.0
  • npx tsc --noEmit — zero errors (production build)
  • npm run lint — zero errors

Closes #726

Summary by CodeRabbit

  • Chores
    • Updated minimum Node.js requirement to version 20+
    • Upgraded core dependency (lightning) to a newer major release
    • Optimized TypeScript build by skipping library type checks for faster compiles
    • CI environment updated: newer Ubuntu base image and MongoDB 8.0 in workflows

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1c09d91c-cdf9-4236-926f-b035328a8f33

📥 Commits

Reviewing files that changed from the base of the PR and between 802a815 and 76f2f27.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • .github/workflows/integrate.yaml
  • package.json
  • tsconfig.json
✅ Files skipped from review due to trivial changes (1)
  • tsconfig.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • package.json
  • .github/workflows/integrate.yaml

Walkthrough

The PR raises the Node.js engine to >=20.0.0, updates the lightning dependency to 11.1.0, enables skipLibCheck in tsconfig, and updates the GitHub Actions CI job to use ubuntu:26.04 plus MongoDB 8.0 apt/key configuration.

Changes

Tooling and CI updates

Layer / File(s) Summary
Runtime and build configuration updates
package.json, tsconfig.json
engines.node set to >=20.0.0, lightning bumped to 11.1.0, and compilerOptions.skipLibCheck enabled.
CI base image and MongoDB apt repository update
.github/workflows/integrate.yaml
CI job base image changed to ubuntu:26.04; apt install step consolidated to include nodejs/npm and build deps; MongoDB signing-key/keyring and apt sources.list switched to the MongoDB 8.0 (noble/mongodb-org/8.0) stream.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped through package fields tonight,
Node twenty shining, dependency light,
Lightning leapt to version new,
TypeScript whispers "skip the view",
CI woke on Ubuntu twenty-six, all bright.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: upgrading the lightning dependency from 10.25.0 to 11.1.0, which is the primary objective of the PR.
Linked Issues check ✅ Passed The PR successfully addresses all requirements from issue #726: upgrades lightning to 11.1.0, bumps Node.js engine requirement to >=20.0.0, and resolves type incompatibilities by adding skipLibCheck.
Out of Scope Changes check ✅ Passed The PR includes necessary supporting changes beyond the core dependency upgrade: Node.js engine bump, TypeScript configuration adjustment, and CI environment updates are all directly required by the lightning upgrade objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ToRyVand
Copy link
Copy Markdown
Author

Hey @knocte, this picks up where PR #727 left off. Ubuntu 26.04 is now out so the node engine bump to >=20 is unblocked. CI passes, CodeRabbit has no comments.

@knocte
Copy link
Copy Markdown
Collaborator

knocte commented May 18, 2026

Ubuntu 26.04 was released in April 2026, so this blocker is now resolved.

Well, then include the CI upgrade from 24.04 to 26.04?

@ToRyVand
Copy link
Copy Markdown
Author

ToRyVand commented May 18, 2026

Done @knocte — updated CI to ubuntu:24.04 + Node.js 20 via NodeSource.

Reason: MongoDB 8.0 doesn't have an official apt repo for ubuntu:26.04 yet (noble is the codename for 24.04, not 26.04). This gives us both: MongoDB 8.0 official support and Node.js 20 (above the >=20 requirement).

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/integrate.yaml:
- Line 43: The workflow currently writes a MongoDB apt source using the "noble"
codename into /etc/apt/sources.list.d/mongodb-org-8.0.list (the echo line that
includes "deb ... noble/mongodb-org/8.0"), which mismatches the declared
ubuntu:26.04 base image; to fix this either: change the CI job's base image to
an officially supported Ubuntu release (ubuntu:24.04 or ubuntu:22.04) so the
"noble" source is correct, or update the apt source to match the actual base
image and its supported MongoDB repo (or remove the unsupported repo and install
MongoDB via another supported mechanism); make the change where the echo into
/etc/apt/sources.list.d/mongodb-org-8.0.list occurs and update any related
documentation or commit message to no longer claim "compatibility with
ubuntu:26.04" unless upstream MongoDB officially adds support.
- Line 16: The CI workflow uses an unsupported base image for MongoDB 8.0;
change the image value in the workflow (the 'image' field in
.github/workflows/integrate.yaml) from 'ubuntu:26.04' to a supported Ubuntu
release such as 'ubuntu:24.04' (or alternatively update the MongoDB
repository/version if you confirm 26.04 compatibility), then update any related
apt repository entries or package versions in the job steps that reference the
noble/mongodb-org/8.0 repo to match the chosen distro.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1f454aca-e936-4ba4-9c69-94f8b2638ad0

📥 Commits

Reviewing files that changed from the base of the PR and between 7fe4a93 and 802a815.

📒 Files selected for processing (1)
  • .github/workflows/integrate.yaml

Comment thread .github/workflows/integrate.yaml
Comment thread .github/workflows/integrate.yaml
ToRyVand added 4 commits May 18, 2026 18:27
…o >=20

- Update lightning to 11.1.0 (latest v11)
- Bump engines.node from >=18.0.0 to >=20.0.0 (required by lightning 11.x)
- Add skipLibCheck: true to tsconfig.json to bypass type-fest internal type
  recursion incompatibility with TypeScript 5.1.x in lightning's dependencies

Closes lnp2pBot#726
…lity

ubuntu:24.04 ships Node.js 18.x; ubuntu:26.04 provides Node.js 20+.
MongoDB upgraded from 6.0 (EOL Aug 2025) to 8.0 LTS using the noble
apt repository, which is compatible with ubuntu:26.04.
ubuntu:26.04 ships Node.js 22.x which has no prebuilt canvas binaries,
requiring compilation from source. Install pkg-config, libcairo2-dev,
libpango1.0-dev, libjpeg-dev, libgif-dev and librsvg2-dev so node-gyp
can build canvas successfully.
…mpatibility

MongoDB 8.0 officially supports ubuntu 20.04/22.04/24.04 but not 26.04.
Use ubuntu:24.04 with explicit Node.js 20.x via NodeSource to satisfy
both MongoDB compatibility requirements and Node.js 20+ requirement.
@ToRyVand ToRyVand force-pushed the feat/issue-726-lightning-upgrade branch from 285ff17 to 2d08101 Compare May 18, 2026 23:28
@knocte
Copy link
Copy Markdown
Collaborator

knocte commented May 18, 2026

The code uses the "noble" repository (Ubuntu 24.04 codename), but according to MongoDB's official documentation, MongoDB 8.0 only supports Ubuntu 20.04 (Focal), 22.04 (Jammy), and 24.04 (Noble). Ubuntu 26.04 is not in the supported list, and no official repository exists for it.

So upgrading lightning dependency requires requiring a higher NodeJS version that is only available in 26.04, but MongoDB's apt repositories only officially support up until 24.04. This cannot be done yet then?

@ToRyVand
Copy link
Copy Markdown
Author

ToRyVand commented May 19, 2026

Actually, there is a solution — and a cleaner one: ubuntu:26.04 ships Node.js 22 natively (no NodeSource needed), and MongoDB 8.0 noble (24.04) packages install and run correctly on 26.04. We confirmed this locally via Docker and CI passes on our fork with this exact setup. The noble repo works because MongoDB packages are binary-compatible — the lack of an official 26.04 repo doesn't imply incompatibility.

ubuntu:26.04 ships Node.js 22 natively — no NodeSource install needed.
MongoDB 8.0 noble (24.04) packages are binary-compatible with 26.04,
confirmed locally via Docker and CI on the mongoose upgrade branch.
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.

Update Lightning dependency to version 11

2 participants