Generalize wrangler deploy positional argument from [script] to [path]#14153
Conversation
🦋 Changeset detectedLatest commit: 657490b The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
This test ( Now consider the case where a user runs This logic is actually well-designed. My concern #1 about the Let me reconsider severity. Since Let me do a final check — verify the Overall assessment: The PR is well-constructed. The directory-as-assets resolution is moved to Let me verify there are no remaining concerns with the I've completed a thorough review. The PR correctly:
The only minor observation is that in the interactive autoconfig flow, the "You should run..." suggestion drops the entry-point path when the deprecated LGTM |
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
@cloudflare/wrangler-bundler
commit: |
|
✅ All changesets look good |
|
Codeowners approval required for this PR:
Show detailed file reviewers |
591c399 to
99859f5
Compare
99859f5 to
b3ee161
Compare
dce9d14 to
b9f397e
Compare
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
Co-authored-by: emily-shen <69125074+emily-shen@users.noreply.github.com>
Fixes https://jira.cfdata.org/browse/DEVX-2333
The
wrangler deploycommand now accepts a generic[path]positional argument that can point to either a Worker entry-point file or a directory of static assets. The type is auto-detected:wrangler deploy ./src/index.tsdeploys a Worker (same as before)wrangler deploy ./publicdeploys a static assets site (no interactive confirmation prompt)The
--scriptnamed option is now hidden and deprecated for the deploy command. It continues to work for backwards compatibility but only accepts file paths. Passing a directory to--scriptnow produces a clear error message suggesting the positionalpathargument or--assetsflag instead.wrangler deploy's<PATH>option only accepting assets in interactive mode cloudflare-docs#31183A picture of a cute animal (not mandatory, but encouraged)