Skip to content

Commit

Permalink
feat!: add Astro 5 support (#58)
Browse files Browse the repository at this point in the history
* feat!: add Astro 5 support

* chore: remove scripts folder

* chore: add `.astro` folder to `.gitignore`

* chore: update pnpm to 9.15.0

* chore: fix lint
  • Loading branch information
userquin authored Dec 18, 2024
1 parent 133e3d8 commit ed4013e
Show file tree
Hide file tree
Showing 13 changed files with 2,200 additions and 1,673 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
node-version: 20
registry-url: https://registry.npmjs.org/
cache: "pnpm"
cache: pnpm
- run: pnpm install
- run: pnpm build
- run: pnpx pkg-pr-new publish --compact --no-template --pnpm
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ dev-dist
.idea/
# routify
.routify/
.astro/
1 change: 0 additions & 1 deletion build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default defineBuildConfig({
'workbox-build',
],
rollup: {
emitCJS: true,
dts: {
respectExternal: true,
},
Expand Down
4 changes: 2 additions & 2 deletions examples/pwa-prompt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"devDependencies": {
"@vite-pwa/astro": "workspace:*",
"astro": "^4.0.1",
"workbox-window": "^7.1.0"
"astro": "^5.0.9",
"workbox-window": "^7.3.0"
},
"stackblitz": {
"installDependencies": false,
Expand Down
3 changes: 2 additions & 1 deletion examples/pwa-prompt/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"types": [
"astro/client",
"vite-plugin-pwa/vanillajs",
"vite-plugin-pwa/info"
"vite-plugin-pwa/info",
"vite-plugin-pwa/pwa-assets"
]
}
}
4 changes: 2 additions & 2 deletions examples/pwa-simple-assets-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"devDependencies": {
"@vite-pwa/astro": "workspace:*",
"astro": "^4.0.1",
"workbox-window": "^7.1.0"
"astro": "^5.0.9",
"workbox-window": "^7.3.0"
}
}
1 change: 1 addition & 0 deletions examples/pwa-simple-assets-generator/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// <reference types="astro/client" />
/// <reference types="vite-plugin-pwa/info" />
/// <reference types="vite-plugin-pwa/pwa-assets" />
/// <reference types="vite-plugin-pwa/vanillajs" />
4 changes: 2 additions & 2 deletions examples/pwa-simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"devDependencies": {
"@vite-pwa/astro": "workspace:*",
"astro": "^4.0.1",
"workbox-window": "^7.1.0"
"astro": "^5.0.9",
"workbox-window": "^7.3.0"
},
"stackblitz": {
"installDependencies": false,
Expand Down
1 change: 0 additions & 1 deletion index.d.ts

This file was deleted.

31 changes: 18 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@vite-pwa/astro",
"type": "module",
"version": "0.4.3",
"packageManager": "pnpm@9.9.0",
"packageManager": "pnpm@9.15.0",
"description": "Zero-config PWA for Astro",
"author": "antfu <[email protected]>",
"license": "MIT",
Expand All @@ -23,51 +23,56 @@
],
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"./package.json": "./package.json"
},
"main": "dist/index.cjs",
"main": "dist/index.mjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist",
"*.d.ts"
"dist"
],
"scripts": {
"build": "unbuild && esno scripts/postbuild.ts",
"build": "unbuild",
"lint": "eslint .",
"lint-fix": "nr lint --fix",
"prepublishOnly": "npm run build",
"release": "bumpp && npm publish"
},
"peerDependencies": {
"@vite-pwa/assets-generator": "^0.2.6",
"astro": "^1.6.0 || ^2.0.0 || ^3.0.0 || ^4.0.0",
"vite-plugin-pwa": ">=0.20.5 <1"
"astro": "^1.6.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0",
"vite-plugin-pwa": ">=0.21.1 <1"
},
"peerDependenciesMeta": {
"@vite-pwa/assets-generator": {
"optional": true
}
},
"dependencies": {
"vite-plugin-pwa": ">=0.20.5 <1"
"vite-plugin-pwa": ">=0.21.1 <1"
},
"devDependencies": {
"@antfu/eslint-config": "^0.43.1",
"@antfu/ni": "^0.21.12",
"@types/debug": "^4.1.8",
"@types/node": "^20.8.7",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"astro": "^4.0.1",
"astro": "^5.0.9",
"bumpp": "^9.2.0",
"eslint": "^8.54.0",
"esno": "^4.0.0",
"https-localhost": "^4.7.1",
"typescript": "^5.4.5",
"unbuild": "^2.0.0",
"typescript": "^5.7.2",
"unbuild": "^3.0.1",
"vite": "^5.0.0"
},
"pnpm": {
"overrides": {
"sharp": "0.32.6",
"sharp-ico": "0.1.5"
}
}
}
Loading

0 comments on commit ed4013e

Please sign in to comment.