profile
viewpoint
Kevin Mårtensson kevva @imagemin @yeoman Sweden

gillstrom/battery-level 182

Get current battery level

benlesh/symbol-observable 167

Symbol.observable ponyfill

get-alex/SublimeLinter-contrib-alex 57

SublimeLinter plugin for Alex

gillstrom/vol 53

Get and set sound volume.

gillstrom/screensaver 30

Start the screensaver.

gillstrom/nircmd 26

Perform tasks using the nircmd.exe utility.

gillstrom/dpn 25

Get the dependents of a users npm modules

gillstrom/osx-brightness 22

Get or set screen brightness in OS X

gillstrom/battery-level-cli 16

Get current battery level

gillstrom/swish-qr 15

Generate a Swish QR code

fork kevva/yup

Dead simple Object schema validation

fork in 12 days

CommitCommentEvent
CommitCommentEvent
CommitCommentEvent
CommitCommentEvent

push eventkevva/next.js

JJ Kasper

commit sha 8a489e24bcb6141ad706e1527b77f3ff38940b6d

Add initial handling for dynamic route href resolving and rewrites on the client (#15231) Co-authored-by: Tim Neutkens <timneutkens@me.com>

view details

Tim Neutkens

commit sha 7b13205e7eef11ba104e23e98583051f497c0a9b

v9.5.3-canary.0

view details

Joe Haddad

commit sha 5b81531676df921e272fa655d5359a2c6fe31981

Reduce router code (#16159) 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; ```

view details

Joe Haddad

commit sha 09afc376cd67357949d1e1d2ae52aeb82e654a1b

Convert performance relayer to TypeScript (#16161) Really basic one! Needed for `next/client`.

view details

Joe Haddad

commit sha 0e48ea3938a6d57bc85c2d903f8401d147bfc4f6

Convert next/client to TypeScript (#16167) Fixes #16166

view details

Joe Haddad

commit sha 33176806f39e5d9f67c4aab43292aa9d7331422e

Remove unused dependency (#16168)

view details

Joe Haddad

commit sha cb786ebd81f637b8231e664d9e2dce690e34d5e4

Share NEXT_DATA type instead of recreating it (#16174)

view details

Joe Haddad

commit sha 4e813ae0c658f3ead343b4ebd65755d3058528a3

v9.5.3-canary.1

view details

JJ Kasper

commit sha 39e00a3f2f87fa2c1ee6d858dc49120842fb9a5b

Add test case for preloading buildManifest (#16183)

view details

Joe Haddad

commit sha 3597978d7f121f11df99cd7cd757e1eb9868fff7

Modify low priority files in manifest (#16181) 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

view details

Joe Haddad

commit sha 32adc3a00de854f071f4c5ea0c53893b38235f94

v9.5.3-canary.2

view details

Kristoffer K

commit sha db40a39f5ec260d29b245d2f5ea54441e9b2cdc4

fix: add missing dependency caniuse-lite (#16091) **What's the problem this PR addresses?** https://github.com/vercel/next.js/pull/16048 stopped bundling `caniuse-lite` but didn't declare it as a dependency https://github.com/yarnpkg/berry/runs/972037981?check_suite_focus=true#step:5:75 **How did you fix it?** Add `caniuse-lite` as a dependency --- cc @Timer As mentioned in https://github.com/vercel/next.js/issues/14157#issuecomment-667328984 I looked into adding a PnP e2e test but the use of the `gist` protocol stopped me from getting it to work since v2 doesn't support that yet. Would it be possible to change this to one of the supported protocols (https://yarnpkg.com/features/protocols)? https://github.com/vercel/next.js/blob/636672755004c756eefcddb5d4ccabbc1855e75a/packages/next/package.json#L208

view details

Joe Haddad

commit sha 9fcf39acd45966d8a6c362bec62e49a53dcd8581

Refactor <Document> files (#16184) Instead of reading the `BuildManifest` and passing it to `/_document`, it should be able to read it for itself. --- Fixes #16182

view details

Artem Zakharchenko

commit sha 746000ea5e55c12763defe01028d03ae765eda67

Add MSW usage example (#13731) * Add MSW usage example * Updated example * Added .gitignore * Added .gitignore in the right place lol Co-authored-by: Luis Alvarez <luis@vercel.com>

view details

JJ Kasper

commit sha 1b4d463cc8037be7725f8a2bb8e2b32bd1600f96

Update rewrite params query appending (#16189) This updates to not automatically append params to the query for rewrites if one or more of the params are already used in the destination's path. No other behavior is being changed and if the user still wants the params in the query after using them in the destination's path they can manually add them like with redirects. Closes: https://github.com/vercel/next.js/issues/15626

view details

Joe Haddad

commit sha 2e8068fcbea427bf50dd464c5565e676e4685ff0

v9.5.3-canary.3

view details

Rafael Almeida

commit sha 521cc621d80542071df6c7ee299cb6ec88e5a4db

Update Storybook examples to v6.0 (#16139) * Update with-storybook example * Delete with-storybook-typescript example * Add TypeScript section to the README Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

view details

Tuan Nguyen

commit sha 2cb05b539eae985454501888d81d049caa348ecd

Correct a couple of small grammar errors. (#16221) Just noticed a couple of tiny grammar errors.

view details

cargallo

commit sha aec37fa8f12408d77c2cfe06486f56620360e1b0

how to bundle-analyzer with next-compose-plugins (#15370) Added a section in readme with the proper use of the plugin with next-compose-plugins ^2.0.0, otherwise it doesn't work

view details

Sergey Rubanov

commit sha feeb941dc6fd44887216b0f0d257aab6bbd2625d

Update to Terser 5 (#16194) Co-authored-by: Tim Neutkens <timneutkens@me.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

view details

push time in a month

push eventkevva/next.js

Kevin Martensson

commit sha 48501a9bc7ed42bf26a3edc4ed9b5f0290314f63

Remove moot check

view details

push time in a month

PR opened vercel/next.js

Reviewers
Handle cases where `config` is exported after its declaration

AMP will still not work correctly when switching between non-AMP and AMP pages in development mode because of https://github.com/vercel/next.js/blob/canary/packages/next/build/babel/plugins/next-page-config.ts#L116-L120.

Fixes #15704.

+50 -7

0 comment

4 changed files

pr created time in a month

create barnchkevva/next.js

branch : config-var-before-export

created branch time in a month

fork kevva/next.js

The React Framework

https://nextjs.org

fork in a month

issue commentvercel/next.js

Links from non-AMP pages to AMP pages causes broken pages

I did some debugging yesterday and found out that it never hits this function https://github.com/vercel/next.js/blob/canary/packages/next/build/webpack/plugins/next-drop-client-page-plugin.ts#L53-L62.

kevva

comment created time in 2 months

pull request commentvercel/next.js

Improvements - Font optimizations

@prateekbh, ideally, it would detect AMP pages then and skip optimizations for them. There could be some pages that are and some that aren't AMP and want the font optimization on the non-AMP ones which isn't possible at the moment.

prateekbh

comment created time in 2 months

pull request commentvercel/next.js

Normalize serverless asPath value

Trying this out, I got the following error:

defaultRouteRegex is not defined

image

ijjk

comment created time in 2 months

startedsindresorhus/capture-website

started time in 2 months

issue openedvercel/next.js

Links from non-AMP pages to AMP pages causes broken pages

Bug report

Describe the bug

So, the problem I reported in https://github.com/vercel/next.js/issues/11521 has essentially resurfaced again.

To Reproduce

Clone https://github.com/kevva/next-app-issue and do the following:

  1. Run npm run dev
  2. Click on the "Test" link and then on the "Home" link again
  3. The image on the start page is gone (notice that it tries to load the bundle for the page)

created time in 2 months

create barnchkevva/next-app-issue

branch : master

created branch time in 2 months

created repositorykevva/next-app-issue

created time in 2 months

issue commentvercel/next.js

Introduce a new `fallback: 'blocking'` ISG mode

Great! Sounds like this would allow for AMP pages to make use of fallback now then as well?

Timer

comment created time in 2 months

issue openedvercel/next.js

Ability to add custom entries to Webpack and build manifest

Feature request

Is your feature request related to a problem? Please describe.

When using AMP together with amp-script, it'd be good if the script somehow could be transpiled. For example, if I would like to import preact and build some component I have to either introduce a second build step, or heavily modifiy the current Webpack config, if that's even possible.

I've tried to add custom entries, but they don't end up in the build manifest so I have no way of getting their path.

Describe the solution you'd like

The way I see it, there are two ways to go here. One way would be to magically find all the AMP script tags on the page that aren't remote and transpile them automatically during build. The other way would be to let users add custom entries in the Webpack config that would end up in the build manifest.

created time in 2 months

more