Skip to content

Version Packages - #74

Open
github-actions[bot] wants to merge 1 commit into
masterfrom
changeset-release/master
Open

github-actions[bot] wants to merge 1 commit into
masterfrom
changeset-release/master

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.

Releases

react-spring-lightbox@1.10.0

Released 2026-11-07

Minor Changes

  • 3a4933c: Add an ES module build and an exports map, so import and require each load their own bundle with matching types.

    • The package now ships dist/index.mjs (ES module) and dist/index.cjs (CommonJS, renamed from dist/index.cjs.js), each with a source map. The type declarations are bundled into dist/index.d.mts for import and dist/index.d.cts for require. They replace dist/index.d.ts and the per-file declarations that 1.9.0 shipped under dist/components/ and dist/types/.
    • package.json now sets "main": "./dist/index.cjs", "module": "./dist/index.mjs", and "types": "./dist/index.d.cts". Its new exports map has import and require conditions for the package root and also exposes ./package.json.
    • Bundlers now load the ES module build. Together with the existing "sideEffects": false, that lets them drop the lightbox entirely from an app that imports it without rendering it.
    • import Lightbox, { ImagesListType } from 'react-spring-lightbox' works as before, and require('react-spring-lightbox') still returns the component itself, not { default }.
    • The CommonJS declarations now use export =, which matches module.exports = Lightbox. The 1.9.0 declarations used export default, so TypeScript projects compiling to CommonJS under "module": "node16" or "nodenext" expected a .default property that does not exist at runtime. import Lightbox = require('react-spring-lightbox') now type-checks as well.
    • The declarations import React's types from react instead of relying on the global React namespace that @types/react declares.
    • Release 1.8.0 removed an earlier ES module build because of problems with Next.js and its SWC compiler. The repository's Next.js 16 demo, which uses Turbopack, builds and hot-reloads with this one.

    Upgrade notes:

    • Imports of files inside dist/ now fail, because the exports map exposes only the package root and ./package.json. Node.js reports ERR_PACKAGE_PATH_NOT_EXPORTED, and bundlers report that the package path is not exported. Import from react-spring-lightbox instead, and replace imports of dist/types/ImagesList with import type { ImagesListType } from 'react-spring-lightbox'.
    • Configuration that names dist/index.cjs.js directly needs to name the package instead.
  • 3a4933c: Require Node.js ^22.18.0 || ^24.11.0 || >=26.0.0 and npm >=10.9.0 in engines, up from Node.js >=16 and npm >=7.

    • Node.js 16, 18, and 20 are past end of life. Installing the package from a git URL runs its prepare script, which builds it with rolldown-plugin-dts, and that plugin supports only these Node.js versions.
    • The published bundles use no Node.js APIs and need only ES2022 support, so the new minimum comes from the build and from Node.js's support schedule rather than from the code the lightbox runs.
    • On older versions, npm prints npm warn EBADENGINE Unsupported engine and installs anyway. With engine-strict=true, npm stops with npm error code EBADENGINE. Yarn 1 always stops, with The engine "node" is incompatible with this module followed by error Found incompatible module. Upgrade Node.js, or skip the check with yarn install --ignore-engines or npm install --engine-strict=false.
  • 3cd50c2: Support React 19 by moving to @react-spring/web 10, and fix two-finger pinch zoom stopping after its first step under React 19.

    • dependencies now has @react-spring/web ^10.1.2, up from ^9.7.3. Version 9 declares react and react-dom peers of ^16.8.0 || ^17.0.0 || ^18.0.0, and version 10 adds ^19.0.0. The lightbox's own peers stay react >=16.8 and react-dom >=16.8.
    • With 1.9.0 next to React 19, npm 11 prints npm warn ERESOLVE overriding peer dependency and installs @react-spring/web 9.7.5 anyway. With --strict-peer-deps, npm stops with npm error code ERESOLVE and lists @react-spring/web@"^9.7.3" from react-spring-lightbox@1.9.0 under Could not resolve dependency:. This release installs next to React 19 without either message.
    • Under React 19, a two-finger pinch zoomed for one step and then stopped. When the second finger landed, ImagePager marked itself as dragging and cancelled the drag. Its drag-end handler cleared that flag only inside an if (isDragging) check, which read a stale false because React 19 had not yet re-rendered the pager with the new value. The flag stayed set, and the image ignores pinches while the pager is dragging. The drag-end handler now always moves the pages back to their resting positions and clears the flag 100 ms after the gesture ends.
    • React 18 keeps working. The unit tests and the Chromium Playwright tests pass against React 18.3.1 as well as React 19. The peer range still includes React 16.8 and 17, which this release was not tested against.

    Upgrade notes:

    • If your app also depends on @react-spring/web 9, npm installs a second copy for the lightbox, and npm ls @react-spring/web lists 9.x at the top level and 10.x under react-spring-lightbox. Your bundle then carries both copies. Settings you apply through Globals.assign, such as skipAnimation in a test setup file, reach only your copy, so the lightbox's springs keep animating. Move your app to @react-spring/web 10 so both share one copy.

Patch Changes

  • 3a4933c: Build with Rolldown and TypeScript 7 instead of Rollup, Babel, and TypeScript 5, and drop the @babel/runtime dependency.

    • dependencies no longer lists @babel/runtime. The 1.9.0 bundle required @babel/runtime/helpers/defineProperty, @babel/runtime/helpers/extends, and @babel/runtime/helpers/objectWithoutProperties, and neither bundle needs them now.
    • Both bundles target ES2022. Class fields, object spread and rest, and optional chaining stay native, where Babel used to turn class fields and object spread into helper calls. Safari 15.6, Chrome 109, Firefox 102, and later run this syntax, the same browsers the Babel build targeted. A parser that cannot read class fields, such as the one in webpack 4, could not read 1.9.0 either, because 1.9.0 already used optional chaining.
    • The CommonJS bundle went from 12.2 kB to 10.2 kB, or from 4.0 kB to 3.7 kB gzipped. The new ES module bundle is 9.4 kB, or 3.5 kB gzipped.
    • Rolldown's Oxc minifier replaces Terser, so minified names and stack traces differ from 1.9.0. Both bundles ship source maps.
    • TypeScript 7 writes the declarations, and rolldown-plugin-dts bundles them into one file per module format.
    • No runtime behavior change is intended. The unit tests run the same user flows against both built bundles, and CI runs the Playwright suite in Chromium, Firefox, and WebKit.
    • Linting, formatting, and the git hooks also moved, to oxlint, oxfmt, and husky 9, but none of that ships in the package.
  • 3a4933c: Ship CHANGELOG.md in the npm package, so the release notes are in node_modules/react-spring-lightbox/CHANGELOG.md after an install.

    • files in package.json now lists CHANGELOG.md and MIGRATION.md next to dist. Through 1.9.0, the package held only dist/, package.json, README.md, and LICENSE, so the release notes were only on GitHub.
    • No release has a MIGRATION.md yet. The first release that needs a step-by-step migration guide ships one at node_modules/react-spring-lightbox/MIGRATION.md.
    • Nothing imports either file, so app bundles don't change.

@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a7feaa7e-61a7-4b88-9496-01008d74b999

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions
github-actions Bot force-pushed the changeset-release/master branch from 39557e9 to 5c4ec23 Compare November 7, 2026 04:38
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.

0 participants