Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dont't include ignored packages when adding a changeset (#744)
- Loading branch information
Showing
3 changed files
with
27 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@changesets/cli": patch | ||
--- | ||
|
||
Ignored packages are no longer listed when adding a changeset. |
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 |
---|---|---|
|
@@ -23,7 +23,9 @@ export default async function add( | |
{ empty, open }: { empty?: boolean; open?: boolean }, | ||
config: Config | ||
) { | ||
const packages = await getPackages(cwd); | ||
const packages = (await getPackages(cwd)).packages.filter( | ||
pkg => !config.ignore.includes(pkg.packageJson.name) | ||
); | ||
const changesetBase = path.resolve(cwd, ".changeset"); | ||
|
||
let newChangeset: UnwrapPromise<ReturnType<typeof createChangeset>>; | ||
|
@@ -39,10 +41,11 @@ export default async function add( | |
ref: config.baseBranch | ||
}); | ||
const changePackagesName = changedPackages | ||
.filter(a => a) | ||
.map(pkg => pkg.packageJson.name); | ||
newChangeset = await createChangeset(changePackagesName, packages.packages); | ||
printConfirmationMessage(newChangeset, packages.packages.length > 1); | ||
.map(pkg => pkg.packageJson.name) | ||
.filter(pkgName => config.ignore.includes(pkgName)); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mskelton
Author
Contributor
|
||
|
||
newChangeset = await createChangeset(changePackagesName, packages); | ||
This comment has been minimized.
Sorry, something went wrong.
walt1992
|
||
printConfirmationMessage(newChangeset, packages.length > 1); | ||
|
||
if (!newChangeset.confirmed) { | ||
newChangeset = { | ||
|
@mskelton Not include???