@changesets/cli
Advanced tools
Comparing version 2.27.9 to 2.27.10
@@ -492,3 +492,4 @@ 'use strict'; | ||
if (packages.packages.length === 0) { | ||
throw new Error(`No packages found. You might have ${packages.tool} workspaces configured but no packages yet?`); | ||
logger.error(`No packages found. You might have ${packages.tool} workspaces configured but no packages yet?`); | ||
throw new errors.ExitError(1); | ||
} | ||
@@ -500,2 +501,10 @@ | ||
})); | ||
if (versionablePackages.length === 0) { | ||
logger.error("No versionable packages found"); | ||
logger.error('- Ensure the packages to version are not in the "ignore" config'); | ||
logger.error('- Ensure that relevant package.json files have the "version" field'); | ||
throw new errors.ExitError(1); | ||
} | ||
const changesetBase = path__default["default"].resolve(cwd, ".changeset"); | ||
@@ -511,5 +520,15 @@ let newChangeset; | ||
} else { | ||
const changedPackagesNames = (await getVersionableChangedPackages(config, { | ||
cwd | ||
})).map(pkg => pkg.packageJson.name); | ||
let changedPackagesNames = []; | ||
try { | ||
changedPackagesNames = (await getVersionableChangedPackages(config, { | ||
cwd | ||
})).map(pkg => pkg.packageJson.name); | ||
} catch (e) { | ||
// NOTE: Getting the changed packages is best effort as it's only being used for easier selection | ||
// in the CLI. So if any error happens while we try to do so, we only log a warning and continue | ||
logger.warn(`Failed to find changed packages from the "${config.baseBranch}" base branch due to error below`); | ||
logger.warn(e); | ||
} | ||
newChangeset = await createChangeset(changedPackagesNames, versionablePackages); | ||
@@ -516,0 +535,0 @@ printConfirmationMessage(newChangeset, versionablePackages.length > 1); |
@@ -454,3 +454,4 @@ import mri from 'mri'; | ||
if (packages.packages.length === 0) { | ||
throw new Error(`No packages found. You might have ${packages.tool} workspaces configured but no packages yet?`); | ||
error(`No packages found. You might have ${packages.tool} workspaces configured but no packages yet?`); | ||
throw new ExitError(1); | ||
} | ||
@@ -462,2 +463,10 @@ | ||
})); | ||
if (versionablePackages.length === 0) { | ||
error("No versionable packages found"); | ||
error('- Ensure the packages to version are not in the "ignore" config'); | ||
error('- Ensure that relevant package.json files have the "version" field'); | ||
throw new ExitError(1); | ||
} | ||
const changesetBase = path.resolve(cwd, ".changeset"); | ||
@@ -473,5 +482,15 @@ let newChangeset; | ||
} else { | ||
const changedPackagesNames = (await getVersionableChangedPackages(config, { | ||
cwd | ||
})).map(pkg => pkg.packageJson.name); | ||
let changedPackagesNames = []; | ||
try { | ||
changedPackagesNames = (await getVersionableChangedPackages(config, { | ||
cwd | ||
})).map(pkg => pkg.packageJson.name); | ||
} catch (e) { | ||
// NOTE: Getting the changed packages is best effort as it's only being used for easier selection | ||
// in the CLI. So if any error happens while we try to do so, we only log a warning and continue | ||
warn(`Failed to find changed packages from the "${config.baseBranch}" base branch due to error below`); | ||
warn(e); | ||
} | ||
newChangeset = await createChangeset(changedPackagesNames, versionablePackages); | ||
@@ -478,0 +497,0 @@ printConfirmationMessage(newChangeset, versionablePackages.length > 1); |
{ | ||
"name": "@changesets/cli", | ||
"version": "2.27.9", | ||
"version": "2.27.10", | ||
"description": "Organise your package versioning and publishing to make both contributors and maintainers happy", | ||
@@ -69,13 +69,13 @@ "bin": { | ||
"dependencies": { | ||
"@changesets/apply-release-plan": "^7.0.5", | ||
"@changesets/assemble-release-plan": "^6.0.4", | ||
"@changesets/apply-release-plan": "^7.0.6", | ||
"@changesets/assemble-release-plan": "^6.0.5", | ||
"@changesets/changelog-git": "^0.2.0", | ||
"@changesets/config": "^3.0.3", | ||
"@changesets/config": "^3.0.4", | ||
"@changesets/errors": "^0.2.0", | ||
"@changesets/get-dependents-graph": "^2.1.2", | ||
"@changesets/get-release-plan": "^4.0.4", | ||
"@changesets/git": "^3.0.1", | ||
"@changesets/get-release-plan": "^4.0.5", | ||
"@changesets/git": "^3.0.2", | ||
"@changesets/logger": "^0.1.1", | ||
"@changesets/pre": "^2.0.1", | ||
"@changesets/read": "^0.6.1", | ||
"@changesets/read": "^0.6.2", | ||
"@changesets/should-skip-package": "^0.1.1", | ||
@@ -96,3 +96,3 @@ "@changesets/types": "^6.0.0", | ||
"semver": "^7.5.3", | ||
"spawndamnit": "^2.0.0", | ||
"spawndamnit": "^3.0.1", | ||
"term-size": "^2.1.0" | ||
@@ -99,0 +99,0 @@ }, |
## @changesets/cli 🦋 | ||
[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@changesets/cli) | ||
[![npm package](https://img.shields.io/npm/v/@changesets/cli)](https://npmjs.com/package/@changesets/cli) | ||
[![View changelog](https://img.shields.io/badge/Explore%20Changelog-brightgreen)](./CHANGELOG.md) | ||
@@ -5,0 +6,0 @@ The primary implementation of [changesets](https://github.com/Noviny/changesets). Helps you manage the versioning |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
128130
2839
198
+ Addedpackage-manager-detector@0.2.5(transitive)
- Removedcross-spawn@5.1.0(transitive)
- Removedlru-cache@4.1.5(transitive)
- Removedpackage-manager-detector@0.2.6(transitive)
- Removedpseudomap@1.0.2(transitive)
- Removedshebang-command@1.2.0(transitive)
- Removedshebang-regex@1.0.0(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedspawndamnit@2.0.0(transitive)
- Removedwhich@1.3.1(transitive)
- Removedyallist@2.1.2(transitive)
Updated@changesets/config@^3.0.4
Updated@changesets/git@^3.0.2
Updated@changesets/read@^0.6.2
Updatedspawndamnit@^3.0.1