[READ-ONLY] Mirror of https://github.com/danielroe/nuxt-timings-module.
0

Configure Feed

Select the types of activity you want to include in your feed.

fix: normalise plugin names to prevent malformed windows paths (#162)

Co-authored-by: Daniel Roe <daniel@roe.dev>

authored by

Paw
Daniel Roe
and committed by
GitHub
(Jun 16, 2022, 10:41 PM +0100) c662449e 6aece241

+19 -11
+1 -1
package.json
··· 36 36 "@nuxt/kit": "0.6.4", 37 37 "chalk": "4.1.2", 38 38 "consola": "2.15.3", 39 - "upath": "2.0.1" 39 + "pathe": "0.3.0" 40 40 }, 41 41 "devDependencies": { 42 42 "@babel/plugin-transform-runtime": "7.17.10",
+10 -5
yarn.lock
··· 9152 9152 resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" 9153 9153 integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== 9154 9154 9155 + pathe@0.3.0: 9156 + version "0.3.0" 9157 + resolved "https://registry.yarnpkg.com/pathe/-/pathe-0.3.0.tgz#fd95bc16208263fa6dc1c78c07b3907a528de6eb" 9158 + integrity sha512-3vUjp552BJzCw9vqKsO5sttHkbYqqsZtH0x1PNtItgqx8BXEXzoY1SYRKcL6BTyVh4lGJGLj0tM42elUDMvcYA== 9159 + 9155 9160 pathe@^0.2.0: 9156 9161 version "0.2.0" 9157 9162 resolved "https://registry.yarnpkg.com/pathe/-/pathe-0.2.0.tgz#30fd7bbe0a0d91f0e60bae621f5d19e9e225c339" ··· 11960 11965 resolved "https://registry.yarnpkg.com/untyped/-/untyped-0.2.13.tgz#31be48c9cf1d81b65d05f762a0332b2b5e9a9cb3" 11961 11966 integrity sha512-dnvCmDKTb+zg504JyQ9h1sWINAyxnP6KgmvUH6s6BjLV+3fvjZTiUklL15VvEqpDjy4Leq/xzlZ+JxskeoM5mg== 11962 11967 11963 - upath@2.0.1, upath@^2.0.1: 11964 - version "2.0.1" 11965 - resolved "https://registry.yarnpkg.com/upath/-/upath-2.0.1.tgz#50c73dea68d6f6b990f51d279ce6081665d61a8b" 11966 - integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w== 11967 - 11968 11968 upath@^1.1.1: 11969 11969 version "1.2.0" 11970 11970 resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" 11971 11971 integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== 11972 + 11973 + upath@^2.0.1: 11974 + version "2.0.1" 11975 + resolved "https://registry.yarnpkg.com/upath/-/upath-2.0.1.tgz#50c73dea68d6f6b990f51d279ce6081665d61a8b" 11976 + integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w== 11972 11977 11973 11978 update-notifier@5.1.0: 11974 11979 version "5.1.0"
+1 -1
src/fetch.ts
··· 1 1 import { addPlugin } from '@nuxt/kit' 2 - import { extname } from 'upath' 2 + import { extname } from 'pathe' 3 3 4 4 export function registerFetchTimings () { 5 5 const src = require.resolve('./templates/fetch')
+5 -2
src/plugins.ts
··· 1 1 import { addTemplate, useNuxt } from '@nuxt/kit' 2 - import { extname, resolve } from 'upath' 2 + import { extname, normalize, resolve } from 'pathe' 3 3 4 4 import type { NuxtOptionsPlugin } from '@nuxt/types/config/plugin' 5 5 ··· 17 17 const nuxt = useNuxt() 18 18 19 19 nuxt.options.plugins = nuxt.options.plugins.reduce((plugins, plugin, index) => { 20 - const pluginName = (typeof plugin === 'string' ? plugin : plugin.src).replace(nuxt.options.buildDir + '/', '').replace('~/plugins/', '').replace('~/', '') 20 + const pluginName = normalize(typeof plugin === 'string' ? plugin : plugin.src) 21 + .replace(nuxt.options.buildDir + '/', '') 22 + .replace('~/plugins/', '') 23 + .replace('~/', '') 21 24 22 25 const src = require.resolve('./templates/plugins') 23 26 const before = templateFile(
+1 -1
src/store.ts
··· 1 1 import { addPlugin } from '@nuxt/kit' 2 - import { extname } from 'upath' 2 + import { extname } from 'pathe' 3 3 4 4 export function registerStoreTimings () { 5 5 const src = require.resolve('./templates/store')
+1 -1
.github/workflows/ci.yml
··· 15 15 strategy: 16 16 matrix: 17 17 os: [ubuntu-latest, macos-latest, windows-latest] 18 - node: [12, 14] 18 + node: [14, 16] 19 19 20 20 steps: 21 21 - uses: actions/setup-node@v2