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 #7692

Merged
merged 1 commit into from
Jan 9, 2025
Merged

Version Packages #7692

merged 1 commit into from
Jan 9, 2025

Conversation

workers-devprod
Copy link
Contributor

@workers-devprod workers-devprod commented Jan 7, 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

[email protected]

Minor Changes

[email protected]

Minor Changes

  • #7702 78bdec5 Thanks @penalosa! - Support the CF-Connecting-IP header, which will be available in your Worker to determine the IP address of the client that initiated a request.

Patch Changes

@cloudflare/[email protected]

Minor Changes

  • #7561 8b48ca6 Thanks @GregBrimble! - feat: Return a 304 Not Modified response when matching an asset preservation cache request if appropriate

Patch Changes

@cloudflare/[email protected]

Minor Changes

  • #7697 3e2bede Thanks @vicb! - chore(unenv-preset): drop unused .cjs files

    Only .mjs files are used.

@cloudflare/[email protected]

Minor Changes

Patch Changes

[email protected]

Minor Changes

  • #7534 7c8ae1c Thanks @cmackenzie1! - feat: Use OAuth flow to generate R2 tokens for Pipelines

  • #7674 45d1d1e Thanks @Ankcorn! - Add support for env files to wrangler secret bulk i.e. .dev.vars

    Run wrangler secret bulk .dev.vars to add the env file

    //.dev.vars
    KEY=VALUE
    KEY_2=VALUE

    This will upload the secrets KEY and KEY_2 to your worker

  • #7442 e4716cc Thanks @petebacondarwin! - feat: add support for redirecting Wrangler to a generated config when running deploy-related commands

    This new feature is designed for build tools and frameworks to provide a deploy-specific configuration,
    which Wrangler can use instead of user configuration when running deploy-related commands.
    It is not expected that developers of Workers will need to use this feature directly.

    Affected commands

    The commands that use this feature are:

    • wrangler deploy
    • wrangler dev
    • wrangler versions upload
    • wrangler versions deploy
    • wrangler pages deploy
    • wrangler pages build
    • wrangler pages build-env

    Config redirect file

    When running these commands, Wrangler will look up the directory tree from the current working directory for a file at the path .wrangler/deploy/config.json. This file must contain only a single JSON object of the form:

    { "configPath": "../../path/to/wrangler.json" }

    When this file exists Wrangler will follow the configPath (relative to the .wrangler/deploy/config.json file) to find an alternative Wrangler configuration file to load and use as part of this command.

    When this happens Wrangler will display a warning to the user to indicate that the configuration has been redirected to a different file than the user's configuration file.

    Custom build tool example

    A common approach that a build tool might choose to implement.

    • The user writes code that uses Cloudflare Workers resources, configured via a user wrangler.toml file.

      name = "my-worker"
      main = "src/index.ts"
      [[kv_namespaces]]
      binding = "<BINDING_NAME1>"
      id = "<NAMESPACE_ID1>"

      Note that this configuration points main at user code entry-point.

    • The user runs a custom build, which might read the wrangler.toml to find the entry-point:

      > my-tool build
    • This tool generates a dist directory that contains both compiled code and a new deployment configuration file, but also a .wrangler/deploy/config.json file that redirects Wrangler to this new deployment configuration file:

      - dist
        - index.js
      	- wrangler.json
      - .wrangler
        - deploy
      	  - config.json
      

      The dist/wrangler.json will contain:

      {
        "name": "my-worker",
        "main": "./index.js",
        "kv_namespaces": [
          { "binding": "<BINDING_NAME1>", "id": "<NAMESPACE_ID1>" }
        ]
      }

      And the .wrangler/deploy/config.json will contain:

      {
        "configPath": "../../dist/wrangler.json"
      }
  • #7685 9d2740a Thanks @vicb! - allow overriding the unenv preset.

    By default wrangler uses the bundled unenv preset.

    Setting WRANGLER_UNENV_RESOLVE_PATHS allow to use another version of the preset.
    Those paths are used when resolving the unenv module identifiers to absolute paths.
    This can be used to test a development version.

  • #7694 f3c2f69 Thanks @joshthoward! - Default wrangler d1 export to --local rather than failing

Patch Changes

@cloudflare/[email protected]

Patch Changes

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

github-actions bot commented Jan 7, 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/12698490950/npm-package-wrangler-7692

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12698490950/npm-package-wrangler-7692 dev path/to/script.js
Additional artifacts:
wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12698490950/npm-package-cloudflare-workers-bindings-extension-7692 -O ./cloudflare-workers-bindings-extension.0.0.0-v7520cdc5a.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-v7520cdc5a.vsix
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12698490950/npm-package-create-cloudflare-7692 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12698490950/npm-package-cloudflare-kv-asset-handler-7692
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12698490950/npm-package-miniflare-7692
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12698490950/npm-package-cloudflare-pages-shared-7692
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12698490950/npm-package-cloudflare-unenv-preset-7692
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12698490950/npm-package-cloudflare-vitest-pool-workers-7692
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12698490950/npm-package-cloudflare-workers-editor-shared-7692
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12698490950/npm-package-cloudflare-workers-shared-7692
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12698490950/npm-package-cloudflare-workflows-shared-7692

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.1
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 7 times, most recently from c52d984 to 1b3805c Compare January 8, 2025 12:20
@workers-devprod workers-devprod requested a review from a team as a code owner January 8, 2025 12:20
@workers-devprod workers-devprod force-pushed the changeset-release/main branch 17 times, most recently from 3df6683 to 8f7580f Compare January 9, 2025 20:57
@penalosa penalosa merged commit 45f45c3 into main Jan 9, 2025
36 checks passed
@penalosa penalosa deleted the changeset-release/main branch January 9, 2025 22:24
penalosa pushed a commit that referenced this pull request Jan 10, 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
Development

Successfully merging this pull request may close these issues.

3 participants