Skip to content
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

[next] update initial config message #23165

Merged
merged 2 commits into from
Apr 25, 2021
Merged

Conversation

coetry
Copy link

@coetry coetry commented Mar 17, 2021

This PR updates the initial typescript config message to mention that strict-mode is off by default to maintain expectations about type errors.

Tweet

@ijjk
Copy link
Member

ijjk commented Mar 17, 2021

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
buildDuration 11.6s 11.9s ⚠️ +299ms
nodeModulesSize 43.6 MB 43.6 MB ⚠️ +158 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
/ failed reqs 0 0
/ total time (seconds) 1.925 1.98 ⚠️ +0.05
/ avg req/sec 1298.77 1262.84 ⚠️ -35.93
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.196 1.24 ⚠️ +0.04
/error-in-render avg req/sec 2089.86 2015.33 ⚠️ -74.53
Client Bundles (main, webpack, commons)
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
677f882d2ed8..a2e7.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 7.14 kB 7.14 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 vercel/next.js update-ts-config-init-message Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
_app-fde3324..9dd1.js gzip 1.28 kB 1.28 kB
_error-af59f..582f.js gzip 3.46 kB 3.46 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-e6cee42..49eb.js gzip 1.64 kB 1.64 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.64 kB 8.64 kB
Client Build Manifests
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
_buildManifest.js gzip 346 B 346 B
Overall change 346 B 346 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
index.html gzip 614 B 614 B
link.html gzip 622 B 622 B
withRouter.html gzip 609 B 609 B
Overall change 1.84 kB 1.84 kB

Serverless Mode
General Overall increase ⚠️
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
buildDuration 13.8s 13.2s -584ms
nodeModulesSize 43.6 MB 43.6 MB ⚠️ +158 B
Client Bundles (main, webpack, commons)
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
677f882d2ed8..a2e7.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 7.14 kB 7.14 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 vercel/next.js update-ts-config-init-message Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
_app-fde3324..9dd1.js gzip 1.28 kB 1.28 kB
_error-af59f..582f.js gzip 3.46 kB 3.46 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-e6cee42..49eb.js gzip 1.64 kB 1.64 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.64 kB 8.64 kB
Client Build Manifests
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
_buildManifest.js gzip 346 B 346 B
Overall change 346 B 346 B
Serverless bundles
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
_error.js 1.02 MB 1.02 MB
404.html 2.67 kB 2.67 kB
500.html 2.65 kB 2.65 kB
amp.amp.html 10.6 kB 10.6 kB
amp.html 1.86 kB 1.86 kB
hooks.html 1.92 kB 1.92 kB
index.js 1.02 MB 1.02 MB
link.js 1.08 MB 1.08 MB
routerDirect.js 1.07 MB 1.07 MB
withRouter.js 1.07 MB 1.07 MB
Overall change 5.27 MB 5.27 MB

Webpack 5 Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
buildDuration 13.3s 17.6s ⚠️ +4.3s
nodeModulesSize 43.6 MB 43.6 MB ⚠️ +158 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
/ failed reqs 0 0
/ total time (seconds) 1.865 1.946 ⚠️ +0.08
/ avg req/sec 1340.8 1284.68 ⚠️ -56.12
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.154 1.215 ⚠️ +0.06
/error-in-render avg req/sec 2166.87 2056.87 ⚠️ -110
Client Bundles (main, webpack, commons)
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
597-12fee761..569d.js gzip 13.3 kB 13.3 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 7.1 kB 7.1 kB
webpack-HASH.js gzip 993 B 993 B
Overall change 60.7 kB 60.7 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
polyfills-HASH.js gzip 31.1 kB 31.1 kB
Overall change 31.1 kB 31.1 kB
Client Pages
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
_app-d0eb668..79ef.js gzip 1.28 kB 1.28 kB
_error-d12ff..6063.js gzip 3.4 kB 3.4 kB
amp-127483e4..9cd8.js gzip 560 B 560 B
hooks-75994b..62d3.js gzip 924 B 924 B
index-ac1ee6..819e.js gzip 243 B 243 B
link-1cd4709..71e5.js gzip 1.65 kB 1.65 kB
routerDirect..4d90.js gzip 333 B 333 B
withRouter-0..60b0.js gzip 329 B 329 B
Overall change 8.72 kB 8.72 kB
Client Build Manifests
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
_buildManifest.js gzip 324 B 324 B
Overall change 324 B 324 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
index.html gzip 587 B 587 B
link.html gzip 594 B 594 B
withRouter.html gzip 582 B 582 B
Overall change 1.76 kB 1.76 kB

Diffs

Diff for index.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "XBdE5eubFnQaqO0YhE39X",
+        "buildId": "L0R32uM0BGR3nMqY6l1fe",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/XBdE5eubFnQaqO0YhE39X/_buildManifest.js"
+      src="/_next/static/L0R32uM0BGR3nMqY6l1fe/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/XBdE5eubFnQaqO0YhE39X/_ssgManifest.js"
+      src="/_next/static/L0R32uM0BGR3nMqY6l1fe/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "XBdE5eubFnQaqO0YhE39X",
+        "buildId": "L0R32uM0BGR3nMqY6l1fe",
         "isFallback": false,
         "gip": true
       }
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/XBdE5eubFnQaqO0YhE39X/_buildManifest.js"
+      src="/_next/static/L0R32uM0BGR3nMqY6l1fe/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/XBdE5eubFnQaqO0YhE39X/_ssgManifest.js"
+      src="/_next/static/L0R32uM0BGR3nMqY6l1fe/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "XBdE5eubFnQaqO0YhE39X",
+        "buildId": "L0R32uM0BGR3nMqY6l1fe",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/XBdE5eubFnQaqO0YhE39X/_buildManifest.js"
+      src="/_next/static/L0R32uM0BGR3nMqY6l1fe/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/XBdE5eubFnQaqO0YhE39X/_ssgManifest.js"
+      src="/_next/static/L0R32uM0BGR3nMqY6l1fe/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: d62f71a

@coetry coetry changed the title [typescript] update initial config message [next] update initial config message Mar 17, 2021
@@ -183,7 +183,7 @@ export async function writeConfigurationDefaults(
chalk.green(
`We detected TypeScript in your project and reconfigured your ${chalk.bold(
'tsconfig.json'
)} file for you.`
)} file for you. Strict-mode is set to ${chalk.bold('false')} by default.`
Copy link

@msutkowski msutkowski Mar 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thanks for adding this, but a quick question: If someone doesn't know exactly what this means, is this helpful? This should most likely link to an article about the implications of strict mode and how it's intended to be enabled for most users.

Copy link
Contributor

@phryneas phryneas Mar 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least it is helpful for people who know about & would expect strict mode (which is the default of tsc --init), so it's definitely a win.

But yeah, people starting their first TypeScript project with this probably might read over it and not assume that strictNullChecks is off or what the implications of that are.

@Hubtig23

This comment has been minimized.

@kodiakhq kodiakhq bot requested a review from shuding as a code owner April 25, 2021 15:29
@ijjk
Copy link
Member

ijjk commented Apr 25, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
buildDuration 17s 16.7s -333ms
buildDurationCached 5.4s 4.9s -502ms
nodeModulesSize 46.6 MB 46.6 MB ⚠️ +158 B
Page Load Tests Overall increase ✓
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
/ failed reqs 0 0
/ total time (seconds) 2.987 2.825 -0.16
/ avg req/sec 836.89 884.85 +47.96
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.737 1.586 -0.15
/error-in-render avg req/sec 1439.31 1575.8 +136.49
Client Bundles (main, webpack, commons)
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
597-HASH.js gzip 13.3 kB 13.3 kB
778-HASH.js gzip 7.12 kB 7.12 kB
framework-HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
polyfills-HASH.js gzip 31.1 kB 31.1 kB
Overall change 31.1 kB 31.1 kB
Client Pages
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
_app-HASH.js gzip 1.3 kB 1.3 kB
_error-HASH.js gzip 3.68 kB 3.68 kB
amp-HASH.js gzip 558 B 558 B
css-HASH.js gzip 363 B 363 B
hooks-HASH.js gzip 924 B 924 B
index-HASH.js gzip 243 B 243 B
link-HASH.js gzip 1.66 kB 1.66 kB
routerDirect..HASH.js gzip 336 B 336 B
withRouter-HASH.js gzip 334 B 334 B
99a142a5cfae..804.css gzip 125 B 125 B
Overall change 9.52 kB 9.52 kB
Client Build Manifests
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
_buildManifest.js gzip 390 B 390 B
Overall change 390 B 390 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
index.html gzip 608 B 608 B
link.html gzip 615 B 615 B
withRouter.html gzip 605 B 605 B
Overall change 1.83 kB 1.83 kB

Serverless Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
buildDuration 20.5s 20s -455ms
buildDurationCached 7.5s 7.5s ⚠️ +42ms
nodeModulesSize 46.6 MB 46.6 MB ⚠️ +158 B
Client Bundles (main, webpack, commons)
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
597-HASH.js gzip 13.3 kB 13.3 kB
778-HASH.js gzip 7.12 kB 7.12 kB
framework-HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
polyfills-HASH.js gzip 31.1 kB 31.1 kB
Overall change 31.1 kB 31.1 kB
Client Pages
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
_app-HASH.js gzip 1.3 kB 1.3 kB
_error-HASH.js gzip 3.68 kB 3.68 kB
amp-HASH.js gzip 558 B 558 B
css-HASH.js gzip 363 B 363 B
hooks-HASH.js gzip 924 B 924 B
index-HASH.js gzip 243 B 243 B
link-HASH.js gzip 1.66 kB 1.66 kB
routerDirect..HASH.js gzip 336 B 336 B
withRouter-HASH.js gzip 334 B 334 B
99a142a5cfae..804.css gzip 125 B 125 B
Overall change 9.52 kB 9.52 kB
Client Build Manifests
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
_buildManifest.js gzip 390 B 390 B
Overall change 390 B 390 B
Serverless bundles Overall decrease ✓
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
_error.js 1.39 MB 1.39 MB
404.html 2.76 kB 2.76 kB
500.html 2.75 kB 2.75 kB
amp.amp.html 10.8 kB 10.8 kB
amp.html 1.96 kB 1.96 kB
css.html 2.13 kB 2.13 kB
hooks.html 2.01 kB 2.01 kB
index.js 1.39 MB 1.39 MB
link.js 1.45 MB 1.45 MB
routerDirect.js 1.44 MB 1.44 MB
withRouter.js 1.44 MB 1.44 MB -2 B
Overall change 7.14 MB 7.14 MB -2 B

Webpack 4 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
buildDuration 13.6s 13.6s ⚠️ +4ms
buildDurationCached 5.7s 5.7s -26ms
nodeModulesSize 46.6 MB 46.6 MB ⚠️ +158 B
Page Load Tests Overall increase ✓
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
/ failed reqs 0 0
/ total time (seconds) 2.887 2.813 -0.07
/ avg req/sec 865.95 888.59 +22.64
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.671 1.628 -0.04
/error-in-render avg req/sec 1496.01 1535.59 +39.58
Client Bundles (main, webpack, commons)
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
677f882d2ed8..HASH.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 7.19 kB 7.19 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 vercel/next.js update-ts-config-init-message Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
_app-HASH.js gzip 1.28 kB 1.28 kB
_error-HASH.js gzip 3.71 kB 3.71 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.65 kB 1.65 kB
routerDirect..HASH.js gzip 303 B 303 B
withRouter-HASH.js gzip 302 B 302 B
21c68fa65a48..217.css gzip 125 B 125 B
Overall change 9.36 kB 9.36 kB
Client Build Manifests
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
_buildManifest.js gzip 419 B 419 B
Overall change 419 B 419 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js update-ts-config-init-message Change
index.html gzip 612 B 612 B
link.html gzip 619 B 619 B
withRouter.html gzip 604 B 604 B
Overall change 1.83 kB 1.83 kB
Commit: 5ccbb12

This was referenced Apr 28, 2021
@vercel vercel locked as resolved and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants