-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feta: Update to Astro 5 and Vite 6 (#173)
- Loading branch information
Showing
87 changed files
with
2,288 additions
and
1,372 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@inox-tools/astro-tests': patch | ||
--- | ||
|
||
Fix opt-out of Vite's dependency optimization during tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@inox-tools/custom-routing': major | ||
--- | ||
|
||
Bump support to Astro 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"mode": "exit", | ||
"tag": "beta", | ||
"initialVersions": { | ||
"docs": "0.0.5", | ||
"@examples/astro-when": "0.0.8", | ||
"@example/content-injection": "0.0.12", | ||
"@example/custom-routing": "0.0.2", | ||
"@example/inline-mod": "0.0.1", | ||
"@example/inline-mod-aik": "0.1.0", | ||
"@example/inline-mod-astro": "0.0.2", | ||
"@example/request-nanostores": "0.0.2", | ||
"@example/request-state": "0.0.11", | ||
"@example/sitemap-ext": "0.1.20", | ||
"@inox-tools/aik-mod": "0.8.4", | ||
"@inox-tools/aik-route-config": "0.7.4", | ||
"@inox-tools/astro-tests": "0.1.5", | ||
"@inox-tools/astro-when": "0.2.4", | ||
"@astro-when/server-output": "0.0.0", | ||
"@astro-when/static-output": "0.0.0", | ||
"@inox-tools/content-utils": "0.7.3", | ||
"@inox-tools/custom-routing": "0.4.1", | ||
"@inox-tools/cut-short": "0.1.2", | ||
"@cut-short/basic": "0.0.0", | ||
"@inox-tools/inline-mod": "1.5.2", | ||
"@inox-tools/modular-station": "0.3.3", | ||
"@inox-tools/portal-gun": "0.1.0", | ||
"@portal-gun/basic": "0.0.0", | ||
"@inox-tools/request-nanostores": "0.1.4", | ||
"@request-nanostores/basic": "0.0.0", | ||
"@request-nanostores/race": "0.0.0", | ||
"@inox-tools/request-state": "0.1.4", | ||
"@request-state/basic": "0.0.0", | ||
"@request-state/dev": "0.0.0", | ||
"@request-state/view-transitions": "0.0.0", | ||
"@inox-tools/runtime-logger": "0.3.4", | ||
"@inox-tools/sitemap-ext": "0.3.5", | ||
"@inox-tools/star-warp": "0.1.5", | ||
"@inox-tools/utils": "0.2.0", | ||
"@inox-tools/velox-luna": "0.3.2", | ||
"templates": "1.0.0" | ||
}, | ||
"changesets": [ | ||
"grumpy-coins-collect", | ||
"hot-pandas-dream", | ||
"sixty-chefs-itch", | ||
"smooth-pets-grab", | ||
"ten-fireants-peel" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@inox-tools/inline-mod': major | ||
'@inox-tools/utils': minor | ||
--- | ||
|
||
Bump support to Vite 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'@inox-tools/astro-when': major | ||
'@inox-tools/portal-gun': major | ||
'@inox-tools/cut-short': major | ||
'@inox-tools/astro-tests': minor | ||
--- | ||
|
||
Bump support to Astro 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@inox-tools/utils': minor | ||
--- | ||
|
||
Add utility for setting deeply nested values through optional fields |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
import { Aside, Code } from '@astrojs/starlight/components'; | ||
import { AstroError } from 'astro/errors'; | ||
import { PackageManagers } from 'starlight-package-managers'; | ||
export type Props = { | ||
type?: 'lib' | 'devLib' | 'integration'; | ||
packageName?: string; | ||
inSteps?: boolean; | ||
version?: string; | ||
}; | ||
const { type: packageType = 'integration', inSteps, version = 'beta' } = Astro.props; | ||
const packageName: string | undefined = | ||
Astro.locals.starlight.entry.data.packageName ?? Astro.props.packageName; | ||
if (!packageName) { | ||
throw new AstroError('Missing package name.'); | ||
} | ||
const packageSpec = version && version !== 'latest' ? `${packageName}@${version}` : packageName; | ||
// Taked from Astro source to show the exact code the user will see. | ||
const codemodBrokenIdent = packageSpec | ||
.trim() | ||
.replace(/[-_./]?astro(?:js)?[-_.]?/g, '') | ||
.replace(/\.js/, '') | ||
.replace(/[.\-_/]+([a-zA-Z])/g, (_, w) => w.toUpperCase()) | ||
.replace(/^[^a-zA-Z$_]+/, ''); | ||
const codemodFixedIdent = codemodBrokenIdent.replace(/@.*$/, ''); | ||
--- | ||
|
||
{ | ||
inSteps && ( | ||
<> | ||
Install <code dir="auto">{packageName}</code>:{' '} | ||
</> | ||
) | ||
} | ||
|
||
{ | ||
packageType === 'integration' && ( | ||
<> | ||
<PackageManagers type="exec" pkg="astro" args={`add ${packageSpec}`} /> | ||
{codemodBrokenIdent !== codemodFixedIdent && ( | ||
<Aside type="caution" title="Invalid Codemod"> | ||
<p> | ||
Installing the <code>{version}</code> version of the this package using | ||
<code>astro add</code> | ||
generates an invalid code for your Astro Config. After installing, remove the | ||
<code>@{version}</code> added in the import and integrations section. | ||
</p> | ||
<Code | ||
lang="ts" | ||
title="astro.config.mjs" | ||
del={{ range: '1,5' }} | ||
ins={{ range: '2,6' }} | ||
code={` | ||
import ${codemodBrokenIdent} from '${packageName}'; | ||
import ${codemodFixedIdent} from '${packageName}'; | ||
export default defineConfig({ | ||
integrations: [${codemodBrokenIdent}()], | ||
integrations: [${codemodFixedIdent}()], | ||
});`.trim()} | ||
/> | ||
<p> | ||
Follow <a href="https://github.com/withastro/astro/issues/12359">this issue</a> for more | ||
information and updates. | ||
</p> | ||
</Aside> | ||
)} | ||
</> | ||
) | ||
} | ||
|
||
{ | ||
packageType !== 'integration' && ( | ||
<PackageManagers dev={packageType === 'devLib'} pkg={packageSpec} /> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
import Default from '@astrojs/starlight/components/MarkdownContent.astro'; | ||
export type { Props } from '@astrojs/starlight/props'; | ||
Astro.locals.starlight = Astro.props; | ||
--- | ||
|
||
<Default {...Astro.props}><slot /></Default> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.