Bump default wrangler version to 3.91.0
Add support for wrangler.jsonc by upgrading to wrangler v3.91.0+
Issue
When using the official GitHub Actions deployment script with a wrangler.jsonc file, the build fails unexpectedly. Error as follows:
You need to provide a name when publishing a worker. Either pass it as a cli arg with `--name <name>` or in your config file as `name = "<name>"`
Reproduction steps:
Project structure:
Auto generated by
npm create hono@latest
├── package.json
├── src
│ └── index.ts
├── wrangler.jsonc # Uses JSONC format
└── ...
Deploy
Run the GitHub Actions workflow from the Cloudflare documentation:
- uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Result
Build fails due to unrecognized wrangler.jsonc support in older Wrangler versions.
Solution
Upgrade Wrangler to v3.91.0+ to resolve compatibility with wrangler.jsonc. This aligns with the community-reported issue #203 and ensures the action works as expected with modern configuration files.
Impact
- Fixes deployment failures for projects using wrangler.jsonc.
- Maintains backward compatibility with wrangler.json.
#352
Have you verified this version change? Also, is this backward compatible, would it not break and any new system?
The Wrangler version change is based on reference to Cloudflare documentation and has been validated.
GitHub Actions uses Wrangler v3.90.0 by default. According to the official documentation:
https://developers.cloudflare.com/workers/wrangler/configuration/#sample-wrangler-configuration
JSONC file support was introduced in Wrangler v3.91.0.
- your examples in official CloudFlare documentation use jsonc, but this action by default doesn't supoprt it (and there's no hint why it fails). That's very bad developer experience.
- why is the version fixed, and why to such an old version where wrangler is on 4.x now?
- is this action maintained? an important fix is unmerged for half a year. or should we use plain shell action?