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: let "assets" in wrangler.toml be a string #5938

Merged
merged 1 commit into from
May 30, 2024

Conversation

threepointone
Copy link
Contributor

The experimental "assets" field can be either a string or an object. However the type definition marks it only as an object. This is a problem because we use this to generate the json schema, which gets picked up by vscode's even better toml extension, and shows it to be an error when used with a string (even though it works fine). The fix is to simply change the type definition to add a string variant.

@threepointone threepointone requested a review from a team as a code owner May 29, 2024 19:08
Copy link

changeset-bot bot commented May 29, 2024

🦋 Changeset detected

Latest commit: e51e0b6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
wrangler Patch
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

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

Copy link
Contributor

github-actions bot commented May 29, 2024

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/9291853086/npm-package-wrangler-5938

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9291853086/npm-package-wrangler-5938 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9291853086/npm-package-create-cloudflare-5938 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9291853086/npm-package-cloudflare-kv-asset-handler-5938
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9291853086/npm-package-miniflare-5938
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9291853086/npm-package-cloudflare-pages-shared-5938
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9291853086/npm-package-cloudflare-vitest-pool-workers-5938

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


wrangler@3.57.2 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240524.0
workerd 1.20240524.0 1.20240524.0
workerd --version 1.20240524.0 2024-05-24

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

The experimental "assets" field can be either a string or an object. However the type definition marks it only as an object. This is a problem because we use this to generate the json schema, which gets picked up by vscode's even better toml extension, and shows it to be an error when used with a string (even though it works fine). The fix is to simply change the type definition to add a string variant.
@CarmenPopoviciu CarmenPopoviciu merged commit 9e4d8bc into main May 30, 2024
19 checks passed
@CarmenPopoviciu CarmenPopoviciu deleted the fix-assets-config-type branch May 30, 2024 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants