Merged
Conversation
2938589 to
cc50d12
Compare
4f4f765 to
b233d9d
Compare
b233d9d to
3517613
Compare
sarah11918
reviewed
Oct 13, 2022
1f91682 to
bb069e6
Compare
bb069e6 to
cc30be8
Compare
Co-authored-by: Sarah Rainsberger <[email protected]>
1 task
ematipico
pushed a commit
that referenced
this pull request
Feb 5, 2025
* [ci] release * Update packages/integrations/node/CHANGELOG.md Co-authored-by: Sarah Rainsberger <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Matthew Phillips <[email protected]> Co-authored-by: Sarah Rainsberger <[email protected]>
ematipico
pushed a commit
that referenced
this pull request
Feb 5, 2025
* [ci] release * Update packages/integrations/node/CHANGELOG.md Co-authored-by: Sarah Rainsberger <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Matthew Phillips <[email protected]> Co-authored-by: Sarah Rainsberger <[email protected]>
ematipico
pushed a commit
that referenced
this pull request
Feb 6, 2025
* [ci] release * Update packages/integrations/node/CHANGELOG.md Co-authored-by: Sarah Rainsberger <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Matthew Phillips <[email protected]> Co-authored-by: Sarah Rainsberger <[email protected]>
ematipico
pushed a commit
that referenced
this pull request
Feb 6, 2025
* [ci] release * Update packages/integrations/node/CHANGELOG.md Co-authored-by: Sarah Rainsberger <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Matthew Phillips <[email protected]> Co-authored-by: Sarah Rainsberger <[email protected]>
ematipico
pushed a commit
that referenced
this pull request
Feb 7, 2025
* [ci] release * Update packages/integrations/node/CHANGELOG.md Co-authored-by: Sarah Rainsberger <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Matthew Phillips <[email protected]> Co-authored-by: Sarah Rainsberger <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@astrojs/[email protected]
Major Changes
#5056
e55af8a23Thanks @matthewp! - # Standalone mode for the Node.js adapterNew in
@astrojs/nodeis support for standalone mode. With standalone mode you can start your production server without needing to write any server JavaScript yourself. The server starts simply by running the script like so:To enable standalone mode, set the new
modeto'standalone'option in your Astro config:See the @astrojs/node documentation to learn all of the options available in standalone mode.
Breaking change
This is a semver major change because the new
modeoption is required. Existing @astrojs/node users who are using their own HTTP server framework such as Express can upgrade by setting themodeoption to'middleware'in order to build to a middleware mode, which is the same behavior and API as before.Minor Changes
#5056
e55af8a23Thanks @matthewp! - # Adapter support forastro previewAdapters are now about to support the
astro previewcommand via a new integration option. The Node.js adapter@astrojs/nodeis the first of the built-in adapters to gain support for this. What this means is that if you are using@astrojs/nodeyou can new preview your SSR app by running:Adapter API
We will be updating the other first party Astro adapters to support preview over time. Adapters can opt-in to this feature by providing the
previewEntrypointvia thesetAdapterfunction inastro:config:donehook. The Node.js adapter's code looks like this:export default function() { return { name: '@astrojs/node', hooks: { 'astro:config:done': ({ setAdapter, config }) => { setAdapter({ name: '@astrojs/node', serverEntrypoint: '@astrojs/node/server.js', + previewEntrypoint: '@astrojs/node/preview.js', exports: ['handler'], }); // more here } } }; }The
previewEntrypointis a module in the adapter's package that is a Node.js script. This script is run whenastro previewis run and is charged with starting up the built server. See the Node.js implementation in@astrojs/nodeto see how that is implemented.#5056
e55af8a23Thanks @matthewp! - # New build configurationThe ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for
server(the server code for SSR),client(your client-side JavaScript and assets), andserverEntry(the name of the entrypoint server module). Here are the defaults:These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site).
Integration hook change
The integration hook
astro:build:startincludes a parambuildConfigwhich includes all of these same options. You can continue to use this param in Astro 1.x, but it is deprecated in favor of the newbuild.configoptions. All of the built-in adapters have been updated to the new format. If you have an integration that depends on this param we suggest upgrading to do this instead:[email protected]
Minor Changes
#5056
e55af8a23Thanks @matthewp! - # Adapter support forastro previewAdapters are now about to support the
astro previewcommand via a new integration option. The Node.js adapter@astrojs/nodeis the first of the built-in adapters to gain support for this. What this means is that if you are using@astrojs/nodeyou can new preview your SSR app by running:Adapter API
We will be updating the other first party Astro adapters to support preview over time. Adapters can opt-in to this feature by providing the
previewEntrypointvia thesetAdapterfunction inastro:config:donehook. The Node.js adapter's code looks like this:export default function() { return { name: '@astrojs/node', hooks: { 'astro:config:done': ({ setAdapter, config }) => { setAdapter({ name: '@astrojs/node', serverEntrypoint: '@astrojs/node/server.js', + previewEntrypoint: '@astrojs/node/preview.js', exports: ['handler'], }); // more here } } }; }The
previewEntrypointis a module in the adapter's package that is a Node.js script. This script is run whenastro previewis run and is charged with starting up the built server. See the Node.js implementation in@astrojs/nodeto see how that is implemented.#4986
ebd364e39Thanks @bluwy! - ## New properties for API routesIn API routes, you can now get the
site,generator,url,clientAddress,props, andredirectfields on the APIContext, which is the first parameter passed to an API route. This was done to make the APIContext more closely align with theAstroglobal in .astro pages.For example, here's how you might use the
clientAddress, which is the user's IP address, to selectively allow users.Check out the docs for more information on the newly available fields: https://docs.astro.build/en/core-concepts/endpoints/#server-endpoints-api-routes
#4959
0ea6187f9Thanks @Princesseuh! - Added support for updating TypeScript settings automatically when usingastro addThe
astro addcommand will now automatically update yourtsconfig.jsonwith the proper TypeScript settings needed for the chosen frameworks.For instance, typing
astro add solidwill update yourtsconfig.jsonwith the following settings, per Solid's TypeScript guide:{ "compilerOptions": { "jsx": "preserve", "jsxImportSource": "solid-js" } }#4947
a5e3ecc80Thanks @JuanM04! - - AddedisRestartandaddWatchFileto integration stepisRestart.#4986
ebd364e39Thanks @bluwy! - ## Support passing a custom status code for Astro.redirectNew in this minor is the ability to pass a status code to
Astro.redirect. By default it uses302but now you can pass another code as the second argument:#5056
e55af8a23Thanks @matthewp! - # New build configurationThe ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for
server(the server code for SSR),client(your client-side JavaScript and assets), andserverEntry(the name of the entrypoint server module). Here are the defaults:These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site).
Integration hook change
The integration hook
astro:build:startincludes a parambuildConfigwhich includes all of these same options. You can continue to use this param in Astro 1.x, but it is deprecated in favor of the newbuild.configoptions. All of the built-in adapters have been updated to the new format. If you have an integration that depends on this param we suggest upgrading to do this instead:Patch Changes
#5057
baf88ee9eThanks @bluwy! - Skip JSX tagging for export statements with source#5044
44ea0c6d9Thanks @JuanM04! - Upgrade Astro compiler to 0.27.1#5059
f7fcdfe62Thanks @bluwy! - Support strict dependency install for libraries with JSX#5047
1e2799243Thanks @matthewp! - Update Astro.cookies.set types to allow booleans and numbersNote that booleans and numbers were already allowed, they just were not allowed by the type definitions.
@astrojs/[email protected]
Minor Changes
#5056
e55af8a23Thanks @matthewp! - # New build configurationThe ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for
server(the server code for SSR),client(your client-side JavaScript and assets), andserverEntry(the name of the entrypoint server module). Here are the defaults:These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site).
Integration hook change
The integration hook
astro:build:startincludes a parambuildConfigwhich includes all of these same options. You can continue to use this param in Astro 1.x, but it is deprecated in favor of the newbuild.configoptions. All of the built-in adapters have been updated to the new format. If you have an integration that depends on this param we suggest upgrading to do this instead:@astrojs/[email protected]
Minor Changes
#5056
e55af8a23Thanks @matthewp! - # New build configurationThe ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for
server(the server code for SSR),client(your client-side JavaScript and assets), andserverEntry(the name of the entrypoint server module). Here are the defaults:These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site).
Integration hook change
The integration hook
astro:build:startincludes a parambuildConfigwhich includes all of these same options. You can continue to use this param in Astro 1.x, but it is deprecated in favor of the newbuild.configoptions. All of the built-in adapters have been updated to the new format. If you have an integration that depends on this param we suggest upgrading to do this instead:@astrojs/[email protected]
Minor Changes
#5056
e55af8a23Thanks @matthewp! - # New build configurationThe ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for
server(the server code for SSR),client(your client-side JavaScript and assets), andserverEntry(the name of the entrypoint server module). Here are the defaults:These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site).
Integration hook change
The integration hook
astro:build:startincludes a parambuildConfigwhich includes all of these same options. You can continue to use this param in Astro 1.x, but it is deprecated in favor of the newbuild.configoptions. All of the built-in adapters have been updated to the new format. If you have an integration that depends on this param we suggest upgrading to do this instead:Patch Changes
#5073
93f72f90bThanks @bluwy! - Fix image external config in build#5072
3918787cbThanks @bluwy! - Support relative protocol image URL@astrojs/[email protected]
Minor Changes
#5056
e55af8a23Thanks @matthewp! - # New build configurationThe ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for
server(the server code for SSR),client(your client-side JavaScript and assets), andserverEntry(the name of the entrypoint server module). Here are the defaults:These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site).
Integration hook change
The integration hook
astro:build:startincludes a parambuildConfigwhich includes all of these same options. You can continue to use this param in Astro 1.x, but it is deprecated in favor of the newbuild.configoptions. All of the built-in adapters have been updated to the new format. If you have an integration that depends on this param we suggest upgrading to do this instead:@astrojs/[email protected]
Minor Changes
f7fcdfe62Thanks @bluwy! - Auto ssr.noExternal solidjs dependencies@astrojs/[email protected]
Minor Changes
#4947
a5e3ecc80Thanks @JuanM04! - ## HMR on config file changesNew in this release is the ability for config changes to automatically reflect via HMR. Now when you edit your
tsconfig.jsonortailwind.config.jsconfigs, the changes will reload automatically without the need to restart your dev server.@astrojs/[email protected]
Minor Changes
#5056
e55af8a23Thanks @matthewp! - # New build configurationThe ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for
server(the server code for SSR),client(your client-side JavaScript and assets), andserverEntry(the name of the entrypoint server module). Here are the defaults:These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site).
Integration hook change
The integration hook
astro:build:startincludes a parambuildConfigwhich includes all of these same options. You can continue to use this param in Astro 1.x, but it is deprecated in favor of the newbuild.configoptions. All of the built-in adapters have been updated to the new format. If you have an integration that depends on this param we suggest upgrading to do this instead:@astrojs/[email protected]
Patch Changes
0f2a88ba5Thanks @matthewp! - Allow class to be passed into Svelte islands