diff --git a/.changeset/proud-clocks-stare.md b/.changeset/proud-clocks-stare.md
new file mode 100644
index 0000000..5cc3613
--- /dev/null
+++ b/.changeset/proud-clocks-stare.md
@@ -0,0 +1,10 @@
+---
+"@astro-reactive/validator": minor
+"@astro-reactive/landing-page": minor
+"@astro-reactive/common": minor
+"@astro-reactive/form": minor
+"@astro-reactive/demo": minor
+"@astro-reactive/docs": minor
+---
+
+Support Astro 3
diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
index 62d6094..45370b9 100644
--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
- node-version: [16.x, 18.x]
+ node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
@@ -25,7 +25,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- - run: npm i --force
+ - run: npm ci
- run: npm run check
- run: npm run test
- run: npm run lint
diff --git a/.npmrc b/.npmrc
new file mode 100644
index 0000000..521a9f7
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1 @@
+legacy-peer-deps=true
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 98d3a14..72a81dc 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -4,5 +4,8 @@
"source.fixAll": true
},
"cSpell.words": ["Astro", "maxlength"],
- "prettier.documentSelectors": ["**/*.astro"]
+ "prettier.documentSelectors": ["**/*.astro"],
+ "[astro]": {
+ "editor.defaultFormatter": "astro-build.astro-vscode"
+ }
}
diff --git a/apps/demo/.prettierrc.cjs b/apps/demo/.prettierrc.cjs
index 0e9c748..6728c28 100644
--- a/apps/demo/.prettierrc.cjs
+++ b/apps/demo/.prettierrc.cjs
@@ -6,12 +6,13 @@ module.exports = {
tabWidth: 2,
trailingComma: 'es5',
useTabs: true,
- plugins: ['../../node_modules/prettier-plugin-astro'],
+ plugins: ['prettier-plugin-astro'],
overrides: [
{
files: '*.astro',
options: {
parser: 'astro',
+ astroAllowShorthand: false,
},
},
{
diff --git a/apps/demo/package.json b/apps/demo/package.json
index 2a1d3b8..0d86516 100644
--- a/apps/demo/package.json
+++ b/apps/demo/package.json
@@ -1,14 +1,13 @@
{
"name": "@astro-reactive/demo",
"description": "Demo App for Astro Reactive Library",
- "type": "module",
"version": "0.0.2",
"author": "astro-reactive",
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
- "check": "astro check && tsc --noEmit && astro build",
+ "check": "astro check",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
@@ -20,7 +19,9 @@
"dependencies": {
"@astro-reactive/form": "*",
"@astro-reactive/validator": "*",
- "astro": "^2.1.3"
+ "@astrojs/check": "^0.2.0",
+ "astro": "^3.1.2",
+ "typescript": "^5.2.2"
},
"main": "index.js",
"repository": {
@@ -35,11 +36,11 @@
"devDependencies": {
"@astro-reactive/eslint-config-custom": "*",
"@astro-reactive/tsconfig": "*",
- "@types/eslint": "^8.4.10",
- "@types/prettier": "^2.7.2",
- "eslint": "^8.31.0",
- "prettier": "^2.8.3",
- "prettier-plugin-astro": "^0.7.2",
- "rimraf": "^3.0.2"
+ "@types/eslint": "^8.44.3",
+ "@types/prettier": "^3.0.0",
+ "eslint": "^8.50.0",
+ "prettier": "^3.0.3",
+ "prettier-plugin-astro": "^0.12.0",
+ "rimraf": "^5.0.1"
}
}
diff --git a/apps/demo/src/pages/index.astro b/apps/demo/src/pages/index.astro
index 1cad8e1..4736908 100644
--- a/apps/demo/src/pages/index.astro
+++ b/apps/demo/src/pages/index.astro
@@ -1,6 +1,7 @@
---
-import Form, { ControlConfig, FormGroup, FormControl } from '@astro-reactive/form';
-import type { Submit } from '@astro-reactive/common/types';
+import Form, { FormGroup, FormControl } from '@astro-reactive/form';
+import type { ControlConfig } from '@astro-reactive/form';
+import type { Submit } from '@astro-reactive/common';
import { Validators } from '@astro-reactive/validator';
import Layout from '../components/Layout.astro';
diff --git a/apps/demo/src/pages/job-application.astro b/apps/demo/src/pages/job-application.astro
index c2ec2cc..49639c6 100644
--- a/apps/demo/src/pages/job-application.astro
+++ b/apps/demo/src/pages/job-application.astro
@@ -1,5 +1,6 @@
---
-import Form, { ControlConfig, FormControl, FormGroup } from '@astro-reactive/form';
+import Form, { FormControl, FormGroup } from '@astro-reactive/form';
+import type { ControlConfig } from '@astro-reactive/form';
import { Validators } from '@astro-reactive/validator';
import type { Submit } from '@astro-reactive/common';
import Layout from '../components/Layout.astro';
diff --git a/apps/demo/tsconfig.json b/apps/demo/tsconfig.json
index 142b083..1f83110 100644
--- a/apps/demo/tsconfig.json
+++ b/apps/demo/tsconfig.json
@@ -1,3 +1,6 @@
{
- "extends": "@astro-reactive/tsconfig/base.json"
+ "extends": "@astro-reactive/tsconfig/base.json",
+ "compilerOptions": {
+ "skipLibCheck": true
+ }
}
diff --git a/apps/docs/.prettierrc.cjs b/apps/docs/.prettierrc.cjs
index 2532f35..cf7ee6b 100644
--- a/apps/docs/.prettierrc.cjs
+++ b/apps/docs/.prettierrc.cjs
@@ -6,7 +6,7 @@ module.exports = {
tabWidth: 2,
trailingComma: "es5",
useTabs: true,
- plugins: ["../../node_modules/prettier-plugin-astro"],
+ plugins: ['prettier-plugin-astro'],
overrides: [
{
files: "*.astro",
diff --git a/apps/docs/package.json b/apps/docs/package.json
index 0cdb8b4..1b6557a 100644
--- a/apps/docs/package.json
+++ b/apps/docs/package.json
@@ -7,7 +7,7 @@
"dev": "astro dev",
"start": "astro dev",
"docs": "astro dev",
- "check": "astro check && tsc --noEmit && astro build",
+ "check": "astro check",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
@@ -17,18 +17,18 @@
"clean": "rimraf node_modules .turbo dist"
},
"dependencies": {
- "@algolia/client-search": "^4.13.1",
- "@astrojs/preact": "^1.1.1",
- "@astrojs/react": "^1.1.4",
- "@docsearch/css": "^3.1.0",
- "@docsearch/react": "^3.1.0",
- "@types/node": "^18.0.0",
- "@types/react": "^18.0.24",
- "@types/react-dom": "^18.0.0",
- "astro": "^2.1.3",
- "preact": "^10.7.3",
- "react": "^18.1.0",
- "react-dom": "^18.1.0"
+ "@algolia/client-search": "^4.20.0",
+ "@astrojs/preact": "^3.0.0",
+ "@astrojs/react": "^3.0.2",
+ "@docsearch/css": "^3.5.2",
+ "@docsearch/react": "^3.5.2",
+ "@types/node": "^20.6.5",
+ "@types/react": "^18.2.22",
+ "@types/react-dom": "^18.2.7",
+ "astro": "^3.1.2",
+ "preact": "^10.17.1",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0"
},
"description": "```bash npm create astro@latest -- --template docs ```",
"main": "index.js",
@@ -45,11 +45,11 @@
"devDependencies": {
"@astro-reactive/eslint-config-custom": "*",
"@astro-reactive/tsconfig": "*",
- "@types/eslint": "^8.4.10",
- "@types/prettier": "^2.7.2",
- "eslint": "^8.31.0",
- "prettier": "^2.8.3",
- "prettier-plugin-astro": "^0.7.2",
+ "@types/eslint": "^8.44.3",
+ "@types/prettier": "^2.7.3",
+ "eslint": "^8.50.0",
+ "prettier": "^3.0.3",
+ "prettier-plugin-astro": "^0.12.0",
"rimraf": "^3.0.2"
}
}
diff --git a/apps/docs/src/components/HeadSEO.astro b/apps/docs/src/components/HeadSEO.astro
index c40e043..fee3744 100644
--- a/apps/docs/src/components/HeadSEO.astro
+++ b/apps/docs/src/components/HeadSEO.astro
@@ -1,5 +1,6 @@
---
-import { SITE, OPEN_GRAPH, Frontmatter } from '../config';
+import { SITE, OPEN_GRAPH } from '../config';
+import type { Frontmatter } from '../config';
export interface Props {
frontmatter: Frontmatter;
diff --git a/apps/landing-page/.prettierrc.cjs b/apps/landing-page/.prettierrc.cjs
index 0e9c748..1c36e6b 100644
--- a/apps/landing-page/.prettierrc.cjs
+++ b/apps/landing-page/.prettierrc.cjs
@@ -6,7 +6,7 @@ module.exports = {
tabWidth: 2,
trailingComma: 'es5',
useTabs: true,
- plugins: ['../../node_modules/prettier-plugin-astro'],
+ plugins: ['prettier-plugin-astro'],
overrides: [
{
files: '*.astro',
diff --git a/apps/landing-page/package.json b/apps/landing-page/package.json
index 8ab72ca..d756db3 100644
--- a/apps/landing-page/package.json
+++ b/apps/landing-page/package.json
@@ -6,7 +6,7 @@
"dev": "astro dev",
"start": "astro dev",
"landing-page": "astro dev",
- "check": "astro check && tsc --noEmit && astro build",
+ "check": "astro check",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
@@ -17,22 +17,22 @@
},
"devDependencies": {
"@astro-reactive/eslint-config-custom": "*",
- "@astrojs/tailwind": "^3.1.1",
- "@types/eslint": "^8.4.10",
+ "@astrojs/tailwind": "^5.0.0",
+ "@types/eslint": "^8.44.3",
"@types/micromodal": "^0.3.3",
- "@types/prettier": "^2.7.2",
- "astro": "^2.1.3",
- "astro-icon": "^0.8.0",
- "eslint": "^8.31.0",
- "prettier": "^2.7.1",
- "prettier-plugin-astro": "^0.7.2",
- "rimraf": "^3.0.2",
+ "@types/prettier": "^3.0.0",
+ "astro": "^3.1.2",
+ "eslint": "^8.50.0",
+ "prettier": "^3.0.3",
+ "prettier-plugin-astro": "^0.12.0",
+ "rimraf": "^5.0.1",
"tailwindcss-fluid-type": "^2.0.3"
},
"dependencies": {
"@astro-reactive/tsconfig": "*",
+ "astro-iconify": "^1.2.0",
"micromodal": "^0.4.10",
- "tailwindcss": "^3.1.8"
+ "tailwindcss": "^3.3.3"
},
"description": "[](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)",
"main": "index.js",
diff --git a/apps/landing-page/src/components/astro-section.astro b/apps/landing-page/src/components/astro-section.astro
index 82e1d09..4073463 100644
--- a/apps/landing-page/src/components/astro-section.astro
+++ b/apps/landing-page/src/components/astro-section.astro
@@ -1,5 +1,5 @@
---
-import { Icon } from "astro-icon";
+import { Icon } from "astro-iconify";
// import Starfield from "~/components/starfield.astro";
---
diff --git a/apps/landing-page/src/components/copynpm.astro b/apps/landing-page/src/components/copynpm.astro
index 04e0683..e943b08 100644
--- a/apps/landing-page/src/components/copynpm.astro
+++ b/apps/landing-page/src/components/copynpm.astro
@@ -1,5 +1,5 @@
---
-import { Icon } from 'astro-icon';
+import { Icon } from 'astro-iconify';
---
+ onload="th
+ is.media=' a ll'"
+ />