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

Version Packages #7766

Merged
merged 1 commit into from
Jan 16, 2025
Merged

Version Packages #7766

merged 1 commit into from
Jan 16, 2025

Conversation

workers-devprod
Copy link
Contributor

@workers-devprod workers-devprod commented Jan 14, 2025

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

@cloudflare/[email protected]

Minor Changes

Patch Changes

  • #7768 97603f0 Thanks @WalshyDev! - fix: on a 404 from KV, we do not want the asset to stay in cache for the normal 1 year TTL. Instead we want to re-insert with a 60s TTL to revalidate and prevent a bad 404 from persisting.

[email protected]

Minor Changes

  • #5086 8faf2c0 Thanks @dario-piotrowicz! - add --strict-vars option to wrangler types

    add a new --strict-vars option to wrangler types that developers can (by setting the
    flag to false) use to disable the default strict/literal types generation for their variables

    opting out of strict variables can be useful when developers change often their vars values,
    even more so when multiple environments are involved

    Example

    With a toml containing:

    [vars]
    MY_VARIABLE = "production_value"
    MY_NUMBERS = [1, 2, 3]
    
    [env.staging.vars]
    MY_VARIABLE = "staging_value"
    MY_NUMBERS = [7, 8, 9]

    the wrangler types command would generate the following interface:

    interface Env {
            MY_VARIABLE: "production_value" | "staging_value";
            MY_NUMBERS: [1,2,3] | [7,8,9];
    }
    

    while wrangler types --strict-vars=false would instead generate:

    interface Env {
            MY_VARIABLE: string;
            MY_NUMBERS: number[];
    }
    

    (allowing the developer to easily change their toml variables without the
    risk of breaking typescript types)

Patch Changes

  • #7720 902e3af Thanks @vicb! - chore(wrangler): use the unenv preset from @cloudflare/unenv-preset

  • #7760 19228e5 Thanks @vicb! - chore: update unenv dependency version

  • #7735 e8aaa39 Thanks @penalosa! - Unwrap the error cause when available to send to Sentry

  • #5086 8faf2c0 Thanks @dario-piotrowicz! - fix: widen multi-env vars types in wrangler types

    Currently, the type generated for vars is a string literal consisting of the value of the variable in the top level environment. If multiple environments
    are specified this wrongly restricts the type, since the variable could contain any of the values from each of the environments.

    For example, given a wrangler.toml containing the following:

    [vars]
    MY_VAR = "dev value"
    
    [env.production.vars]
    MY_VAR = "prod value"
    

    running wrangler types would generate:

    interface Env {
      MY_VAR: "dev value";
    }

    making typescript incorrectly assume that MY_VAR is always going to be "dev value"

    after these changes, the generated interface would instead be:

    interface Env {
      MY_VAR: "dev value" | "prod value";
    }
  • #7733 dceb196 Thanks @emily-shen! - feat: pull resource names for provisioning from config if provided

    Uses database_name and bucket_name for provisioning if specified. For R2, this only happens if there is not a bucket with that name already. Also respects R2 jurisdiction if provided.

  • Updated dependencies []:

[email protected]

Patch Changes

@cloudflare/[email protected]

Patch Changes

[email protected]

Patch Changes

@workers-devprod workers-devprod requested review from a team as code owners January 14, 2025 20:33
@workers-devprod workers-devprod added the skip-pr-description-validation Skip validation of the required PR description format label Jan 14, 2025
Copy link
Contributor

github-actions bot commented Jan 14, 2025

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12806127861/npm-package-wrangler-7766

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7766/npm-package-wrangler-7766

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12806127861/npm-package-wrangler-7766 dev path/to/script.js
Additional artifacts:

cloudflare-workers-bindings-extension:

wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12806127861/npm-package-cloudflare-workers-bindings-extension-7766 -O ./cloudflare-workers-bindings-extension.0.0.0-v8ee7af2e2.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-v8ee7af2e2.vsix

create-cloudflare:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12806127861/npm-package-create-cloudflare-7766 --no-auto-update

@cloudflare/kv-asset-handler:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12806127861/npm-package-cloudflare-kv-asset-handler-7766

miniflare:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12806127861/npm-package-miniflare-7766

@cloudflare/pages-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12806127861/npm-package-cloudflare-pages-shared-7766

@cloudflare/unenv-preset:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12806127861/npm-package-cloudflare-unenv-preset-7766

@cloudflare/vitest-pool-workers:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12806127861/npm-package-cloudflare-vitest-pool-workers-7766

@cloudflare/workers-editor-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12806127861/npm-package-cloudflare-workers-editor-shared-7766

@cloudflare/workers-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12806127861/npm-package-cloudflare-workers-shared-7766

@cloudflare/workflows-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12806127861/npm-package-cloudflare-workflows-shared-7766

Note that these links will no longer work once the GitHub Actions artifact expires.


[email protected] includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20241230.2
workerd 1.20241230.0 1.20241230.0
workerd --version 1.20241230.0 2024-12-30

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@workers-devprod workers-devprod force-pushed the changeset-release/main branch 8 times, most recently from 0bb9dbb to a84fe6e Compare January 15, 2025 15:07
@lrapoport-cf
Copy link
Contributor

this has tentative approval pending passing checks and additional review after #7774 lands

@workers-devprod workers-devprod requested a review from a team as a code owner January 16, 2025 09:41
@CarmenPopoviciu CarmenPopoviciu merged commit cc4af98 into main Jan 16, 2025
35 checks passed
@CarmenPopoviciu CarmenPopoviciu deleted the changeset-release/main branch January 16, 2025 10:03
edmundhung added a commit that referenced this pull request Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-pr-description-validation Skip validation of the required PR description format
Projects
None yet
4 participants