Skip to content

Commit 40c16f2

Browse files
authored
feat: support Vite 6 and update deps (#770)
* Upgrade dependencies * Use ESM vite * fix chokidar glob * Use micromatch instead of minimatch * Remove optimizeDeps on vite server * Fix markdown watcher * Update artifact version * Fix import * Make plugins mjs * Migrate from vite-node to vite runtime * Revert "Migrate from vite-node to vite runtime" This reverts commit 4e19240. * Try to trigger some tests * fix minimatch import * Lint everything * Update file path handling * Revert vite-node version * revert vitest version * fix cypress lint error * Fix lint * hopefully last lint fix... * please be the last lint fix * sigh... * Revert some version to make svelte compile * Fix nuxt build * Replace flexsearch with fuse * Fix typescript erro * Fix lint
1 parent f583371 commit 40c16f2

File tree

257 files changed

+7619
-11744
lines changed

Some content is hidden

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

257 files changed

+7619
-11744
lines changed

.github/workflows/test-nuxt3.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
working-directory: ${{env.dir}}
6262
run: pnpm run ci
6363

64-
- uses: actions/upload-artifact@v2
64+
- uses: actions/upload-artifact@v4
6565
if: failure()
6666
with:
6767
name: cypress-screenshots

.github/workflows/test-svelte4.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
working-directory: ${{env.dir}}
6262
run: pnpm run ci
6363

64-
- uses: actions/upload-artifact@v2
64+
- uses: actions/upload-artifact@v4
6565
if: failure()
6666
with:
6767
name: cypress-screenshots

.github/workflows/test-vue3.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
TOTAL_RUNNERS: 5
127127
THIS_RUNNER: ${{ matrix.containers }}
128128

129-
- uses: actions/upload-artifact@v2
129+
- uses: actions/upload-artifact@v4
130130
if: failure()
131131
with:
132132
name: cypress-screenshots

.stackblitz/codeflow.json

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"overrides": {
44
"histoire": "./packages/histoire",
55
"@histoire/plugin-vue": "./packages/historie-plugin-vue",
6-
"@histoire/plugin-vue2": "./packages/historie-plugin-vue2",
76
"@histoire/plugin-svelte": "./packages/historie-plugin-svelte",
87
"@histoire/plugin-nuxt": "./packages/historie-plugin-nuxt",
98
"@histoire/plugin-percy": "./packages/historie-plugin-percy",

docs/.vitepress/config.js

-62
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ module.exports = {
4141
text: 'Vue 3',
4242
link: '/guide/vue3/getting-started',
4343
},
44-
{
45-
text: 'Vue 2.7',
46-
link: '/guide/vue2/getting-started',
47-
},
4844
{
4945
text: 'Svelte 3',
5046
link: '/guide/svelte3/getting-started',
@@ -212,64 +208,6 @@ module.exports = {
212208
],
213209
},
214210
],
215-
'/guide/vue2/': [
216-
{
217-
text: 'Guide - Vue 2',
218-
collapsible: true,
219-
items: [
220-
{
221-
text: 'Getting Started',
222-
link: '/guide/vue2/getting-started',
223-
},
224-
{
225-
text: 'Stories',
226-
link: '/guide/vue2/stories',
227-
},
228-
{
229-
text: 'State & Controls',
230-
link: '/guide/vue2/controls',
231-
},
232-
{
233-
text: 'Events',
234-
link: '/guide/vue2/events',
235-
},
236-
{
237-
text: 'App setup',
238-
link: '/guide/vue2/app-setup',
239-
},
240-
{
241-
text: 'Wrapper',
242-
link: '/guide/vue2/wrapper',
243-
},
244-
{
245-
text: 'Documentation',
246-
link: '/guide/vue2/docs',
247-
},
248-
{
249-
text: 'Hierarchy',
250-
link: '/guide/vue2/hierarchy',
251-
},
252-
],
253-
},
254-
{
255-
text: 'Learn more',
256-
collapsible: true,
257-
items: [
258-
{
259-
text: 'About Histoire ⮌',
260-
link: '/guide/',
261-
},
262-
{
263-
text: 'Configuration ⮌',
264-
link: '/guide/config',
265-
},
266-
{
267-
text: 'Plugins ⮌',
268-
link: '/guide/plugins/official',
269-
},
270-
],
271-
},
272-
],
273211
'/guide/svelte3/': [
274212
{
275213
text: 'Guide - Svelte 3',

docs/.vitepress/theme/index.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import DefaultTheme from 'vitepress/theme'
2-
import FloatingVue from 'floating-vue'
31
import { Icon } from '@iconify/vue'
2+
import FloatingVue from 'floating-vue'
3+
import DefaultTheme from 'vitepress/theme'
4+
import DemoLinks from './DemoLinks.vue'
5+
import DemoPreview from './DemoPreview.vue'
6+
import MeetTeam from './MeetTeam.vue'
7+
import SponsorButton from './SponsorButton.vue'
48
import 'floating-vue/dist/style.css'
59
import './style/vars.pcss'
610
import './style/index.pcss'
7-
import SponsorButton from './SponsorButton.vue'
8-
import MeetTeam from './MeetTeam.vue'
9-
import DemoPreview from './DemoPreview.vue'
10-
import DemoLinks from './DemoLinks.vue'
1111

1212
export default {
1313
...DefaultTheme,

docs/examples/visual-regression-testing/lost-pixel.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ Lost Pixel has first-class Histoire support meaning that you don't need to do mu
88

99
Start with installing lost-pixel by `npm install lost-pixel` and creating a `lostpixel.config.js|ts` file with following contents.
1010

11-
```javascript
12-
import { CustomProjectConfig } from 'lost-pixel';
11+
```ts
12+
import { CustomProjectConfig } from 'lost-pixel'
1313

1414
export const config: CustomProjectConfig = {
1515
histoireShots: {
1616
histoireUrl: './.histoire/dist',
1717
},
1818
generateOnly: true,
1919
failOnDifference: true
20-
};
20+
}
2121
```
2222
**Before running visual tests you need to have your Histoire book built first**.
2323

docs/examples/visual-regression-testing/percy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ pnpm add -D @histoire/plugin-percy
99
Add the plugin in histoire config:
1010

1111
```js
12-
import { defineConfig } from 'histoire'
1312
import { HstPercy } from '@histoire/plugin-percy'
13+
import { defineConfig } from 'histoire'
1414

1515
export default defineConfig({
1616
plugins: [

docs/guide/config.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -142,17 +142,16 @@ You can also tell Histoire to configure the sandbox application using the corres
142142
| Framework | Setup function |
143143
| --------- | -------------- |
144144
| Vue 3 | `setupVue3` |
145-
| Vue 2 | `setupVue2` |
146145
147146
### Vue setup
148147
149-
Inside your setup file, you can export a `setupVue3` (or `setupVue2` for Vue 2) function that will be called by Histoire allowing you to configure the Vue 3 sandbox application. Histoire provides an optional `defineSetupVue3` helper to have better types in your IDE :
148+
Inside your setup file, you can export a `setupVue3` function that will be called by Histoire allowing you to configure the Vue 3 sandbox application. Histoire provides an optional `defineSetupVue3` helper to have better types in your IDE :
150149
151150
```ts
152151
// src/histoire.setup.ts
153152

154-
import { createPinia } from 'pinia'
155153
import { defineSetupVue3 } from '@histoire/plugin-vue'
154+
import { createPinia } from 'pinia'
156155

157156
export const setupVue3 = defineSetupVue3(({ app, story, variant }) => {
158157
const pinia = createPinia()

docs/guide/getting-started.md

-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ Histoire is an Open-Source project supported by our sponsors - thank you!
5353
| Framework | Version | Support* | Auto-CodeGen* | Auto-Docs* |
5454
| --------- | -------- | ------- | ------------ | ---- |
5555
| [Vue →](./vue3/getting-started.md) | `3.2+` ||| 🏗️ |
56-
| [Vue →](./vue2/getting-started.md) | `2.7+` ||| 🏗️ |
5756
| [Svelte →](./svelte3/getting-started.md) | `3+` || - | 🏗️ |
5857
| Solid | - | - | - | - |
5958
| Angular | - | - | - | - |

docs/guide/svelte3/getting-started.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ yarn add -D histoire @histoire/plugin-svelte
4949
Create an `histoire.config.js` or `histoire.config.ts` file in your project root to enable the Svelte plugin:
5050

5151
```ts
52-
import { defineConfig } from 'histoire'
5352
import { HstSvelte } from '@histoire/plugin-svelte'
53+
import { defineConfig } from 'histoire'
5454

5555
export default defineConfig({
5656
plugins: [

docs/guide/vue2/app-setup.md

-134
This file was deleted.

0 commit comments

Comments
 (0)