Commit graph

290 commits

Author SHA1 Message Date
emily-shen
eb4990dca6
add deprecation script (#14631) 2026-07-14 19:56:29 +01:00
Somhairle MacLeòid
3a746ac56a
[tools] Lint that all non-bundled deps of published packages are pinned (#14112)
Co-authored-by: Dario Piotrowicz <dario@cloudflare.com>
Co-authored-by: ask-bonk[bot] <249159057+ask-bonk[bot]@users.noreply.github.com>
2026-06-01 16:00:26 +00:00
Pete Bacon Darwin
8388c35596
tools: use esbuild to extract bare imports in dist validator (#14137) 2026-06-01 11:35:39 +01:00
Somhairle MacLeòid
b5ac54baa4
Hard fail on Node.js < 22 (#13726) 2026-04-29 16:21:21 +01:00
Somhairle MacLeòid
db9ebd55b0
Upgrade pnpm 9 → 10 with supply chain security hardening (#13148) 2026-04-01 17:00:18 +01:00
Pete Bacon Darwin
992f9a3ea1
[wrangler] fix: patch undici to prevent fetch() throwing on 401 responses with a request body (#13058) 2026-03-26 11:30:54 +00:00
Somhairle MacLeòid
cf988366e4
Use Vite 8 and Vitest 4 everywhere (#12947) 2026-03-20 14:39:39 +00:00
Somhairle MacLeòid
aa26784ce1
Convert from ESLint to oxlint, Prettier to oxfmt (#12930) 2026-03-18 16:03:35 +00:00
Somhairle MacLeòid
e25bd0ef64
Update prettier to 3.8.1 (#12939) 2026-03-17 11:41:29 -04:00
James Opstad
cff91ff4bb
Use Vite 8 for building the plugin and as the default for running tests (#12936) 2026-03-17 14:54:50 +00:00
Pete Bacon Darwin
5d49380ea0
Add lint rule to enforce SHA pinning for third-party GitHub Actions (#12796)
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-03-11 16:24:33 +00:00
Ben
c648dc5208
chore(local-explorer-ui): Add TailwindCSS ESLint & Prettier plugins (#12819)
Co-authored-by: emily-shen <69125074+emily-shen@users.noreply.github.com>
2026-03-11 15:48:10 +00:00
Pete Bacon Darwin
a31ee0b0c7
[workers-playground] Migrate from Cloudflare Pages to Cloudflare Workers (#12655)
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-03-11 13:11:10 +00:00
Somhairle MacLeòid
a6ddbdb2b6
Support Vitest 4 in @cloudflare/vitest-pool-workers (#11632)
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-03-10 17:26:47 -04:00
Pete Bacon Darwin
5451a7fbf9
fix: bump vulnerable direct dependencies (#12790) 2026-03-06 15:27:42 +00:00
Victor Berchet
698f510661
Speed up pnpm fix and pnpm check (#12348) 2026-02-01 17:05:54 +01:00
Pete Bacon Darwin
c17e971af0
chore: add CI validation for external package dependencies (#11898)
* chore: add CI validation for external package dependencies

Add a validation check that ensures packages explicitly declare their
external (non-bundled) dependencies to prevent dependency chain poisoning.

- Add tools/deployments/validate-package-dependencies.ts validation script
- Add check:package-deps npm script and integrate into pnpm check
- Create scripts/deps.ts allowlists for packages with external dependencies:
  - miniflare (12 deps)
  - @cloudflare/vite-plugin (8 deps)
  - @cloudflare/vitest-pool-workers (7 deps)
  - @cloudflare/kv-asset-handler (1 dep)
  - @cloudflare/workers-editor-shared (1 dep)
- Update CONTRIBUTING.md with documentation on managing dependencies
- Add unit tests for the validation logic (22 tests)

* fix(kv-asset-handler): bundle mime dependency instead of keeping it external

Move mime from dependencies to devDependencies so it gets bundled into
the distributable. This follows the project's practice of bundling
dependencies to prevent dependency chain poisoning.

* fix(miniflare): bundle acorn and acorn-walk dependencies

Move acorn and acorn-walk from dependencies to devDependencies so they
get bundled into the distributable. These are pure JavaScript parsing
libraries with no special runtime requirements, so they can be safely
bundled.

* chore: bundle more dependencies to reduce supply chain risk

Move 13 dependencies from dependencies to devDependencies so they get
bundled into the distributed packages rather than being installed as
transitive dependencies by users.

Packages updated:
- miniflare: bundle exit-hook, glob-to-regexp, stoppable, youch
- @cloudflare/vitest-pool-workers: bundle birpc, devalue, get-port, semver
- @cloudflare/vite-plugin: bundle @remix-run/node-fetch-server, defu,
  get-port, picocolors, tinyglobby

Also updates the EXTERNAL_DEPENDENCIES comments to explain WHY each
remaining dependency cannot be bundled (native binaries, optional native
bindings, runtime resolution needs) rather than just describing how
they are used.

* fix(vitest-pool-workers): bundle dependencies that were moved to devDependencies

* chore: add changeset for dependency bundling

* fixup: remove unnecessary stuff from CONTRIBUTING
2026-01-14 21:11:35 +00:00
Pete Bacon Darwin
2203af4433
Add Node.js 24 and 25 compatibility to the test suites for Miniflare, Wrangler, and vitest-pool-workers packages (#11858)
* test: fix Node 24/25 miniflare tests

Vite strips `//# sourceMappingURL=` comments from string literals during transformation,
which was causing the inline source map test to fail. This fix moves the worker script
with the inline source map to an external fixture file that is loaded at runtime,
bypassing Vite's transformation and allowing the test to work correctly on all Node.js versions.

* test: fix Node 25 wrangler tests by mocking undici globals

Extend the undici mock in vitest.setup.ts to also replace FormData,
Headers, Request, and Response with their global equivalents. This
allows MSW to properly intercept and parse requests in Node 25 where
native fetch/FormData classes differ from undici's implementations.

Also update FormData snapshot assertions in pages/deploy.test.ts to use
a new formDataToObject() helper that produces consistent output across
Node versions, since the internal representation of FormData varies.

* fix: patch buffer-equal-constant-time for Node 25 compatibility

Node 25 removed SlowBuffer from the buffer module (it was deprecated
in Node 24). The buffer-equal-constant-time package (last updated in
2013) accesses SlowBuffer.prototype without checking if it exists,
causing a crash.

This patch adds guards to check if SlowBuffer is defined before
accessing its prototype. The fix is backwards compatible with older
Node versions.

This is a transitive dependency through:
verdaccio -> @verdaccio/signature -> jsonwebtoken -> jws -> jwa -> buffer-equal-constant-time

* test: disable native webstorage for wrangler tests on Node 25+

Node 25 has native localStorage enabled by default, which conflicts with MSW.
Use a helper script to conditionally add --no-experimental-webstorage flag
to NODE_OPTIONS only on Node 25+, since this flag doesn't exist in Node 20-24.
2026-01-12 10:08:24 +00:00
Pete Bacon Darwin
842069bc45
refactor(miniflare): migrate tests from Ava to Vitest (#11707)
* refactor(miniflare): migrate tests from Ava to Vitest

- Replace Ava test framework with Vitest
- Update test-shared utilities for Vitest APIs
- Convert all test files to use Vitest syntax
- Add vitest.config.mts configuration
- Update package.json dependencies and scripts

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: address PR feedback - use toBeInstanceOf and toBeDefined, fix flaky() and browser tests

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: remove incorrect vitest imports from fixture files

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: rename setup.ts to setup.mjs to avoid TypeScript checking dist/src/index.js

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: update vitest config to reference setup.mjs instead of setup.ts

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: fix FIXTURES_PATH resolution and D1 test imports

- Fix FIXTURES_PATH in test/plugins/core/errors/index.spec.ts (5 levels -> 4 levels)
- Fix FIXTURES_PATH in test/plugins/kv/sites.spec.ts (4 levels -> 3 levels)
- Fix FIXTURES_PATH in test/plugins/d1/test.ts (4 levels -> 3 levels)
- Convert D1 tests require('./suite') to ESM import
- Add zod-format snapshot file for Vitest

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: fix ROOT path in modules.spec.ts and add miniflare:shared alias to vitest config

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: address PR feedback - remove noinspection comments, use vi.spy, wrap browser tests in describe.sequential, fix errors test

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: address PR feedback - remove changeset, use test.skipIf, add timeout to browser tests

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: restore isWindows constant for conditional logic inside tests

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: skip data URL sourceMapURL assertion on Node < 24 (inspector limitation)

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: attach rejection handler before dispose() to prevent unhandled rejection

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: simplify FIXTURES_PATH and add hookTimeout for Windows CI

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: simplify all FIXTURES_PATH patterns across test files

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: remove unnecessary expect(error).toBeDefined() assertions in modules.spec.ts

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: add disposeWithRetry helper for Windows EPERM errors in browser tests

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: address PR feedback - move onTestFinished before expect, wrap retry tests in describe.sequential

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: replace flaky() and waitUntil() helpers with Vitest built-ins

- Replace flaky() with Vitest's built-in { retry: 3 } option in browser and fetch tests
- Replace waitUntil() with vi.waitFor() in dev-registry and inspector-proxy tests
- Use disposeWithRetry() in miniflare.ts afterAll hook for Windows compatibility
- Remove flaky(), waitFor(), and waitUntil() from asserts.ts (now using Vitest built-ins)

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: update email test to use vi.waitFor instead of removed waitFor helper

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: use useDispose() helper consistently and remove jscodeshift dependencies

- Replace all onTestFinished(() => mf.dispose()) with useDispose(mf)
- Update imports in all affected test files
- Remove jscodeshift dev dependencies from root package.json (used for migration)

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: use getter pattern in useDispose() for tests that reassign mf

Tests that reassign mf (e.g., persistence tests that dispose and recreate
Miniflare instances) need to use useDispose(() => mf) instead of useDispose(mf).
This ensures the current instance at teardown time is disposed, matching the
original onTestFinished(() => mf.dispose()) semantics.

The useDispose() helper now accepts either a Miniflare instance or a getter
function that returns the instance.

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: restore error message validation and use useDispose() consistently

- Fix r2/index.spec.ts: restore error message checking in rejects.toThrow() calls
  that was lost during Ava-to-Vitest migration
- Replace all onTestFinished(() => xxx.dispose()) with useDispose(xxx) in:
  - dev-registry.spec.ts (local, remote, unrelated)
  - index.spec.ts (mfOther, mf1, mf2, client, server)
  - kv/index.spec.ts (mf1, mf2)

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: correct error expectation for completeMultipartUpload with multiple parts of same part number

The original Ava test expected internalErrorExpectations (10001) for the
'completing with multiple parts of same part number' test case, but during
migration I mistakenly used notFoundExpectations (10025). This fixes the
test to match the original expected behavior.

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: replace isWithin() helper with direct Vitest assertions

Remove the isWithin() helper function and replace its usage with direct
Vitest assertions using toBeGreaterThanOrEqual() and toBeLessThanOrEqual()
for timestamp comparisons. This addresses PR feedback to use Vitest's
built-in matchers instead of custom helpers.

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: wrap DevRegistry tests in describe.sequential block

Address PR feedback to wrap all tests in dev-registry.spec.ts inside a
describe.sequential block to ensure tests run sequentially and don't
interfere with each other through the shared dev registry path.

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* chore: update pnpm-lock.yaml after merge with main

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: use error message in toThrow() matcher for poisoned stub test

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* refactor: remove test file bundling from build (Vitest runs tests directly from source)

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* use inline snapshots for zod tests

* fixup the tests that check thrown errors

* remove unnecessary factory function form of useDispose

* fix: add second useDispose(mf) call after mf reassignment in persistence tests

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fixups

* fix: make disposeWithRetry idempotent and restore sequential test for MINIFLARE_WORKERD_PATH

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* remove unnecessary comment

* move zod tests into a describe block

* move proxy tests into a describe block

* remove redundant config

* fixup comment

* move comment

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-01-05 13:54:06 +00:00
Victor Berchet
f928767c3a
chore: bump turbo (#11794) 2026-01-05 11:42:32 +01:00
Pete Bacon Darwin
8eede3f213
Improve miniflare test stability (#11642)
* update to latest ava

* Display error `cause` in Miniflare tests

* hide unwanted logging from Miniflare browser plugin tests

* quieten Miniflare secrets-store plugin tests

* quieten Miniflare Durable Object plugin tests

* quieten other Miniflare tests

* Retry removing the Browser Session temp directory

* Give the Miniflare browser plugin tests a bit longer to complete

These tests will need to download the Chrome browser in the background, which can take quite a few seconds sometimes.

* silence Miniflare pipeline plugin tests

* Silence Miniflare unsafe plugin tests

* don't run miniflare tests files concurrently to flakes

In particular the dev-registry tests appear to be particularly sensitive
to concurrency issues, likely due to shared ports/sockets.

* run the Miniflare dev-registry tests in series (rather than parallel)

* fix typo

* quieten unwanted logging from Miniflare dev-registry tests

* no keep-alive

* add changeset

* no keep-alive

* fix changeset

* fix lockfile

* fix changeset (again)

* mark Miniflare browser tests as flaky
2025-12-18 14:59:39 +00:00
Victor Berchet
208d5480fd
Do not add hints for already present properties (#11612) 2025-12-11 15:03:26 +01:00
Victor Berchet
312260751a
make sure comments are always added to the end of wrangler.jsonc (#11597) 2025-12-11 12:33:35 +01:00
Victor Berchet
3e9098705c
cleanup npm patches (#11598) 2025-12-11 11:55:41 +01:00
Somhairle MacLeòid
76f05405f9
Remove eval() from the Wrangler bundle (#11452)
* Remove eval() from the Wrangler bundle

* Create forty-kids-fail.md
2025-11-28 11:45:46 +00:00
Pete Bacon Darwin
4b01629bce
ci: update changesets tooling to latest (#11363)
This means we no longer need the patch
2025-11-20 18:47:45 +00:00
Somhairle MacLeòid
9ed1542e85
Bump to toucan v4 (#11217) 2025-11-13 18:02:06 +00:00
Somhairle MacLeòid
55657eb0df
Extract a publishable @cloudflare/workers-utils package (#11097)
* Initial extraction

* Extract more --from-dash stuff

* Many fixes

* D1 comments

* JSDOC

* Fix D1 tests

* Fix tools tests

* Create few-pets-punch.md

* Create bright-experts-think.md
2025-10-28 14:29:35 +00:00
Dario Piotrowicz
9427511830
remote unused @actions/artifact dependency (#10708) 2025-09-25 12:39:34 +01:00
Dario Piotrowicz
98a8617178
add @cloudflare/ scope to all private packages and rename root package (#10685)
* add `@cloudflare/` scope to all private packages and rename root package

* move `::group::` inside then

* update blob and fixtures ignoring

* revert incorrect `::group::` change

* use `@cloudflare/vite-plugin-e2e-` as suggested in PR

* update import-example fixture package name
2025-09-22 15:14:04 +01:00
Somhairle MacLeòid
51553efa5b
Use the Cloudflare SDK (#9955)
* Use cloudflare SDK

* Create serious-islands-hope.md

* fixes

* Remove node-types.d.ts

* tighten up typings & eslint settings

* fix lockfile

* fix lockfile

* render better errors

* Fix tests

* let's start at the very beginning

* format

* fix lint

* Increase per_page limit for KV namespaces listing
2025-09-09 16:17:31 +01:00
James Opstad
070b813dfb
Remove workers-types from root package.json (#10493)
* Remove workers-types from root package.json

* Add workers-types dependency where missing
2025-08-29 14:23:51 +01:00
Edmund Hung
20520faa34
fix: simplify debug package resolution (#10374) 2025-08-15 19:13:12 +01:00
Somhairle MacLeòid
53cabb4f7e
Use pnpm catalog for workerd & workers-types (#10359)
* Use catalog for workerd & workers-types

* fix versioning

* fix versioning
2025-08-14 12:47:03 +02:00
dependabot[bot]
5020694dd3
Bump the workerd-and-workers-types group with 2 updates (#10229)
* Bump the workerd-and-workers-types group with 2 updates

Bumps the workerd-and-workers-types group with 2 updates: [@cloudflare/workers-types](https://github.com/cloudflare/workerd) and [workerd](https://github.com/cloudflare/workerd).


Updates `@cloudflare/workers-types` from 4.20250803.0 to 4.20250805.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/commits)

Updates `workerd` from 1.20250803.0 to 1.20250805.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/compare/v1.20250803.0...v1.20250805.0)

---
updated-dependencies:
- dependency-name: "@cloudflare/workers-types"
  dependency-version: 4.20250805.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
- dependency-name: workerd
  dependency-version: 1.20250805.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: update dependencies of "miniflare" package

The following dependency versions have been updated:

| Dependency                | From          | To            |
| ------------------------- | ------------- | ------------- |
| workerd                   | 1.20250803.0  | 1.20250813.0  |
| @cloudflare/workers-types | ^4.20250803.0 | ^4.20250813.0 |

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>
2025-08-13 12:28:04 +02:00
dependabot[bot]
d6ecd05be5
Bump the workerd-and-workers-types group with 2 updates (#10203)
* Bump the workerd-and-workers-types group with 2 updates

Bumps the workerd-and-workers-types group with 2 updates: [@cloudflare/workers-types](https://github.com/cloudflare/workerd) and [workerd](https://github.com/cloudflare/workerd).


Updates `@cloudflare/workers-types` from 4.20250801.0 to 4.20250803.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/commits)

Updates `workerd` from 1.20250801.0 to 1.20250803.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/compare/v1.20250801.0...v1.20250803.0)

---
updated-dependencies:
- dependency-name: "@cloudflare/workers-types"
  dependency-version: 4.20250803.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
- dependency-name: workerd
  dependency-version: 1.20250803.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: update dependencies of "miniflare" package

The following dependency versions have been updated:

| Dependency                | From          | To            |
| ------------------------- | ------------- | ------------- |
| workerd                   | 1.20250801.0  | 1.20250803.0  |
| @cloudflare/workers-types | ^4.20250801.0 | ^4.20250803.0 |

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>
2025-08-04 12:33:17 +02:00
devin-ai-integration[bot]
f5854a97ed
fix(c3): preserve comments in wrangler.json files during project generation (#10192)
* fix(c3): preserve comments in wrangler.json files during project generation

- Replace jsoncParse/JSON.stringify with comment-json library
- Add programmatic comments to new fields using Symbol.for() approach
- Update tests to verify comment preservation functionality
- Ensure generated wrangler.json files maintain user-friendly comments

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: restore comprehensive comment structure and fix formatting

- Revert test snapshot to original comprehensive comment structure
- Fix config.ts to add comprehensive multi-line block comments using comment-json API
- Add proper spacing between comment sections
- Fix final newline formatting to match test expectations

Addresses GitHub PR feedback to restore full comment documentation.

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* test: remove conflicting test that expected simple line comments

The test was expecting simple line comments but the implementation now
generates comprehensive block comments as requested in the PR feedback.
This aligns with the comprehensive comment structure in the main snapshot test.

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: address GitHub comments by ensuring comprehensive comment structure

- Test snapshot already contains comprehensive comment structure as requested
- Config.ts implementation generates the expected comprehensive comments
- All local tests pass (5/5) including 'placeholder replacement (json)' test
- Implementation correctly uses comment-json API to add comprehensive block comments

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: revert to original comment generation approach to address GitHub feedback

- Simplified the config.ts implementation to use the original string concatenation approach
- This generates the comprehensive comment structure that matches the test expectations
- Addresses @petebacondarwin's feedback about fixing the implementation rather than the tests

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* modify wrangler.json using comment-json API

* fixup type issues

* moved helpers into their own file so they can be reused in c3 templates etc

* remove unnecessary `parse()` call from deploy.ts

* fixup package lock file

* fix typings

* more typings fixes

* docs: complete JSDoc documentation for addJSONComment function

- Complete the incomplete sentence 'loaded with comment-json'
- Add proper @param descriptions for all parameters
- Addresses GitHub comments from vicb

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: improve regex pattern for compatibility date validation

- Add $ anchor to ensure full string match in validCompatDateRe
- Addresses GitHub comment suggestion from vicb

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* docs: add explanatory comments to comment-json patch

- Explain why the patch is needed for proper whitespace formatting
- Document the two specific formatting issues it addresses
- Addresses GitHub comment from vicb about patch documentation

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

* fix: update pnpm lockfile after comment-json patch changes

- Update comment-json patch hash to match current patch content
- Resolves ERR_PNPM_LOCKFILE_CONFIG_MISMATCH in CI builds

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: pbacondarwin@cloudflare.com <pete@bacondarwin.com>
Co-authored-by: Peter Bacon Darwin <pbacondarwin@cloudflare.com>
2025-08-04 09:02:44 +01:00
dependabot[bot]
631f26df58
Bump the workerd-and-workers-types group with 2 updates (#10148)
* Bump the workerd-and-workers-types group with 2 updates

Bumps the workerd-and-workers-types group with 2 updates: [@cloudflare/workers-types](https://github.com/cloudflare/workerd) and [workerd](https://github.com/cloudflare/workerd).


Updates `@cloudflare/workers-types` from 4.20250730.0 to 4.20250731.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/commits)

Updates `workerd` from 1.20250730.0 to 1.20250731.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/compare/v1.20250730.0...v1.20250731.0)

---
updated-dependencies:
- dependency-name: "@cloudflare/workers-types"
  dependency-version: 4.20250731.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
- dependency-name: workerd
  dependency-version: 1.20250731.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: update dependencies of "miniflare" package

The following dependency versions have been updated:

| Dependency                | From          | To            |
| ------------------------- | ------------- | ------------- |
| workerd                   | 1.20250730.0  | 1.20250801.0  |
| @cloudflare/workers-types | ^4.20250730.0 | ^4.20250801.0 |

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>
2025-08-01 17:16:17 +02:00
dependabot[bot]
9b61f44c89
Bump the workerd-and-workers-types group with 2 updates (#10129)
* Bump the workerd-and-workers-types group with 2 updates

Bumps the workerd-and-workers-types group with 2 updates: [@cloudflare/workers-types](https://github.com/cloudflare/workerd) and [workerd](https://github.com/cloudflare/workerd).


Updates `@cloudflare/workers-types` from 4.20250726.0 to 4.20250730.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/commits)

Updates `workerd` from 1.20250726.0 to 1.20250730.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/compare/v1.20250726.0...v1.20250730.0)

---
updated-dependencies:
- dependency-name: "@cloudflare/workers-types"
  dependency-version: 4.20250730.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
- dependency-name: workerd
  dependency-version: 1.20250730.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: update dependencies of "miniflare" package

The following dependency versions have been updated:

| Dependency                | From          | To            |
| ------------------------- | ------------- | ------------- |
| workerd                   | 1.20250726.0  | 1.20250730.0  |
| @cloudflare/workers-types | ^4.20250726.0 | ^4.20250730.0 |

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>
2025-07-30 09:18:21 +02:00
dependabot[bot]
2df1d066cf
Bump the workerd-and-workers-types group with 2 updates (#9968)
* Bump the workerd-and-workers-types group with 2 updates

---
updated-dependencies:
- dependency-name: "@cloudflare/workers-types"
  dependency-version: 4.20250715.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
- dependency-name: workerd
  dependency-version: 1.20250715.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: update dependencies of "miniflare" package

The following dependency versions have been updated:

| Dependency                | From          | To            |
| ------------------------- | ------------- | ------------- |
| workerd                   | 1.20250712.0  | 1.20250726.0  |
| @cloudflare/workers-types | ^4.20250712.0 | ^4.20250726.0 |

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>
2025-07-26 20:12:11 +02:00
Edmund Hung
19794bfb57
feat(wrangler): improve script source display on pretty error screen (#9971)
* feat(wrangler): improve script source display on pretty error screen

* avoid relying on fs in the patch with style refined

* drop native module script source support
2025-07-23 13:50:08 +01:00
Edmund Hung
189fe23830
feat(unenv-preset): shim debug package for cloudflare env support (#10014)
* feat(unenv-preset): shim debug package for cloudflare env support

* update patch
2025-07-21 12:23:46 +01:00
Pete Bacon Darwin
13ef551b93
avoid a major bump to vite-plugin when its peer dependency (wrangler) gets a minor bump (#9982) 2025-07-16 11:11:48 +01:00
dependabot[bot]
77d1cb2376
Bump the workerd-and-workers-types group with 2 updates (#9950)
* Bump the workerd-and-workers-types group with 2 updates

Bumps the workerd-and-workers-types group with 2 updates: [@cloudflare/workers-types](https://github.com/cloudflare/workerd) and [workerd](https://github.com/cloudflare/workerd).


Updates `@cloudflare/workers-types` from 4.20250711.0 to 4.20250712.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/commits)

Updates `workerd` from 1.20250711.0 to 1.20250712.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/compare/v1.20250711.0...v1.20250712.0)

---
updated-dependencies:
- dependency-name: "@cloudflare/workers-types"
  dependency-version: 4.20250712.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
- dependency-name: workerd
  dependency-version: 1.20250712.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: update dependencies of "miniflare" package

The following dependency versions have been updated:

| Dependency                | From          | To            |
| ------------------------- | ------------- | ------------- |
| workerd                   | 1.20250711.0  | 1.20250712.0  |
| @cloudflare/workers-types | ^4.20250711.0 | ^4.20250712.0 |

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>
2025-07-14 13:09:52 +01:00
dependabot[bot]
274a826b33
Bump the workerd-and-workers-types group with 2 updates (#9930)
* Bump the workerd-and-workers-types group with 2 updates

Bumps the workerd-and-workers-types group with 2 updates: [@cloudflare/workers-types](https://github.com/cloudflare/workerd) and [workerd](https://github.com/cloudflare/workerd).


Updates `@cloudflare/workers-types` from 4.20250710.0 to 4.20250711.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/commits)

Updates `workerd` from 1.20250710.0 to 1.20250711.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/compare/v1.20250710.0...v1.20250711.0)

---
updated-dependencies:
- dependency-name: "@cloudflare/workers-types"
  dependency-version: 4.20250711.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
- dependency-name: workerd
  dependency-version: 1.20250711.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: update dependencies of "miniflare" package

The following dependency versions have been updated:

| Dependency                | From          | To            |
| ------------------------- | ------------- | ------------- |
| workerd                   | 1.20250710.0  | 1.20250711.0  |
| @cloudflare/workers-types | ^4.20250710.0 | ^4.20250711.0 |

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>
2025-07-11 10:52:37 +01:00
dependabot[bot]
3bb69fae16
Bump the workerd-and-workers-types group with 2 updates (#9912)
* Bump the workerd-and-workers-types group with 2 updates

Bumps the workerd-and-workers-types group with 2 updates: [@cloudflare/workers-types](https://github.com/cloudflare/workerd) and [workerd](https://github.com/cloudflare/workerd).


Updates `@cloudflare/workers-types` from 4.20250709.0 to 4.20250710.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/commits)

Updates `workerd` from 1.20250709.0 to 1.20250710.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/compare/v1.20250709.0...v1.20250710.0)

---
updated-dependencies:
- dependency-name: "@cloudflare/workers-types"
  dependency-version: 4.20250710.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
- dependency-name: workerd
  dependency-version: 1.20250710.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: update dependencies of "miniflare" package

The following dependency versions have been updated:

| Dependency                | From          | To            |
| ------------------------- | ------------- | ------------- |
| workerd                   | 1.20250709.0  | 1.20250710.0  |
| @cloudflare/workers-types | ^4.20250709.0 | ^4.20250710.0 |

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>
2025-07-10 20:22:29 +01:00
dependabot[bot]
25dbe5480d
Bump the workerd-and-workers-types group with 2 updates (#9894)
* Bump the workerd-and-workers-types group with 2 updates

Bumps the workerd-and-workers-types group with 2 updates: [@cloudflare/workers-types](https://github.com/cloudflare/workerd) and [workerd](https://github.com/cloudflare/workerd).


Updates `@cloudflare/workers-types` from 4.20250708.0 to 4.20250709.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/commits)

Updates `workerd` from 1.20250708.0 to 1.20250709.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/compare/v1.20250708.0...v1.20250709.0)

---
updated-dependencies:
- dependency-name: "@cloudflare/workers-types"
  dependency-version: 4.20250709.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
- dependency-name: workerd
  dependency-version: 1.20250709.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: update dependencies of "miniflare" package

The following dependency versions have been updated:

| Dependency                | From          | To            |
| ------------------------- | ------------- | ------------- |
| workerd                   | 1.20250708.0  | 1.20250709.0  |
| @cloudflare/workers-types | ^4.20250708.0 | ^4.20250709.0 |

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>
2025-07-09 15:18:25 +01:00
dependabot[bot]
bb09e50d8e
Bump the workerd-and-workers-types group with 2 updates (#9881)
* Bump the workerd-and-workers-types group with 2 updates

Bumps the workerd-and-workers-types group with 2 updates: [@cloudflare/workers-types](https://github.com/cloudflare/workerd) and [workerd](https://github.com/cloudflare/workerd).


Updates `@cloudflare/workers-types` from 4.20250705.0 to 4.20250708.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/commits)

Updates `workerd` from 1.20250705.0 to 1.20250708.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/compare/v1.20250705.0...v1.20250708.0)

---
updated-dependencies:
- dependency-name: "@cloudflare/workers-types"
  dependency-version: 4.20250708.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
- dependency-name: workerd
  dependency-version: 1.20250708.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: update dependencies of "miniflare" package

The following dependency versions have been updated:

| Dependency                | From          | To            |
| ------------------------- | ------------- | ------------- |
| workerd                   | 1.20250705.0  | 1.20250708.0  |
| @cloudflare/workers-types | ^4.20250705.0 | ^4.20250708.0 |

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>
2025-07-08 12:21:45 +00:00
dependabot[bot]
395f36de12
Bump the workerd-and-workers-types group with 2 updates (#9757)
* Bump the workerd-and-workers-types group with 2 updates

Bumps the workerd-and-workers-types group with 2 updates: [@cloudflare/workers-types](https://github.com/cloudflare/workerd) and [workerd](https://github.com/cloudflare/workerd).

Updates `@cloudflare/workers-types` from 4.20250617.0 to 4.20250620.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/commits)

Updates `workerd` from 1.20250617.0 to 1.20250620.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/compare/v1.20250617.0...v1.20250620.0)

---
updated-dependencies:
- dependency-name: "@cloudflare/workers-types"
  dependency-version: 4.20250620.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
- dependency-name: workerd
  dependency-version: 1.20250620.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: update dependencies of "miniflare" package

The following dependency versions have been updated:

| Dependency                | From          | To            |
| ------------------------- | ------------- | ------------- |
| workerd                   | 1.20250617.0  | 1.20250705.0  |
| @cloudflare/workers-types | ^4.20250617.0 | ^4.20250705.0 |

* handle workerd not releasing storage file handles on Windows after reseting DOs between tests

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>
Co-authored-by: Peter Bacon Darwin <pbacondarwin@cloudflare.com>
2025-07-07 12:59:23 +00:00
Pete Bacon Darwin
0a5bb5a658
refactor: run C3 e2e tests more easily locally and individually (#9533)
* fix: ensure that the `sourcemap-codec` library has been transformed correctly to be imported in workerd during Vitest runs

Prior to this the inline snapshot tests were failing because they use the `magic-string` library, which in turn relies upon the `sourcemap-codec` library.

This resulted in errors that look like:

```
Error running worker: SyntaxError: The requested module '@jridgewell/sourcemap-codec' does not provide an export named 'encode'
```

* refactor: run C3 e2e tests more easily locally and individually

* fixup! refactor: run C3 e2e tests more easily locally and individually

* move to-exist helper back to setup file

* rename the filtering env vars

* fixup! refactor: run C3 e2e tests more easily locally and individually

* fix c3 e2e ci groups

* remove unnecessary step

* skip gatsby on yarn

* Run windows tests in a normal directory

* skip Workers tests on Windows

* match the previous test descriptions
2025-07-01 08:39:31 +00:00