Commit graph

84 commits

Author SHA1 Message Date
emily-shen
b190702ecc
move deploy() and versionsUpload() to deploy-helpers (#14171) 2026-06-09 15:22:34 +01:00
ANT Bot
c8c366e643
Version Packages (#14159)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-04 12:51:12 +01:00
ANT Bot
0b6042466e
Version Packages (#14142)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-02 16:03:57 +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
ANT Bot
50ef72497e
Version Packages (#14082)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-01 15:37:53 +01:00
Edmund Hung
e3c862a99f
Revert "Version Packages" (#14087) 2026-05-28 16:33:07 +01:00
ANT Bot
689f381bf6
Version Packages (#14048)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-28 14:16:39 +01:00
ANT Bot
b92f87cbbf
Version Packages (#13995)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-22 14:17:30 +01:00
ANT Bot
14d4768665
Version Packages (#13856)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-07 19:54:08 +01:00
ANT Bot
553aaa2397
Version Packages (#13826)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-07 15:33:49 +01:00
ANT Bot
0605474843
Version Packages (#13766)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-05 18:38:19 +01:00
Matt ‘TK’ Taylor
0827815ee4
[wrangler] Add safe telemetry labels for user errors (#13722)
Co-authored-by: Edmund Hung <edmund@cloudflare.com>
2026-04-30 16:56:31 +01:00
Dario Piotrowicz
8cb0284cbe
Add require-description-when-disabling linting rule (#13698) 2026-04-27 14:30:01 +01:00
Dario Piotrowicz
2a6191924f
remove unnecessary lint disabling comments (#13691) 2026-04-27 10:48:02 +01:00
ANT Bot
a3f648171f
Version Packages (#13625)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-24 11:37:13 +01:00
Somhairle MacLeòid
47ac63f05c
Publish @cloudflare/cli-shared-helpers and @cloudflare/workers-utils to npm (#13651)
Co-authored-by: emily-shen <eshen@cloudflare.com>
2026-04-24 11:11:16 +01:00
Matt ‘TK’ Taylor
377715d9f6
[cli] Update @clack/core and @clack/prompts to v1.2.0 (#13644)
Co-authored-by: Ben <4991309+NuroDev@users.noreply.github.com>
Co-authored-by: Samuel Macleod <smacleod@cloudflare.com>
2026-04-24 00:16:19 +01:00
ANT Bot
0de69890c8
Version Packages (#13141)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-02 11:52:06 +00:00
Dario Piotrowicz
db60b94d96
Add gitignore-like helpers to cli package and remove old duplicated logic from c3 and autoconfig (#13144) 2026-03-31 21:59:35 +01:00
ANT Bot
d927ee342c
Version Packages (#13096)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-31 12:08:45 +01:00
Dario Piotrowicz
e631a94646
Graduate c3-vendor runCommand, quoteShellArgs, installPackages and installWrangler to @cloudflare/cli (#13068) 2026-03-30 12:35:32 +01:00
Somhairle MacLeòid
aa26784ce1
Convert from ESLint to oxlint, Prettier to oxfmt (#12930) 2026-03-18 16:03:35 +00:00
Victor Berchet
1d5f66c355
refactor: use ci-info for CI detection (#12504) 2026-02-10 18:02:22 +01:00
Victor Berchet
1a1f9e4802
Use vitest#expect from the local context (#12347) 2026-02-02 08:09:49 +01:00
Victor Berchet
698f510661
Speed up pnpm fix and pnpm check (#12348) 2026-02-01 17:05:54 +01:00
ANT Bot
0c7e1f4bd4
Version Packages (#11937)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-20 17:39:09 +00:00
Somhairle MacLeòid
69ff962048
Reduce more Sentry noise (#11940)
* Add user-friendly error handling for file not found errors

Handle ENOENT errors with clear, actionable messages instead of raw error
codes. These are environmental issues where users reference files or
directories that don't exist, so we suppress Sentry reporting and show
the missing path with helpful guidance.

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

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

* Mark macOS version errors as UserError in CLI package

Updates the CLI package to throw UserError instead of generic Error for
macOS version compatibility issues. This ensures version incompatibility
errors are properly classified as user-facing errors that shouldn't be
reported to Sentry.

Also includes changeset for this change.

* Update packages/wrangler/src/core/handle-errors.ts

Co-authored-by: Ben <4991309+NuroDev@users.noreply.github.com>

* Improve error message when creating duplicate KV namespace

When attempting to create a KV namespace that already exists, provide
a clear, user-friendly error message instead of the generic API error.
The new message explains that the namespace already exists and suggests
running `wrangler kv namespace list` to see existing namespaces with
their IDs, or choosing a different namespace name.

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

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

* user error in env types

* Improve error handling for Vite config transformations

Replace assertions with proper error handling when transforming Vite
configs. When Wrangler encounters a Vite config that uses a function
or lacks a plugins array, it now provides clear, actionable error
messages instead of crashing with assertion failures.

The check function gracefully skips incompatible configs with debug
logging, while the transform function throws helpful UserError messages
with examples of how to manually add the Cloudflare plugin.

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

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

* Fix Wrangler test failures

- Fix vite-config tests by setting logger level to debug to capture debug messages
- Update snapshots for FormData boundary formatting changes in deploy and pages tests

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

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

* wording

* Add FormData boundary normalization for cross-platform test consistency

Adds normalization code to ensure FormData boundaries format consistently
across different platforms (macOS vs Linux) in test snapshots.

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

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

* Suppress network fetch errors from Sentry and show user-friendly messages

Add handling for "fetch failed" / "Failed to fetch" TypeError exceptions
to prevent them from being sent to Sentry and instead display helpful
error messages to users about network connectivity issues.

Changes:
- Add isNetworkFetchFailedError() function in handle-errors.ts to detect
  generic network fetch failures
- Display user-friendly error message explaining common network issues
- Mark these errors as non-reportable to Sentry (environmental issues)
- Update sentry tests to use API errors instead of network errors for
  testing reportable error behavior
- Add test coverage for network error suppression

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

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

* fix tests

* fix tests

* fix tests

* remove duplicate calls

* format

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Ben <4991309+NuroDev@users.noreply.github.com>
2026-01-19 14:33:15 +00:00
James Garbutt
e66f97cf09
chore: remove typescript-eslint direct dependency (#11906)
Since we use a shared ESLint config now, that already pulls in TSESLint.
We no longer need to declare it as a direct dependency.
2026-01-14 08:57:19 +01:00
ANT Bot
8ba87a0644
Version Packages (#11602)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-16 12:31:30 +00:00
Gregory Anders
4201472291
Fixup containers ssh UX papercuts (#11578)
* Add helper function to show or hide the cursor

* Watch cli directory in wrangler "dev" script

* containers: ssh UX improvements

Fix a few papercuts with the new container ssh command:

* Provide single-letter aliases for common SSH options (`-F` to specify
  a config file, `-o` to specify options, `-i` to set the private key)
* Allow `-o` to be used multiple times for setting multiple options
* Show the cursor when the SSH process starts. The library that
  Wrangler uses to draw the interactive UI (clack) hides the cursor, so
  it is not visible when the SSH shell starts. We need to manually make
  it visible.
* Hard code some specific SSH options (ControlMaster, ControlPersist,
  UserKnownHostsFile, and StrictHostKeyChecking). These don't make sense
  to use with the way our SSH implementation works
2025-12-11 10:21:06 -06:00
ANT Bot
1b3e10d59c
Version Packages (#11427)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-02 16:53:25 +00:00
Dario Piotrowicz
caf94dbfff
chore: add eslint rule for requiring node: prefix in node imports (#11411) 2025-11-26 15:47:03 +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
305d7bfff9
Full autoconfig flow for some projects (#11164)
* Initial autoconfig

* further fixes

* Use moduleResolution: bundler

* remove directory

* Update packages/wrangler/src/package-manager.ts

* add tests

* fix tests

* Update packages/wrangler/src/deployment-bundle/run-custom-build.ts

Co-authored-by: Dario Piotrowicz <dario@cloudflare.com>

* Update packages/wrangler/src/autoconfig/run.ts

Co-authored-by: Dario Piotrowicz <dario@cloudflare.com>

* Create neat-worms-refuse.md

* fix windows tests

---------

Co-authored-by: Dario Piotrowicz <dario@cloudflare.com>
2025-11-05 12:24:45 +00:00
ANT Bot
1008d026e1
Version Packages (#10821)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-02 14:42:08 +01:00
emily-shen
79a6b7dd81
containers: default max_instances to 20 and fix logging in @cloudflare/cli (#10764)
* default max_instances to 20

* add log level to @cloudflare/cli

* fixup link to docs in error

* Update packages/containers-shared/src/images.ts

Co-authored-by: Edmund Hung <edmund@cloudflare.com>

---------

Co-authored-by: Edmund Hung <edmund@cloudflare.com>
2025-10-01 10:34:39 +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
ANT Bot
edcaea14e2
Version Packages (#10556)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-09 13:51:10 +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]
ab59066670
Move macOS version validation from @cloudflare/cli to miniflare (#10211)
* Move macOS version validation from @cloudflare/cli to miniflare

BREAKING CHANGE: Miniflare constructor now throws an error when running on
unsupported macOS versions (below 13.5) instead of just logging a warning.

- Move validateMacOSVersion, darwinVersionToMacOSVersion, and isVersionLessThan
  functions from @cloudflare/cli to miniflare
- Add validateMacOSVersion call to Miniflare constructor (fails hard)
- Add warnMacOSVersion function for non-breaking warnings
- Update Wrangler to use warnMacOSVersion from miniflare
- Update C3 to use warnMacOSVersion from miniflare
- Remove old validation logic from @cloudflare/cli package
- Add comprehensive tests for both validation functions
- Update C3 build configuration and dependencies

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

* Fix CI environment detection and address changeset feedback

- Update CI detection to check for any truthy CI value instead of just 'true'
- Add test cases for CI='1' and CI='yes' to ensure robustness
- Remove 'BREAKING CHANGE' language from changeset per user feedback
- Clarify that this makes errors more informative rather than introducing new errors

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

* Revert macOS validation to @cloudflare/cli architecture

- Move validation functions back to @cloudflare/cli to keep C3 lightweight
- Remove miniflare dependency from C3 to avoid forcing workerd download
- Update imports in Wrangler, C3, and Miniflare to use @cloudflare/cli
- Remove validation logic from Miniflare constructor
- Update changeset description to reflect architectural change

This addresses @petebacondarwin's feedback that C3 should remain fast and
lightweight without requiring workerd installation.

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

* Update pnpm-lock.yaml after removing miniflare dependency from C3

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

* Remove unused validateMacOSVersion import from miniflare

This fixes the lint error 'validateMacOSVersion' is defined but never used
that was causing CI failures after the architectural revert.

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

* Add validateMacOSVersion call to Miniflare constructor

This completes the architectural revert by ensuring Miniflare validates
macOS versions using the function from @cloudflare/cli, as requested
in the GitHub comment.

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

* Update changeset to combine behavior from PR #10176 and current PR

- Consolidated into existing .changeset/silly-things-walk.md
- Added @cloudflare/cli as minor (new validation functions)
- Updated package versions to reflect architectural changes
- Removed duplicate changeset file as requested by @petebacondarwin

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

* Fix miniflare build to bundle @cloudflare/cli dependency

- Remove @cloudflare/cli from external dependencies list
- This allows validateMacOSVersion to be bundled and available at runtime
- Fixes CI failure where @cloudflare/cli was not available in miniflare

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

* Refactor validateMacOSVersion to eliminate code duplication

- Combine validateMacOSVersion and warnMacOSVersion into single function with boolean parameter
- Add shouldThrow parameter to control error vs warning behavior
- Keep warnMacOSVersion as convenience wrapper calling validateMacOSVersion(false)
- Update Miniflare constructor to explicitly pass true for hard validation
- Addresses GitHub comment from @emily-shen about reducing duplicate code

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

* Make changeset description more concise

- Simplify changeset to 2 sentences as requested by @emily-shen
- Remove verbose sections and overly enthusiastic language
- Keep essential information about macOS validation behavior

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

* Address GitHub comments: simplify API and fix dependency management

- Remove warnMacOSVersion() function as requested by @petebacondarwin
- Update Wrangler and C3 to call validateMacOSVersion(false) directly
- Move @cloudflare/cli from dependencies to devDependencies in miniflare
- Remove special case filter in build.mjs since @cloudflare/cli is now bundled as devDependency

This addresses both GitHub comments on PR #10211

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

* Apply formatting fixes from pnpm fix

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

* Fix CLI tests after removing warnMacOSVersion function

- Remove warnMacOSVersion from import statement
- Update test suite to use validateMacOSVersion(false) instead
- Maintain same test coverage for warning behavior

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

* Update lockfile after adding @cloudflare/cli devDependency to miniflare

- Fixes CI failure: 'Cannot install with frozen-lockfile because pnpm-lock.yaml is not up to date'
- Resolves dependency mismatch for @cloudflare/cli in miniflare package.json

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

* Improve error message text to specify glibc 2.35+ requirement for Linux

Addresses @emily-shen's feedback to make Linux requirements more specific in both error and warning messages.

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

* Change C3 to hard fail on unsupported macOS versions

Addresses @emily-shen's feedback to change C3 behavior from validateMacOSVersion(false) to validateMacOSVersion(true) for consistency with the requirement that C3 should hard fail on unsupported macOS versions.

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

* Update changeset description to reflect C3 hard fail behavior

After addressing @emily-shen's feedback, C3 now uses validateMacOSVersion(true)
for hard fail behavior, matching Miniflare. Only Wrangler shows warnings.

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

* Improve version validation robustness and update API

- Add regex validation to isVersionLessThan function to ensure M.m.p format
- Update test file to use new ensureMinimumMacOsVersion API with object parameters
- Add comprehensive test coverage for both new and deprecated functions
- Address @vicb's feedback about stricter version format validation

All tests pass locally and code follows repository standards.

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

* Rename function and files from validateMacOSVersion to checkMacOSVersion

- Rename validate-macos-version.ts to check-macos-version.ts
- Rename validate-macos-version.test.ts to check-macos-version.test.ts
- Update all import statements to reference new file names
- Address GitHub feedback from @petebacondarwin

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>
2025-08-04 21:47:19 +01:00
devin-ai-integration[bot]
07c8611b69
feat: add macOS version validation to prevent EPIPE errors on unsupported versions (#10176)
* feat: add macOS version validation to prevent EPIPE errors

- Add validateMacOSVersion utility to check for macOS 13.5+ requirement
- Integrate validation early in both wrangler and create-cloudflare CLI startup
- Show helpful error message with DevContainer suggestion for unsupported versions
- Add comprehensive unit tests covering various macOS version scenarios
- Add changesets for both packages documenting the new feature

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

* fix: correct Darwin version mapping in macOS validation test

- Use Darwin 22.4.0 to properly map to macOS 13.4.0 in test case
- Update expected version assertion to match correct mapping

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

* fix: skip macOS validation in CI environments and add test coverage

- Add CI environment detection to prevent validation interference with test runners
- Add test case to verify validation is skipped when CI=true
- Follows existing pattern used in other test files

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

* fix: add proper export for validateMacOSVersion and fix test environment isolation

- Export validateMacOSVersion from wrangler package index for cross-package usage
- Add vi.unstubAllEnvs() to test beforeEach to prevent CI environment interference
- Update create-cloudflare to import validateMacOSVersion from wrangler package

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

* fix: address GitHub comment and cross-package import bundling issues

- Move validateMacOSVersion export from index.ts to cli.ts as requested by @petebacondarwin
- Add wrangler to external dependencies in create-cloudflare build config
- Prevents esbuild from bundling wrangler's sqlite and blake3-wasm dependencies
- Resolves TypeScript import errors and build failures in create-cloudflare
- Follows pattern used by other packages that import from wrangler

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

* fix: properly isolate CI environment variable in macOS validation tests

- Add vi.stubEnv('CI', '') to tests that expect validation to throw
- Prevents CI environment from interfering with test execution
- Resolves 2 failing tests causing 5 CI suite failures

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

* fix: change changeset from minor to patch for macOS validation feature

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

* fix: revert changeset to minor for macOS validation feature

This is a new stable feature, not a bugfix, so it should be classified as 'minor' according to CONTRIBUTING.md guidelines. This resolves the v3 backport CI failure that was triggered by the patch classification.

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

* refactor: move macOS validation to @cloudflare/cli to resolve cross-package dependencies

- Move validateMacOSVersion function from wrangler to @cloudflare/cli package
- Update imports in both wrangler and create-cloudflare to use @cloudflare/cli
- Remove external: ['wrangler'] from create-cloudflare build configuration
- Move tests to @cloudflare/cli package and update to use crash() instead of UserError
- Maintain all existing functionality while improving dependency structure

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

* fix: revert macOS validation to throw errors instead of using crash()

- Replace crash() with standard Error throwing as requested by @petebacondarwin
- Update tests to expect thrown errors with specific error messages
- Maintain same validation functionality while avoiding process.exit() calls
- Both wrangler and create-cloudflare have proper error handling for thrown errors

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

* feat: improve macOS validation error message as requested by @petebacondarwin

- Update error message to mention 'Cloudflare Workers runtime cannot run'
- Add link to workerd documentation for more context
- Update test expectations to match new error message format
- Maintain same validation functionality with better user experience

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>
2025-08-03 20:53:54 +01:00
Pete Bacon Darwin
d609ac7823
update eslint versions and ban direct console usage in Wrangler, Miniflare and C3 (#9861)
* update eslint versions and ban direct console usage in Wrangler, Miniflare and C3

* fixup! update eslint versions and ban direct console usage in Wrangler, Miniflare and C3

* fixup! update eslint versions and ban direct console usage in Wrangler, Miniflare and C3

* fixup! update eslint versions and ban direct console usage in Wrangler, Miniflare and C3

* rebase catchups of new eslint errors
2025-07-15 09:33:30 +01:00
Somhairle MacLeòid
869ec7b916
Wrangler v4 (#7334)
* ci: setup next branch with prereleases to next tag

* chore: remove deprecated `getBindingsProxy` (#5005)

* Require Node v18 in Wrangler v4 (#7338)

* Remove node_compat in Wrangler & Miniflare v4 (#7336)

* Remove v2 warning (#7228)

* chore: update esbuild (#6884)

* `--local` by default for `wrangler kv` & `wrangler r2` (#7392)

* deprecate unused D1 commands/options  (#7471)

* chore: remove alpha support from `wrangler d1 migrations apply`

* chore: remove `wrangler d1 backups`

* chore: fixup tests

* chore: fixup tests

* chore: fixup tests

* chore: remove --batch-size

* Remove deprecated commands & config (#7352)

* Remove wrangler version

* Remove generate & strip down init

* Add changesets

* Remove deprecated --format & config

* Add changeset

* remove commands

* Fix tests

* Remove .only()

* Remove legacy assets

* clarify legacy assets -> sites naming

* various test fixes after rebase

* fixup! chore: update esbuild (#6884)

esbuild 0.24.2 variable naming changes

* fixup! Remove node_compat in Wrangler & Miniflare v4 (#7336)

* feat(wrangler): Drop worker prefix when creating KV namespaces (#7759)

* feat(wrangler): Drop worker prefix when creating KV namespaces

---------

Co-authored-by: Samuel Macleod <smacleod@cloudflare.com>

* Include node version in name

* Ignore kv-asset-handler tests on Node 22

* rename tests

* Rename positional `json` args. Fixes #7688

* unescape

* fix tests

* Update .changeset/funny-pets-punch.md

* Add system requirements to the README

* fix formatting

* fix formatting

* Address feedback

* lockfile

* fix test

* Fix changeset format

* Use RC versioning

* feat: graduate `--x-include-runtime` (#8166)

* graduate wrangler type generation to GA

* fixups

* extra changeset

* Fix legacy assets

* Clarify that node support affects Wrangler & Miniflare & kv-asset-handler

* Clarify comment re node 20

* Add more packages

* Remove obsolete tests

* Rename legacyAssets

* more robust isLocal

* fix test snapshot

* Add --legacy-peer-deps so that installing Wrangler v4 doesn't case issues with frameworks that haven't updated their peer dependency for Wrangler v4

* Remove crypto polyfill

* fix kv.local test after rebase

* fix lockfile

* bump rc version

* revert rc versions

---------

Co-authored-by: Dario Piotrowicz <dario@cloudflare.com>
Co-authored-by: Max Rozen <3822106+rozenmd@users.noreply.github.com>
Co-authored-by: Pedro Leal <pmiguel@users.noreply.github.com>
Co-authored-by: emily-shen <69125074+emily-shen@users.noreply.github.com>
2025-03-11 20:26:18 +00:00
Gregory Anders
c46e02dfd7
spinner: do not print escape sequences to non-tty output (#7133)
The workers-sdk defines an `isInteractive` test which (incorrectly) does
not check whether stdout is a TTY. This means that when piping output to
a file or to another process, UI elements like the spinner write ANSI
escape sequences to stdout where they are not properly interpreted.

Wrangler has its own separate interactivity test that does check that
stdout is a TTY. This commit updates workers-sdk to use the
`isInteractive` test from Wrangler (which checks that both stdin and
stdout are TTYs) and then updates Wrangler to use this function. This
both eliminates code duplication and also fixes the problem mentioned
above where escape sequences are written to non-TTY outputs.

In addition, the `logOutput` function that the spinner uses (which uses
code from the 3rd party `log-output` library) _unconditionally_ assumes
that stdout is a TTY (it doesn't even check!) and always emits escape
sequences. So when we are running non-interactively, we must use the
`logRaw` function to avoid emitting escape sequences.

While making this change, I also addressed the TODO on the
`isNonInteractiveOrCI` function by using that function throughout the
wrangler codebase.
2024-11-14 13:20:24 +00:00
Somhairle MacLeòid
0a38bbade6
Update & consolidate some repo dependencies (#7090)
* undici -> catalog

* TS -> catalog

* upgrade ws

* absolutely pin @types/node

* fix types

* fix warnings

* fix some tests

* pin msw

* fix some tests
2024-10-25 17:56:31 +01:00
Edmund Hung
a034aa1f60
feat(create-cloudflare): prompt user to correct the answer if the arg value is invalid (#7055) 2024-10-25 15:59:32 +01:00
Somhairle MacLeòid
fa8cc0def2
Upgrade to turbo v2 (#7076)
* Upgrade to turbo v2

* fix tests

* rebase
2024-10-25 14:07:35 +01:00
Edmund Hung
5632968383
feat(create-cloudflare): telemetry collection (#6484)
Co-authored-by: Nevi Shah <76798024+nevikashah@users.noreply.github.com>
Co-authored-by: lrapoport-cf <107272160+lrapoport-cf@users.noreply.github.com>
2024-09-23 12:39:08 +01:00
Pete Bacon Darwin
40ecf47968
C3-workers-assets-experimental-templates (#6678)
* feat: add --experimental flag to allow access to experimental templates

* fix: do not crash if the chosen framework does not exist

* fix: offer to deploy workers with assets and no bindings

* feat: add experimental qwik workers + assets template

* feat: add experimental svelte workers + assets template

* feat: add experimental remix workers + assets template

* feat: add experimental astro workers + assets template

* feat: add hello world with assets template

* feat: add experimental solid workers + assets template

* feat: add experimental nuxt workers + assets template

* feat: filter the C3 help info when in experimental mode

* fix: mark new Workers + Assets experimental templates as "workers" platform

This avoids C3 from trying to create a Pages project for them.
Needed a bit of refactoring to ensure that these new templates still work even if not marked as "pages".

* feat: add experimental angular workers + assets template

* refactor: use mapped paths to import templates

* feat: add experimental docusaurus workers + assets template

* feat: add experimental gatsby workers + assets template

* add changesets
2024-09-12 19:14:21 +01:00
Edmund Hung
37dc86ff43
feat(create-cloudflare): allow users to change prompt answer (#6428) 2024-08-15 11:43:05 +01:00