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

fix(wrangler): use require.resolve to resolve unenv path #7804

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Jan 16, 2025

This PR fixes an issue with unenv resolution introduced in #7625 that could break some Nuxt apps built with wrangler v3.100.0 ... v3.103.1.

This fix should go in v3.103.2 tomorrow.

If you previously built a Nuxt app with any of the affected wrangler versions, please rebuild it with either wrangler v3.99 or with v3.103.2 when it is released.

To detect the issue, you should dump aliasAbsolute in wrangler/wrangler-dist/cli.js.

Faulty releases import unenv from different paths/versions:

image


  • Tests
    • TODO (before merge)
    • Tests included + tested manually
    • Tests not necessary because:
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because:
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because: no user facing change

@vicb vicb requested a review from a team as a code owner January 16, 2025 21:28
Copy link
Contributor

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/12817920361/npm-package-wrangler-7804

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

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

Or you can use npx with this latest build directly:

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

cloudflare-workers-bindings-extension:

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

create-cloudflare:

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

@cloudflare/kv-asset-handler:

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

miniflare:

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

@cloudflare/pages-shared:

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

@cloudflare/unenv-preset:

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

@cloudflare/vitest-pool-workers:

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

@cloudflare/workers-editor-shared:

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

@cloudflare/workers-shared:

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

@cloudflare/workflows-shared:

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

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.

@vicb vicb added the e2e Run e2e tests on a PR label Jan 16, 2025
@CarmenPopoviciu CarmenPopoviciu merged commit 16a9460 into main Jan 17, 2025
40 of 42 checks passed
@CarmenPopoviciu CarmenPopoviciu deleted the unenv-require branch January 17, 2025 12:15
CarmenPopoviciu added a commit that referenced this pull request Jan 17, 2025
CarmenPopoviciu added a commit that referenced this pull request Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run e2e tests on a PR
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants