-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: error on empty package name (#8152)
### Description We now will error if we encounter a package with a missing or empty package name. This is done in the graph validation step as opposed to construction since we don't want to impose this restriction on `@turbo/repository` users. ### Testing Instructions Added integration test
- Loading branch information
1 parent
6373a42
commit 79026a2
Showing
3 changed files
with
41 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Setup | ||
$ . ${TESTDIR}/../../helpers/setup_integration_test.sh | ||
Clear name field | ||
$ jq '.name = ""' apps/my-app/package.json > package.json.new | ||
$ mv package.json.new apps/my-app/package.json | ||
Build should fail due to missing name field | ||
$ ${TURBO} build 1> ERR | ||
[1] | ||
$ grep -F --quiet 'x package.json must have a name field:' ERR |