Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(next): reference astro/client from astro/config #11925

Merged
merged 34 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
509f1cc
feat(next): add astro/client references to examples
florian-lefebvre Sep 5, 2024
f62b8e1
Merge branch 'next' into feat/next-config-client-reference
florian-lefebvre Sep 6, 2024
45ba4e3
Discard changes to examples/basics/astro.config.mjs
florian-lefebvre Sep 9, 2024
60812ce
Discard changes to examples/blog/astro.config.mjs
florian-lefebvre Sep 9, 2024
ef820d0
Discard changes to examples/container-with-vitest/astro.config.ts
florian-lefebvre Sep 9, 2024
fb194ce
Discard changes to examples/framework-alpine/astro.config.mjs
florian-lefebvre Sep 9, 2024
6a71d79
Discard changes to examples/framework-multiple/astro.config.mjs
florian-lefebvre Sep 9, 2024
a722585
Discard changes to examples/framework-preact/astro.config.mjs
florian-lefebvre Sep 9, 2024
aef4a57
Discard changes to examples/framework-react/astro.config.mjs
florian-lefebvre Sep 9, 2024
78cdf32
Discard changes to examples/framework-solid/astro.config.mjs
florian-lefebvre Sep 9, 2024
6c56ab8
Discard changes to examples/framework-svelte/astro.config.mjs
florian-lefebvre Sep 9, 2024
c2266d3
Discard changes to examples/framework-vue/astro.config.mjs
florian-lefebvre Sep 9, 2024
1dbaaf9
Discard changes to examples/hackernews/astro.config.mjs
florian-lefebvre Sep 9, 2024
f71cb8d
Discard changes to examples/middleware/astro.config.mjs
florian-lefebvre Sep 9, 2024
341c951
Discard changes to examples/minimal/astro.config.mjs
florian-lefebvre Sep 9, 2024
cc71f9e
Discard changes to examples/non-html-pages/astro.config.mjs
florian-lefebvre Sep 9, 2024
8e8774d
Discard changes to examples/portfolio/astro.config.mjs
florian-lefebvre Sep 9, 2024
f6ef5ba
Discard changes to examples/server-islands/astro.config.mjs
florian-lefebvre Sep 9, 2024
e398ec7
Discard changes to examples/ssr/astro.config.mjs
florian-lefebvre Sep 9, 2024
dbdff9f
Discard changes to examples/starlog/astro.config.mjs
florian-lefebvre Sep 9, 2024
1550ed7
Discard changes to examples/view-transitions/astro.config.mjs
florian-lefebvre Sep 9, 2024
175e546
Discard changes to examples/with-markdoc/astro.config.mjs
florian-lefebvre Sep 9, 2024
7f278f3
Discard changes to examples/with-markdown-plugins/astro.config.mjs
florian-lefebvre Sep 9, 2024
391f041
Discard changes to examples/with-markdown-shiki/astro.config.mjs
florian-lefebvre Sep 9, 2024
2ee6cd0
Discard changes to examples/with-mdx/astro.config.mjs
florian-lefebvre Sep 9, 2024
622567f
Discard changes to examples/with-nanostores/astro.config.mjs
florian-lefebvre Sep 9, 2024
ba06f98
Discard changes to examples/with-tailwindcss/astro.config.mjs
florian-lefebvre Sep 9, 2024
f7548c9
Discard changes to examples/with-vitest/astro.config.ts
florian-lefebvre Sep 9, 2024
438ed81
feat: reference astro/client from astro/config
florian-lefebvre Sep 9, 2024
fd7e284
fix: swap include order
florian-lefebvre Sep 9, 2024
927f9b3
Merge branch 'next' into feat/next-config-client-reference
florian-lefebvre Sep 9, 2024
62dd4f0
fix: swap include order
florian-lefebvre Sep 9, 2024
16fd30a
Merge branch 'feat/next-config-client-reference' of https://github.co…
florian-lefebvre Sep 9, 2024
006deef
Merge branch 'next' into feat/next-config-client-reference
florian-lefebvre Sep 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/old-zebras-teach.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To update your project to Astro's recommended TypeScript settings, please add th
```diff
{
"extends": "astro/tsconfigs/base",
+ "include": ["**/*", ".astro/types.d.ts"],
+ "include": [".astro/types.d.ts", "**/*"],
+ "exclude": ["dist"]
}
```
7 changes: 7 additions & 0 deletions .changeset/violet-goats-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'astro': minor
---

Updates `astro/config` import to reference `astro/client` types

When importing `astro/config`, types from `astro/client` will be made automatically available to your project. If your project `tsconfig.json` changes how references behave, you'll still have access to these types after running `astro sync`.
1 change: 0 additions & 1 deletion examples/basics/src/env.d.ts

This file was deleted.

2 changes: 1 addition & 1 deletion examples/basics/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion examples/blog/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
"strictNullChecks": true
Expand Down
2 changes: 1 addition & 1 deletion examples/component/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
"jsx": "preserve"
Expand Down
2 changes: 1 addition & 1 deletion examples/container-with-vitest/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion examples/framework-alpine/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion examples/framework-multiple/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
// Needed for TypeScript intellisense in the template inside Vue files
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-preact/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
// Preact specific settings
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-react/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
"jsx": "react-jsx",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-solid/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
// Solid specific settings
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-svelte/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion examples/framework-vue/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
// Needed for TypeScript intellisense in the template inside Vue files
Expand Down
2 changes: 1 addition & 1 deletion examples/hackernews/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion examples/middleware/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion examples/minimal/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion examples/non-html-pages/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion examples/portfolio/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion examples/ssr/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion examples/starlog/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/strict",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion examples/view-transitions/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
"resolveJsonModule": true
Expand Down
2 changes: 1 addition & 1 deletion examples/with-markdoc/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
"strictNullChecks": true
Expand Down
2 changes: 1 addition & 1 deletion examples/with-markdown-plugins/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion examples/with-markdown-shiki/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion examples/with-mdx/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion examples/with-nanostores/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
// Preact specific settings
Expand Down
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion examples/with-vitest/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
```diff
{
"extends": "astro/tsconfigs/base",
+ "include": ["**/*", ".astro/types.d.ts"],
+ "include": [".astro/types.d.ts", "**/*"],
+ "exclude": ["dist"]
}
```
Expand Down
1 change: 1 addition & 0 deletions packages/astro/config.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// <reference path='./client.d.ts' />
type ViteUserConfig = import('vite').UserConfig;
type ViteUserConfigFn = import('vite').UserConfigFn;
type AstroUserConfig = import('./dist/types/public/config.js').AstroUserConfig;
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/e2e/fixtures/actions-blog/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"jsx": "react-jsx",
"jsxImportSource": "react"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion packages/astro/e2e/fixtures/actions-react-19/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"jsx": "react-jsx",
"jsxImportSource": "react"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion packages/astro/e2e/fixtures/client-only/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"compilerOptions": {
"importsNotUsedAsValues": "error"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
// This is only needed because we link Astro locally.
"preserveSymlinks": true
},
"include": ["./src/**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "./src/**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion packages/astro/performance/fixtures/md/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"jsx": "react-jsx",
"jsxImportSource": "react"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion packages/astro/performance/fixtures/mdoc/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"jsx": "react-jsx",
"jsxImportSource": "react"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion packages/astro/performance/fixtures/mdx/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"jsx": "react-jsx",
"jsxImportSource": "react"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion packages/astro/performance/fixtures/utils/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"jsx": "react-jsx",
"jsxImportSource": "react"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"compilerOptions": {
"baseUrl": "./src"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion packages/astro/test/fixtures/alias-tsconfig/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
]
}
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion packages/astro/test/fixtures/astro-env/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion packages/astro/test/fixtures/core-image-base/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
]
},
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"~/assets/*": ["src/assets/*"]
},
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"compilerOptions": {
"baseUrl": ".",
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"compilerOptions": {
"baseUrl": ".",
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion packages/astro/test/fixtures/core-image-ssg/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"~/assets/*": ["src/assets/*"]
},
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"~/assets/*": ["src/assets/*"]
},
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
Loading
Loading