The web framework for content-driven websites. ⭐️ Star to support our work!
OTHER License
Published by astrobot-houston 3 months ago
49b5145
]:
Published by astrobot-houston 3 months ago
49b5145
]:
Published by astrobot-houston 3 months ago
#11304 2e70741
Thanks @Fryuni! - Removes the AstroDbIntegration
type
Astro integration hooks can now be extended and as such @astrojs/db
no longer needs to declare it's own integration type. Using AstroIntegration
will have the same type.
If you were using the AstroDbIntegration
type, apply this change to your integration code:
- import { defineDbIntegration, type AstroDbIntegration } from '@astrojs/db/utils';
+ import { defineDbIntegration } from '@astrojs/db/utils';
import type { AstroIntegration } from 'astro';
- export default (): AstroDbIntegration => {
+ export default (): AstroIntegration => {
return defineDbIntegration({
name: 'your-integration',
hooks: {},
});
}
Published by astrobot-houston 3 months ago
#11459 bc2e74d
Thanks @mingjunlu! - Fixes false positive audit warnings on elements with the role "tabpanel".
#11472 cb4e6d0
Thanks @delucis! - Avoids targeting all files in the src/
directory for eager optimization by Vite. After this change, only JSX, Vue, Svelte, and Astro components get scanned for early optimization.
#11387 b498461
Thanks @bluwy! - Fixes prerendering not removing unused dynamic imported chunks
#11437 6ccb30e
Thanks @NuroDev! - Fixes a case where Astro's config experimental.env.schema
keys did not allow numbers. Numbers are still not allowed as the first character to be able to generate valid JavaScript identifiers
#11439 08baf56
Thanks @bholmesdev! - Expands the isInputError()
utility from astro:actions
to accept errors of any type. This should now allow type narrowing from a try / catch block.
// example.ts
import { actions, isInputError } from 'astro:actions';
try {
await actions.like(new FormData());
} catch (error) {
if (isInputError(error)) {
console.log(error.fields);
}
}
#11452 0e66849
Thanks @FugiTech! - Fixes an issue where using .nullish() in a formdata Astro action would always parse as a string
#11438 619f07d
Thanks @bholmesdev! - Exposes utility types from astro:actions
for the defineAction
handler (ActionHandler
) and the ActionError
code (ActionErrorCode
).
#11456 17e048d
Thanks @RickyC0626! - Fixes astro dev --open
unexpected behavior that spawns a new tab every time a config file is saved
#11337 0a4b31f
Thanks @florian-lefebvre! - Adds a new property experimental.env.validateSecrets
to allow validating private variables on the server.
By default, this is set to false
and only public variables are checked on start. If enabled, secrets will also be checked on start (dev/build modes). This is useful for example in some CIs to make sure all your secrets are correctly set before deploying.
// astro.config.mjs
import { defineConfig, envField } from 'astro/config';
export default defineConfig({
experimental: {
env: {
schema: {
// ...
},
validateSecrets: true,
},
},
});
#11443 ea4bc04
Thanks @bholmesdev! - Expose new ActionReturnType
utility from astro:actions
. This infers the return type of an action by passing typeof actions.name
as a type argument. This example defines a like
action that returns likes
as an object:
// actions/index.ts
import { defineAction } from 'astro:actions';
export const server = {
like: defineAction({
handler: () => {
/* ... */
return { likes: 42 };
},
}),
};
In your client code, you can infer this handler return value with ActionReturnType
:
// client.ts
import { actions, ActionReturnType } from 'astro:actions';
type LikesResult = ActionReturnType<typeof actions.like>;
// -> { likes: number }
#11436 7dca68f
Thanks @bholmesdev! - Fixes astro:actions
autocompletion for the defineAction
accept
property
#11455 645e128
Thanks @florian-lefebvre! - Improves astro:env
invalid variables errors
Published by astrobot-houston 3 months ago
Published by astrobot-houston 3 months ago
2cdb685
Thanks @rschristian! - Swap out preact-ssr-prepass
for renderToStringAsync
from preact-render-to-string
Published by astrobot-houston 4 months ago
Published by astrobot-houston 4 months ago
#11362 93993b7
Thanks @ematipico! - Fixes an issue where creating manually the i18n middleware could break the logic of the functions of the virtual module astro:i18n
#11349 98d9ce4
Thanks @ematipico! - Fixes an issue where Astro didn't throw an error when Astro.rewrite
was used without providing the experimental flag
#11352 a55ee02
Thanks @ematipico! - Fixes an issue where the rewrites didn't update the status code when using manual i18n routing.
#11388 3a223b4
Thanks @mingjunlu! - Adjusts the color of punctuations in error overlay.
#11369 e6de11f
Thanks @bluwy! - Fixes attribute rendering for non-boolean attributes with boolean values
Published by astrobot-houston 4 months ago
Published by astrobot-houston 4 months ago
#11335 4c4741b
Thanks @ematipico! - Reverts #11292, which caused a regression to the input type
#11326 41121fb
Thanks @florian-lefebvre! - Fixes a case where running astro sync
when using the experimental astro:env
feature would fail if environment variables were missing
#11338 9752a0b
Thanks @zaaakher! - Fixes svg icon margin in devtool tooltip title to look coherent in rtl
and ltr
layouts
#11331 f1b78a4
Thanks @bluwy! - Removes resolve
package and simplify internal resolve check
#11339 8fdbf0e
Thanks @matthewp! - Remove non-fatal errors from telemetry
Previously we tracked non-fatal errors in telemetry to get a good idea of the types of errors that occur in astro dev
. However this has become noisy over time and results in a lot of data that isn't particularly useful. This removes those non-fatal errors from being tracked.
Published by astrobot-houston 4 months ago
Published by astrobot-houston 4 months ago
#11331 f1b78a4
Thanks @bluwy! - Relaxes exports condition to allow importing ESM from CJS
Updated dependencies [f1b78a4
]:
Published by astrobot-houston 4 months ago
#11308 44c61dd
Thanks @ematipico! - Fixes an issue where custom 404.astro
and 500.astro
were not returning the correct status code when rendered inside a rewriting cycle.
#11302 0622567
Thanks @martrapp! - Fixes an issue with the view transition router when redirecting to an URL with different origin.
Updated dependencies [b6afe6a
, 41064ce
]:
Published by astrobot-houston 4 months ago
Published by astrobot-houston 4 months ago
#11271 7f956f0
Thanks @florian-lefebvre! - Adds support for forced redirects
Redirects can be forced by setting force
to true
:
redirects.add({
// ...
force: true,
});
It will append a !
after the status.
Published by astrobot-houston 4 months ago
#11323 41064ce
Thanks @ascorbic! - Extracts fs helpers into shared internal-helpers module
#11296 5848d97
Thanks @florian-lefebvre! - Fixes astro:env
getSecret compatibility
Updated dependencies [41064ce
]:
Published by astrobot-houston 4 months ago
Published by astrobot-houston 4 months ago
5848d97
Thanks @florian-lefebvre! - Fixes astro:env
getSecret compatibilityPublished by astrobot-houston 4 months ago
b6afe6a
, 41064ce
]:
Published by astrobot-houston 4 months ago
b6afe6a
]: