Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# pkg.pr.new registry bridge (added by test-pkg-pr-new-migrate.sh)
registry=https://pkg-pr-registry-bridge.void.app/
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,17 @@
"editor.formatOnSaveMode": "file",
"[json]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
}
}
17 changes: 17 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Agent Guide

See [CONTRIBUTING](./CONTRIBUTING.md) for the main contributor guide that applies to both human contributors and agents.

<!--VITE PLUS START-->

# Using Vite+, the Unified Toolchain for the Web

This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, and it invokes Vite through `vp dev` and `vp build`. Run `vp help` to print a list of commands and `vp <command> --help` for information about a specific command.

Docs are local at `node_modules/vite-plus/docs` or online at https://viteplus.dev/guide/.

## Review Checklist

- [ ] Run `vp install` after pulling remote changes and before getting started.
- [ ] Run `vp check` and `vp test` to format, lint, type check and test changes.
- [ ] Check if there are `vite.config.ts` tasks or `package.json` scripts necessary for validation, run via `vp run <script>`.
- [ ] If setup, runtime, or package-manager behavior looks wrong, run `vp env doctor` and include its output when asking for help.

<!--VITE PLUS END-->
472 changes: 231 additions & 241 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
"prepare": "vp config"
},
"devDependencies": {
"@vitest/coverage-v8": ">=4.1.9",
"vite-plus": ">=0.2.1"
"@vitest/coverage-v8": "4.1.9",
"vite-plus": "0.0.0-commit.5b214b7987c99adfe0aff4d406264457ed0232ce",
"vitest": "4.1.9"
Comment on lines +25 to +26

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The vitest package is a dependency of vite-plus, so it will be installed transitively. Adding it as a direct devDependency here is redundant. To simplify dependency management, it's best to remove it and rely on the version brought in by vite-plus. The overrides section already ensures a consistent version of vitest is used throughout the monorepo.

    "vite-plus": "0.0.0-commit.5b214b7987c99adfe0aff4d406264457ed0232ce"

},
"overrides": {
"vite": "npm:@voidzero-dev/vite-plus-core"
"vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.5b214b7987c99adfe0aff4d406264457ed0232ce",
"vitest": "4.1.9"
},
"engines": {
"node": ">=26.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/App/__tests__/coverage.ui.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { afterEach, describe, expect, it, vi } from 'vitest'
import { afterEach, describe, expect, it, vi } from 'vite-plus/test'

import { createOnErrorHandler } from '../../App'

Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/App/__tests__/index.ui.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { setMock } from '@faasjs/react'
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { useEffect } from 'react'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { App } from '../../App'
import { useFaas } from '../../FaasDataWrapper'
Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/Blank/__tests__/index.ui.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { Blank } from '../../Blank'

Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/Config/__tests__/index.ui.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import { describe, expect, it, vi } from 'vitest'
import { describe, expect, it, vi } from 'vite-plus/test'

import { Blank } from '../../Blank'
import { ConfigProvider, useConfigContext } from '../../Config'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { Description } from '../../Description'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { Description } from '../../Description'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import {
Description,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { setMock } from '@faasjs/react'
import { render, screen } from '@testing-library/react'
import { beforeEach, describe, expect, it } from 'vitest'
import { beforeEach, describe, expect, it } from 'vite-plus/test'

import { Description } from '../../Description'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react'
import dayjs from 'dayjs'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { Description } from '../../Description'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react'
import type { JSX } from 'react'
import { describe, expect, it, vi } from 'vitest'
import { describe, expect, it, vi } from 'vite-plus/test'

import { ErrorBoundary } from '../../ErrorBoundary'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ declare module '@faasjs/types' {
}

import { render, screen } from '@testing-library/react'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vite-plus/test'

import { FaasDataWrapper, withFaasData } from '../../FaasDataWrapper'

Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/Form/__tests__/base.ui.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { Form } from '../../Form'

Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/Form/__tests__/extend.ui.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react'
import { Input } from 'antd'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { type ExtendFormItemProps, Form, type FormProps } from '../../Form'

Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/Form/__tests__/items.ui.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { Input } from 'antd'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { Form } from '../../Form'

Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/Form/__tests__/submit.ui.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { setMock } from '@faasjs/react'
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { Form } from '../../Form'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import type { FaasItemType } from '../../data'
import { Form } from '../../Form'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { Form } from '../../Form'
import { FormItem } from '../../FormItem'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import type { FaasItemType } from '../../data'
import { Form } from '../../Form'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import type { UnionFaasItemProps } from '../../data'
import { Form } from '../../Form'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import type { FaasItemType } from '../../data'
import { FormItem } from '../../FormItem'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { Loading } from '../../Loading'

Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/Table/__tests__/ajax.ui.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vite-plus/test'

import { Table } from '../../Table'

Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/Table/__tests__/base.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { Table } from '../../Table'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fireEvent, render, screen, waitFor } from '@testing-library/react'
import dayjs from 'dayjs'
import { describe, expect, it, vi } from 'vitest'
import { describe, expect, it, vi } from 'vite-plus/test'

import { createTableColumns } from '../column-builder'
import { FaasDataTable, Table } from '../table'
Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/Table/__tests__/extend.ui.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { type ExtendTableItemProps, Table, type TableProps } from '../../Table'

Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/Table/__tests__/faas.ui.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vite-plus/test'

import { Table } from '../../Table'

Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/Table/__tests__/items.ui.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import dayjs from 'dayjs'
import { beforeEach, describe, expect, it } from 'vitest'
import { beforeEach, describe, expect, it } from 'vite-plus/test'

import type { UnionFaasItemElement, UnionFaasItemRender } from '../../data'
import { Table, type TableItemProps } from '../../Table'
Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/Table/__tests__/logic.ui.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { setMock } from '@faasjs/react'
import { render, screen, waitFor } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { describe, expect, it, vi } from 'vitest'
import { describe, expect, it, vi } from 'vite-plus/test'

import { Table } from '../../Table'

Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/Tabs/__tests__/index.ui.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { Tabs } from '../../Tabs'

Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/Title/__tests__/index.ui.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from '@testing-library/react'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { Title } from '../../Title'

Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/__tests__/dialog-hook-cases.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { act, render, screen } from '@testing-library/react'
import type { Dispatch, JSX, ReactNode, SetStateAction } from 'react'
import { describe, expect, it, vi } from 'vitest'
import { describe, expect, it, vi } from 'vite-plus/test'

type DialogProps = {
children?: ReactNode
Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/data/__tests__/data.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import dayjs from 'dayjs'
import { createElement } from 'react'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import {
cloneUnionFaasItemElement,
Expand Down
2 changes: 1 addition & 1 deletion packages/ant-design/src/index/__tests__/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import * as antDesign from '../../index'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertType, it } from 'vitest'
import { assertType, it } from 'vite-plus/test'

import type { useApp } from '../../useApp'
import { type useAppProps } from '../../useApp'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react'
import { ConfigProvider } from 'antd'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { useThemeToken } from '../../useThemeToken'

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/define-api/__tests__/define-api.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Http, defineApi, type FuncRuntime } from '@faasjs/core'
import { streamToObject, z } from '@faasjs/utils'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { TestsAuthPlugin } from './auth-plugin'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
} from '@faasjs/core'
import { defineApi } from '@faasjs/core'
import { z } from '@faasjs/utils'
import { assertType, expect, it } from 'vitest'
import { assertType, expect, it } from 'vite-plus/test'

type CurrentUser = {
id: number
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/func/__tests__/coverage.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { Func, parseApiFilenameFromStack } from '../..'

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/func/__tests__/fp.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { Func, type InvokeData, type MountData, type Next, type Plugin } from '../..'

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/func/__tests__/handler.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { Func, type FuncRuntime } from '../..'

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/func/__tests__/lifecycle.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { Func, type InvokeData, type MountData, type Next, type Plugin } from '../..'

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/func/__tests__/logger.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it, vi } from 'vitest'
import { describe, expect, it, vi } from 'vite-plus/test'

import { Func } from '../..'

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/func/__tests__/plugins.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'

import { Func, type InvokeData, type MountData, type Next, type Plugin } from '../..'

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/index/__tests__/types.types.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineApi, Func } from '@faasjs/core'
import { z } from '@faasjs/utils'
import { assertType, expect, it } from 'vitest'
import { assertType, expect, it } from 'vite-plus/test'

import { type Cookie, type FuncEventType, type FuncReturnType, type Session } from '../../index'

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/middleware/__tests__/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { join } from 'node:path'

import { afterAll, beforeAll, describe, expect, it } from 'vitest'
import { afterAll, beforeAll, describe, expect, it } from 'vite-plus/test'

import { Server } from '../../server'

Expand Down
Loading
Loading