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

[ci] release #2619

Merged
merged 1 commit into from
Feb 18, 2022
Merged

[ci] release #2619

merged 1 commit into from
Feb 18, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Feb 18, 2022

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

[email protected]

Minor Changes

  • #2489 618a16f5 Thanks @natemoo-re! - Add support for the set:html and set:text directives.

    With the introduction of these directives, unescaped HTML content in expressions is now deprecated. Please migrate to set:html in order to continue injecting unescaped HTML in future versions of Astro—you can use <Fragment set:html={content}> to avoid a wrapper element. set:text allows you to opt-in to escaping now, but it will soon become the default.

  • #2494 d7149f9b Thanks @FredKSchott! - Refactor dev server to use vite server internally.

    This should be an invisible change, and no breaking changes are expected from this change. However, it is a big enough refactor that some unexpected changes may occur. If you've experienced a regression in the dev server, it is most likely a bug!

  • #2586 d6d35bca Thanks @tony-sull! - Support for non-HTML pages

    ⚠️ This feature is currently only supported with the --experimental-static-build CLI flag. This feature may be refined over the next few weeks/months as SSR support is finalized.

    This adds support for generating non-HTML pages form .js and .ts pages during the build. Built file and extensions are based on the source file's name, ex: src/pages/data.json.ts will be built to dist/data.json.

    Is this different from SSR? Yes! This feature allows JSON, XML, etc. files to be output at build time. Keep an eye out for full SSR support if you need to build similar files when requested, for example as a serverless function in your deployment host.

    Examples

    // src/pages/company.json.ts
    export async function get() {
    	return {
    		body: JSON.stringify({
    			name: 'Astro Technology Company',
    			url: 'https://astro.build/',
    		}),
    	};
    }

    What about getStaticPaths()? It just works™.

    export async function getStaticPaths() {
        return [
            { params: { slug: 'thing1' }},
            { params: { slug: 'thing2' }}
        ]
    }
    
    export async function get(params) {
        const { slug } = params
    
        return {
            body: // ...JSON.stringify()
        }
    }
  • #2424 1abb9ed0 Thanks @natemoo-re! - Upgrade vite to 2.8.x, unvendoring vite and bringing Astro's dependencies up-to-date.

    This is a low-level change that you shouldn't have to worry about too much, but it should fix many, many issues with CJS/ESM interoperability. It also allows Astro to stay up-to-date with the vite ecosystem. If you run into any unexpected problems, please let us know by opening an issue.

  • #2471 c9bb1147 Thanks @FredKSchott! - Standardize trailing subpath behavior in config.

    Most users are not aware of the subtle differences between /foo and /foo/. Internally, we have to handle both which means that we are constantly worrying about the format of the URL, needing to add/remove trailing slashes when we go to work with this property, etc. This change transforms all site values to use a trailing slash internally, which should help reduce bugs for both users and maintainers.

  • #2548 ba5e2b5e Thanks @matthewp! - Experimental SSR Support

    ⚠️ If you are a user of Astro and see this PR and think that you can start deploying your app to a server and get SSR, slow down a second! This is only the initial flag and very basic support. Styles are not loading correctly at this point, for example. Like we did with the --experimental-static-build flag, this feature will be refined over the next few weeks/months and we'll let you know when its ready for community testing.

    Changes

    • This adds a new --experimental-ssr flag to astro build which will result in dist/server/ and dist/client/ directories.

    • SSR can be used through this API:

      import { createServer } from 'http';
      import { loadApp } from 'astro/app/node';
      
      const app = await loadApp(new URL('./dist/server/', import.meta.url));
      
      createServer((req, res) => {
        const route = app.match(req);
        if(route) {
          let html = await app.render(req, route);
        }
      
      }).listen(8080);
    • This API will be refined over time.

    • This only works in Node.js at the moment.

    • Many features will likely not work correctly, but rendering HTML at least should.

Patch Changes

@astrojs/[email protected]

Minor Changes

@astrojs/[email protected]

Minor Changes

@astrojs/[email protected]

Minor Changes

@astrojs/[email protected]

Minor Changes

@astrojs/[email protected]

Minor Changes

@astrojs/[email protected]

Minor Changes

@astrojs/[email protected]

Patch Changes

@astrojs/[email protected]

@github-actions github-actions bot force-pushed the changeset-release/main branch from 100e213 to 5967fef Compare February 18, 2022 22:32
@natemoo-re natemoo-re merged commit 1d9f8a5 into main Feb 18, 2022
@natemoo-re natemoo-re deleted the changeset-release/main branch February 18, 2022 22:33
SiriousHunter pushed a commit to SiriousHunter/astro that referenced this pull request Feb 3, 2023
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant