Skip to content

@cloudflare/cli-shared-helpers@0.4.0

Choose a tag to compare

@workers-devprod workers-devprod released this 29 Nov 08:29
· 4 commits to main since this release
Immutable release. Only release title and notes can be modified.
b5929df

Minor Changes

  • #17222 89bc2d5 Thanks @edmundhung! - Add ensureCleanGitWorktree to @cloudflare/cli-shared-helpers/git

    It checks that a directory is outside Git or in a clean Git worktree before a command changes it, so tools other than the codemods can use the same check.

Patch Changes

  • #17164 7072797 Thanks @petebacondarwin! - Create missing project files and install their tooling when autoconfig generates cloudflare.config.ts.

    Projects get a local manifest and TypeScript config where needed, along with default cf dev and cf build scripts when those scripts are missing. Interactive setup asks before creating these files; non-interactive runs, such as CI, accept the additions without prompting. Existing scripts, compiler settings, and the project's choice of build tool are preserved, including Vite runners declared at the workspace root. New manifests set "type": "module" so Node loads cloudflare.config.ts without a module-type warning. Existing manifests keep their module type. Autoconfig reports when an explicit CommonJS package setting prevents it from writing a usable cloudflare.config.ts.

    For static sites that serve the project root, autoconfig adds node_modules, .cloudflare, and the new configuration and package-manager files to .assetsignore. Wrangler's asset watcher, local asset serving, and build output skip directories according to those rules, which you can edit to include paths you want to serve. Local dev still follows directory symlinks, but does not revisit ancestor directories.

    Builds do not support broken asset symlinks. A missing target fails the build unless .assetsignore excludes the link regardless of whether it points to a file or a directory.

    writeAssets accepts an optional filter. It does not apply .assetsignore when no filter is provided. Wrangler uses the shared createAssetsCopyFilter helper to honor .assetsignore and preserve asset metadata in build output.

  • Updated dependencies [7072797, 7217f26]:

    • @cloudflare/workers-utils@0.59.0