Skip to content

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

Open
ToRyVand wants to merge 8 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 8 commits into
lnp2pBot:mainfrom
ToRyVand:feat/issue-726-lightning-upgrade

Conversation

@ToRyVand

@ToRyVand ToRyVand commented May 17, 2026

Copy link
Copy Markdown

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 20+
    • Upgraded core dependency (lightning) to a new major release
    • Enabled TypeScript skipLibCheck to speed up builds
    • CI environment refreshed: newer Ubuntu base image, consolidated package installation, and upgraded MongoDB runtime to 8.0

@coderabbitai

coderabbitai Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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 with MongoDB 8.0 apt/key changes.

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 canvas 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 gleams, dependencies light,
Lightning climbed a notch with flair,
TypeScript whispers "skipLibCheck" there,
CI woke on Ubuntu twenty-six — delight.

🚥 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 PR title clearly and specifically describes the main change: upgrading the lightning dependency from 10.25.0 to 11.1.0 with issue reference.
Linked Issues check ✅ Passed All objectives from issue #726 are met: lightning upgraded to 11.1.0, Node.js requirement bumped to >=20.0.0, type incompatibilities resolved via skipLibCheck, and CI updated to provide Node >=20 runtime.
Out of Scope Changes check ✅ Passed All changes are directly related to the lightning upgrade: dependency version bump, Node engine requirement update, TypeScript configuration fix, and CI environment updates are all necessary prerequisites for the upgrade.
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

knocte commented May 18, 2026

Copy link
Copy Markdown
Collaborator

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

ToRyVand commented May 18, 2026

Copy link
Copy Markdown
Author

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).

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 Outdated
Comment thread .github/workflows/integrate.yaml Outdated
@ToRyVand ToRyVand force-pushed the feat/issue-726-lightning-upgrade branch from 285ff17 to 2d08101 Compare May 18, 2026 23:28
@knocte

knocte commented May 18, 2026

Copy link
Copy Markdown
Collaborator

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

ToRyVand commented May 19, 2026

Copy link
Copy Markdown
Author

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.

@knocte

knocte commented May 19, 2026

Copy link
Copy Markdown
Collaborator

Node.js 20 is available via NodeSource (the official Node.js distribution for Ubuntu, not a workaround)

If you want to change the way NodeJS is installed in CI, IMHO it should go in a separate PR (but if you open it, you will get a -1 from me, because NodeJS installed with apt is way simpler and has other advantages).

@ToRyVand

Copy link
Copy Markdown
Author

NodeSource was already dropped — current CI installs Node.js via apt on ubuntu:26.04 (which ships Node 22).

The CI changes can't go in a separate PR: lightning v11 requires Node >=20, and the previous CI didn't meet that requirement. This change is a direct prerequisite of the upgrade.

@ToRyVand

ToRyVand commented Jun 9, 2026

Copy link
Copy Markdown
Author

Hi @knocte — consolidating, since the thread drifted.

Final setup is all distro apt, no NodeSource: ubuntu:26.04 ships Node 22 via apt (24.04 only ships Node 18, which is why 26.04), and MongoDB 8.0 via the noble channel — no dedicated 26.04 repo yet, but the packages are binary-compatible.

I reproduced the full CI in a clean ubuntu:26.04 container: Node 22 + MongoDB 8.0.23 (starts & connects) + 126 tests passing + prettier clean. I also added inline comments in the workflow explaining the 26.04 and noble choices.

The CI run here is stuck in action_required (fork approval), so CodeRabbit is the only visible green check — could you approve the run? Happy to address anything else.

@knocte

knocte commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

I don't have permissions to approve CI runs for PRs sorry.

@ToRyVand

Copy link
Copy Markdown
Author

Hi @Catrya — could you help approve the CI run here when you get a chance? @knocte mentioned he doesn't have permissions to approve CI runs, so the workflows are stuck in action_required. I reproduced the full pipeline locally on ubuntu:26.04 (all tests passing), so it should come up green. Thanks!

ToRyVand added 6 commits June 11, 2026 12:35
…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.
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.
@ToRyVand ToRyVand force-pushed the feat/issue-726-lightning-upgrade branch from ada2d64 to da0a939 Compare June 11, 2026 17:44

@mostronatorcoder mostronatorcoder Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I reviewed the current head and I do see one real blocking issue before merge.

Blocking issue:

  • The workflow now runs inside ubuntu:26.04, but MongoDB is installed from the noble (24.04) mongodb-org/8.0 apt repository with the justification that it is “binary-compatible”.
  • That may happen to work in local testing, but it is still an unsupported base/repository combination for a critical CI dependency.
  • For a PR whose intended scope is upgrading lightning to v11, this introduces a fragile environment assumption into the integration pipeline rather than keeping CI on a supported, reproducible base.

Why I think this is a blocker:

  • CI reliability is part of correctness here. If the job depends on unofficial distro/package compatibility, failures can appear later as infra noise unrelated to the actual code change.
  • The PR description and comments treat this as effectively acceptable, but from a maintenance standpoint it is still “works by accident until it doesn’t”.
  • A dependency/tooling upgrade PR should not widen the support surface through an unsupported OS/repo combination unless that broader environment change is explicitly intended and justified.

What I would want instead:

  • Either move the container back to an Ubuntu release MongoDB 8 officially supports and install Node 20 there explicitly, or choose another fully supported CI setup for both Node and MongoDB.
  • In short: supported Node + supported MongoDB base, not a mixed unsupported compromise.

I do not have a blocker in the lightning version bump itself from this diff, but I would request changes on the CI environment choice.

ubuntu:24.04 (noble) is an LTS officially supported by MongoDB 8.0, so
both MongoDB and Node come from supported sources instead of mixing an
ubuntu:26.04 base with the noble MongoDB repo. lightning v11 only needs
Node >=20, which NodeSource provides on 24.04. Addresses CI review
feedback on PR lnp2pBot#806.

Validated locally in a real ubuntu:24.04 container: Node 20.20.2 via
NodeSource and MongoDB 8.0.26 from the noble repo install and start
(mongod ping ok).
@ToRyVand

Copy link
Copy Markdown
Author

Thanks for the careful review — you're right, and I've reverted the CI base accordingly.

The job now runs on ubuntu:24.04 (noble), an LTS that MongoDB 8.0 officially supports, with Node 20 installed via NodeSource. So both MongoDB and Node come from supported sources — no more mixing a 26.04 base with the noble MongoDB repo. Since lightning v11 only requires Node >=20, there was no real reason to push the base to 26.04 just to get a newer Node from distro apt.

Validated locally in a clean ubuntu:24.04 container: Node 20.20.2 (NodeSource) and MongoDB 8.0.26 (noble repo) both install and start, mongod ping returns ok. Pushed in 4df96b1.

@ToRyVand

Copy link
Copy Markdown
Author

@Catrya when you have a moment, could you approve the CI run? The latest push moves the base back to a supported ubuntu:24.04 + NodeSource Node 20 (validated locally), which should address the environment concern. Thanks!

Replaces ubuntu:24.04 + NodeSource with the official node:20-bookworm
image: Node 20 comes baked into the image (no third-party NodeSource
repo) and MongoDB 8.0 installs from the officially supported Debian
bookworm repo. Satisfies both a supported MongoDB base and avoiding a
third-party Node source. Validated end-to-end in a node:20-bookworm
container: npm ci, tsc (0 errors), 126 tests passing, prettier clean.
@ToRyVand

Copy link
Copy Markdown
Author

Switched the CI base to the official node:20-bookworm image (instead of ubuntu:24.04 + NodeSource): Node 20 is baked into the image — no third-party repo — and MongoDB 8.0 comes from the supported Debian bookworm repo. Keeps both Node and MongoDB on supported sources. Validated end-to-end in the container: npm ci, tsc clean, 126 tests, prettier clean.

@ToRyVand

Copy link
Copy Markdown
Author

The CI base discussion for this PR is happening on #805 since it's the same integrate.yaml change on both. Summary: moved to the official node:20-bookworm image (Node 20 baked in, no NodeSource; MongoDB 8.0 from the supported Debian repo). @Catrya's input on the preferred base would help settle it for both PRs.

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