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

feat(wrangler): Add support for wrangler.jsonc #6276

Merged
merged 1 commit into from
Jul 24, 2024
Merged

Conversation

CarmenPopoviciu
Copy link
Contributor

@CarmenPopoviciu CarmenPopoviciu commented Jul 17, 2024

What this PR solves / how to test

This PR adds support for wrangler.jsonc config file, behind the same --experimental-json-config flag as wrangler.json support.

Fixes #5437

Author has addressed the following

  • Tests
    • TODO (before merge)
    • Included
    • Not necessary because:
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required / Maybe required
    • Not required because:
  • Changeset (Changeset guidelines)
    • TODO (before merge)
    • Included
    • Not necessary because:
  • Public documentation

@CarmenPopoviciu CarmenPopoviciu requested review from a team as code owners July 17, 2024 11:10
Copy link

changeset-bot bot commented Jul 17, 2024

🦋 Changeset detected

Latest commit: a8716a3

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

This PR includes changesets to release 2 packages
Name Type
wrangler Minor
@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 Jul 17, 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/9974323447/npm-package-wrangler-6276

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

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

Or you can use npx with this latest build directly:

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

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.20240712.0
workerd 1.20240712.0 1.20240712.0
workerd --version 1.20240712.0 2024-07-12

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

This commit adds support for `wrangler.jsonc` config file,
behind the same `--experimental-json-config` flag as
`wrangler.json` support.
@CarmenPopoviciu CarmenPopoviciu added awaiting Cloudflare response Awaiting response from workers-sdk maintainer team and removed awaiting Cloudflare response Awaiting response from workers-sdk maintainer team labels Jul 18, 2024
@petebacondarwin petebacondarwin added the e2e Run e2e tests on a PR label Jul 23, 2024
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@petebacondarwin
Copy link
Contributor

I note you have said that a docs update is required before merge. Is that correct? Is the JSON support actually documented, given that it is experimental?

@CarmenPopoviciu
Copy link
Contributor Author

CarmenPopoviciu commented Jul 24, 2024

I was thinking in https://developers.cloudflare.com/workers/wrangler/commands/ in the following section 👇 ? Or is that overkill?
Screenshot 2024-07-24 at 09 56 40

@petebacondarwin
Copy link
Contributor

Ah I see. I guess that could be tweaked. But I won't block this PR on it.

@petebacondarwin petebacondarwin merged commit a432a13 into main Jul 24, 2024
33 checks passed
@petebacondarwin petebacondarwin deleted the carmen/jsonc branch July 24, 2024 10:17
dario-piotrowicz pushed a commit that referenced this pull request Jul 28, 2024
This commit adds support for `wrangler.jsonc` config file,
behind the same `--experimental-json-config` flag as
`wrangler.json` support.
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
Archived in project
Development

Successfully merging this pull request may close these issues.

🚀 Feature Request: wrangler.json supports comments but wrangler won't pick up wrangler.jsonc
2 participants