Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Commit

Permalink
fix: switch to pathe to normalize paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Dec 22, 2021
1 parent c8f4565 commit 3fa174a
Show file tree
Hide file tree
Showing 24 changed files with 37 additions and 18 deletions.
1 change: 1 addition & 0 deletions packages/peeky-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"consola": "^2.15.0",
"lodash": "^4.17.21",
"open": "^7.3.1",
"pathe": "^0.2.0",
"portfinder": "^1.0.28",
"sade": "^1.7.4"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/peeky-cli/src/bin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'fs'
import { dirname, resolve } from 'path'
import { dirname, resolve } from 'pathe'
import { fileURLToPath } from 'url'
import sade from 'sade'

Expand Down
2 changes: 1 addition & 1 deletion packages/peeky-client/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
import { resolve } from 'pathe'

const monacoPrefix = 'monaco-editor/esm/vs'

Expand Down
1 change: 1 addition & 0 deletions packages/peeky-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"dependencies": {
"@peeky/utils": "^0.9.3",
"consola": "^2.15.0",
"pathe": "^0.2.0",
"reactive-fs": "^0.4.1",
"shortid": "^2.2.16",
"vite": "^2.7.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/peeky-config/src/loader.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'fs'
import { join } from 'path'
import { join } from 'pathe'
import consola from 'consola'
import shortid from 'shortid'
import { fixWindowsAbsoluteFileUrl } from '@peeky/utils'
Expand Down
1 change: 1 addition & 0 deletions packages/peeky-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"lodash": "^4.17.21",
"memfs": "^3.2.0",
"mlly": "^0.3.16",
"pathe": "^0.2.0",
"pragma": "^1.0.0",
"reactive-fs": "^0.4.1",
"shortid": "^2.2.16",
Expand Down
2 changes: 1 addition & 1 deletion packages/peeky-runner/src/runner.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { relative } from 'path'
import { relative } from 'pathe'
import { ReactiveFileSystem } from 'reactive-fs'
import Tinypool from 'tinypool'
import { Awaited } from '@peeky/utils'
Expand Down
2 changes: 1 addition & 1 deletion packages/peeky-runner/src/runtime/coverage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'fs'
import path from 'path'
import path from 'pathe'
import match from 'anymatch'
import { V8Coverage } from 'collect-v8-coverage'
import { SourceMapConsumer } from 'source-map'
Expand Down
2 changes: 1 addition & 1 deletion packages/peeky-runner/src/runtime/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import fs from 'fs'
import { Volume } from 'memfs'
import { dirname } from 'path'
import { dirname } from 'pathe'
import { patchFs as patch } from 'fs-monkey'

export const realFs = { ...fs, promises: { ...fs.promises } }
Expand Down
2 changes: 1 addition & 1 deletion packages/peeky-runner/src/runtime/peeky-global/mock.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { resolve, dirname } from 'path'
import { resolve, dirname } from 'pathe'
import { mockedModules } from '../mocked-files.js'
import { PeekyGlobalContext } from './index.js'

Expand Down
2 changes: 1 addition & 1 deletion packages/peeky-runner/src/runtime/run-test-file.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { performance } from 'perf_hooks'
import { resolve, relative } from 'path'
import { resolve, relative } from 'pathe'
import { install as installSourceMap } from 'source-map-support'
import consola from 'consola'
import { CoverageInstrumenter } from 'collect-v8-coverage'
Expand Down
2 changes: 1 addition & 1 deletion packages/peeky-runner/src/runtime/run-tests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { basename } from 'path'
import { basename } from 'pathe'
import { performance } from 'perf_hooks'
import type { Context, Test } from '../types'
import { setCurrentSuite, setCurrentTest } from './global-context.js'
Expand Down
2 changes: 1 addition & 1 deletion packages/peeky-runner/src/runtime/test-register.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { basename, extname } from 'path'
import { basename, extname } from 'pathe'
import shortid from 'shortid'
import slugify from 'slugify'
import { TestFlag } from '..'
Expand Down
2 changes: 1 addition & 1 deletion packages/peeky-runner/src/runtime/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/* eslint-disable @typescript-eslint/no-empty-function */

import { resolve, dirname, relative } from 'path'
import { resolve, dirname, relative } from 'pathe'
import { builtinModules, createRequire } from 'module'
import vm from 'vm'
import { fileURLToPath, pathToFileURL } from 'url'
Expand Down
1 change: 1 addition & 0 deletions packages/peeky-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"launch-editor": "^2.2.1",
"nexus": "^1.0.0",
"object-inspect": "^1.11.0",
"pathe": "^0.2.0",
"project-name-generator": "^2.1.9",
"random-emoji": "^1.0.2",
"reactive-fs": "^0.4.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/peeky-server/src/schema/Run.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { relative } from 'path'
import { relative } from 'pathe'
import { fileURLToPath } from 'url'
import { performance } from 'perf_hooks'
import { arg, extendType, idArg, inputObjectType, nonNull, objectType } from 'nexus'
Expand Down
2 changes: 1 addition & 1 deletion packages/peeky-server/src/schema/Settings.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { arg, extendType, inputObjectType, nonNull, objectType } from 'nexus'
import path from 'path'
import path from 'pathe'
import fs from 'fs-extra'
import os from 'os'
import type { Context } from '../context'
Expand Down
2 changes: 1 addition & 1 deletion packages/peeky-server/src/schema/TestFile.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { join } from 'path'
import { join } from 'pathe'
import { extendType, idArg, intArg, nonNull, objectType, stringArg } from 'nexus'
import launchEditor from 'launch-editor'
import type { Context } from '../context'
Expand Down
2 changes: 1 addition & 1 deletion packages/peeky-server/src/server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { dirname, join } from 'path'
import { dirname, join } from 'pathe'
import HTTP from 'http'
import { fileURLToPath } from 'url'
import { createRequire } from 'module'
Expand Down
2 changes: 1 addition & 1 deletion packages/peeky-server/src/util.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { basename } from 'path'
import { basename } from 'pathe'
import consola from 'consola'
import { RunTestFileData } from './schema/index.js'

Expand Down
2 changes: 1 addition & 1 deletion packages/peeky-server/src/watch.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import chokidar from 'chokidar'
import { join } from 'path'
import { join } from 'pathe'
import type { Context } from './context'
import { run } from './run.js'
import { isRunning, settings, testFiles } from './schema/index.js'
Expand Down
1 change: 1 addition & 0 deletions packages/peeky-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"chalk": "^5.0.0",
"consola": "^2.15.0",
"esbuild": "^0.13.12",
"pathe": "^0.2.0",
"merge-source-map": "^1.1.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/peeky-utils/src/esbuild.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { extname } from 'path'
import { extname } from 'pathe'
import chalk from 'chalk'
import {
Message,
Expand Down
14 changes: 14 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3fa174a

Please sign in to comment.