Commit graph

1490 commits

Author SHA1 Message Date
Joe Haddad
69b7538dce
Simplify getRouteRegex Callsites (#9597) 2019-12-02 16:43:30 -05:00
Joe Haddad
dd1f610f8d
Add SSG Tests with Catch All Routing (#9594)
* Add SSG Tests with Catch All Routing

* fix node version compat

* Remove unneeded query
2019-12-02 16:04:25 -05:00
Lachlan Campbell
590e8d5c26 Fix docs typo: “your sites SEO” (#9579) 2019-11-30 22:16:46 -05:00
Joe Haddad
11c7ca33d1
v9.1.5-canary.8 2019-11-27 23:24:12 -05:00
JJ Kasper
89b22d2994 Fix missing getStaticProps error in serverless mode (#9532)
* Make sure to show missing getStaticProps error in serverless mode

* Update test
2019-11-27 23:23:32 -05:00
JJ Kasper
45832e4421 Make sure to parse query values for SSG page after hydration (#9545)
* Make sure to parse query values for SSG page after hydration

* Update to re-use __NEXT_SPR
2019-11-27 23:16:19 -05:00
Joe Haddad
ca3f881a42 s/getStaticParams/getStaticPaths/ (#9565)
* WIP: rename get static paths

* Adjust logic

* Add warning

* rename constant

* Check for error when using old method

* Add friendly error message

* Test for message of invalid keys

* replace index with dots
2019-11-27 21:46:16 -06:00
Joe Haddad
a6656a0b84
Upgrade path-to-regexp (#9553)
* Upgrade `path-to-regexp`

* Correct import

* Update delimiter

* Fix path match

* Fix hot loader

* Fix params.path usage and pathToRegexp import

* Revert changes for params.path

* Fix lint

* Simplify path match function

* Delimiter should always be `/`

* Fix passed in params

* Add new regex wrapping

* Wrap another route

* Fix error message match
2019-11-27 16:48:28 -05:00
JJ Kasper
375b86cd8a
v9.1.5-canary.7 2019-11-27 15:31:59 -06:00
Janicklas Ralph
6517246b22 Native url (#9561)
* Adding native-url package

* Bumping native-url version

* Upgrading native-url

* Logging stats object for debugging

* Logging stats object for debugging

* Adding try catch to the error lines

* Experimenting with regex

* Experimenting with regex

* Experimenting with regex

* Testing regex changes

* Fixing defer-script test case to not include polyfill.js

* Meging changes with existing polyfill work

* Bumping version

* adjust webpack config

* Reduce size in size test

* Remove 1kb from legacy

* Bumping native-url version, includes fix for IE11

* Update lock file

* Updating native-url, fixes issue on IE11
2019-11-27 13:17:05 -06:00
Joe Haddad
75e6e21029
Add Next.js Version as Metadata (#9551) 2019-11-27 11:28:40 -05:00
JJ Kasper
6ec56d3750 Update to latest fork-ts-checker version (#9555) 2019-11-27 11:16:55 -05:00
JJ Kasper
5cf9ef6582 [WIP] Add err.sh for prerender error (#9548) 2019-11-27 10:54:57 +01:00
Kristoffer K
63886b36a2 fix: resolve preset-modules (#9538)
* fix: require preset-modules

* Update packages/next/build/webpack/plugins/next-esm-plugin.ts

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

* fix formatting
2019-11-26 14:56:08 -05:00
Janicklas Ralph
be496a260c Update native-url package for IE compat (#9539)
* Adding native-url package

* Bumping native-url version

* Upgrading native-url

* Logging stats object for debugging

* Logging stats object for debugging

* Adding try catch to the error lines

* Experimenting with regex

* Experimenting with regex

* Experimenting with regex

* Testing regex changes

* Fixing defer-script test case to not include polyfill.js

* Meging changes with existing polyfill work

* Bumping version

* adjust webpack config

* Reduce size in size test

* Remove 1kb from legacy

* Bumping native-url version, includes fix for IE11

* Update lock file
2019-11-26 14:14:24 -05:00
Adam Stankiewicz
9c9f0609a0 Fix deduplicating dynamic (array) meta tags (#9315) 2019-11-26 12:27:33 -05:00
Jason Miller
1f15746176 [modern] preset-modules & fix custom babelrc (#9489)
* Modernize additional common Babel configurations.

* Add @babel/preset-modules dependency

* code quality

* Use modern terser ecma mode for .module.js bundles.
2019-11-26 11:27:26 +01:00
Prateek Bhatnagar
698f522d71 Wait till load for paint metrics (#9406)
* wait till load to fire paint metrics as they might not be available upfront

* adding performance observer

* adding check for performance user timing
2019-11-26 10:52:38 +01:00
Yosuke Furukawa
93f7da2845 Allow custom amp validation (#9191)
* Allow custom amp validation

* Update packages/next/export/index.ts

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

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

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

* chore: fix prettier error

* fix: set amp.valiator undefined by default
2019-11-26 10:47:55 +01:00
JJ Kasper
cd8e72d5e3 Add custom routes to build output (#9517)
* Add custom routes to build output

* De-dupe code a bit
2019-11-26 10:33:47 +01:00
Janicklas Ralph
04a7f1e85d Replace url polyfill with self.URL (#9200)
* Adding native-url package

* Bumping native-url version

* Upgrading native-url

* Logging stats object for debugging

* Logging stats object for debugging

* Adding try catch to the error lines

* Experimenting with regex

* Experimenting with regex

* Experimenting with regex

* Testing regex changes

* Fixing defer-script test case to not include polyfill.js

* Meging changes with existing polyfill work

* Bumping version

* adjust webpack config

* Reduce size in size test

* Remove 1kb from legacy
2019-11-25 23:10:02 -05:00
Joe Haddad
3ebc61045a
v9.1.5-canary.6 2019-11-25 17:18:00 -05:00
Joe Haddad
302407486e
Specify Invalid Dynamic Route Values (#9525) 2019-11-25 17:15:23 -05:00
Joe Haddad
4656f52d15
CSS Support Customization (#9502)
* CSS Support Customization

* Sort imports

* Correct PostCSS plugin loading

* Add css customization test

* Test "bad" css configuration

* Add load config test

* adjust spacing

* adjust spacing 2x

* Only allow config through JSON

* Support excluding false plugins

* Test tailwind css behavior

* Test plugin exclusion

* Fix unit test

* Fix config file

* Remove more variants

* Update test cases
2019-11-25 16:52:29 -05:00
Joe Haddad
acf3517995 Catch Telemetry Initialization Error (#9518)
* Catch Telemetry Initialization Error
This catches telemetry initialization errors where a user's `os.tmpdir()` directory isn't writable by the process.

* adjust cond
2019-11-25 14:31:10 -06:00
JJ Kasper
409f20a9ca
Fix AMP HTML content emit (#9468)
* Add failing test

* Escape dollar signs in AMP HTML

* Update to not use replace for updating AMP_RENDER_TARGET
2019-11-25 14:05:52 -06:00
Joe Haddad
caa5347873
Remove Legacy Code (#9515)
The `sprStatus` module state is no longer used (and shouldn't be!). We can safely remove this code.

I also renamed the drop bundle identifier while I was here.
2019-11-25 14:32:25 -05:00
Joe Haddad
0a86b149fa
Purge Babel Cache (#9514)
* Bust Babel Cache

* Increase e
2019-11-25 14:16:04 -05:00
Joe Haddad
77c4b4de12
v9.1.5-canary.5 2019-11-25 11:46:02 -05:00
Joe Haddad
b80d4d6893
Drop Re-Exported iSSG Imports (#9512)
* Drop Re-Exported iSSG Imports
This pull request adds loader support for the following export form:
```js
export { getStaticParams as unstable_getStaticParams } from '../../lib/docs/page';
export { getStaticProps as unstable_getStaticProps } from '../../lib/docs/page';
```

This will now result in correct detection and removal.

* Add unit tests for next page config behavior

* Test extra function is not dropped
2019-11-25 11:44:24 -05:00
JJ Kasper
ff2d28c4ff Add err.sh for invalid multi-match usage (#9498)
* Adds err.sh for multi-match error

* Fix missing apostrophe

* Update regex to catch other param names

* Add test for multi-match error

* Update test/integration/invalid-multi-match/test/index.test.js
2019-11-23 02:23:01 +01:00
Joe Haddad
63671782be
v9.1.5-canary.4 2019-11-21 21:17:39 -05:00
Joe Haddad
8a087d50b7
next export should skip iSSG fallback page (#9491)
* `next export` should skip iSSG fallback page

* Move config to correct place
2019-11-21 20:20:19 -05:00
Joe Haddad
dc0c940978
v9.1.5-canary.3 2019-11-21 15:21:55 -05:00
Joe Haddad
8e7ddeb6ca
Ensure CSS Is Preloaded First (#9486)
* Ensure CSS Is Preloaded First

* add test polyfills
2019-11-21 13:24:10 -05:00
Joe Haddad
61f4e70135
Upgrade Babel Dependencies (#9478)
* Upgrade Babel Dependencies

* Update test for new size
2019-11-20 21:53:12 -05:00
JJ Kasper
14cfadf599
v9.1.5-canary.2 2019-11-20 11:37:42 -06:00
JJ Kasper
29d267a1dc
Add handling for rewriting to /_next with catchall (#9466)
* Add handling for rewriting to /_next with catchall

* bump
2019-11-20 09:53:31 -06:00
JJ Kasper
546bb68a05
v9.1.5-canary.1 2019-11-19 11:30:24 -06:00
Tim Neutkens
10066aac9a Exclude cache from being deleted in dev (#9448)
* Exclude cache from being deleted in dev

* Exclude cache directory from delete

* Fix clean regex and update tests

* Remove extra param comment
2019-11-19 10:40:13 -06:00
Joe Haddad
4c549391de
v9.1.5-canary.0 2019-11-19 00:21:03 -05:00
Maël Nison
213c243c18 Adds missing dependency (#9453)
* Adds missing dependency

* Update package.json

* Update yarn.lock
2019-11-19 00:13:25 -05:00
Bart Langelaan
57fa38a39d Remove re-exports of default when they don't exist (#9450) 2019-11-18 20:11:59 -06:00
JJ Kasper
0b18f854ba
v9.1.4 2019-11-18 16:04:17 -06:00
Tim Neutkens
34125559eb v9.1.4-canary.8 2019-11-17 20:29:58 -08:00
Tim Neutkens
6a2c16a945
Update router to have only one route traverse pass (#9435)
* Fix next-news inconsistent return type

* Add failing test for static file rewrite

* Revert "Fix next-news inconsistent return type"

This reverts commit b66e76fb86061e45741c3c4bb9296a0874900f76.

* Add failing test for double redirect

* Fix bug in matcher when having multiple redirects

* Remove custom traversal in favor of router handling it

* Update next-server.ts

* Update router.ts

* Temporarily disable test

* Don't deeply resolve redirects

* Support combined parameters + query passing

* Make sure params are correctly passed in

* Add test for hash in route
2019-11-17 16:12:48 -08:00
JJ Kasper
c7d2da4abd
v9.1.4-canary.7 2019-11-15 20:01:54 -06:00
JJ Kasper
09cab2df5e Fix typo in serverless loader (#9431)
* Fix typo in serverless loader

* Add test for top level error in API route

* Fix type error
2019-11-15 18:00:24 -08:00
JJ Kasper
fefe453ebf
v9.1.4-canary.6 2019-11-15 16:39:36 -06:00
JJ Kasper
dd990506c0 Fix recursive copy failing if more folders than concurrency (#9429)
* Fix recursive-copy function failing with more
folders than concurrency

* Make default concurrency 32 for recursive-copy
2019-11-15 13:53:59 -08:00