Skip to content

Commit e54954a

Browse files
ElMassimoclaude
andauthored
feat: upgrade to vite 8 and rolldown (#332)
Co-authored-by: Claude <noreply@anthropic.com>
1 parent c9e95d7 commit e54954a

33 files changed

Lines changed: 2210 additions & 1230 deletions

.claude/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.0.1",
3+
"configurations": [
4+
{
5+
"name": "blog",
6+
"runtimeExecutable": "pnpm",
7+
"runtimeArgs": ["blog"],
8+
"port": 5173
9+
}
10+
]
11+
}

.claude/settings.local.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"mcp__Claude_Preview__preview_start"
5+
]
6+
}
7+
}

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
CI: true
5555

5656
runs-on: ubuntu-latest
57-
container: cypress/included:9.2.0
57+
container: cypress/included:15.13.0
5858
steps:
5959
- uses: actions/checkout@v2
6060

docs/cypress/e2e/docsearch.cypress.cy.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,37 @@ describe('DocSearch', () => {
3939
openSearchModalWithKeyboard()
4040
closeSearchModal()
4141
})
42+
43+
it('can search and navigate to a result', () => {
44+
visitHome()
45+
openSearchModal()
46+
47+
// Type a search query.
48+
cy.get('.DocSearch-Input').type('hydration')
49+
cy.get('.DocSearch-Hit', { timeout: 10000 }).should('exist')
50+
51+
// Click the first result.
52+
cy.get('.DocSearch-Hit').first().click()
53+
54+
// Verify navigation happened — should be on a page about hydration.
55+
cy.url().should('include', 'hydration')
56+
cy.get('h1').invoke('text').then((text) => {
57+
expect(text.toLowerCase()).to.include('hydration')
58+
})
59+
})
60+
61+
it('search works after turbo navigation', () => {
62+
visitHome()
63+
64+
// Navigate to another page via sidebar link.
65+
navigateTo('FAQs')
66+
assertPage({ title: 'FAQs' })
67+
68+
// Search should still work after turbo navigation.
69+
openSearchModalWithKeyboard()
70+
closeSearchModal()
71+
72+
openSearchModal()
73+
closeSearchModal()
74+
})
4275
})

docs/cypress/e2e/home.cypress.cy.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,14 @@ describe('The Home Page', () => {
1515

1616
goBackHome()
1717
})
18+
19+
it('serves a valid pwa-manifest.json', () => {
20+
cy.request('/pwa-manifest.json').then((response) => {
21+
expect(response.status).to.eq(200)
22+
expect(response.headers['content-type']).to.include('application/json')
23+
expect(response.body.name).to.eq('îles')
24+
expect(response.body.theme_color).to.eq('#5C7E8F')
25+
expect(response.body.icons).to.have.length(3)
26+
})
27+
})
1828
})

docs/cypress/e2e/sidebar.cypress.cy.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { visit, navigateTo, goBackHome, assertPage, waitForHydration } from './helpers'
1+
import { assertPage, visit, visitHome, waitForHydration } from './helpers'
22

33
describe('Sidebar Toggle', () => {
44
const sidebar = () =>
@@ -24,7 +24,8 @@ describe('Sidebar Toggle', () => {
2424
sidebarToggle().should('not.be.visible')
2525
})
2626

27-
test.skipIf(process.env.CI)('can open in mobile', () => {
27+
// test.skipIf(process.env.CI)('can open in mobile', () => {
28+
it('can open in mobile', () => {
2829
visitHome()
2930
cy.viewport(500, 720)
3031
visit('/guide/frameworks')

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"preact": "^10.24.3",
3535
"preact-render-to-string": "^6.5.11",
3636
"rehype-external-links": "^3.0.0",
37-
"unocss": "^0.61.8",
37+
"unocss": "^66.6.6",
3838
"vite-plugin-inspect": "^0.8.7",
3939
"vue-tsc": "^2.1.10"
4040
},

docs/scripts/test-cypress

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ set -e
55
cd "$(dirname "$0")/.."
66

77
echo '== Starting server =='
8-
pnpm run preview &
8+
pnpm exec iles preview --host 0.0.0.0 --port 3050 &
99

1010
echo '== Waiting for server to respond... =='
11-
pnpx wait-on http-get://localhost:3050 --delay 1000 --timeout 15000
11+
pnpx wait-on http-get://localhost:3050 --delay 1000 --timeout 60000
1212

1313
echo '== Server ready! =='
1414

15-
pnpx cypress@10.6.0 run && echo '== Finished! =='
15+
pnpx cypress@15.13.0 run && echo '== Finished! =='

docs/src/components/TheSidebar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function onLoad () {
1111
1212
const [panel, bg] = [doc.getElementById('sidebar-panel')!, doc.getElementById('sidebar-background')!]
1313
14-
panel.classList.toggle('!-translate-x-0', open)
14+
panel.style.setProperty('--un-translate-x', open ? '0' : null)
1515
1616
if (open) {
1717
bg.classList.remove('hidden')

iles.config.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ import { join } from 'pathe'
33

44
const testConfig = {
55
test: {
6-
deps: {
7-
inline: [
8-
'@vue/devtools-api',
9-
],
6+
server: {
7+
deps: {
8+
inline: [
9+
'@vue/devtools-api',
10+
],
11+
},
1012
},
1113
},
1214
}

0 commit comments

Comments
 (0)