|
| 1 | +import { fileURLToPath } from 'node:url' |
| 2 | +import { defineConfig } from 'vitest/config' |
| 3 | + |
| 4 | +const projectRoot = fileURLToPath(new URL('.', import.meta.url)) |
| 5 | + |
| 6 | +export default defineConfig({ |
| 7 | + test: { |
| 8 | + globals: false, |
| 9 | + environment: 'node', |
| 10 | + }, |
| 11 | + resolve: { |
| 12 | + alias: { |
| 13 | + '@socketsecurity/lib/github': `${projectRoot}src/github.ts`, |
| 14 | + '@socketsecurity/lib/env/ci': `${projectRoot}src/env/ci.ts`, |
| 15 | + '@socketsecurity/lib/env/debug': `${projectRoot}src/env/debug.ts`, |
| 16 | + '@socketsecurity/lib/env/github': `${projectRoot}src/env/github.ts`, |
| 17 | + '@socketsecurity/lib/env/home': `${projectRoot}src/env/home.ts`, |
| 18 | + '@socketsecurity/lib/env/locale': `${projectRoot}src/env/locale.ts`, |
| 19 | + '@socketsecurity/lib/env/node-auth-token': `${projectRoot}src/env/node-auth-token.ts`, |
| 20 | + '@socketsecurity/lib/env/node-env': `${projectRoot}src/env/node-env.ts`, |
| 21 | + '@socketsecurity/lib/env/npm': `${projectRoot}src/env/npm.ts`, |
| 22 | + '@socketsecurity/lib/env/path': `${projectRoot}src/env/path.ts`, |
| 23 | + '@socketsecurity/lib/env/pre-commit': `${projectRoot}src/env/pre-commit.ts`, |
| 24 | + '@socketsecurity/lib/env/rewire': `${projectRoot}src/env/rewire.ts`, |
| 25 | + '@socketsecurity/lib/env/shell': `${projectRoot}src/env/shell.ts`, |
| 26 | + '@socketsecurity/lib/env/socket': `${projectRoot}src/env/socket.ts`, |
| 27 | + '@socketsecurity/lib/env/socket-cli': `${projectRoot}src/env/socket-cli.ts`, |
| 28 | + '@socketsecurity/lib/env/socket-cli-shadow': `${projectRoot}src/env/socket-cli-shadow.ts`, |
| 29 | + '@socketsecurity/lib/env/temp-dir': `${projectRoot}src/env/temp-dir.ts`, |
| 30 | + '@socketsecurity/lib/env/term': `${projectRoot}src/env/term.ts`, |
| 31 | + '@socketsecurity/lib/env/test': `${projectRoot}src/env/test.ts`, |
| 32 | + '@socketsecurity/lib/env/windows': `${projectRoot}src/env/windows.ts`, |
| 33 | + '@socketsecurity/lib/env/xdg': `${projectRoot}src/env/xdg.ts`, |
| 34 | + '@socketsecurity/lib/env/helpers': `${projectRoot}src/env/helpers.ts`, |
| 35 | + '#env/rewire': `${projectRoot}src/env/rewire.ts`, |
| 36 | + '#env/helpers': `${projectRoot}src/env/helpers.ts`, |
| 37 | + '#env/ci': `${projectRoot}src/env/ci.ts`, |
| 38 | + '#env/debug': `${projectRoot}src/env/debug.ts`, |
| 39 | + '#env/github': `${projectRoot}src/env/github.ts`, |
| 40 | + '#env/home': `${projectRoot}src/env/home.ts`, |
| 41 | + '#env/node-env': `${projectRoot}src/env/node-env.ts`, |
| 42 | + '#env/socket': `${projectRoot}src/env/socket.ts`, |
| 43 | + '#env/socket-cli': `${projectRoot}src/env/socket-cli.ts`, |
| 44 | + '#env/test': `${projectRoot}src/env/test.ts`, |
| 45 | + '#env/windows': `${projectRoot}src/env/windows.ts`, |
| 46 | + '#lib/paths': `${projectRoot}src/paths.ts`, |
| 47 | + }, |
| 48 | + }, |
| 49 | +}) |
0 commit comments