Skip to content

v7.0.0 - #523

Open
colbyfayock wants to merge 40 commits into
mainfrom
beta
Open

v7.0.0#523
colbyfayock wants to merge 40 commits into
mainfrom
beta

Conversation

@colbyfayock

@colbyfayock colbyfayock commented Sep 26, 2024 •

Copy link
Copy Markdown
Collaborator

Includes

Resolves

Fixes #441 - v7
Fixes #137 - "use client"
Fixes #519 - Bundle Size

This is a small internal improvement that I think is worth taking. This
makes sure that the repository is using only a single package manager
and switches away from using relative paths to reach out across
workspace boundaries

cc @colbyfayock

---------

Co-authored-by: Colby Fayock <fayock@gmail.com>
@vercel

vercel Bot commented Sep 26, 2024 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
next-cloudinary Ready Ready Preview Sep 25, 2026 5:02am UTC

Request Review

# Description

This PR switches away from tsup to preconstruct - a lesser-known but
more capable tool.

The benefits are:
- better cjs & esm setup 
- and types for the above (this should pass
https://arethetypeswrong.github.io/ checks)
- `'use client'` directive support. With this you just can just add the
directive to any of your files and Preconstruct takes care of isolating
that in its own chunk
- `package.json#exports` flexibility:
- it should be possible to add extra entrypoints with ease if you ever
need that (like `next-cloudinary/something`)
- it's also easy to use differential bundling with this, if you ever
need to ship different code for dev/prov bundles, or for
node/browser/webworker/vercel's edge-light/younameit (or perhaps for
`react-server` condition)

## Issue Ticket Number

Related to
#435

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Fix or improve the documentation
- [ ] This change requires a documentation update


# Checklist

- [x] I have followed the contributing guidelines of this project as
mentioned in [CONTRIBUTING.md](/CONTRIBUTING.md)
- [x] I have created an
[issue](https://github.com/cloudinary-community/next-cloudinary/issues)
ticket for this PR
- [x] I have checked to ensure there aren't other open [Pull
Requests](https://github.com/cloudinary-community/next-cloudinary/pulls)
for the same update/change?
- [x] I have performed a self-review of my own code
- [x] I have run tests locally to ensure they all pass
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes needed to the documentation

BREAKING CHANGE: New build tool, no longer requires `use client` directive, marking as breaking for safety
# [7.0.0-beta.1](v6.13.0...v7.0.0-beta.1) (2024-09-27)

### Features

* Switch to Preconstruct for library building ([#520](#520)) ([a35a928](a35a928))

### BREAKING CHANGES

* New build tool, no longer requires `use client` directive, marking as breaking for safety
# [7.0.0-beta.2](v7.0.0-beta.1...v7.0.0-beta.2) (2024-10-03)

### Bug Fixes

* make sure to publish types ([#528](#528)) ([b1d1f61](b1d1f61))
# [7.0.0-beta.3](v7.0.0-beta.2...v7.0.0-beta.3) (2024-10-14)

### Bug Fixes

* removed ts-ignore ([#535](#535)) ([32931c9](32931c9)), closes [#426](#426)
* use more proper type to derive `CldVideoPlayerProps` ([#537](#537)) ([65c3dd1](65c3dd1))

### Features

* added unique id generation using React's `useId()` hook ([#529](#529)) ([682f4c2](682f4c2)), closes [#493](#493)
# [7.0.0-beta.4](v7.0.0-beta.3...v7.0.0-beta.4) (2024-10-15)

### Features

* Log x-cld-error on image error ([#553](#553)) ([711c759](711c759)), closes [#512](#512)
# [7.0.0-beta.5](v7.0.0-beta.4...v7.0.0-beta.5) (2024-10-25)

### Bug Fixes

* upgrading util packages to beta which refactors type system and how props are exported ([08a60de](08a60de))
# [7.0.0-beta.8](v7.0.0-beta.7...v7.0.0-beta.8) (2024-11-01)

### Bug Fixes

* lockfile ([cb44682](cb44682))

### Features

* nextjs 15 support in package.json ([fb75bff](fb75bff))
# [7.0.0-beta.9](v7.0.0-beta.8...v7.0.0-beta.9) (2024-11-01)

### Bug Fixes

* upgrading to stable releases for url-loader and util packages ([1b9c160](1b9c160))
vickywane and others added 2 commits November 1, 2024 15:15
# Description

This PR will add the `src` type to `CloudinaryLoaderCldOptions`
interface to fix the ts error being thrown from the
`cloudinary-loader.ts` file.

Fixes This will close #425 

<!-- Specify above which issue this fixes by referencing the issue
number (`#<ISSUE_NUMBER>`) or issue URL. -->
<!-- Example: Fixes
https://github.com/cloudinary-community/next-cloudinary/issues/<ISSUE_NUMBER>
-->

## Type of change

<!-- Please select all options that are applicable. -->

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Fix or improve the documentation
- [ ] This change requires a documentation update


# Checklist

<!-- These must all be followed and checked. -->

- [x] I have followed the contributing guidelines of this project as
mentioned in [CONTRIBUTING.md](/CONTRIBUTING.md)
- [x] I have created an
[issue](https://github.com/cloudinary-community/next-cloudinary/issues)
ticket for this PR
- [x] I have checked to ensure there aren't other open [Pull
Requests](https://github.com/cloudinary-community/next-cloudinary/pulls)
for the same update/change?
- [x] I have performed a self-review of my own code
- [x] I have run tests locally to ensure they all pass
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes needed to the documentation

---------

Co-authored-by: Colby Fayock <fayock@gmail.com>
# [7.0.0-beta.10](v7.0.0-beta.9...v7.0.0-beta.10) (2024-11-01)

### Bug Fixes

* add src type to CloudinaryLoaderCldOptions interface ([#552](#552)) ([74e1b96](74e1b96)), closes [#425](#425)
eportis-cloudinary and others added 4 commits September 16, 2025 14:52
This brings the seed parameter to fillBackground
# [7.0.0-beta.11](v7.0.0-beta.10...v7.0.0-beta.11) (2025-09-16)

### Bug Fixes

* updating util packages ([56910f1](56910f1))
dharamghevariya and others added 2 commits October 27, 2025 13:58
chore: upgrade @cloudinary-util/url-loader to 6.2.0 and @cloudinary-util/util to 4.2.0
eportis-cloudinary and others added 7 commits September 24, 2026 16:03
Brings 146 commits from main onto the v7 branch, including Next.js 16
compatibility (#657), the Node 20/22 CI matrix (#656), the Trusted
Publishers release plumbing, and three recent fixes: duplicate iframes on
CldUploadWidget unmount (#658), open() called before the widget script
loads (#659), and the docs Table component (#661).

Conflicts resolved as follows:

- CldVideoPlayer.tsx: union. Kept beta's 'use client' and named-only
  react import, added main's useState, which the merged body needs for
  isScriptLoaded/playerInitialized.
- next-cloudinary/package.json: kept beta's preconstruct build config,
  exports map, files and 7.0.0-beta.11 version; adopted the repository
  field main added in 554e2a0.
- package.json: kept @preconstruct/cli (beta's build needs it); dropped
  @colbyfayock/semantic-release-pnpm, which the merged .releaserc no
  longer references; took main's semantic-release 25 and
  @semantic-release/npm 13.
- pnpm-workspace.yaml: beta's list, which adds the test app - required
  because beta's test:app builds it via pnpm rather than npm install.
- tests/nextjs-app/package.json: main's Next 16 / React 19 versions plus
  beta's next-cloudinary workspace link.
- CHANGELOG.md: kept both release histories.
- pnpm-lock.yaml: regenerated against the merged manifests.

Also fixes CldUploadWidget.tsx, which git auto-merged without conflicting
but produced broken output: beta had dropped the default React import
while main's useUploadWidgetId helper calls React.useId and React.useRef.
The combination built fine and failed at prerender with "ReferenceError:
React is not defined". Restored the default import. Caught by test:app,
not by the unit tests.

Note: .releaserc auto-merged to main's @semantic-release/npm, which drops
beta's publishBranch "main|beta" setting. Branch gating now comes from
the top-level branches config alone.
…t 19

@types/react 19 removed the ambient global JSX namespace; it now lives at
React.JSX. Two hand-written annotations still used the bare global, and
they reached the published declarations verbatim:

  CldUploadButton.d.ts        children?: JSX.Element | string | ...
  CldUploadWidget.types.d.ts  (...) => JSX.Element

Any consumer on React 19 compiling with skipLibCheck: false got three
TS2503 "Cannot find namespace 'JSX'" errors from inside the package. It
went unnoticed because skipLibCheck: true is the Next.js default.

Component return types were never affected - TypeScript infers those as
import("react/jsx-runtime").JSX.Element, already qualified. Only the
authored annotations stayed bare.

React.JSX resolves on @types/react 18 and 19 alike, so this is safe
across the whole declared peer range; verified by typechecking the packed
tarball against both.

Also bumps @types/react/@types/react-dom to 19 so the source is checked
against the React version peerDependencies has allowed for some time.
That is what let this survive: the library only ever compiled against
React 18 types. No source changes were needed beyond the two above - the
tree is clean under 19.
Prevents resolving to React 18 (currently used by docs, which caused it to be loaded because auto-install-peers = true)
Prevents test runtime and types from resolving to a stale Next 14.2.15.
`next` is peer-only here, so with auto-install-peers = true pnpm picked a
version once and never re-resolved it upward.

Also fixes two CldImage type errors caused by checking against Next 14's
ImageProps.
@types/react 19 removed the zero-argument useRef overload, so all five call sites needed an argument.

The two default refs in CldVideoPlayer take null instead, which lets their `as MutableRefObject<…>` casts go away: the props declare MutableRefObject<T | null>, so null is the type the casts were asserting, and disposePlayer already assigned null. No runtime change.
The url-loader bump in particular is required to upgrade the video player library
# [7.0.0-beta.12](v7.0.0-beta.11...v7.0.0-beta.12) (2026-09-25)

### Bug Fixes

* add explicit npm install back ([cddc254](cddc254))
* add missing alt text to What's Inside section for accessibility ([8559cdc](8559cdc))
* Add missing repository URL field ([554e2a0](554e2a0))
* bump action versions ([bf4544b](bf4544b))
* bump action-setup version ([52c8e95](52c8e95))
* CI environment variable collision blocked Trusted Publishers ([c334b0f](c334b0f))
* correct undefined variable reference in error handler ([d48fb7c](d48fb7c))
* **docs:** enable muted autoplay for YouTube video in “Watch & Learn” ([5ae810a](5ae810a))
* **docs:** use Tailwind italic for HeaderImage caption ([b4417f5](b4417f5))
* implement useUploadWidgetId with React 18 useId and fallback ([966198c](966198c))
* incorrect analytics code ([7345084](7345084))
* log more to diagnore Trusted Publishers errors ([5883964](5883964))
* merge pull request [#632](#632) from SarthakJain29/updated_footer ([be68133](be68133))
* patch semantic-release for Trusted Publishers ([94f92a4](94f92a4))
* preserve falsy values, stable keys, crash guard, and class typo in Table component ([78624dc](78624dc))
* prevent duplicate iframes on CldUploadWidget unmount/remount ([fd1f4d3](fd1f4d3))
* prevent TypeError when open() called before widget script loads ([8722718](8722718))
* qualify JSX.Element as React.JSX.Element, typecheck against React 19 ([ecc103d](ecc103d))
* remove unnecessary package-lock.json ([e5b9635](e5b9635))
* resolve CldVideoPlayer fullscreen object-cover issue ([27e2dbb](27e2dbb)), closes [#433](#433)
* turn off "silly"logging ([80f5671](80f5671))
* **typo:** remove colon from Watch & Learn ([43fdeda](43fdeda))
* url ([15179f7](15179f7))

### Features

* add disableRemotePlayback prop ([2ae5b59](2ae5b59))
* add Next.js 16 compatibility ([1c1ea9b](1c1ea9b))
* create-cloudinary-next analytics ([#655](#655)) ([59de7e5](59de7e5))

This branch was successfully deployed

1 active deployment
Preview — c34c5dd2 Deployed Sep 25, 2026 by vercel[bot]
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.

Reduce Client Bundle Size v7.0.0 [Feature] Bundle use client with components

6 participants