Repository navigation
Run an app's build only when its package.json defines one - #469
Merged
Merged
Conversation
widefleet deploy and preview run the project's build script when package.json declares it and otherwise bundle the Worker entry directly, so --skip-build is gone. Server builds install only from a committed pnpm-lock.yaml, skip the install for a project without dependencies, and fail with the missing file named when dependencies have no lockfile.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
widefleet-docs | ee457f4 | Nov 28 2026, 04:57 PM |
…cepts pnpm already reports a missing lockfile and finds a workspace's root lockfile, so server builds keep running pnpm install --frozen-lockfile for every project with package.json. Build script detection accepts a byte order mark and script values of any type. The documentation moves to its own pull request until a release includes this change.
The CLI reads package.json as a JSON value and checks only scripts.build, so a scripts field of another type or a repeated scripts key no longer stops a deploy that pnpm would run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An app without a framework build, such as a plain Worker with static assets, still has a package.json for its development tools.
widefleet deployranpnpm run buildwhenever package.json existed, so such apps had to deploy with--skip-build, and server builds, which runwidefleet deploy, failed with "Missing script: build".Changes
widefleet deployandwidefleet previewrun the project'sbuildscript when package.json defines one. Without it they printNo build script in package.json; bundling the Worker entry as is.and bundle the configured entry. The check accepts a byte order mark and script values of any type, as pnpm does; an invalid package.json fails with its parse error.--skip-buildis removed.pnpm install --frozen-lockfilefor every project with package.json, so pnpm finds a workspace's root lockfile and reports a missing one.--skip-build. A CLI test covers a project whose package.json has no build script.Documentation: #471 (draft until a release includes this).
Checks
cargo test -p platform-cli,cargo fmt --check,cargo clippy --all-targets -D warningspnpm typecheck,pnpm lint,pnpm format:checkcli.test.ts,service-documentation.test.ts,organization-selection.integration.test.ts) and CLI package tests with a packaged debug binaryruntime/deployment.test.tsneeds Docker and runs in CI.