Skip to content

Commit 3c39ff7

Browse files
chore(deps): Migrate to Vite+ (#67)
1 parent a56e23e commit 3c39ff7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+6887
-5037
lines changed

.github/workflows/conventional.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ jobs:
1212
uses: ytanikin/pr-conventional-commits@1.4.0
1313
with:
1414
add_label: false
15-
task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert"]'
15+
task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert"]'

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ permissions:
66
on:
77
push:
88
tags:
9-
- 'v*'
9+
- "v*"
1010

1111
jobs:
1212
release:

.github/workflows/unit-test.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,33 @@ jobs:
1515

1616
- name: Install pnpm
1717
uses: pnpm/action-setup@v4.1.0
18-
with:
19-
version: 10
2018

2119
- name: Set node LTS
2220
uses: actions/setup-node@v4
2321
with:
2422
node-version: lts/*
25-
cache: pnpm
2623

27-
- name: Install
28-
run: pnpm install
24+
- name: Get pnpm store directory
25+
shell: bash
26+
run: |
27+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
28+
29+
- name: Cache pnpm modules
30+
uses: actions/cache@v4
31+
with:
32+
path: ${{ env.STORE_PATH }}
33+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
34+
restore-keys: |
35+
${{ runner.os }}-pnpm-store-
36+
37+
- name: Install dependencies
38+
run: pnpm install --frozen-lockfile
2939

3040
- name: Build
3141
run: pnpm -F '!docs' run build
3242

3343
- name: Lint
3444
run: pnpm -F '!docs' run lint
3545

36-
- name: Typecheck
37-
run: pnpm -F '!docs' run typecheck
38-
3946
- name: Test
4047
run: pnpm -F '!docs' run test

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@
3838
"css",
3939
"scss"
4040
]
41-
}
41+
}

CLAUDE.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<!--VITE PLUS START-->
2+
3+
# Using Vite+, the Unified Toolchain for the Web
4+
5+
This project is using Vite+, a modern toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, and Oxfmt. Vite+ wraps these tools and package manager commands in a single, global CLI called `vite`. Vite+ is distinct from Vite, but it invokes Vite through `vite dev` and `vite build`.
6+
7+
## Vite+ Workflow
8+
9+
`vite` is a global binary that handles the full development lifecycle. Run `vite help` to print a list of commands and `vite <command> --help` for information about a specific command.
10+
11+
### Vite+ Commands
12+
13+
- dev - Run the development server
14+
- build - Build for production
15+
- lint - Lint code
16+
- test - Run tests
17+
- fmt - Format code
18+
- lib - Build library
19+
- migrate - Migrate an existing project to Vite+
20+
- new - Create a new monorepo package (in-project) or a new project (global)
21+
- run - Run tasks from `package.json` scripts
22+
23+
These commands map to their corresponding tools. For example, `vite dev --port 3000` runs Vite's dev server and works the same as Vite. `vite test` runs JavaScript tests through the bundled Vitest. The version of all tools can be checked using `vite --version`. This is useful when researching documentation, features, and bugs.
24+
25+
### Package Manager Commands
26+
27+
Vite+ automatically detects and wraps the underlying package manager such as pnpm, npm, or Yarn through the `packageManager` field in `package.json` or package manager-specific lockfiles.
28+
29+
- install - Install all dependencies, or add packages if package names are provided
30+
- add - Add packages to dependencies
31+
- remove - Remove packages from dependencies
32+
- dlx - Execute a package binary without installing it as a dependency
33+
- info - View package information from the registry, including latest versions
34+
- link - Link packages for local development
35+
- outdated - Check for outdated packages
36+
- pm - Forward a command to the package manager
37+
- unlink - Unlink packages
38+
- update - Update packages to their latest versions
39+
- why - Show why a package is installed
40+
41+
## Common Pitfalls
42+
43+
- **Using the package manager directly:** Do not use pnpm, npm, or Yarn directly. Vite+ can handle all package manager operations.
44+
- **Always use Vite commands to run tools:** Don't attempt to run `vite vitest` or `vite oxlint`. They do not exist. Use `vite test` and `vite lint` instead.
45+
- **Running scripts:** Vite+ commands take precedence over `package.json` scripts. If there is a `test` script defined in `scripts` that conflicts with the built-in `vite test` command, run it using `vite run test`.
46+
- **Do not install Vitest, Oxlint, Oxfmt, or tsdown directly:** Vite+ wraps these tools. They must not be installed directly. You cannot upgrade these tools by installing their latest versions. Always use Vite+ commands.
47+
- **Import JavaScript modules from `vite-plus`:** Instead of importing from `vite` or `vitest`, all modules should be imported from the project's `vite-plus` dependency. For example, `import { defineConfig } from 'vite-plus';` or `import { expect, test, vi } from 'vite-plus/test';`. You must not install `vitest` to import test utilities.
48+
- **Type-Aware Linting:** There is no need to install `oxlint-tsgolint`, `vite lint --type-aware` works out of the box.
49+
50+
## Review Checklist for Agents
51+
52+
- [ ] Run `vite install` after pulling remote changes and before getting started.
53+
- [ ] Run `vite lint`, `vite fmt`, and `vite test` to validate changes.
54+
<!--VITE PLUS END-->

docs/app.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default defineAppConfig({
22
header: {
3-
title: 'Vue Split Panel',
3+
title: "Vue Split Panel",
44
},
55
});

docs/components/example/ExampleBasic.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
<script lang="ts" setup>
2-
import { SplitPanel } from '@directus/vue-split-panel';
2+
import { SplitPanel } from "@directus/vue-split-panel";
33
</script>
44

55
<template>
66
<SplitPanel class="w-full">
77
<template #start>
8-
<div class="h-16 bg-orange-100 dark:bg-orange-900 flex items-center justify-center">Panel A</div>
8+
<div class="h-16 bg-orange-100 dark:bg-orange-900 flex items-center justify-center">
9+
Panel A
10+
</div>
911
</template>
10-
12+
1113
<template #end>
1214
<div class="h-16 bg-blue-100 dark:bg-blue-900 flex items-center justify-center">Panel B</div>
1315
</template>

docs/components/example/ExampleCollapsible.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts" setup>
2-
import { SplitPanel } from '@directus/vue-split-panel';
2+
import { SplitPanel } from "@directus/vue-split-panel";
33
</script>
44

55
<template>
@@ -13,7 +13,9 @@ import { SplitPanel } from '@directus/vue-split-panel';
1313
:collapse-threshold="50"
1414
>
1515
<template #start>
16-
<div class="h-16 bg-orange-100 dark:bg-orange-900 flex items-center justify-center">Panel A</div>
16+
<div class="h-16 bg-orange-100 dark:bg-orange-900 flex items-center justify-center">
17+
Panel A
18+
</div>
1719
</template>
1820

1921
<template #end>

docs/components/example/ExampleDivider.vue

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
<script lang="ts" setup>
2-
import { SplitPanel } from '@directus/vue-split-panel';
2+
import { SplitPanel } from "@directus/vue-split-panel";
33
</script>
44

55
<template>
6-
<SplitPanel
7-
class="w-full"
8-
collapsible
9-
size-unit="px"
10-
:min-size="200"
11-
:size="350"
12-
:max-size="500"
13-
>
6+
<SplitPanel class="w-full" collapsible size-unit="px" :min-size="200" :size="350" :max-size="500">
147
<template #start>
15-
<div class="h-16 bg-orange-100 dark:bg-orange-900 flex items-center justify-center">Panel A</div>
8+
<div class="h-16 bg-orange-100 dark:bg-orange-900 flex items-center justify-center">
9+
Panel A
10+
</div>
1611
</template>
1712

1813
<template #divider>

docs/components/example/ExampleNested.vue

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
11
<script lang="ts" setup>
2-
import { SplitPanel } from '@directus/vue-split-panel';
2+
import { SplitPanel } from "@directus/vue-split-panel";
33
</script>
44

55
<template>
66
<SplitPanel primary="start" class="h-128 w-full">
77
<template #start>
8-
<div class="w-full h-full bg-orange-100 dark:bg-orange-900 flex items-center justify-center">Panel A</div>
8+
<div class="w-full h-full bg-orange-100 dark:bg-orange-900 flex items-center justify-center">
9+
Panel A
10+
</div>
911
</template>
10-
12+
1113
<template #end>
1214
<SplitPanel orientation="vertical" class="h-full">
1315
<template #start>
14-
<div class="w-full h-full bg-blue-100 dark:bg-blue-900 flex items-center justify-center">Panel B</div>
16+
<div class="w-full h-full bg-blue-100 dark:bg-blue-900 flex items-center justify-center">
17+
Panel B
18+
</div>
1519
</template>
16-
20+
1721
<template #end>
18-
<div class="w-full h-full bg-green-100 dark:bg-green-900 flex items-center justify-center">Panel C</div>
22+
<div
23+
class="w-full h-full bg-green-100 dark:bg-green-900 flex items-center justify-center"
24+
>
25+
Panel C
26+
</div>
1927
</template>
2028
</SplitPanel>
2129
</template>

0 commit comments

Comments
 (0)