Skip to content

Commit f49a33e

Browse files
authored
feat!: update templates to use Vite 6 and latest framework changes (#30)
* feat!: update templates to use Vite 6 and latest framework changes * chore: update `vite.dev` links * docs: include notes about the new version in the usage section of the README file
1 parent 54226c7 commit f49a33e

File tree

117 files changed

+2105
-1369
lines changed

Some content is hidden

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

117 files changed

+2105
-1369
lines changed

.github/workflows/cr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
node-version: 20
2828
registry-url: https://registry.npmjs.org/
29-
cache: "pnpm"
29+
cache: pnpm
3030
- run: pnpm install
3131
- run: pnpm build
3232
- run: pnpx pkg-pr-new publish --compact --no-template --pnpm

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ PWA Templates
4545

4646
## 🦄 Usage
4747

48+
> Version v0.7.0: updated all the templates to use **Vite 6**, including also the latest frameworks changes.
49+
50+
> Use version v0.6.0 for **Vite 5** and previous versions of the frameworks.
51+
4852
Since the package name begins with `create-`, it is considered a project generator and can be run simply as `@vite-pwa/pwa`.
4953

5054
This command launches an interactive questionnaire in the command line for configuring different parts of the project.

TODO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Pending tasks
22

3-
- [ ] Unify templates: right now `vanilla` and `vanilla-ts` including stuff differently
3+
- [ ] Unify templates: right now `vanilla` and `vanilla-ts` including stuff differently
44
- [ ] Extract utilities from vanilla customizations to manipulate stuff: for example `vite.config.[j|t]s`
55
- [x] `vanilla` and `vanilla-ts` templates
66
- [x] `vue` and `vue-ts` templates

__tests__/cli.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { join } from 'node:path'
21
import type { ExecaSyncReturnValue, SyncOptions } from 'execa'
2+
import { join } from 'node:path'
33
import { execaCommandSync } from 'execa'
44
import fs from 'fs-extra'
55
import { afterEach, beforeAll, expect, it } from 'vitest'
@@ -57,7 +57,7 @@ it('prompts for the framework on not supplying a value for --template', () => {
5757
it('prompts for the framework on supplying an invalid template', () => {
5858
const { stdout } = run([projectName, '--template', 'unknown'])
5959
expect(stdout).toContain(
60-
`"unknown" isn't a valid template. Please choose from below:`,
60+
`"unknown" isn't a valid template. Please choose from below:`,
6161
)
6262
})
6363

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@vite-pwa/create-pwa",
33
"type": "module",
44
"version": "0.5.0",
5-
"packageManager": "pnpm@9.12.3",
5+
"packageManager": "pnpm@9.15.4",
66
"description": "PWA Templates",
77
"author": "antfu <[email protected]>",
88
"license": "MIT",
@@ -36,7 +36,7 @@
3636
"templates"
3737
],
3838
"engines": {
39-
"node": "^18.0.0 || >=20.0.0"
39+
"node": "^18.0.0 || ^20.0.0 || >=22.0.0"
4040
},
4141
"scripts": {
4242
"dev": "unbuild --stub",
@@ -47,7 +47,7 @@
4747
"release": "bumpp && npm publish"
4848
},
4949
"devDependencies": {
50-
"@antfu/eslint-config": "^2.16.1",
50+
"@antfu/eslint-config": "^3.16.0",
5151
"@antfu/ni": "^0.21.12",
5252
"@types/cross-spawn": "^6.0.6",
5353
"@types/fs-extra": "^11.0.4",
@@ -56,15 +56,15 @@
5656
"@types/prompts": "^2.4.9",
5757
"bumpp": "^9.4.1",
5858
"cross-spawn": "^7.0.3",
59-
"eslint": "^9.2.0",
60-
"eslint-plugin-antfu": "^2.1.2",
59+
"eslint": "^9.18.0",
60+
"eslint-plugin-antfu": "^2.7.0",
6161
"kolorist": "^1.8.0",
6262
"magicast": "^0.3.4",
6363
"minimist": "^1.2.8",
64-
"package-manager-detector": "^0.2.2",
64+
"package-manager-detector": "^0.2.8",
6565
"prompts": "^2.4.2",
6666
"tsx": "^4.9.1",
67-
"typescript": "^5.6.3",
67+
"typescript": "^5.7.3",
6868
"unbuild": "^2.0.0",
6969
"vitest": "^1.6.0"
7070
}

0 commit comments

Comments
 (0)