-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove deprecated features #25446
Merged
ijjk
merged 11 commits into
vercel:canary
from
timneutkens:add/remove-deprecated-features
Jun 2, 2021
Merged
Remove deprecated features #25446
ijjk
merged 11 commits into
vercel:canary
from
timneutkens:add/remove-deprecated-features
Jun 2, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the next major version we'll want to merge this PR that removes some of the long-time deprecated features, it'll have a positive effect on bundle size.
timneutkens
requested review from
divmain,
ijjk,
leerob,
lfades and
shuding
as code owners
May 25, 2021 12:50
leerob
previously approved these changes
May 25, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs LGTM
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Stats from current PRDefault Server Mode (Decrease detected ✓)General Overall decrease ✓
Page Load Tests Overall decrease
|
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.084 | 2.076 | -0.01 |
/ avg req/sec | 1199.37 | 1204.48 | +5.11 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.074 | 1.101 | |
/error-in-render avg req/sec | 2326.87 | 2271.63 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
framework-HASH.js gzip | 39.3 kB | 39.3 kB | ✓ |
main-HASH.js gzip | 19.5 kB | 19.5 kB | ✓ |
webpack-HASH.js gzip | 804 B | 804 B | ✓ |
Overall change | 59.5 kB | 59.5 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.1 kB | 31.1 kB | ✓ |
Overall change | 31.1 kB | 31.1 kB | ✓ |
Client Pages Overall decrease ✓
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
_app-HASH.js gzip | 1.02 kB | 801 B | -219 B |
_error-HASH.js gzip | 3.07 kB | 3.07 kB | ✓ |
amp-HASH.js gzip | 527 B | 527 B | ✓ |
css-HASH.js gzip | 334 B | 334 B | ✓ |
hooks-HASH.js gzip | 890 B | 890 B | ✓ |
index-HASH.js gzip | 263 B | 263 B | ✓ |
link-HASH.js gzip | 1.64 kB | 1.64 kB | ✓ |
routerDirect..HASH.js gzip | 333 B | 333 B | ✓ |
withRouter-HASH.js gzip | 330 B | 330 B | ✓ |
bb14e60e810b..30f.css gzip | 125 B | 125 B | ✓ |
Overall change | 8.53 kB | 8.31 kB | -219 B |
Client Build Manifests
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
_buildManifest.js gzip | 392 B | 392 B | ✓ |
Overall change | 392 B | 392 B | ✓ |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
index.html gzip | 560 B | 559 B | -1 B |
link.html gzip | 570 B | 567 B | -3 B |
withRouter.html gzip | 557 B | 556 B | -1 B |
Overall change | 1.69 kB | 1.68 kB | -5 B |
Diffs
Diff for _app-HASH.js
@@ -54,8 +54,6 @@
var _interopRequireDefault = __webpack_require__(5318);
exports.__esModule = true;
- exports.Container = Container;
- exports.createUrl = createUrl;
exports.default = void 0;
var _react = _interopRequireDefault(__webpack_require__(7294));
@@ -114,36 +112,15 @@
}
_createClass(App, [
- {
- key: "componentDidCatch",
- // Kept here for backwards compatibility.
- // When someone ended App they could call `super.componentDidCatch`.
- // @deprecated This method is no longer needed. Errors are caught at the top level
- value: function componentDidCatch(error, _errorInfo) {
- throw error;
- }
- },
{
key: "render",
value: function render() {
var _this$props = this.props,
- router = _this$props.router,
Component = _this$props.Component,
- pageProps = _this$props.pageProps,
- __N_SSG = _this$props.__N_SSG,
- __N_SSP = _this$props.__N_SSP;
+ pageProps = _this$props.pageProps;
return /*#__PURE__*/ _react["default"].createElement(
Component,
- Object.assign(
- {},
- pageProps, // we don't add the legacy URL prop if it's using non-legacy
- // methods like getStaticProps and getServerSideProps
- !(__N_SSG || __N_SSP)
- ? {
- url: createUrl(router)
- }
- : {}
- )
+ pageProps
);
}
}
@@ -155,73 +132,6 @@
exports.default = App;
App.origGetInitialProps = appGetInitialProps;
App.getInitialProps = appGetInitialProps;
- var warnContainer;
- var warnUrl;
-
- if (false) {
- } // @deprecated noop for now until removal
-
- function Container(p) {
- if (false) {
- }
- return p.children;
- }
-
- function createUrl(router) {
- // This is to make sure we don't references the router object at call time
- var pathname = router.pathname,
- asPath = router.asPath,
- query = router.query;
- return {
- get query() {
- if (false) {
- }
- return query;
- },
-
- get pathname() {
- if (false) {
- }
- return pathname;
- },
-
- get asPath() {
- if (false) {
- }
- return asPath;
- },
-
- back: function back() {
- if (false) {
- }
- router.back();
- },
- push: function push(url, as) {
- if (false) {
- }
- return router.push(url, as);
- },
- pushTo: function pushTo(href, as) {
- if (false) {
- }
- var pushRoute = as ? href : "";
- var pushUrl = as || href;
- return router.push(pushRoute, pushUrl);
- },
- replace: function replace(url, as) {
- if (false) {
- }
- return router.replace(url, as);
- },
- replaceTo: function replaceTo(href, as) {
- if (false) {
- }
- var replaceRoute = as ? href : "";
- var replaceUrl = as || href;
- return router.replace(replaceRoute, replaceUrl);
- }
- };
- }
/***/
},
Diff for index.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/_app-4c8c52e081f8bceed063.js"
+ href="/_next/static/chunks/pages/_app-28769756f9a0c21b149b.js"
as="script"
/>
<link
@@ -60,7 +60,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/_app-4c8c52e081f8bceed063.js"
+ src="/_next/static/chunks/pages/_app-28769756f9a0c21b149b.js"
async=""
></script>
<script
Diff for link.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/_app-4c8c52e081f8bceed063.js"
+ href="/_next/static/chunks/pages/_app-28769756f9a0c21b149b.js"
as="script"
/>
<link
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/_app-4c8c52e081f8bceed063.js"
+ src="/_next/static/chunks/pages/_app-28769756f9a0c21b149b.js"
async=""
></script>
<script
Diff for withRouter.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/_app-4c8c52e081f8bceed063.js"
+ href="/_next/static/chunks/pages/_app-28769756f9a0c21b149b.js"
as="script"
/>
<link
@@ -60,7 +60,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/_app-4c8c52e081f8bceed063.js"
+ src="/_next/static/chunks/pages/_app-28769756f9a0c21b149b.js"
async=""
></script>
<script
Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
buildDuration | 12.9s | 12.5s | -392ms |
buildDurationCached | 3.9s | 4.1s | |
nodeModulesSize | 46.7 MB | 46.7 MB | -16.9 kB |
Client Bundles (main, webpack, commons)
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
framework-HASH.js gzip | 39.3 kB | 39.3 kB | ✓ |
main-HASH.js gzip | 19.5 kB | 19.5 kB | ✓ |
webpack-HASH.js gzip | 804 B | 804 B | ✓ |
Overall change | 59.5 kB | 59.5 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.1 kB | 31.1 kB | ✓ |
Overall change | 31.1 kB | 31.1 kB | ✓ |
Client Pages Overall decrease ✓
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
_app-HASH.js gzip | 1.02 kB | 801 B | -219 B |
_error-HASH.js gzip | 3.07 kB | 3.07 kB | ✓ |
amp-HASH.js gzip | 527 B | 527 B | ✓ |
css-HASH.js gzip | 334 B | 334 B | ✓ |
hooks-HASH.js gzip | 890 B | 890 B | ✓ |
index-HASH.js gzip | 263 B | 263 B | ✓ |
link-HASH.js gzip | 1.64 kB | 1.64 kB | ✓ |
routerDirect..HASH.js gzip | 333 B | 333 B | ✓ |
withRouter-HASH.js gzip | 330 B | 330 B | ✓ |
bb14e60e810b..30f.css gzip | 125 B | 125 B | ✓ |
Overall change | 8.53 kB | 8.31 kB | -219 B |
Client Build Manifests
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
_buildManifest.js gzip | 392 B | 392 B | ✓ |
Overall change | 392 B | 392 B | ✓ |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
_error.js | 16.9 kB | 16.9 kB | |
404.html | 2.42 kB | 2.42 kB | ✓ |
500.html | 2.41 kB | 2.41 kB | ✓ |
amp.amp.html | 10.8 kB | 10.8 kB | ✓ |
amp.html | 1.61 kB | 1.61 kB | ✓ |
css.html | 1.79 kB | 1.79 kB | ✓ |
hooks.html | 1.67 kB | 1.67 kB | ✓ |
index.js | 17.2 kB | 17.2 kB | ✓ |
link.js | 17.4 kB | 17.4 kB | ✓ |
routerDirect.js | 17.4 kB | 17.4 kB | |
withRouter.js | 17.4 kB | 17.4 kB | ✓ |
Overall change | 107 kB | 107 kB |
Webpack 4 Mode (Increase detected ⚠️ )
General Overall decrease ✓
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
buildDuration | 11.2s | 10.7s | -518ms |
buildDurationCached | 4.7s | 4.6s | -97ms |
nodeModulesSize | 46.7 MB | 46.7 MB | -16.9 kB |
Page Load Tests Overall increase ✓
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.152 | 2.15 | 0 |
/ avg req/sec | 1161.61 | 1162.64 | +1.03 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.197 | 1.089 | -0.11 |
/error-in-render avg req/sec | 2089.18 | 2294.81 | +205.63 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
677f882d2ed8..HASH.js gzip | 13.3 kB | 13.3 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-HASH.js gzip | 7.26 kB | 7.26 kB | ✓ |
webpack-HASH.js gzip | 751 B | 751 B | ✓ |
Overall change | 60.3 kB | 60.3 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages Overall decrease ✓
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
_app-HASH.js gzip | 1.28 kB | 1.07 kB | -210 B |
_error-HASH.js gzip | 3.74 kB | 3.74 kB | ✓ |
amp-HASH.js gzip | 536 B | 536 B | ✓ |
css-HASH.js gzip | 339 B | 339 B | ✓ |
hooks-HASH.js gzip | 887 B | 887 B | ✓ |
index-HASH.js gzip | 227 B | 227 B | ✓ |
link-HASH.js gzip | 1.63 kB | 1.63 kB | ✓ |
routerDirect..HASH.js gzip | 303 B | 303 B | ✓ |
withRouter-HASH.js gzip | 302 B | 302 B | ✓ |
e025d2764813..52f.css gzip | 125 B | 125 B | ✓ |
Overall change | 9.37 kB | 9.16 kB | -210 B |
Client Build Manifests
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
_buildManifest.js gzip | 420 B | 420 B | ✓ |
Overall change | 420 B | 420 B | ✓ |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | timneutkens/next.js add/remove-deprecated-features | Change | |
---|---|---|---|
index.html gzip | 614 B | 614 B | ✓ |
link.html gzip | 620 B | 620 B | ✓ |
withRouter.html gzip | 608 B | 607 B | -1 B |
Overall change | 1.84 kB | 1.84 kB | -1 B |
Diffs
Diff for _app-HASH.js
@@ -82,8 +82,6 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
var _interopRequireDefault = __webpack_require__("TqRt");
exports.__esModule = true;
- exports.Container = Container;
- exports.createUrl = createUrl;
exports["default"] = void 0;
var _react = _interopRequireDefault(__webpack_require__("q1tI"));
@@ -142,36 +140,15 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
}
_createClass(App, [
- {
- key: "componentDidCatch",
- // Kept here for backwards compatibility.
- // When someone ended App they could call `super.componentDidCatch`.
- // @deprecated This method is no longer needed. Errors are caught at the top level
- value: function componentDidCatch(error, _errorInfo) {
- throw error;
- }
- },
{
key: "render",
value: function render() {
var _this$props = this.props,
- router = _this$props.router,
Component = _this$props.Component,
- pageProps = _this$props.pageProps,
- __N_SSG = _this$props.__N_SSG,
- __N_SSP = _this$props.__N_SSP;
+ pageProps = _this$props.pageProps;
return /*#__PURE__*/ _react["default"].createElement(
Component,
- Object.assign(
- {},
- pageProps, // we don't add the legacy URL prop if it's using non-legacy
- // methods like getStaticProps and getServerSideProps
- !(__N_SSG || __N_SSP)
- ? {
- url: createUrl(router)
- }
- : {}
- )
+ pageProps
);
}
}
@@ -183,73 +160,6 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
exports["default"] = App;
App.origGetInitialProps = appGetInitialProps;
App.getInitialProps = appGetInitialProps;
- var warnContainer;
- var warnUrl;
-
- if (false) {
- } // @deprecated noop for now until removal
-
- function Container(p) {
- if (false) {
- }
- return p.children;
- }
-
- function createUrl(router) {
- // This is to make sure we don't references the router object at call time
- var pathname = router.pathname,
- asPath = router.asPath,
- query = router.query;
- return {
- get query() {
- if (false) {
- }
- return query;
- },
-
- get pathname() {
- if (false) {
- }
- return pathname;
- },
-
- get asPath() {
- if (false) {
- }
- return asPath;
- },
-
- back: function back() {
- if (false) {
- }
- router.back();
- },
- push: function push(url, as) {
- if (false) {
- }
- return router.push(url, as);
- },
- pushTo: function pushTo(href, as) {
- if (false) {
- }
- var pushRoute = as ? href : "";
- var pushUrl = as || href;
- return router.push(pushRoute, pushUrl);
- },
- replace: function replace(url, as) {
- if (false) {
- }
- return router.replace(url, as);
- },
- replaceTo: function replaceTo(href, as) {
- if (false) {
- }
- var replaceRoute = as ? href : "";
- var replaceUrl = as || href;
- return router.replace(replaceRoute, replaceUrl);
- }
- };
- }
/***/
},
Diff for index.html
@@ -27,7 +27,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/_app-b27d78b0671a2f452859.js"
+ href="/_next/static/chunks/pages/_app-14e4eac7b0cda2ea09bf.js"
as="script"
/>
<link
@@ -69,7 +69,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/_app-b27d78b0671a2f452859.js"
+ src="/_next/static/chunks/pages/_app-14e4eac7b0cda2ea09bf.js"
async=""
></script>
<script
Diff for link.html
@@ -27,7 +27,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/_app-b27d78b0671a2f452859.js"
+ href="/_next/static/chunks/pages/_app-14e4eac7b0cda2ea09bf.js"
as="script"
/>
<link
@@ -74,7 +74,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/_app-b27d78b0671a2f452859.js"
+ src="/_next/static/chunks/pages/_app-14e4eac7b0cda2ea09bf.js"
async=""
></script>
<script
Diff for withRouter.html
@@ -27,7 +27,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/_app-b27d78b0671a2f452859.js"
+ href="/_next/static/chunks/pages/_app-14e4eac7b0cda2ea09bf.js"
as="script"
/>
<link
@@ -69,7 +69,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/_app-b27d78b0671a2f452859.js"
+ src="/_next/static/chunks/pages/_app-14e4eac7b0cda2ea09bf.js"
async=""
></script>
<script
ijjk
approved these changes
Jun 2, 2021
flybayer
pushed a commit
to blitz-js/next.js
that referenced
this pull request
Jun 16, 2021
* Remove deprecated features In the next major version we'll want to merge this PR that removes some of the long-time deprecated features, it'll have a positive effect on bundle size. * Update tests * Update tests * Change unsized to layout=fill in test * Update sizes * Update rotation test * Update size limit test * Update test * Update test * Update test
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the next major version we'll want to merge this PR that removes some of the long-time deprecated features, it'll have a positive effect on bundle size.
Bug
fixes #number
Feature
fixes #number
Documentation / Examples