Commit graph

2103 commits

Author SHA1 Message Date
Joe Haddad
0e915b118d
Add Missing Hook for MainTemplate (#11984) 2020-04-17 16:52:04 -04:00
Joe Haddad
2ef814a274
v9.3.6-canary.3 2020-04-17 15:26:31 -04:00
Joe Haddad
09e38847ea
Update HMR Client Runtime (#11977)
* Update HMR Client Runtime

* Increment event when building or different state

* Dismiss Old Type-Only Overlay

* Update packages/next/client/dev/error-overlay/hot-dev-client.js
2020-04-17 15:24:45 -04:00
Joe Haddad
48e2c19de0
Serialize JSON Warnings Before Event (#11976) 2020-04-17 13:38:09 -04:00
Tim Neutkens
511cf748ee
Enable "paths" support by default (#11970)
* Enable "paths" support by default

* Enable NEXT_PUBLIC_ prefix exposing the variable globally

Part of #11106
2020-04-17 16:28:17 +02:00
Tim Neutkens
e0d4ae0447 v9.3.6-canary.2 2020-04-17 11:24:55 +02:00
Tim Neutkens
2fa26a2fd8
Allow disabling runtime JS in production for certain pages (#11949)
This allows a page to be fully static (no runtime JavaScript) on a per-page basis.

The initial implementation does not disable JS in development mode as we need to figure out a way to inject CSS from CSS imports / CSS modules without executing the component JS. This restriction is somewhat similar to https://www.gatsbyjs.org/packages/gatsby-plugin-no-javascript/. All things considered that plugin only has a usage of 600 downloads per week though, hence why I've made this option unstable/experimental initially as I'd like to see adoption patterns for it first.

Having a built-in way to do this makes sense however as the people that do want to adopt this pattern are overriding Next.js internals currently and that'll break between versions.

Related issue: #5054 - Not adding `fixes` right now as this implementation needs more work. If anyone wants to work on this feel free to reach out on https://twitter.com/timneutkens
2020-04-17 11:22:03 +02:00
Tim Neutkens
5d0932ce25 v9.3.6-canary.1 2020-04-16 13:44:51 +02:00
Tim Neutkens
29c697b36b
Add initial configuration changes for webpack 5 (#11917)
* Disable PnP plugin in webpack 5

Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>

* Use full hashes for hot update names

Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>

* Disable autodll in webpack 5

Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>

* Disable HashedModuleIdsPlugin in webpack 5

Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>

* Use regexes for ignoreplugin as it only supports regexes in webpack 5

Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>

* webpack 4 supports resourceRegExp and contextRegExp

Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>

* Remove webpack 4 specific properties from the webpack 5 config

Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>

* Add library option for webpack 5 support

Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>

* Fix TypeScript Errors

Co-authored-by: Zack Jackson <zackary.l.jackson@gmail.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-15 14:25:02 -04:00
Joe Haddad
fe09c10383
Upgrade terser-webpack-plugin for Webpack 5 (#11922)
* Upgrade `terser-webpack-plugin` for Webpack 5

* Upgrade again

* cacache cannot be bundled

* cacache cannot be bundled

* fix file

* remove cacache dep

* Update LICENSE
2020-04-15 14:20:25 -04:00
Joe Haddad
92dac59630
v9.3.6-canary.0 2020-04-15 02:48:57 -04:00
JJ Kasper
20c7b5c50d
Add initial process.env stubbing for new env support (#11893)
* Add initial process.env stubbing for new env support

* Fix server process.env being stubbed in production

* bump

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-15 02:42:37 -04:00
JJ Kasper
2b116cea29
Ensure module not found error is shown with jsconfig paths (#11889)
* Ensure correct module not found error is shown with jsconfig paths

* bump
2020-04-15 02:33:05 -04:00
Scott Parker
67e6cae448
Correct Global and Local CSS Loading Order in Dev (#11901)
* Global styles now load before local in dev

* fix lint

* Adjust tests

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-15 02:32:25 -04:00
JJ Kasper
2b488ab1e1
Fix NEXT_PUBLIC env values not being inlined (#11896)
* Clean up env tests a bit

* Fix NEXT_PUBLIC env values not being inlined

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-15 02:32:03 -04:00
Joe Haddad
c0724cac82
v9.3.5 2020-04-14 23:24:53 -04:00
Joe Haddad
df1e54877c
v9.3.5-canary.13 2020-04-14 19:39:12 -04:00
Joe Haddad
682120b732
v9.3.5-canary.12 2020-04-14 19:16:15 -04:00
Fonger
5248e182fe
fix(export): fallback to empty string for basePath (#11880)
* fix(next-server): fallback to empty string for basePath

* Revert extra change and add unit test

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-04-14 19:12:02 -04:00
JJ Kasper
ab18c7929e
Add support for params in header key/values (#10324)
* Add support for params in header key/values

* Update todo

* Update with handling for named patterns

* Use compiled package

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-14 11:47:53 -05:00
Joe Haddad
b1aa594a80
Handle Potential Promise Rejection in Serverless (#11882) 2020-04-14 11:43:46 -04:00
Joe Haddad
d1b987f524
v9.3.5-canary.11 2020-04-14 10:49:42 -04:00
Joe Haddad
841cd6c4d7
Fix Situation Where Build Can Hang Indefinitely (#11881) 2020-04-14 10:25:24 -04:00
Tim Neutkens
5713bcbb6c v9.3.5-canary.10 2020-04-14 11:35:38 +02:00
JJ Kasper
d3e308a79f
Add basePath in link component and add/remove it consistently (#9988)
* Add basePath in link component and add/remove it consistently

* Update to not use regex for delBasePath

* Expose addBasePath as router method

* Revert "Expose addBasePath as router method"

This reverts commit 40fed596195c6affabf837e42d472452768e13a3.

* Expose basePath as router field

* Apply suggestion

* Expose basePath as router field

* remove un-used vars

* Update externals

* Apply lint fix

* Update size-limit test

* Update prefetch
2020-04-14 09:50:39 +02:00
Houssein Djirdeh
04ceba4309
Adds first input delay performance metric (#8884)
* measures fid

* updates typings, fixes logic, updates per review comments

* update to es5

* separate clearMeasures

* use relayer

* creates fid polyfll render helper + simplifies measure

* switch to dynamic import

* creates fid experimental flag

* removes unecessary time-to-first-input metric

* removes hydration measure removes

* default flag to false

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-13 14:46:46 -04:00
JJ Kasper
2594bb93ab
v9.3.5-canary.9 2020-04-13 11:26:11 -05:00
JJ Kasper
dcb0a656f5
Add gip identifiers to NEXT_DATA (#11835)
* Add gip identifiers to NEXT_DATA

* Update test a bit
2020-04-13 11:59:49 +02:00
Dave Cardwell
cbcb10b922
Add displayName property to React Context objects (#11829)
https://reactjs.org/docs/context.html#contextdisplayname

Use the .displayName property to show distinct component names in React
DevTools. For example, “DocumentContext.Provider” instead of just
“Context.Provider”.
2020-04-13 11:55:42 +02:00
JJ Kasper
37c98faa01
Make sure to pass through query values for custom routes (#11812) 2020-04-11 12:57:52 +02:00
Tim Neutkens
099ea8b932 v9.3.5-canary.8 2020-04-11 12:45:39 +02:00
Joe Haddad
1199c235b1
Externalize next-server from Server Builds (#11819)
* Externalize  from Server Builds

* Windows Compatibility for Plugins

* Only check for windows path on windows

* add comments
2020-04-11 12:36:06 +02:00
JJ Kasper
46ecb00112
v9.3.5-canary.7 2020-04-10 18:12:02 -05:00
JJ Kasper
cd1a2a5949
Handle more invalid CSS class characters (#11809)
* Handle more invalid CSS class characters

* Remove old comment
2020-04-10 10:37:24 -05:00
JJ Kasper
ab4ba0418c
Replace brackets in CSS classes for dynamic routes (#11795) 2020-04-10 12:32:55 +02:00
JJ Kasper
0648c35508
Update auto export opt-out warning and err.sh (#11801) 2020-04-10 12:31:19 +02:00
Joe Haddad
13cf97055f
v9.3.5-canary.6 2020-04-09 10:24:02 -04:00
Joe Haddad
041384bdda
Upgrade ci-info (#11758)
* Upgrade `ci-info`
This adds support for Nevercode, GH Actions, and Render.

* Repackage compiled deps

* Try to fix test
2020-04-09 10:23:04 -04:00
JJ Kasper
7af04db4e4
Fix just headers not being applied in dev mode (#11755) 2020-04-09 10:24:15 +02:00
JJ Kasper
fa167e3346
Update to latest version of AMP optimizer (#11753)
* Update to latest version of AMP optimizer

* Update test

* Update another test

* Update another test
2020-04-09 10:23:31 +02:00
Joe Haddad
2704387d2e
Add New Provider (#11757) 2020-04-08 16:20:28 -04:00
Zack Krida
21be4c054b
Fix: small typo in SERVER_PROPS_EXPORT_ERROR constant (#11749) 2020-04-08 09:43:18 -04:00
JJ Kasper
cad2a75649
Make sure to handle "next" import gracefully (#11733)
* Make sure to handle "next" import gracefully

* Update test file
2020-04-07 15:13:01 -04:00
Joe Haddad
43a8e57b3e
v9.3.5-canary.5 2020-04-07 13:38:48 -04:00
JJ Kasper
cc9678056e
Fix inconsistent handling for /index (#11643)
* Fix inconsistent handling for /index

* Add more test cases

* Add pages/index/index.js test

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-07 13:24:53 -04:00
JJ Kasper
bf184fceeb
Update to merge props from GSSP methods with _app pageProps (#11709)
* Add warning for pageProps GSSP conflict

* Update warning

* Update to merge pageProps instead of warn on conflict

* bump

* Update merging
2020-04-07 11:33:26 -04:00
JJ Kasper
84b89c8b24
Pre-ncc compiled packages to prevent re-nccing unnecessarily (#11569)
* Pre-ncc compiled packages to prevent re-nccing unnecessarily

* Add compiled files

* Re-run pre-ncc step

* Add check to workflow to ensure pre-compiled doesnt need updating

* Update check-pre-compiled script

* Add handling for lower case license while nccing

* bump

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-07 09:42:16 -04:00
JJ Kasper
43b9f8fbfe
v9.3.5-canary.4 2020-04-06 14:24:16 -05:00
JJ Kasper
04e4c457d9
Update to not modify req.url for getServerSideProps requests (#11637) 2020-04-06 13:55:22 -05:00
Joey Tepperman
cdc7f01954
Add warning when a page is rendered without a starting / (#11418)
* Add error/warning when a page is rendered without a /

Throws an error for development and gives a warning in production

* Add tests for error when rendering without starting slash

* Update to always warn and add err.sh

* Update errors/render-no-starting-slash.md

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-04-06 11:54:42 -05:00
Aaron Reisman
8f4e265f76
Fix Utility Types (#11077) 2020-04-06 17:59:44 +02:00
Aaron Reisman
7a61fb7fdf
Cleanup Build Output Types (#11076) 2020-04-06 17:59:36 +02:00
Aaron Reisman
bddd1ce53e
Update compiler.ts Improve TypeScript typings (#11074)
Improve TypeScript typings
2020-04-06 17:58:35 +02:00
matamatanot
6821d1f8f7
import from compiled (#11684)
Co-authored-by: “kosuke_matano” <kosuke_matano@cyberagent.co.jp>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-04-06 10:24:37 -04:00
Madeline Ziolko
301cca3802
Update webpack and mkdirp (#11165)
* Update mkdirp to a version that no longer has a dependency on minimist: https://npmjs.com/advisories/1179

* Update webpack to the most recent minor version to remove minimist vulnerability.

* Update deps

Co-authored-by: Tim Neutkens <timneutkens@me.com>
2020-04-06 13:12:14 +02:00
Tim Neutkens
69984de796 v9.3.5-canary.3 2020-04-06 11:51:39 +02:00
Tim Neutkens
6e84c0c12a
Add dependencies used by compiled files (#11699)
* Add dependencies used by compiled files

* Update utils.ts
2020-04-06 11:52:19 +02:00
Janicklas Ralph
52f9e911ec
Updating native-url version (#11670)
* Updating native-url version

* Bump version
2020-04-05 13:20:05 +02:00
JJ Kasper
1cdc607968
Warn when user has pages/_error but no pages/404 (#11603)
* Warn when user has pages/_error but no pages/404

* Update test

* Update custom-error-no-custom-404.md

* Apply suggestions from code review

Co-Authored-By: Tim Neutkens <tim@timneutkens.nl>

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-04-05 13:19:14 +02:00
JJ Kasper
9baa103bb8
v9.3.5-canary.2 2020-04-04 12:39:57 -05:00
JJ Kasper
7f8f149f99
Add error when GSSP methods are added as page component members (#11645) 2020-04-03 19:08:17 -04:00
Joe Haddad
ed1aba0dbb
v9.3.5-canary.1 2020-04-03 13:18:26 -04:00
Joe Haddad
b747a366ab
Fix Preview Mode in <iframe> (#11638) 2020-04-03 13:18:04 -04:00
JJ Kasper
97a6b64f83
Rename unstable GSP field (#11602)
* Rename unstable GSP revalidate field

* Update error message

* Tweak error message some more

* Apply suggestions from code review

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-02 14:29:41 -04:00
JJ Kasper
ef1bfc962b
v9.3.5-canary.0 2020-04-02 10:12:50 -05:00
JJ Kasper
56118439b7
Update to make sure to respond with 400 for invalid URLs (#11561)
* Update to make sure to respond with 400 for invalid URLs

* Update response text for 400 API error
2020-04-02 09:24:32 +02:00
Gerald Monaco
139da5ade2
Prevent extraneous re-renders with next/dynamic (#11587)
* Prevent extraneous rerenders with loadables

* Don't try to spread undefined

* Allow ref to be memoized
2020-04-02 09:22:04 +02:00
Tim Neutkens
8c899ee5e4 v9.3.4 2020-04-01 16:05:04 +02:00
Tim Neutkens
e000d843b2 v9.3.4-canary.4 2020-04-01 16:04:03 +02:00
Tim Neutkens
a99244402e v9.3.4-canary.3 2020-04-01 12:14:38 +02:00
JJ Kasper
3f6bd47dfb
Update build output with renamed column (#11401)
* Update build output with renamed column

* Update build output test

* Update naming of column

Co-authored-by: Tim Neutkens <timneutkens@me.com>
2020-04-01 11:39:25 +02:00
JJ Kasper
d61eced9a6
Update to make sure AMP only bundles are always removed in pro… (#11527) 2020-04-01 10:24:44 +02:00
Vincent Voyer
fa5da6d220
Remove passing of NODE_OPTIONS='--inspect' to subprocesses (#11041)
* fix(debugging): do not pass NODE_OPTIONS='--inspect' to subprocesses

fixes #11030

* fix(debugger): use a regex to remove bad NODE_OPTIONS flags

Co-authored-by: Alec Larson <alec.stanford.larson@gmail.com>
2020-04-01 10:12:38 +02:00
JJ Kasper
f9cd7c581f
v9.3.4-canary.2 2020-03-31 14:30:10 -05:00
Jane Manchun Wong
c17ee73db7
Generic Type for GetStaticPaths (#11430)
* Generic Type for GetStaticPaths

* Add generic typing for params to GSSP and GSP too

* Added basic tests

Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-03-31 14:11:09 -05:00
JJ Kasper
b307ed9186
Update checking for existing dotenv usage (#11496)
* Update checking for existing dotenv usage

* Check for package-lock.json also
2020-03-31 11:27:46 -05:00
Tim Neutkens
b8d075ef0e
Update environment support (#11524)
* Remove req.env

* Rename NEXT_APP_ to NEXT_PUBLIC_

* Remove key exposing env config

* Update tests

* Update NEXT_APP_ test to NEXT_PUBLIC_
2020-03-31 17:53:50 +02:00
Guy Bedford
ce3f7d05b3
Drop url dependency (#11503) 2020-03-31 10:00:17 +02:00
Joe Haddad
0bfc0b3f18
v9.3.4-canary.1 2020-03-30 16:29:38 -04:00
Guy Bedford
d7f9a5270e correct babel dev dependency 2020-03-30 16:26:25 -04:00
Guy Bedford
755dc40969 postcss loaders 2020-03-30 16:26:25 -04:00
Guy Bedford
a3ec26d30a ignore-loader 2020-03-30 16:26:25 -04:00
Guy Bedford
8dad5abd66 file-loader 2020-03-30 16:26:25 -04:00
Guy Bedford
c855a3828e babel-loader, cache-loader 2020-03-30 16:26:25 -04:00
Guy Bedford
84a46dfb8c thread-loader 2020-03-30 16:26:25 -04:00
Guy Bedford
c5c4bef90e fixup self-externalization 2020-03-30 16:26:25 -04:00
Guy Bedford
40f6bdef32 autodll-webpack-plugin 2020-03-30 16:26:25 -04:00
Guy Bedford
8b1ea308c6 webpack-dev-middleware, webpack-hot-middleware 2020-03-30 16:26:25 -04:00
Guy Bedford
3621a5d515 Revert "@ampproject/toolbox-optimizer"
This reverts commit 4a7afb72b8c328057bd50b86de92c1abb8d8afc3.
2020-03-30 16:26:25 -04:00
Guy Bedford
278fd54ef1 @ampproject/toolbox-optimizer 2020-03-30 16:26:25 -04:00
Guy Bedford
35a6710cdb babel revert 2020-03-30 16:26:25 -04:00
Guy Bedford
d76844082b react-error-overlay 2020-03-30 16:26:25 -04:00
Guy Bedford
c16f60067b path-to-regexp 2020-03-30 16:26:25 -04:00
Guy Bedford
8c21494997 polyfills 2020-03-30 16:26:25 -04:00
Guy Bedford
9c2e43a382 find-up 2020-03-30 16:26:25 -04:00
Guy Bedford
e68b5622d3 externals refactor 2020-03-30 16:26:25 -04:00
Guy Bedford
7ea2ce8c0e conf 2020-03-30 16:26:25 -04:00
Guy Bedford
202fcbff7a terser 2020-03-30 16:26:25 -04:00
Guy Bedford
7194bfc6a6 string-hash, strip-ansi 2020-03-30 16:26:25 -04:00
Guy Bedford
caa5da7c41 source-map, manifest type fix 2020-03-30 16:26:25 -04:00
Guy Bedford
e7fcdd327f send 2020-03-30 16:26:25 -04:00
Guy Bedford
9615bbd83d recast, babel core sharing 2020-03-30 16:26:25 -04:00
Guy Bedford
98f4f8b886 raw-body 2020-03-30 16:26:25 -04:00
Guy Bedford
26dca225d6 node-fetch, ora 2020-03-30 16:26:25 -04:00
Guy Bedford
4a37263e98 lru-cache 2020-03-30 16:26:25 -04:00
Guy Bedford
4adf4b3300 lodash.curry 2020-03-30 16:26:25 -04:00
Guy Bedford
0f80e127f4 launch-editor 2020-03-30 16:26:25 -04:00
Guy Bedford
e11a7c132b jsonwebtoken 2020-03-30 16:26:25 -04:00
Guy Bedford
3b36a3711c json5 2020-03-30 16:26:25 -04:00
Guy Bedford
9831d3b3e2 is-docker, is-wsl 2020-03-30 16:26:25 -04:00
Guy Bedford
5da7d9edca http-proxy 2020-03-30 16:26:25 -04:00
Guy Bedford
a34766ab62 gzip-size 2020-03-30 16:26:25 -04:00
Guy Bedford
9d3b82094e fresh 2020-03-30 16:26:25 -04:00
Guy Bedford
fda5becf09 etag 2020-03-30 16:26:25 -04:00
Guy Bedford
6a8455e713 escape-string-regexp 2020-03-30 16:26:25 -04:00
Guy Bedford
a9a704e727 devalue 2020-03-30 16:26:25 -04:00
Guy Bedford
580c13a028 cookie 2020-03-30 16:26:25 -04:00
Guy Bedford
0adb310c27 compress, content-type 2020-03-30 16:26:25 -04:00
Guy Bedford
af40b5b2f8 chalk, ci-info 2020-03-30 16:26:25 -04:00
Guy Bedford
90a0cef87e browserslist 2020-03-30 16:26:25 -04:00
Guy Bedford
8af5a83301 amphtml-validator 2020-03-30 16:26:25 -04:00
Guy Bedford
eb5e962d78 async-retry 2020-03-30 16:26:25 -04:00
Guy Bedford
b215348cdb remove unused babel types 2020-03-30 16:26:25 -04:00
Guy Bedford
5619f990cf refactor ncc optimization, babel optimization 2020-03-30 16:26:25 -04:00
Joe Haddad
7038d275d0
v9.3.4-canary.0 2020-03-30 13:04:48 -04:00
shYkiSto
2db9563f13
fix(performance-relayer): properly clean up event listeners (#11410)
Co-authored-by: siarhei.fedarovich <siarhei.fedarovich@ticketmaster.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-03-30 13:04:27 -04:00
Joe Haddad
c2c4241860
Use Lax Cookie for Preview Mode (#11495)
* Use Lax Cookie for Preview Mode

* Fix tests
2020-03-30 12:47:26 -04:00
JJ Kasper
2713369e40
Update to not add path segments to redirect query automatically (#11497)
* Update to not add path segments to redirect query automatically

* Move check up
2020-03-30 18:43:24 +02:00
Joe Haddad
b5d8660ef3
v9.3.3 2020-03-30 10:00:26 -04:00
Tim Neutkens
ac223e2761 v9.3.3-canary.0 2020-03-30 14:21:05 +02:00
Tim Neutkens
d3d0b936a4
Fix type ignore (#11479) 2020-03-30 10:02:36 +02:00
David D
6f27e21f8a
Fix #11396 (#11397)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-03-30 09:53:09 +02:00
liulanz
39a70d8eb1
Minor change in README.md (#11434)
* changed link for JOIN THE COMMUNITY

* Update packages/next/README.md

Co-Authored-By: Luis Alvarez D. <luis@zeit.co>

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-03-28 12:58:42 -05:00
Tim Neutkens
8fdc13afa4
Add support for comments in tsconfig.json (#11392)
Fixes #11390
2020-03-27 14:23:36 +01:00
Tim Neutkens
ee0081356d v9.3.2 2020-03-26 20:11:41 +01:00
Joe Haddad
dd4cee7245
v9.3.2-canary.9 2020-03-26 15:00:03 -04:00
Joe Haddad
ee249ee6cd
v9.3.2-canary.8 2020-03-26 13:18:16 -04:00
Joe Haddad
1d6ffc39f7
Fix static/ file name encoding (#11373)
* Test `static/` file name encoding

* Fix `static/` file name encoding
2020-03-26 12:58:15 -04:00
Tim Neutkens
e83cd4aa96 v9.3.2-canary.7 2020-03-26 14:13:54 +01:00
JJ Kasper
d8155b22ff
Add initial support for new env handling (#10525)
* Add initial support for new env config file

* Fix serverless processEnv call when no env is provided

* Add missing await for test method

* Update env config to .env.json and add dotenv loading

* ncc dotenv package

* Update type

* Update with new discussed behavior removing .env.json

* Update hot-reloader createEntrypoints

* Make sure .env is loaded before next.config.js

* Add tests for all separate .env files

* Remove comments

* Add override tests

* Add test for overriding env vars based on local environment

* Add support for .env.test

* Apply suggestions from code review

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

* Use chalk for env loaded message

* Remove constant as it’s not needed

* Update test

* Update errsh, taskr, and CNA template ignores

* Make sure to only consider undefined missing

* Remove old .env ignore

* Update to not populate process.env with loaded env

* Add experimental flag and add loading of global env values

Co-authored-by: Tim Neutkens <timneutkens@me.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-03-26 13:32:41 +01:00
Joe Haddad
aac2e3e2db
v9.3.2-canary.6 2020-03-25 15:02:15 -04:00
JJ Kasper
2ba6db65e2
Update to prevent re-using workers for getStaticPaths in dev mode (#11347) 2020-03-25 14:57:14 -04:00
Filipe Medeiros
a6ac0a5057
Just a small typo I think, right? (#11344) 2020-03-25 13:26:53 +01:00
JJ Kasper
77380507d8
Make sure to copy AMP SSG files during export (#11331)
* Make sure to copy AMP SSG files during export

* bump

* bump
2020-03-25 09:22:34 +01:00
Joe Haddad
e7842aff23
v9.3.2-canary.5 2020-03-24 22:19:47 -04:00
JJ Kasper
eeea53c04b
Fix warning for API routes with next export (#11330)
* Fix warning for API routes with next export

* Update warning copy
2020-03-24 13:38:22 -04:00
Tim Neutkens
876ae3fc87
Upgrade loader-utils (#11324) 2020-03-24 09:57:23 -04:00
Tim Neutkens
55186cabd6 v9.3.2-canary.4 2020-03-24 12:40:29 +01:00
Tim Neutkens
7774101ad1
Skip paths that are routed to a .d.ts file (#11322) 2020-03-24 12:25:58 +01:00
JJ Kasper
b4fca31d3b
Update handling for ENOENT from GSSP methods (#11302)
* Update handling for ENOENT from GSSP methods

* Add route to routes-manifest test
2020-03-24 09:33:39 +01:00
Yosuke Furukawa
aadb31fa5b
Add custom amp optimizer and skip validation mode (#10705)
* Add custom amp optimizer and skip validation mode

* fix: type

* fix worker lint errors
2020-03-24 09:31:04 +01:00
Joe Haddad
130733129d
v9.3.2-canary.3 2020-03-23 18:46:48 -04:00
Joe Haddad
f19dcf9b6e
Add Numeric Separator Support for TypeScript (#11308)
* Add Numeric Separator Support for TypeScript

* Check for number in render
2020-03-23 17:41:35 -05:00
Joe Haddad
c68de947a4
v9.3.2-canary.2 2020-03-23 11:20:28 -04:00
Tim Neutkens
7fce52b905
Add support for paths in tsconfig.json and jsconfig.json (#11293)
* Add support for tsconfig/json `paths` option

* Add tests for paths in tsconfig.json

* Don't apply aliases when paths is empty

* Clean up unused methods and link to TypeScript license

* Add tests for jsconfig

* Put feature under an experimental flag

* Enable to see if tests pass

* Update types

* Add feature under an experimental flag
2020-03-23 10:45:51 -04:00
Dulmandakh
d3fb262958
remove mkdirp, bump fs-extra to 9.0.0 (#11251)
* bump mkdirp to 1.0.3, which support promise

* fix mkdirp in spr-cache.ts

* bump fs-extra to 9.0.0

* remove mkdirp
2020-03-21 17:02:05 +01:00
Tim Neutkens
f25f9b8753 v9.3.2-canary.1 2020-03-20 13:07:04 +01:00
JJ Kasper
c14d983d54
Ensure hybrid AMP works correctly with SSG (#11205)
* Ensure hybrid AMP works correctly with SSG

* Strip AMP from query when not needed
2020-03-20 09:46:52 +01:00
Tim Neutkens
38e42cd4bb
Add support for baseUrl option in tsconfig and jsconfig (#11203)
* Add support for baseUrl option in tsconfig and jsconfig

* Move jsconfigPath

* Remove filter
2020-03-19 17:34:24 +01:00
Prateek Bhatnagar
3907dfd60d
updating min nodejs requirement (#11181)
* updating min canary requirement

* watchpack requires 10.13.0
2020-03-19 09:25:41 +01:00
JJ Kasper
e28e8ada98
Group CSS files in shared build output separate from JS files (#11184)
* Group CSS files in shared build output separate from JS files

* Fix buildId not being replaced in shared by all
2020-03-19 09:25:10 +01:00
Joe Haddad
bf93ca4af6
v9.3.2-canary.0 2020-03-18 13:00:25 -04:00
Sebastian Benz
4b1ce16e12
upgrade @ampproject/toolbox-optimizer to 2.0.1 (#11168)
Fixes #11159
2020-03-18 14:20:29 +01:00
Tim Neutkens
527453560e Update <dir> reference in help text
Fixes #11151
2020-03-18 10:18:29 +01:00
JJ Kasper
836f68aa67
Add CSS file to build output (#11145)
* Remove filtering CSS from build output

* Add displaying page specific CSS files and including them in page size
2020-03-18 09:47:39 +01:00
JJ Kasper
203f43c1fe
Add error when attempting to export GSSP page (#11154)
* Add error when attempting to export GSSP page

* Update errors/gssp-export.md

* Update errors/gssp-export.md

* Update errors/gssp-export.md

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-03-18 09:33:10 +01:00
Shu Uesugi
408a01ce95
Update CLI custom config documentation link (#11152)
* Update CLI custom config documentation link

* Update packages/next/cli/next-dev.ts

Co-Authored-By: Joe Haddad <timer150@gmail.com>

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-03-18 09:21:12 +01:00
Tim Neutkens
9730be6734 v9.3.1 2020-03-17 16:06:51 +01:00
Tim Neutkens
d661fac733 v9.3.1-canary.7 2020-03-17 15:39:49 +01:00
Tim Neutkens
25d8652283 v9.3.1-canary.6 2020-03-16 10:57:41 +01:00
JJ Kasper
ea7c1e1dcf
Add support for SCSS options (#11063)
* Add support for SCSS includePaths

* Support sassOptions instead of just includePaths

Co-authored-by: Tim Neutkens <timneutkens@me.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-03-16 10:55:16 +01:00
Tim Neutkens
30cf4d5ab6 v9.3.1-canary.5 2020-03-15 15:15:19 +01:00
Aaron Reisman
85e9ce1b0b
Update preset.ts: Remove any and use updated Node.js types (#11075)
Remove any and use updated Node.js types
2020-03-15 12:22:53 +01:00
Giuseppe
bc4aba1713
Upgrade styled-jsx (#11070)
The main change in this version is https://github.com/zeit/styled-jsx/pull/621
2020-03-15 11:51:55 +01:00
JJ Kasper
71f97198d1
Add support for static 404 when _error does not have custom GIP (#11062)
* Add support for static 404 when _error does not have custom GIP

* Update tests
2020-03-14 09:58:20 +01:00
Joe Haddad
925d843503
v9.3.1-canary.4 2020-03-13 09:09:10 -04:00
Joe Haddad
18036d4e51
Correct Cache-Control Behavior for GS(S)P (#11022)
* Correct Cache-Control Behavior for GS(S)P

* remove old line

* fix test
2020-03-13 10:40:10 +01:00
Joe Haddad
8f8030f7eb
v9.3.1-canary.3 2020-03-12 14:09:12 -04:00
Armand Abric
886037b1ba
Add "noreferrer" to the prerender indicator doc link (#11005) 2020-03-12 11:23:58 -04:00
Jeremy Stucki
861257bdfc
Generic form of GetStaticProps and GetServerSideProps (#10856)
* Generic form of GetStaticProps and GetServerSideProps

* Oops, fix type!

* Add constraint for P

* Update packages/next/types/index.d.ts

Co-authored-by: Joe Haddad <timer150@gmail.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-03-12 09:11:15 -04:00
Joe Haddad
a86184eb89
v9.3.1-canary.2 2020-03-12 07:31:26 -04:00
JJ Kasper
ccb6ce7ed4
Add support for getStaticProps in pages/404 (#10984)
* Make sure to not show pages/404 GIP error from _app having GIP

* Add error for getStaticProps in pages/404 too

* Add support for getStaticProps in pages/404

* Update test
2020-03-12 10:48:14 +01:00
Joe Haddad
9d9f7a5873
Improve Sass Error (#10982)
* Improve Sass Error

* test sass error massage

* use quotes

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-03-11 16:34:14 -04:00
JJ Kasper
34a8e8843d
Make sure to not show pages/404 GIP error from _app having GIP (#10974)
* Make sure to not show pages/404 GIP error from _app having GIP

* Add error for getStaticProps in pages/404 too
2020-03-11 12:18:05 -04:00
Joe Haddad
33503f70a7
v9.3.1-canary.1 2020-03-11 10:37:26 -04:00
Joe Haddad
905f0ce214
Check SSG Page via Route Lookup (#10971) 2020-03-11 09:33:55 -05:00
JJ Kasper
6616a371e8
Update handling for patterns in custom routes (#10523)
* Update handling for unnamed params and named patterns in custom-routes

* Update query handling to match Now
2020-03-10 16:09:35 -04:00
JJ Kasper
fde1ce2924
Add warning when built-in CSS/SCSS support is disabled (#10942) 2020-03-10 14:29:40 -04:00
Joe Haddad
a4ab088746
v9.3.1-canary.0 2020-03-09 14:59:13 -04:00
Joe Haddad
1e53a4961a
Correctly Count Object References (#10903)
* Correctly Count Object References

* Make error message better

* add more tests
2020-03-09 14:58:51 -04:00
Tim Neutkens
befb5006f4 v9.3.0 2020-03-09 19:08:52 +01:00
Joe Haddad
713340600d
v9.2.3-canary.29 2020-03-09 13:31:12 -04:00
Joe Haddad
8443a809f3
Verify GS(S)P Serializability (#10857)
* Verify GS(S)P Serializability

* Add support for cyclic refs

* Add unit tests

* Test for error in development mode

* Fix prerender preview tests

* Fix gssp preview tests

* fix 2x test cases

* Add desired test

* fix some more tests

* Fix route manifest expect

* Fix test expects

* Test that `getServerSideProps` does not error in production

* Test that getStaticProps is not checked in production

* Test serialization check during build

* Fix export detection for serverless

* Update test/unit/is-serializable-props.test.js

Co-Authored-By: JJ Kasper <jj@jjsweb.site>

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-03-09 13:30:44 -04:00
Tim Neutkens
1a47dbea69
Upgrade webpack (#10895)
Fixes #10890
2020-03-09 13:11:06 +01:00
Tim Neutkens
f0cec748d8 v9.2.3-canary.28 2020-03-09 11:01:02 +01:00
Tim Neutkens
1d16b10e3a v9.2.3-canary.27 2020-03-09 10:45:11 +01:00
JJ Kasper
764edc51b2
Add identifier to NEXT_DATA when custom server is used (#10869) 2020-03-06 11:14:39 -05:00
Tim Neutkens
9edafc6469 v9.2.3-canary.26 2020-03-06 12:20:38 +01:00
Joe Haddad
49369d7649
Fix getServerSideProps Test Case (#10862)
* Fix `getServerSideProps` Test Case

* Data requests should fail instead of rendering
2020-03-06 00:53:11 -05:00
JJ Kasper
b274fe39d3
Update method for attaching GS(S)P identifier to page (#10859)
* Update to use separate export instead of attaching to Component to identify GS(S)P pages

* Handle initialProps being undefined
2020-03-05 23:15:10 -05:00