Commit graph

83 commits

Author SHA1 Message Date
Roli Bosch
7329b3f1ba
chore: replace glob with tinyglobby (#12705)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Pete Bacon Darwin <pbacondarwin@cloudflare.com>
2026-04-19 22:13:39 +01:00
Dario Piotrowicz
0d7b7b21c1
In the changesets validation, allow private packages to have major bumps (#13040) 2026-04-01 00:47:49 +01:00
Dario Piotrowicz
e200179d8d
Deduplicate codemod logic in C3 and autoconfig by moving it to its own @cloudflare/codemod package (#13102)
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
2026-03-30 14:14:32 +01: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
James Opstad
2f57027c84
Add workers-utils back into changesets (#12817) 2026-03-10 10:51:59 +00:00
Pete Bacon Darwin
e3beb2edaa
Remove temporary block on Worker/Pages deployment changesets (#12791) 2026-03-06 19:21:27 +00:00
Dario Piotrowicz
a3f9d1a4bf
Make workers-utils package private (#12658) 2026-03-03 12:59:48 +00:00
Somhairle MacLeòid
10e2e15406
[workers-playground] Expandable object logging and improved console UI (#12549) 2026-02-18 10:40:15 +00:00
emily-shen
60eaf16da4
[explorer] add the UI for the dev resource explorer (#12288) 2026-02-04 11:27:14 +00:00
Edmund Hung
7400cd3f78
chore: skip alert if changeset fails to create PR (#11703) 2026-01-26 13:11:18 +00:00
emily-shen
2aa769c873
Add a new linting rule to catch unsafe exec usage (#11902)
* add lint rule for command injection

* add agents.local.md to gitignore

* PR feedback

* Fix any linting errors

* changeset

* fix tooling tests
2026-01-22 10:55:27 +00:00
emily-shen
0b249a103e
Notify when security advisories are submitted to workers-sdk (#11916)
* Notify when security advisories are submitted to workers-sdk

* Use repository_advisory event instead of security_advisory

* add description to body

* Add devprod status bot to COFS exceptions
2026-01-16 13:38:01 +00:00
Pete Bacon Darwin
39465da974
chore: allow quick-edit worker deployments via changesets (#11941)
The quick-edit deployment does not hit the production dashboard until a
change is made to the internal dashboard project, so it is safe to
deploy this worker via the changeset-triggered deployment process.
2026-01-16 12:17:19 +00:00
emily-shen
bd224e0276
misc CI cleanup (#11935) 2026-01-15 11:52:57 +00: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
lrapoport-cf
a50c01d2c9
Update pull_request_template.md (#11654)
* Update pull_request_template.md

* Update .github/pull_request_template.md

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

* Update PR description validation

* Fix formatting

* Update snapshots

---------

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
2026-01-09 16:22:52 +00:00
Victor Berchet
be5ef57244
refactor: consistenly import expect from vitest (#11795) 2026-01-05 14:54:25 +01:00
Edmund Hung
7b4d45104f
chore: update workflows-shared deploy config (#11746)
* chore: update workflows-shared deploy config

* fix test
2025-12-22 22:53:13 +00:00
Matt Kane
e3c11202c2
chore: remove v3 backport automation and PR validation (#11721)
- Delete .github/workflows/open-v3-maintenance-prs.yml workflow
- Delete tools/deployments/open-v3-pr.ts script
- Remove v3 backport section from PR template
- Remove v3 backport validation from validate-pr-description.ts
- Update tests to reflect removal of v3 backport validation

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2025-12-19 15:11:12 +00:00
Pete Bacon Darwin
40b1d14dc0
ci: ban landing changes that could lead to a Worker/Pages deployment from workers-sdk (#11591) 2025-12-10 15:59:24 +00:00
Victor Berchet
2d9a30c843
Support <PACKAGE_NAME> as a placeholder for the name in package.jso… (#11560) 2025-12-09 11:24:25 +01:00
Dario Piotrowicz
caf94dbfff
chore: add eslint rule for requiring node: prefix in node imports (#11411) 2025-11-26 15:47:03 +00:00
Pete Bacon Darwin
8ecabd8170
ci: use the correct npm version for releases (#11423)
Trusted publishing requires the installed npm to be at least 11.5.1.
We get this automatically via Node 24.
2025-11-26 12:07:10 +00:00
Pete Bacon Darwin
a897d20aac
ci: make the release failure alert resilient to missing DEPLOYMENT_STATUS (#11422)
* ci: make the release failure alert resilient to missing `DEPLOYMENT_STATUS`

If the npm release fails then the non-npm release is not even attempted.
In which case the `DEPLOYMENT_STATUS` is empty, which was causing the JSON parsing to fail and no alert to be sent.

* Apply suggestion from @edmundhung

---------

Co-authored-by: Edmund Hung <edmund@cloudflare.com>
2025-11-26 11:13:38 +00:00
Pete Bacon Darwin
eb9fdafcdf
ci: ban major bump changesets in the repo (#11327) 2025-11-18 16:08:24 +00:00
Somhairle MacLeòid
4be581af7d
Use eslint flat file config (#11207)
* Use eslint flat file config

* prettify

* fix

* address some comments
2025-11-07 13:15:59 +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
Pete Bacon Darwin
5f8155a4b4
further e2e test stability improvements (#10731)
Includes fixing private packages check
2025-09-23 21:42:33 +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
Greg Brimble
85b41bee61
Remove workers.new (#10429) 2025-09-10 08:42:21 -04: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
Gregory Anders
8ae9323a5c
Include cursor in text prompts (#10492)
Co-authored-by: emily-shen <eshen@cloudflare.com>
2025-09-08 08:58:29 -05:00
devin-ai-integration[bot]
911fd8d109
ci: ensure existing-script-test-do-not-delete worker exists before C3 E2E tests (#10272)
* ci: ensure existing-script-test-do-not-delete worker exists before C3 E2E tests

Add deployment step to create-cloudflare E2E workflow that deploys the
existing-script-test-do-not-delete worker before tests run. This ensures
the worker exists with the correct configuration (FOO=bar variable and
Hello World response) that the --existing-script test relies on.

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

* Address PR feedback: use wrangler.jsonc, handle fork PRs, check worker existence

- Convert wrangler.toml to wrangler.jsonc format as requested
- Add condition to skip deployment if TEST_CLOUDFLARE_ACCOUNT_ID is not set (handles fork PRs)
- Check if worker exists before deploying to avoid unnecessary deployments

Addresses feedback from @petebacondarwin in PR comments.

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

* Fix worker URL in curl existence check

Use the correct worker URL https://existing-script-test-do-not-delete.devprod-testing7928.workers.dev
as specified by @petebacondarwin in PR comment feedback.

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

* Update condition to check for API token instead of account ID

Change from env.TEST_CLOUDFLARE_ACCOUNT_ID to secrets.TEST_CLOUDFLARE_API_TOKEN
as suggested by @petebacondarwin in PR comment feedback.

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

* Trigger CI to pick up no-changeset-required label

This empty commit forces CI to re-run with the no-changeset-required label
that was added to the PR after the last commit.

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

* Fix GitHub Actions YAML syntax error in worker deployment condition

Replace invalid secrets.TEST_CLOUDFLARE_API_TOKEN check with proper fork detection
pattern used elsewhere in the repository.

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

* Refactor CI to use permanent test worker files from tools/test-workers/

- Move worker definition from inline CI creation to tools/test-workers/existing-script-test-do-not-delete/
- Update C3 E2E workflow to reference permanent worker files instead of creating temporary ones
- Add documentation for test workers in tools/README.md
- Create deploy-all.sh script for future extensibility
- Add .eslintignore to exclude test worker files from strict TypeScript linting
- Maintain same deployment logic with existence check and fork PR handling

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

* Address PR feedback: convert deployment script to TypeScript and use separate CI job

- Convert tools/test-workers/deploy-all.sh to TypeScript using Node.js patterns
- Move environment variable checks and fetch-based existence check into TypeScript script
- Refactor CI workflow to use separate 'deploy-test-workers' job with needs: dependency
- Use 'node -r esbuild-register' execution pattern following tools/package.json conventions
- Remove trigger_ci.md file which was only for triggering CI
- Maintain all existing functionality while improving maintainability

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

* Trigger fresh CI validation

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

* Remove temporary trigger file

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

* Fix linting issues: remove unused error variable and enable allowJs for test workers

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

* Add documentation for deploy-all script as requested in PR feedback

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

* Update README with deploy-all documentation

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

* Fix unused @ts-expect-error directive in changeset-version.test.ts

The directive was no longer needed after enabling allowJs in TypeScript config,
causing a compilation error in CI checks.

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

* use `pnpx` rather than `npx`

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: pbacondarwin@cloudflare.com <pete@bacondarwin.com>
2025-08-08 13:13:07 +01:00
Somhairle MacLeòid
3851388070
Bump tar-fs where possible (#9978) 2025-07-16 15:26:37 +01:00
Victor Berchet
3ed8dcd8b4
Fix the v3 backport message to use v3-backport-PR (#9777)
* Fix the v3 backport message to use v3-backport-PR

* fixup! actually create the v3 PR

* fixup! this will not happen again!
2025-06-27 08:42:16 +00:00
Somhairle MacLeòid
ba25bd5037
Fix E2E's on forks (#9768)
* Revert "Move `changeset-version.js` file out of `.github` (#9766)"

This reverts commit e3a67ff31d.

* exclude on forks
2025-06-26 15:45:15 +00:00
Somhairle MacLeòid
e3a67ff31d
Move changeset-version.js file out of .github (#9766)
* move changeset-version file

* skip for md
2025-06-26 15:26:42 +00:00
Somhairle MacLeòid
6fb8f50844
Run more tests, more of the time (#9737)
* run more tests, more of the time

* Checks can be single-os

* syntax

* syntax

* add more labels

* fix group

* fix group

* skip node 24

* skip test

* Simplify PR validation

* fix tool tests

* re-skip 24

* address review comments

* match existing test names
2025-06-26 10:39:38 +00:00
emily-shen
caf97e40e5
fix changeset issue with containers-shared (#9675)
* fix changeset issue with containers-shared

* changeset
2025-06-19 16:06:39 +02:00
Somhairle MacLeòid
a9375723e8
Migrate prereleases to pkg-pr-new (#9492)
* try out pkg-pr-new

* try again

* compact

* versions

* fully migrate

* fix name

* it's a tool

* mjs

* label

* label

* label

* add env

* indent

* Update prerelease.yml

* Update prerelease.yml
2025-06-05 17:30:14 +00:00
Pete Bacon Darwin
1f76f30bb3
Ensure consistent fixture package naming (#9378)
* tighten up turbo dependencies to avoid having to manually build

* test: ensure that fixture packages always start with `fixture-`

* refactor: consolidate fixture package names with consistent `fixture-` prefix

Updates all 63 fixture package names to use a consistent naming scheme with logical categorization:
- Core workers: fixture-worker-basic, fixture-worker-ai, fixture-worker-typescript, etc.
- Pages functions: fixture-pages-functions, fixture-pages-workerjs, etc.
- Database/storage: fixture-d1-basic, fixture-secrets-store, etc.
- Module handling: fixture-import-wasm, fixture-no-bundle-import, etc.
- Development tools: fixture-interactive-dev, fixture-local-mode, etc.

Also updates test files that reference specific fixture package names to maintain compatibility.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* add CI_OS env var to the check run to ensure correct turbo remote caching

* fixup! refactor: consolidate fixture package names with consistent `fixture-` prefix

* fixup! test: ensure that fixture packages always start with `fixture-`

* revert unnecessary change

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-05-28 12:08:48 +00:00
Edmund Hung
23975ad9e3
chore: backport changes to v3 with v3-backport branch prefix and label (#9283) 2025-05-16 11:21:31 +00:00
Edmund Hung
aa9b7dd230
chore: cleanup unused backport job (#9061) 2025-04-28 11:38:22 +01:00
Edmund Hung
a4c52e69b6
chore: add workflow to check v3 patch status (#8962)
Co-authored-by: lrapoport-cf <107272160+lrapoport-cf@users.noreply.github.com>
2025-04-24 13:40:48 +01:00
Edmund Hung
955c624910
chore: create v3 backport PR as draft first (#8934) 2025-04-14 17:00:48 +01:00
Edmund Hung
dfea523ea4
chore: comment on v3 backport status only if it has wrangler patch (#8930) 2025-04-14 12:38:58 +01:00
Somhairle MacLeòid
1bdb96926a
Add " in v3 backport script (#8929) 2025-04-14 11:06:54 +01:00
Edmund Hung
a34b172298
chore: re-run v3 backport on label changes (#8877) 2025-04-10 13:10:57 +01:00
Greg Brimble
d4c11710fd
Unhide 'wrangler pages functions build' (#8795)
* Unhide 'wrangler pages functions build'

* Accept live docs URLs
2025-04-05 14:30:28 +01:00