Skip to content

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

Open
ToRyVand wants to merge 6 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 6 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
    • Optimized TypeScript build by enabling skipLibCheck for faster compiles
    • CI environment refreshed: newer Ubuntu base image, consolidated package setup, and upgraded MongoDB runtime to 8.0

@coderabbitai

coderabbitai Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

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: cd73ebe6-01dd-4413-a29c-29bab76e209e

📥 Commits

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

📒 Files selected for processing (1)
  • .github/workflows/integrate.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .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 gleams, dependencies light,
Lightning climbed a notch with flair,
TypeScript says "skip checked files" with care,
CI woke on Ubuntu twenty-six — hooray, delight.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes scope beyond #726: CI environment upgrades (ubuntu 24.04→26.04, MongoDB 6.0→8.0) that, while supporting the lightning upgrade, constitute infrastructure changes not explicitly required by the issue. Consider whether CI environment changes (Ubuntu/MongoDB versions) are truly prerequisites for the lightning upgrade or should be addressed separately per knocte's suggestion for a dedicated infrastructure PR.
✅ Passed checks (4 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 this pull request.
Linked Issues check ✅ Passed The PR fully addresses issue #726 by upgrading lightning to 11.1.0, updating Node.js requirement to >=20.0.0, and resolving type incompatibilities via tsconfig.json configuration.
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
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

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.

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

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