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 (next) #2580

Merged
merged 1 commit into from
Feb 16, 2022
Merged

[ci] release (next) #2580

merged 1 commit into from
Feb 16, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Feb 14, 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.

⚠️⚠️⚠️⚠️⚠️⚠️

main is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on main.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

astro@0.23.0-next.7

Patch Changes

  • #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()
        }
    }
  • #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.

  • #2581 ec6f148f Thanks @matthewp! - Fix for resolving relative imports from hoisted scripts in the static build.

  • #2594 085468e9 Thanks @natemoo-re! - Upgrade @astrojs/compiler to v0.10.2

@github-actions github-actions bot force-pushed the changeset-release/main branch 6 times, most recently from 9bf736e to e7214ef Compare February 16, 2022 01:52
@github-actions github-actions bot force-pushed the changeset-release/main branch from e7214ef to c1a8a6d Compare February 16, 2022 14:48
@natemoo-re natemoo-re merged commit ebe7f4d into main Feb 16, 2022
@natemoo-re natemoo-re deleted the changeset-release/main branch February 16, 2022 14:49
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