next.js
next.js copied to clipboard
next-codemod(upgrade): warn peer dependencies not met
Why?
After the upgrade, there might be an incompatibility with the peerDependencies of the existing dependencies. Therefore, we run a check for it to warn the user at the end of the upgrade.
Testing Plan
Unmet Peer Dependencies with Range and Prerelease
pnpm test:upgrade-fixture bin/__testfixtures__/peer-dep-out-of-range
CLI output includes:
⚠ Found 2 dependencies out of range from the peer dependencies.
unmet-prerelease file:./unmet-prerelease
├── ✕ unmet peer react@"^18.2.0 || 19.0.0-rc-aaaaaaaa-20240101": found ...
└── ✕ unmet peer react-dom@"^18.2.0 || 19.0.0-rc-aaaaaaaa-20240101": found ...
unmet-range file:./unmet-range
├── ✕ unmet peer react@"^18.0.0 || ^19.0.0": ...
└── ✕ unmet peer react-dom@"< 19": found ...
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @devjiwonchoi and the rest of your teammates on
Graphite
Stats from current PR
Default Build (Increase detected ⚠️)
General
| vercel/next.js canary | vercel/next.js 10-23-next-codemod_upgrade_warn_peer_dependencies_not_met | Change | |
|---|---|---|---|
| buildDuration | 21.5s | 21.2s | N/A |
| buildDurationCached | 16.7s | 14.8s | N/A |
| nodeModulesSize | 403 MB | 403 MB | N/A |
| nextStartRea..uration (ms) | 458ms | 458ms | ✓ |
Client Bundles (main, webpack)
| vercel/next.js canary | vercel/next.js 10-23-next-codemod_upgrade_warn_peer_dependencies_not_met | Change | |
|---|---|---|---|
| 3073-HASH.js gzip | 45.4 kB | 45.4 kB | N/A |
| 3898-HASH.js gzip | 5.27 kB | 5.27 kB | N/A |
| 7183.HASH.js gzip | 169 B | 169 B | ✓ |
| b5cfd723-HASH.js gzip | 52.5 kB | 52.5 kB | N/A |
| framework-HASH.js gzip | 57.3 kB | 57.3 kB | N/A |
| main-app-HASH.js gzip | 233 B | 230 B | N/A |
| main-HASH.js gzip | 33.1 kB | 33.1 kB | N/A |
| webpack-HASH.js gzip | 1.71 kB | 1.71 kB | N/A |
| Overall change | 169 B | 169 B | ✓ |
Legacy Client Bundles (polyfills)
| vercel/next.js canary | vercel/next.js 10-23-next-codemod_upgrade_warn_peer_dependencies_not_met | Change | |
|---|---|---|---|
| polyfills-HASH.js gzip | 39.4 kB | 39.4 kB | ✓ |
| Overall change | 39.4 kB | 39.4 kB | ✓ |
Client Pages
| vercel/next.js canary | vercel/next.js 10-23-next-codemod_upgrade_warn_peer_dependencies_not_met | Change | |
|---|---|---|---|
| _app-HASH.js gzip | 193 B | 193 B | ✓ |
| _error-HASH.js gzip | 192 B | 192 B | ✓ |
| amp-HASH.js gzip | 513 B | 508 B | N/A |
| css-HASH.js gzip | 343 B | 343 B | ✓ |
| dynamic-HASH.js gzip | 1.85 kB | 1.84 kB | N/A |
| edge-ssr-HASH.js gzip | 265 B | 264 B | N/A |
| head-HASH.js gzip | 363 B | 365 B | N/A |
| hooks-HASH.js gzip | 392 B | 391 B | N/A |
| image-HASH.js gzip | 4.41 kB | 4.41 kB | ✓ |
| index-HASH.js gzip | 268 B | 268 B | ✓ |
| link-HASH.js gzip | 2.77 kB | 2.77 kB | N/A |
| routerDirect..HASH.js gzip | 327 B | 327 B | ✓ |
| script-HASH.js gzip | 396 B | 394 B | N/A |
| withRouter-HASH.js gzip | 324 B | 322 B | N/A |
| 1afbb74e6ecf..834.css gzip | 106 B | 106 B | ✓ |
| Overall change | 5.84 kB | 5.84 kB | ✓ |
Client Build Manifests
| vercel/next.js canary | vercel/next.js 10-23-next-codemod_upgrade_warn_peer_dependencies_not_met | Change | |
|---|---|---|---|
| _buildManifest.js gzip | 748 B | 750 B | N/A |
| Overall change | 0 B | 0 B | ✓ |
Rendered Page Sizes
| vercel/next.js canary | vercel/next.js 10-23-next-codemod_upgrade_warn_peer_dependencies_not_met | Change | |
|---|---|---|---|
| index.html gzip | 525 B | 524 B | N/A |
| link.html gzip | 540 B | 539 B | N/A |
| withRouter.html gzip | 520 B | 519 B | N/A |
| Overall change | 0 B | 0 B | ✓ |
Edge SSR bundle Size Overall increase ⚠️
| vercel/next.js canary | vercel/next.js 10-23-next-codemod_upgrade_warn_peer_dependencies_not_met | Change | |
|---|---|---|---|
| edge-ssr.js gzip | 128 kB | 128 kB | ⚠️ +114 B |
| page.js gzip | 198 kB | 189 kB | N/A |
| Overall change | 128 kB | 128 kB | ⚠️ +114 B |
Middleware size
| vercel/next.js canary | vercel/next.js 10-23-next-codemod_upgrade_warn_peer_dependencies_not_met | Change | |
|---|---|---|---|
| middleware-b..fest.js gzip | 669 B | 668 B | N/A |
| middleware-r..fest.js gzip | 156 B | 155 B | N/A |
| middleware.js gzip | 31 kB | 31 kB | N/A |
| edge-runtime..pack.js gzip | 844 B | 844 B | ✓ |
| Overall change | 844 B | 844 B | ✓ |
Next Runtimes
| vercel/next.js canary | vercel/next.js 10-23-next-codemod_upgrade_warn_peer_dependencies_not_met | Change | |
|---|---|---|---|
| 196-experime...dev.js gzip | 322 B | 322 B | ✓ |
| 196.runtime.dev.js gzip | 314 B | 314 B | ✓ |
| app-page-exp...dev.js gzip | 319 kB | 318 kB | N/A |
| app-page-exp..prod.js gzip | 123 kB | 122 kB | N/A |
| app-page-tur..prod.js gzip | 136 kB | 135 kB | N/A |
| app-page-tur..prod.js gzip | 131 kB | 130 kB | N/A |
| app-page.run...dev.js gzip | 309 kB | 309 kB | N/A |
| app-page.run..prod.js gzip | 119 kB | 118 kB | N/A |
| app-route-ex...dev.js gzip | 35.9 kB | 35.9 kB | N/A |
| app-route-ex..prod.js gzip | 24.4 kB | 24.3 kB | N/A |
| app-route-tu..prod.js gzip | 24.4 kB | 24.4 kB | N/A |
| app-route-tu..prod.js gzip | 24.2 kB | 24.1 kB | N/A |
| app-route.ru...dev.js gzip | 37.5 kB | 37.5 kB | N/A |
| app-route.ru..prod.js gzip | 24.2 kB | 24.1 kB | N/A |
| pages-api-tu..prod.js gzip | 9.59 kB | 9.59 kB | ✓ |
| pages-api.ru...dev.js gzip | 11.4 kB | 11.4 kB | ✓ |
| pages-api.ru..prod.js gzip | 9.58 kB | 9.58 kB | ✓ |
| pages-turbo...prod.js gzip | 20.9 kB | 20.9 kB | N/A |
| pages.runtim...dev.js gzip | 26.5 kB | 26.5 kB | N/A |
| pages.runtim..prod.js gzip | 20.9 kB | 20.9 kB | N/A |
| server.runti..prod.js gzip | 915 kB | 914 kB | N/A |
| Overall change | 31.2 kB | 31.2 kB | ✓ |
build cache
| vercel/next.js canary | vercel/next.js 10-23-next-codemod_upgrade_warn_peer_dependencies_not_met | Change | |
|---|---|---|---|
| 0.pack gzip | 2 MB | 1.86 MB | N/A |
| index.pack gzip | 146 kB | 144 kB | N/A |
| Overall change | 0 B | 0 B | ✓ |
Diff details
Diff for page.js
Diff too large to display
Diff for middleware.js
Diff too large to display
Diff for edge-ssr.js
Diff too large to display
Diff for image-HASH.js
@@ -1,7 +1,7 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
- [2983],
+ [8358],
{
- /***/ 8916: /***/ (
+ /***/ 8942: /***/ (
__unused_webpack_module,
__unused_webpack_exports,
__webpack_require__
@@ -9,7 +9,7 @@
(window.__NEXT_P = window.__NEXT_P || []).push([
"/image",
function () {
- return __webpack_require__(4209);
+ return __webpack_require__(2864);
},
]);
if (false) {
@@ -18,7 +18,7 @@
/***/
},
- /***/ 9265: /***/ (module, exports, __webpack_require__) => {
+ /***/ 1673: /***/ (module, exports, __webpack_require__) => {
"use strict";
/* __next_internal_client_entry_do_not_use__ cjs */
Object.defineProperty(exports, "__esModule", {
@@ -30,27 +30,27 @@
return Image;
},
});
- const _interop_require_default = __webpack_require__(1739);
- const _interop_require_wildcard = __webpack_require__(1474);
- const _jsxruntime = __webpack_require__(7515);
+ const _interop_require_default = __webpack_require__(9608);
+ const _interop_require_wildcard = __webpack_require__(4856);
+ const _jsxruntime = __webpack_require__(2073);
const _react = /*#__PURE__*/ _interop_require_wildcard._(
- __webpack_require__(7611)
+ __webpack_require__(102)
);
const _reactdom = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(9577)
+ __webpack_require__(8693)
);
const _head = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(1436)
+ __webpack_require__(5838)
);
- const _getimgprops = __webpack_require__(8517);
- const _imageconfig = __webpack_require__(2168);
- const _imageconfigcontextsharedruntime = __webpack_require__(9202);
- const _warnonce = __webpack_require__(6992);
- const _routercontextsharedruntime = __webpack_require__(8155);
+ const _getimgprops = __webpack_require__(5726);
+ const _imageconfig = __webpack_require__(187);
+ const _imageconfigcontextsharedruntime = __webpack_require__(5786);
+ const _warnonce = __webpack_require__(3673);
+ const _routercontextsharedruntime = __webpack_require__(759);
const _imageloader = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(345)
+ __webpack_require__(2182)
);
- const _usemergedref = __webpack_require__(2806);
+ const _usemergedref = __webpack_require__(9363);
// This is replaced by webpack define plugin
const configEnv = {
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
@@ -371,7 +371,7 @@
/***/
},
- /***/ 2806: /***/ (module, exports, __webpack_require__) => {
+ /***/ 9363: /***/ (module, exports, __webpack_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", {
@@ -383,7 +383,7 @@
return useMergedRef;
},
});
- const _react = __webpack_require__(7611);
+ const _react = __webpack_require__(102);
function useMergedRef(refA, refB) {
const cleanupA = (0, _react.useRef)(() => {});
const cleanupB = (0, _react.useRef)(() => {});
@@ -432,7 +432,7 @@
/***/
},
- /***/ 8517: /***/ (
+ /***/ 5726: /***/ (
__unused_webpack_module,
exports,
__webpack_require__
@@ -448,9 +448,9 @@
return getImgProps;
},
});
- const _warnonce = __webpack_require__(6992);
- const _imageblursvg = __webpack_require__(1692);
- const _imageconfig = __webpack_require__(2168);
+ const _warnonce = __webpack_require__(3673);
+ const _imageblursvg = __webpack_require__(5499);
+ const _imageconfig = __webpack_require__(187);
const VALID_LOADING_VALUES =
/* unused pure expression or super */ null && [
"lazy",
@@ -824,7 +824,7 @@
/***/
},
- /***/ 1692: /***/ (__unused_webpack_module, exports) => {
+ /***/ 5499: /***/ (__unused_webpack_module, exports) => {
"use strict";
/**
* A shared function, used on both client and server, to generate a SVG blur placeholder.
@@ -879,7 +879,7 @@
/***/
},
- /***/ 4673: /***/ (
+ /***/ 6157: /***/ (
__unused_webpack_module,
exports,
__webpack_require__
@@ -905,11 +905,11 @@
return getImageProps;
},
});
- const _interop_require_default = __webpack_require__(1739);
- const _getimgprops = __webpack_require__(8517);
- const _imagecomponent = __webpack_require__(9265);
+ const _interop_require_default = __webpack_require__(9608);
+ const _getimgprops = __webpack_require__(5726);
+ const _imagecomponent = __webpack_require__(1673);
const _imageloader = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(345)
+ __webpack_require__(2182)
);
function getImageProps(imgProps) {
const { props } = (0, _getimgprops.getImgProps)(imgProps, {
@@ -941,7 +941,7 @@
/***/
},
- /***/ 345: /***/ (__unused_webpack_module, exports) => {
+ /***/ 2182: /***/ (__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", {
@@ -976,7 +976,7 @@
/***/
},
- /***/ 4209: /***/ (
+ /***/ 2864: /***/ (
__unused_webpack_module,
__webpack_exports__,
__webpack_require__
@@ -992,10 +992,10 @@
});
// EXTERNAL MODULE: ./node_modules/.pnpm/[email protected]/node_modules/react/jsx-runtime.js
- var jsx_runtime = __webpack_require__(7515);
- // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ngsqfltlxii45umrwe6rktuauy/node_modules/next/image.js
- var next_image = __webpack_require__(7265);
- var image_default = /*#__PURE__*/ __webpack_require__.n(next_image); // ./pages/nextjs.png
+ var jsx_runtime = __webpack_require__(2073);
+ // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ay5jspqvpcpk5357qiimbatlya/node_modules/next/image.js
+ var next_image = __webpack_require__(9915);
+ var image_default = /*#__PURE__*/ __webpack_require__.n(next_image); // CONCATENATED MODULE: ./pages/nextjs.png
/* harmony default export */ const nextjs = {
src: "/_next/static/media/nextjs.cae0b805.png",
height: 1347,
@@ -1004,7 +1004,7 @@
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAMAAAACh/xsAAAAD1BMVEX////x8fH6+vrb29vo6Oh8o70bAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAH0lEQVR4nGNgwARMjIyMjCAGCzMzMwsTRISJCcRABwAEcAAkLCQfgAAAAABJRU5ErkJggg==",
blurWidth: 8,
blurHeight: 7,
- }; // ./pages/image.js
+ }; // CONCATENATED MODULE: ./pages/image.js
function ImagePage(props) {
return /*#__PURE__*/ (0, jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [
@@ -1024,12 +1024,12 @@
/***/
},
- /***/ 7265: /***/ (
+ /***/ 9915: /***/ (
module,
__unused_webpack_exports,
__webpack_require__
) => {
- module.exports = __webpack_require__(4673);
+ module.exports = __webpack_require__(6157);
/***/
},
@@ -1038,8 +1038,8 @@
// webpackRuntimeModules
/******/ var __webpack_exec__ = (moduleId) =>
__webpack_require__((__webpack_require__.s = moduleId));
- /******/ __webpack_require__.O(0, [636, 6593, 8792], () =>
- __webpack_exec__(8916)
+ /******/ __webpack_require__.O(0, [2888, 9774, 179], () =>
+ __webpack_exec__(8942)
);
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ _N_E = __webpack_exports__;
Diff for 3073-HASH.js
Diff too large to display
Diff for app-page-exp..ntime.dev.js
failed to diff
Diff for app-page-exp..time.prod.js
Diff too large to display
Diff for app-page-tur..time.prod.js
Diff too large to display
Diff for app-page-tur..time.prod.js
Diff too large to display
Diff for app-page.runtime.dev.js
failed to diff
Diff for app-page.runtime.prod.js
Diff too large to display
Diff for app-route-ex..ntime.dev.js
Diff too large to display
Diff for app-route-ex..time.prod.js
Diff too large to display
Diff for app-route-tu..time.prod.js
Diff too large to display
Diff for app-route-tu..time.prod.js
Diff too large to display
Diff for app-route.runtime.dev.js
Diff too large to display
Diff for app-route.ru..time.prod.js
Diff too large to display
Diff for pages-turbo...time.prod.js
Diff too large to display
Diff for pages.runtime.dev.js
Diff too large to display
Diff for pages.runtime.prod.js
Diff too large to display
Diff for server.runtime.prod.js
failed to diff