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

Bump astro from 4.9.3 to 4.10.0 #23

Merged
merged 3 commits into from
Jun 8, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 7, 2024

Bumps astro from 4.9.3 to 4.10.0.

Release notes

Sourced from astro's releases.

[email protected]

Minor Changes

  • #10974 2668ef9 Thanks @​florian-lefebvre! - Adds experimental support for the astro:env API.

    The astro:env API lets you configure a type-safe schema for your environment variables, and indicate whether they should be available on the server or the client. Import and use your defined variables from the appropriate /client or /server module:

    ---
    import { PUBLIC_APP_ID } from 'astro:env/client';
    import { PUBLIC_API_URL, getSecret } from 'astro:env/server';
    const API_TOKEN = getSecret('API_TOKEN');
    const data = await fetch(${PUBLIC_API_URL}/users, {
    method: 'POST',
    headers: {
    'Content-Type': 'application/json',
    Authorization: Bearer ${API_TOKEN},
    },
    body: JSON.stringify({ appId: PUBLIC_APP_ID }),
    });

    To define the data type and properties of your environment variables, declare a schema in your Astro config in experimental.env.schema. The envField helper allows you define your variable as a string, number, or boolean and pass properties in an object:

    // astro.config.mjs
    import { defineConfig, envField } from 'astro/config';
    export default defineConfig({
    experimental: {
    env: {
    schema: {
    PUBLIC_API_URL: envField.string({ context: 'client', access: 'public', optional: true }),
    PUBLIC_PORT: envField.number({ context: 'server', access: 'public', default: 4321 }),
    API_SECRET: envField.string({ context: 'server', access: 'secret' }),
    },
    },
    },
    });

    There are three kinds of environment variables, determined by the combination of context (client or server) and access (private or public) settings defined in your env.schema:

    • Public client variables: These variables end up in both your final client and server bundles, and can be accessed from both client and server through the astro:env/client module:

      import { PUBLIC_API_URL } from 'astro:env/client';

... (truncated)

Changelog

Sourced from astro's changelog.

4.10.0

Minor Changes

  • #10974 2668ef9 Thanks @​florian-lefebvre! - Adds experimental support for the astro:env API.

    The astro:env API lets you configure a type-safe schema for your environment variables, and indicate whether they should be available on the server or the client. Import and use your defined variables from the appropriate /client or /server module:

    ---
    import { PUBLIC_APP_ID } from 'astro:env/client';
    import { PUBLIC_API_URL, getSecret } from 'astro:env/server';
    const API_TOKEN = getSecret('API_TOKEN');
    const data = await fetch(${PUBLIC_API_URL}/users, {
    method: 'POST',
    headers: {
    'Content-Type': 'application/json',
    Authorization: Bearer ${API_TOKEN},
    },
    body: JSON.stringify({ appId: PUBLIC_APP_ID }),
    });

    To define the data type and properties of your environment variables, declare a schema in your Astro config in experimental.env.schema. The envField helper allows you define your variable as a string, number, or boolean and pass properties in an object:

    // astro.config.mjs
    import { defineConfig, envField } from 'astro/config';
    export default defineConfig({
    experimental: {
    env: {
    schema: {
    PUBLIC_API_URL: envField.string({ context: 'client', access: 'public', optional: true }),
    PUBLIC_PORT: envField.number({ context: 'server', access: 'public', default: 4321 }),
    API_SECRET: envField.string({ context: 'server', access: 'secret' }),
    },
    },
    },
    });

    There are three kinds of environment variables, determined by the combination of context (client or server) and access (private or public) settings defined in your env.schema:

    • Public client variables: These variables end up in both your final client and server bundles, and can be accessed from both client and server through the astro:env/client module:

      import { PUBLIC_API_URL } from 'astro:env/client';

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro) from 4.9.3 to 4.10.0.
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/[email protected]/packages/astro)

---
updated-dependencies:
- dependency-name: astro
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jun 7, 2024
Copy link

cloudflare-workers-and-pages bot commented Jun 7, 2024

Deploying starlight-utils with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7281320
Status: ✅  Deploy successful!
Preview URL: https://2f624cbc.starlight-utils.pages.dev
Branch Preview URL: https://dependabot-npm-and-yarn-astr-n1ag.starlight-utils.pages.dev

View logs

Copy link

changeset-bot bot commented Jun 7, 2024

⚠️ No Changeset found

Latest commit: 7281320

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

pkg-pr-new bot commented Jun 8, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@lorenzo_lewis/starlight-utils (7281320)

npm i https://pkg.pr.new/@lorenzo_lewis/starlight-utils@23

@lorenzolewis lorenzolewis merged commit 2e12042 into main Jun 8, 2024
3 checks passed
@lorenzolewis lorenzolewis deleted the dependabot/npm_and_yarn/astro-4.10.0 branch June 8, 2024 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant