Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ permissions:
id-token: write
actions: write

env:
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The VP_TOKEN environment variable is added for GitHub Packages authentication to access @voidzero-dev packages. Consider adding a comment or documentation in the workflow explaining what this token is for and how to set it up for contributors, as this is a new external dependency requirement.

Suggested change
env:
env:
# VP_TOKEN is required for authenticating with GitHub Packages to access @voidzero-dev packages.
# Contributors: Set the VP_TOKEN secret in your repository or organization settings with a valid GitHub Packages token.
# See CONTRIBUTING.md for setup instructions.

Copilot uses AI. Check for mistakes.
VP_TOKEN: ${{ secrets.VP_TOKEN }}

jobs:
typecheck:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@voidzero-dev:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=${VP_TOKEN}
Comment on lines +1 to +2
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .npmrc file configures authentication for GitHub Packages using an environment variable VP_TOKEN. Ensure this token is properly documented and secured. Consider adding a comment in this file explaining what this token is for and where to obtain it, or reference documentation that explains this.

Copilot uses AI. Check for mistakes.
24 changes: 0 additions & 24 deletions .oxfmtrc.json

This file was deleted.

11 changes: 0 additions & 11 deletions .oxlintrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions examples/helloworld-commonjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
},
"devDependencies": {
"@eggjs/bin": "workspace:*",
"oxlint": "catalog:"
"@voidzero-dev/vite-plus": "catalog:"
},
"scripts": {
"dev": "egg-bin dev",
"debug": "egg-bin debug",
"test": "egg-bin test",
"cov": "egg-bin cov",
"lint": "oxlint",
"lint": "vite lint",
"ci": "pnpm run lint && pnpm run cov",
"start": "egg-scripts start --daemon",
"stop": "egg-scripts stop"
Expand Down
7 changes: 4 additions & 3 deletions examples/helloworld-tegg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
"@eggjs/tsconfig": "workspace:*",
"tsdown": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:"
"vitest": "catalog:",
"@voidzero-dev/vite-plus": "catalog:"
},
"scripts": {
"dev": "egg-bin dev",
"debug": "egg-bin debug",
"test": "vitest run",
"cov": "vitest run --coverage",
"test": "vite test run",
"cov": "vite test run --coverage",
"lint": "eslint . --ext .ts",
"ci": "pnpm run lint && pnpm run cov",
"prepublishOnly": "pnpm run build",
Expand Down
2 changes: 1 addition & 1 deletion examples/helloworld-tegg/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineProject } from 'vitest/config';
import { defineProject } from '@voidzero-dev/vite-plus';

export default defineProject({
test: {
Expand Down
7 changes: 4 additions & 3 deletions examples/helloworld-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
"@eggjs/tsconfig": "workspace:*",
"tsdown": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:"
"vitest": "catalog:",
"@voidzero-dev/vite-plus": "catalog:"
},
"scripts": {
"dev": "egg-bin dev",
"debug": "egg-bin debug",
"test": "vitest run",
"cov": "vitest run --coverage",
"test": "vite test run",
"cov": "vite test run --coverage",
"lint": "eslint . --ext .ts",
"ci": "pnpm run lint && pnpm run cov",
"prepublishOnly": "pnpm run build",
Expand Down
2 changes: 1 addition & 1 deletion examples/helloworld-typescript/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineProject } from 'vitest/config';
import { defineProject } from '@voidzero-dev/vite-plus';

export default defineProject({
test: {
Expand Down
20 changes: 9 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,29 @@
"js-yaml": "catalog:",
"lint-staged": "catalog:",
"mocha": "catalog:",
"oxfmt": "catalog:",
"oxlint": "catalog:",
"oxlint-tsgolint": "catalog:",
"prettier": "catalog:",
"rimraf": "catalog:",
"semver": "catalog:",
"tsx": "catalog:",
"typescript": "catalog:",
"urllib": "catalog:",
"vitest": "catalog:"
"vitest": "catalog:",
"@voidzero-dev/vite-plus": "catalog:"
},
"scripts": {
"clean": "pnpm -r --parallel run clean && rimraf packages/*/dist plugins/*/dist tools/*/dist examples/*/dist tegg/**/dist **/*/*.tsbuildinfo",
"build": "pnpm clean && pnpm -r run build",
"build:parallel": "pnpm clean && pnpm -r --parallel run build",
"lint": "oxlint --type-aware",
"fmt": "oxfmt",
"lint": "vite lint --type-aware",
"fmt": "vite fmt",
"typecheck": "pnpm clean && pnpm -r run typecheck",
"typecheck:parallel": "pnpm clean && pnpm -r --parallel run typecheck",
"fmtcheck": "oxfmt --check .",
"fmtcheck": "vite fmt --check .",
"pretest": "pnpm run clean && pnpm -r run pretest",
"test": "vitest run --bail 1 --retry 2",
"test": "vite test run --bail 1 --retry 2",
"test:cov": "pnpm run test --coverage",
"preci": "pnpm -r --parallel run pretest",
"ci": "vitest run --bail 1 --retry 2 --coverage --testTimeout 20000 --hookTimeout 20000",
"ci": "vite test run --bail 1 --retry 2 --coverage --testTimeout 20000 --hookTimeout 20000",
"postci": "pnpm run example:test:all",
"site:dev": "pnpm --filter=site run dev",
"site:build": "pnpm --filter=site run build",
Expand All @@ -70,8 +68,8 @@
"prettier --ignore-unknown --write"
],
"*.{ts,mts,cts,js,mjs,cjs,jsx,tsx}": [
"oxfmt",
"oxlint --type-aware --fix"
"vite fmt",
"vite lint --type-aware --fix"
]
},
"repository": {
Expand Down
7 changes: 4 additions & 3 deletions packages/cluster/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"description": "cluster manager for egg",
"scripts": {
"build": "tsdown && rimraf dist *.tsbuildinfo && tsc -p tsconfig.build.json",
"lint": "oxlint",
"lint": "vite lint",
"typecheck": "tsc --noEmit",
"test": "vitest run",
"test": "vite test run",
"prepublishOnly": "pnpm run build"
},
"files": [
Expand Down Expand Up @@ -70,7 +70,8 @@
"tsdown": "catalog:",
"typescript": "catalog:",
"urllib": "catalog:",
"vitest": "catalog:"
"vitest": "catalog:",
"@voidzero-dev/vite-plus": "catalog:"
},
"engines": {
"node": ">=22.18.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/cluster/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineProject, type UserWorkspaceConfig } from 'vitest/config';
import { defineProject, type UserWorkspaceConfig } from '@voidzero-dev/vite-plus';

const config: UserWorkspaceConfig = defineProject({
test: {
Expand Down
10 changes: 5 additions & 5 deletions packages/cookies/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"cookies": "catalog:",
"keygrip": "catalog:",
"@eggjs/tsconfig": "workspace:*",
"oxlint": "catalog:",
"typescript": "catalog:",
"tsdown": "catalog:"
"tsdown": "catalog:",
"@voidzero-dev/vite-plus": "catalog:"
},
"repository": {
"type": "git",
Expand All @@ -37,10 +37,10 @@
"scripts": {
"build": "tsdown && rimraf dist *.tsbuildinfo && tsc -p tsconfig.build.json",
"typecheck": "tsc --noEmit",
"lint": "oxlint --type-aware",
"lint": "vite lint --type-aware",
"lint:fix": "npm run lint -- --fix",
"test": "npm run lint:fix && vitest run",
"ci": "vitest run --coverage",
"test": "npm run lint:fix && vite test run",
"ci": "vite test run --coverage",
"prepublishOnly": "pnpm run build"
},
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/cookies/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineProject, type UserWorkspaceConfig } from 'vitest/config';
import { defineProject, type UserWorkspaceConfig } from '@voidzero-dev/vite-plus';

const config: UserWorkspaceConfig = defineProject({
test: {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"description": "A core plugin framework based on @eggjs/koa",
"scripts": {
"build": "tsdown && rimraf dist *.tsbuildinfo && tsc -p tsconfig.build.json",
"lint": "oxlint",
"lint": "vite lint",
"typecheck": "tsc --noEmit",
"test": "vitest run",
"test": "vite test run",
Comment on lines +28 to +30
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scripts use vite lint and vite test run commands, but @voidzero-dev/vite-plus is missing from devDependencies. Add it to ensure the commands work.

Copilot uses AI. Check for mistakes.
"prepublishOnly": "pnpm run build"
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineProject, type UserWorkspaceConfig } from 'vitest/config';
import { defineProject, type UserWorkspaceConfig } from '@voidzero-dev/vite-plus';

const config: UserWorkspaceConfig = defineProject({
test: {
Expand Down
4 changes: 2 additions & 2 deletions packages/egg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@
"typescript": "catalog:"
},
"scripts": {
"lint": "oxlint",
"lint": "vite lint",
"typecheck": "tsc --noEmit",
"build": "tsdown && rimraf dist *.tsbuildinfo && tsc -p tsconfig.build.json && cp src/config/favicon.png dist/config/favicon.png",
"test": "vitest run",
"test": "vite test run",
Comment on lines +200 to +203
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package.json scripts reference vite lint and vite test run commands, but @voidzero-dev/vite-plus is missing from the devDependencies. This will cause these commands to fail at runtime.

Copilot uses AI. Check for mistakes.
"prepublishOnly": "pnpm run build"
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/egg/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineProject, type UserWorkspaceConfig } from 'vitest/config';
import { defineProject, type UserWorkspaceConfig } from '@voidzero-dev/vite-plus';

const config: UserWorkspaceConfig = defineProject({
test: {
Expand Down
8 changes: 4 additions & 4 deletions packages/errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@
"scripts": {
"build": "tsdown",
"typecheck": "tsc --noEmit",
"lint": "oxlint --type-aware",
"test": "vitest run",
"lint": "vite lint --type-aware",
"test": "vite test run",
"prepublishOnly": "pnpm run build"
},
"dependencies": {},
"devDependencies": {
"@eggjs/tsconfig": "workspace:*",
"@types/node": "catalog:",
"oxlint": "catalog:",
"tsdown": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:"
"vitest": "catalog:",
"@voidzero-dev/vite-plus": "catalog:"
},
"main": "./dist/index.js",
"module": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/errors/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineProject, type UserWorkspaceConfig } from 'vitest/config';
import { defineProject, type UserWorkspaceConfig } from '@voidzero-dev/vite-plus';

const config: UserWorkspaceConfig = defineProject({
test: {
Expand Down
8 changes: 4 additions & 4 deletions packages/extend2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"scripts": {
"build": "tsdown && rimraf dist *.tsbuildinfo && tsc -p tsconfig.build.json",
"typecheck": "tsc --noEmit",
"lint": "oxlint",
"test": "vitest run",
"lint": "vite lint",
"test": "vite test run",
"prepublishOnly": "pnpm run build"
},
"keywords": [
Expand All @@ -33,10 +33,10 @@
"homepage": "https://github.com/eggjs/egg/tree/next/packages/extend2",
"devDependencies": {
"@eggjs/tsconfig": "workspace:*",
"oxlint": "catalog:",
"tsdown": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:"
"vitest": "catalog:",
"@voidzero-dev/vite-plus": "catalog:"
},
"license": "MIT",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/extend2/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineProject, type UserWorkspaceConfig } from 'vitest/config';
import { defineProject, type UserWorkspaceConfig } from '@voidzero-dev/vite-plus';

const config: UserWorkspaceConfig = defineProject({
test: {
Expand Down
11 changes: 5 additions & 6 deletions packages/koa-static-cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,20 @@
"@types/fs-readdir-recursive": "catalog:",
"@types/mime-types": "catalog:",
"@types/node": "catalog:",
"oxlint": "catalog:",
"oxlint-tsgolint": "catalog:",
"rimraf": "catalog:",
"tsdown": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:",
"ylru": "^2.0.0"
"ylru": "^2.0.0",
"@voidzero-dev/vite-plus": "catalog:"
},
"scripts": {
"build": "tsdown && rimraf dist *.tsbuildinfo && tsc -p tsconfig.build.json",
"typecheck": "tsc --noEmit",
"lint": "oxlint --type-aware",
"lint": "vite lint --type-aware",
"lint:fix": "npm run lint -- --fix",
"test": "npm run lint:fix && vitest run",
"ci": "vitest run --coverage",
"test": "npm run lint:fix && vite test run",
"ci": "vite test run --coverage",
"prepublishOnly": "npm run build"
},
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/koa-static-cache/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineProject, type UserWorkspaceConfig } from 'vitest/config';
import { defineProject, type UserWorkspaceConfig } from '@voidzero-dev/vite-plus';

const config: UserWorkspaceConfig = defineProject({
test: {
Expand Down
4 changes: 2 additions & 2 deletions packages/koa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"scripts": {
"build": "tsdown && rimraf dist *.tsbuildinfo && tsc -p tsconfig.build.json",
"typecheck": "tsc --noEmit",
"lint": "oxlint --type-aware",
"test": "vitest run",
"lint": "vite lint --type-aware",
"test": "vite test run",
Comment on lines +29 to +30
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scripts use vite lint and vite test run commands, but @voidzero-dev/vite-plus is missing from devDependencies. Add it to ensure the commands work.

Copilot uses AI. Check for mistakes.
"prepublishOnly": "pnpm run build"
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/koa/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineProject, type UserWorkspaceConfig } from 'vitest/config';
import { defineProject, type UserWorkspaceConfig } from '@voidzero-dev/vite-plus';

const config: UserWorkspaceConfig = defineProject({
test: {
Expand Down
8 changes: 4 additions & 4 deletions packages/path-matching/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"scripts": {
"build": "tsdown",
"typecheck": "tsc --noEmit",
"lint": "oxlint --type-aware",
"test": "vitest run",
"lint": "vite lint --type-aware",
"test": "vite test run",
"prepublishOnly": "npm run build"
},
"dependencies": {
Expand All @@ -53,12 +53,12 @@
"devDependencies": {
"@eggjs/tsconfig": "workspace:*",
"@types/node": "catalog:",
"oxlint": "catalog:",
"path-to-regexp-v8": "npm:path-to-regexp@^8.3.0",
"rimraf": "catalog:",
"tsdown": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:"
"vitest": "catalog:",
"@voidzero-dev/vite-plus": "catalog:"
},
"main": "./dist/index.js",
"module": "./dist/index.js",
Expand Down
Loading
Loading