1. 17 8月, 2020 3 次提交
  2. 16 8月, 2020 3 次提交
  3. 15 8月, 2020 3 次提交
  4. 14 8月, 2020 9 次提交
  5. 13 8月, 2020 12 次提交
    • J
      Convert performance relayer to TypeScript (#16161) · 09afc376
      Joe Haddad 提交于
      Really basic one! Needed for `next/client`.
      09afc376
    • J
      Reduce router code (#16159) · 5b815316
      Joe Haddad 提交于
      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;
      ```
      5b815316
    • T
      v9.5.3-canary.0 · 7b13205e
      Tim Neutkens 提交于
      7b13205e
    • J
    • J
      Remove unused router method (#16149) · ff0571ae
      Joe Haddad 提交于
      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.
      ff0571ae
    • J
      Dedupe ComponentRes type (#16148) · c7acd118
      Joe Haddad 提交于
      This PR dedupes the `ComponentRes` type to now align with the `loadPage` return type.
      c7acd118
    • T
      examples: Add with-supabase-auth-realtime-db example. (#16016) · bdc46509
      Thorsten Schaeff 提交于
      r? @lfades @timothyis  
      cc @kiwicopple @awalias
      
      Adding a realtime chat example showing how to implement authentication and realtime data syncing with supabase.io :)
      bdc46509
    • M
      604ca6c6
    • M
      removed renderToHTML definition from with-flow example (#16137) · d81ace26
      madiknox 提交于
      This is my very first PR, I'm hoping to contribute more. Should I also remove `renderErrorToHTML` and `renderError`?
      
      #14737 
      d81ace26
    • J
      Improve page loader types (#16145) · 94a85cff
      Joe Haddad 提交于
      94a85cff
    • J
      Strongly type Head Manager (#16144) · 16e4f9e7
      Joe Haddad 提交于
      16e4f9e7
    • J
      Strongly type PageLoader (#16132) · 9e65c6a9
      Joe Haddad 提交于
      Fixes #16131
      9e65c6a9
  6. 12 8月, 2020 4 次提交
  7. 11 8月, 2020 6 次提交