- 14 Aug, 2020 3 commits
-
-
Joe Haddad authored
-
Joe Haddad authored
This pull request edits the `BuildManifest` that is sent to `/_document` instead of modifying a single input array to decouple its implementation details. Optimally, we'd eliminate the `files` key all together. --- Related to #16182
-
JJ Kasper authored
-
- 13 Aug, 2020 15 commits
-
-
Joe Haddad authored
-
Joe Haddad authored
-
Joe Haddad authored
-
Joe Haddad authored
Fixes #16166
-
Joe Haddad authored
Really basic one! Needed for `next/client`.
-
Joe Haddad authored
This reduces the code as suggested: https://github.com/vercel/next.js/pull/15231#discussion_r469691649. Removes these bloated Babel helpers: ```diff @@ -678,80 +678,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI var _createClass = __webpack_require__("W8MJ"); - function _createForOfIteratorHelper(o, allowArrayLike) { - var it; - if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { - if ( - Array.isArray(o) || - (it = _unsupportedIterableToArray(o)) || - (allowArrayLike && o && typeof o.length === "number") - ) { - if (it) o = it; - var i = 0; - var F = function F() {}; - return { - s: F, - n: function n() { - if (i >= o.length) return { done: true }; - return { done: false, value: o[i++] }; - }, - e: function e(_e) { - throw _e; - }, - f: F - }; - } - throw new TypeError( - "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." - ); - } - var normalCompletion = true, - didErr = false, - err; - return { - s: function s() { - it = o[Symbol.iterator](); - }, - n: function n() { - var step = it.next(); - normalCompletion = step.done; - return step; - }, - e: function e(_e2) { - didErr = true; - err = _e2; - }, - f: function f() { - try { - if (!normalCompletion && it["return"] != null) it["return"](); - } finally { - if (didErr) throw err; - } - } - }; - } - - function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if ( - n === "Arguments" || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ) - return _arrayLikeToArray(o, minLen); - } - - function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) { - arr2[i] = arr[i]; - } - return arr2; - } - exports.__esModule = true; exports.hasBasePath = hasBasePath; exports.addBasePath = addBasePath; @@ -1864,28 +1790,16 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI } // handle resolving href for dynamic routes if (!pages.includes(cleanPathname)) { - var _iterator = _createForOfIteratorHelper(pages), - _step; - - try { - for (_iterator.s(); !(_step = _iterator.n()).done; ) { - var page = _step.value; - - if ( - (0, _isDynamic.isDynamicRoute)(page) && - (0, _routeRegex.getRouteRegex)(page).re.test( - cleanPathname - ) - ) { - parsedHref.pathname = addBasePath(page); - break; - } + // eslint-disable-next-line array-callback-return + pages.some(function(page) { + if ( + (0, _isDynamic.isDynamicRoute)(page) && + (0, _routeRegex.getRouteRegex)(page).re.test(cleanPathname) + ) { + parsedHref.pathname = addBasePath(page); + return true; } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } + }); } return parsedHref; @@ -2069,10 +1983,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI } if (cancelled) { - var _err = new Error("Loading initial props cancelled"); - - _err.cancelled = true; - throw _err; + var err = new Error("Loading initial props cancelled"); + err.cancelled = true; + throw err; } return data; ```
-
Tim Neutkens authored
-
JJ Kasper authored
Co-authored-by:Tim Neutkens <timneutkens@me.com>
-
Joe Haddad authored
This PR removes a legacy router method that was used for old-style HMR, now replaced by Fast Refresh. This method was not public: ```tsx export type NextRouter = BaseRouter & Pick< Router, | 'push' | 'replace' | 'reload' | 'back' | 'prefetch' | 'beforePopState' | 'events' | 'isFallback' > ``` Even if someone found this method, it's highly unlikely they could use it successfully—it required the full module object. -
Joe Haddad authored
This PR dedupes the `ComponentRes` type to now align with the `loadPage` return type.
-
Thorsten Schaeff authored
r? @lfades @timothyis cc @kiwicopple @awalias Adding a realtime chat example showing how to implement authentication and realtime data syncing with supabase.io :)
-
madiknox authored
Fixes #14737
-
madiknox authored
This is my very first PR, I'm hoping to contribute more. Should I also remove `renderErrorToHTML` and `renderError`? #14737
-
Joe Haddad authored
-
Joe Haddad authored
-
- 12 Aug, 2020 4 commits
-
-
Joe Haddad authored
Fixes #16131
-
Tim Neutkens authored
We no longer use tslint so these comments don't do anything.
-
khasty720 authored
## Summary This PR adds a Next.js example using [Reactsrap](https://reactstrap.github.io/)
-
JJ Kasper authored
Closes: https://github.com/vercel/next.js/issues/16088
-
- 11 Aug, 2020 5 commits
-
-
webpack://_N_E/Andrew Nagy authored
In with-sentry add stripPrefix of `webpack://_N_E/`. This removes the `webpack://_N_E/` prefix from the stack trace which will help Sentry to understand what is "App Only" vs "Full" I'll fully tested calling errors in browser and the stack traces are still aligned and linked correctly. This just gets rid of the extra data in the front which seems to be the same for everyone and I believe it comes from webpack 5 (?)
-
Tim Neutkens authored
Co-authored-by:kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
Tim Neutkens authored
Fixes #16066
-
anotherjsguy authored
- Update dependencies for filbert-js - Add `@filbert-js/macro` example
-
Francis Rodrigues authored
Reference to discussion https://github.com/vercel/next.js/discussions/16010 Bug fixes to `with-firebase-authentication` example that enter in a loop `maximum update depth exceeded errors` becase of the `onIdTokenChanged` Firebase auth method. I added a clean up event listener.
-
- 10 Aug, 2020 13 commits
-
-
Joe Haddad authored
-
Joe Haddad authored
-
Dustin Deus authored
* fix * fix unstable useeffect dep * FIxed lint issue Co-authored-by:
Luis Alvarez <luis@vercel.com> Co-authored-by:
kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
Joe Haddad authored
-
Yuhei Yasuda authored
In most browsers, clicking links with the Alt key has a special behavior, for example, Chrome downloads the target resource. As with other modifier keys, the router should stop the original navigation to avoid preventing the browser’s default behavior. When users click a link while holding the Alt key together, the browsers behave as follows. Windows 10: | Browser | Behavior | |:-----------|:--------------------------------------------| | Chrome 84 | Download the target resource | | Firefox 79 | Prevent navigation and therefore do nothing | | Edge 84 | Download the target resource | | IE 11 | No impact | macOS Catalina: | Browser | Behavior | |:-----------|:--------------------------------------------| | Chrome 84 | Download the target resource | | Firefox 79 | Prevent navigation and therefore do nothing | | Safari 13 | Download the target resource |
-
Joe Haddad authored
-
Prateek Bhatnagar authored
Co-authored-by:
Tim Neutkens <tim@timneutkens.nl> Co-authored-by:
Joe Haddad <joe.haddad@zeit.co>
-
Joe Haddad authored
-
Joe Haddad authored
-
Joe Haddad authored
-
Sebastian Benz authored
See [release notes](https://github.com/ampproject/amp-toolbox/releases/tag/v2.6.0). **Highlight:** [hero images can now be server-side rendered](https://github.com/ampproject/amp-toolbox/tree/main/packages/optimizer#preloadheroimage) by annotating then with `data-hero`. This will greatly improves LCP when using large images in the first viewport. ``` <amp-img data-hero src="/hero.jpg" layout="responsive" width="640" height="480"></amp-img> ``` Also fixes #15979
-
Joe Haddad authored
-
Tim Neutkens authored
-