1
0
mirror of https://github.com/robonen/tools.git synced 2026-03-20 10:54:44 +00:00

Merge pull request #72 from robonen/chore/config

Chore/vitest-config
This commit is contained in:
2025-05-19 04:40:53 +07:00
committed by GitHub
14 changed files with 112 additions and 1253 deletions

View File

@@ -32,4 +32,4 @@ jobs:
run: pnpm install --frozen-lockfile
- name: Test
run: pnpm all:build && pnpm all:test
run: pnpm build && pnpm test

View File

@@ -32,7 +32,7 @@ jobs:
run: pnpm install --frozen-lockfile
- name: Build & Test
run: pnpm all:build && pnpm all:test
run: pnpm build && pnpm test
- name: Get changed files
id: changed-files

View File

@@ -69,14 +69,11 @@ const generatePackageJson = async (name: string, path: string, hasVite: boolean)
},
type: 'module',
files: ['dist'],
main: './dist/index.umd.js',
module: './dist/index.js',
types: './dist/index.d.ts',
exports: {
'.': {
types: './dist/index.d.ts',
import: './dist/index.js',
require: './dist/index.umd.js',
types: './dist/index.d.ts',
},
},
scripts: {

View File

@@ -1,22 +0,0 @@
import { defineConfig } from 'vitepress';
export default defineConfig({
lang: 'ru-RU',
title: "Toolkit",
description: "A collection of typescript and javascript development tools",
rewrites: {
'packages/:pkg/README.md': 'packages/:pkg/index.md',
},
themeConfig: {
sidebar: [
{
text: 'Пакеты',
items: [
{ text: '@robonen/tsconfig', link: '/packages/tsconfig/' },
{ text: '@robonen/renovate', link: '/packages/renovate/' },
{ text: '@robonen/stdlib', link: '/packages/stdlib/' },
],
},
],
},
});

View File

@@ -1,14 +0,0 @@
---
# https://vitepress.dev/reference/default-theme-home-page
layout: home
hero:
name: Toolkit
tagline: A collection of typescript and javascript development tools
actions:
- theme: brand
text: Get Started
link: /
- theme: alt
text: View on GitHub
link: /

View File

@@ -25,14 +25,14 @@
"citty": "^0.1.6",
"jiti": "^2.4.2",
"scule": "^1.3.0",
"vitepress": "^1.6.3"
"jsdom": "catalog:",
"vitest": "catalog:",
"@vitest/coverage-v8": "catalog:",
"@vitest/ui": "catalog:"
},
"scripts": {
"all:build": "pnpm -r build",
"all:test": "pnpm -r test",
"create": "jiti ./bin/cli.ts",
"docs:dev": "vitepress dev .",
"docs:build": "vitepress build .",
"docs:preview": "vitepress preview ."
"build": "pnpm -r build",
"test": "vitest",
"create": "jiti ./bin/cli.ts"
}
}

View File

@@ -28,14 +28,14 @@
],
"exports": {
"./browsers": {
"types": "./dist/browsers.d.ts",
"import": "./dist/browsers.mjs",
"require": "./dist/browsers.cjs",
"types": "./dist/browsers.d.ts"
"require": "./dist/browsers.cjs"
},
"./multi": {
"types": "./dist/multi.d.ts",
"import": "./dist/multi.mjs",
"require": "./dist/multi.cjs",
"types": "./dist/multi.d.ts"
"require": "./dist/multi.cjs"
}
},
"scripts": {
@@ -45,8 +45,6 @@
},
"devDependencies": {
"@robonen/tsconfig": "workspace:*",
"jsdom": "catalog:",
"unbuild": "catalog:",
"vitest": "catalog:"
"unbuild": "catalog:"
}
}

View File

@@ -1,7 +0,0 @@
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'jsdom',
},
});

View File

@@ -26,14 +26,11 @@
"files": [
"dist"
],
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts"
"require": "./dist/index.cjs"
}
},
"scripts": {
@@ -43,9 +40,7 @@
},
"devDependencies": {
"@robonen/tsconfig": "workspace:*",
"@vitest/coverage-v8": "catalog:",
"pathe": "catalog:",
"unbuild": "catalog:",
"vitest": "catalog:"
"unbuild": "catalog:"
}
}

View File

@@ -24,14 +24,11 @@
"files": [
"dist"
],
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts"
"require": "./dist/index.cjs"
}
},
"scripts": {
@@ -44,9 +41,7 @@
"@robonen/stdlib": "workspace:*",
"@robonen/tsconfig": "workspace:*",
"@vue/test-utils": "catalog:",
"jsdom": "catalog:",
"unbuild": "catalog:",
"vitest": "catalog:"
"unbuild": "catalog:"
},
"dependencies": {
"vue": "catalog:"

View File

@@ -1,7 +0,0 @@
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'jsdom',
},
});

1238
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -8,4 +8,5 @@ catalog:
pathe: ^2.0.3
unbuild: 3.5.0
vitest: ^3.1.3
'@vitest/ui': ^3.1.3
vue: ^3.5.13

19
vitest.config.ts Normal file
View File

@@ -0,0 +1,19 @@
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
workspace: [
{
extends: true,
test: {
environment: 'jsdom',
},
},
],
coverage: {
provider: 'v8',
include: ['packages/*'],
exclude: ['**/node_modules/**', '**/dist/**'],
},
},
});