Socket
Socket
Sign inDemoInstall

@changesets/cli

Package Overview
Dependencies
Maintainers
3
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@changesets/cli - npm Package Compare versions

Comparing version 2.12.0 to 2.13.0

13

CHANGELOG.md
# @changesets/cli
## 2.13.0
### Minor Changes
- [`412b4b9`](https://github.com/atlassian/changesets/commit/412b4b97e53b6326e8e733eb7d4e1f5738e6fed0) [#504](https://github.com/atlassian/changesets/pull/504) Thanks [@vitorbal](https://github.com/vitorbal)! - `changeset status` command no longer errors when no packages have been changed.
* [`24d7bc9`](https://github.com/atlassian/changesets/commit/24d7bc9e56a6dce7c64b39e8f73e50e21762faac) [#495](https://github.com/atlassian/changesets/pull/495) Thanks [@RoystonS](https://github.com/RoystonS)! - Automatically deepen shallow clones in order to determine the correct commit at which changesets were added. This helps Git-based changelog generators to always link to the correct commit. From now on it's not required to configure `fetch-depth: 0` for your `actions/checkout` when using [Changesets GitHub action](https://github.com/changesets/action).
### Patch Changes
- Updated dependencies [[`24d7bc9`](https://github.com/atlassian/changesets/commit/24d7bc9e56a6dce7c64b39e8f73e50e21762faac), [`24d7bc9`](https://github.com/atlassian/changesets/commit/24d7bc9e56a6dce7c64b39e8f73e50e21762faac)]:
- @changesets/git@1.1.0
## 2.12.0

@@ -4,0 +17,0 @@

13

dist/cli.cjs.dev.js

@@ -325,3 +325,2 @@ 'use strict';

let type = await askList(`What kind of change is this for ${green(pkg.packageJson.name)}? (current version is ${pkg.packageJson.version})`, ["patch", "minor", "major"]);
console.log(type);

@@ -949,3 +948,4 @@ if (type === "major") {

const releasePlan = await getReleasePlan__default['default'](cwd, since === undefined ? sinceMaster ? "master" : undefined : since, config);
const sinceBranch = since === undefined ? sinceMaster ? "master" : undefined : since;
const releasePlan = await getReleasePlan__default['default'](cwd, sinceBranch, config);
const {

@@ -955,5 +955,10 @@ changesets,

} = releasePlan;
const changedPackages = await git.getChangedPackagesSinceRef({
cwd,
ref: sinceBranch || config.baseBranch
});
if (changesets.length < 1) {
logger.error("No changesets present");
if (changedPackages.length > 0 && changesets.length === 0) {
logger.error("Some packages have been changed but no changesets were found. Run `changeset add` to resolve this error.");
logger.error("If this change doesn't need a release, run `changeset add --empty`.");
process.exit(1);

@@ -960,0 +965,0 @@ }

@@ -184,3 +184,3 @@ "use strict";

let pkg = allPackages[0], type = await askList(`What kind of change is this for ${green(pkg.packageJson.name)}? (current version is ${pkg.packageJson.version})`, [ "patch", "minor", "major" ]);
if (console.log(type), "major" === type) {
if ("major" === type) {
if (!await confirmMajorRelease(pkg.packageJson)) throw new errors.ExitError(1);

@@ -532,5 +532,9 @@ }

logger.warn("Use --since=master instead"));
const releasePlan = await getReleasePlan__default.default(cwd, void 0 === since ? sinceMaster ? "master" : void 0 : since, config), {changesets: changesets, releases: releases} = releasePlan;
if (changesets.length < 1 && (logger.error("No changesets present"), process.exit(1)),
output) return void await fs__default.default.writeFile(path__default.default.join(cwd, output), JSON.stringify(releasePlan, void 0, 2));
const sinceBranch = void 0 === since ? sinceMaster ? "master" : void 0 : since, releasePlan = await getReleasePlan__default.default(cwd, sinceBranch, config), {changesets: changesets, releases: releases} = releasePlan;
if ((await git.getChangedPackagesSinceRef({
cwd: cwd,
ref: sinceBranch || config.baseBranch
})).length > 0 && 0 === changesets.length && (logger.error("Some packages have been changed but no changesets were found. Run `changeset add` to resolve this error."),
logger.error("If this change doesn't need a release, run `changeset add --empty`."),
process.exit(1)), output) return void await fs__default.default.writeFile(path__default.default.join(cwd, output), JSON.stringify(releasePlan, void 0, 2));
const print = verbose ? verbosePrint : SimplePrint;

@@ -537,0 +541,0 @@ return print("patch", releases), logger.log("---"), print("minor", releases), logger.log("---"),

@@ -302,3 +302,2 @@ import meow from 'meow';

let type = await askList(`What kind of change is this for ${green(pkg.packageJson.name)}? (current version is ${pkg.packageJson.version})`, ["patch", "minor", "major"]);
console.log(type);

@@ -926,3 +925,4 @@ if (type === "major") {

const releasePlan = await getReleasePlan(cwd, since === undefined ? sinceMaster ? "master" : undefined : since, config);
const sinceBranch = since === undefined ? sinceMaster ? "master" : undefined : since;
const releasePlan = await getReleasePlan(cwd, sinceBranch, config);
const {

@@ -932,5 +932,10 @@ changesets,

} = releasePlan;
const changedPackages = await getChangedPackagesSinceRef({
cwd,
ref: sinceBranch || config.baseBranch
});
if (changesets.length < 1) {
error("No changesets present");
if (changedPackages.length > 0 && changesets.length === 0) {
error("Some packages have been changed but no changesets were found. Run `changeset add` to resolve this error.");
error("If this change doesn't need a release, run `changeset add --empty`.");
process.exit(1);

@@ -937,0 +942,0 @@ }

{
"name": "@changesets/cli",
"version": "2.12.0",
"version": "2.13.0",
"description": "Organise your package versioning and publishing to make both contributors and maintainers happy",

@@ -33,3 +33,3 @@ "bin": {

"@changesets/get-release-plan": "^2.0.1",
"@changesets/git": "^1.0.6",
"@changesets/git": "^1.1.0",
"@changesets/logger": "^0.0.5",

@@ -36,0 +36,0 @@ "@changesets/pre": "^1.0.4",

@@ -10,3 +10,3 @@ ## @changesets/cli 🦋

This package is intended as a successor to `@atlaskit/build-releases` with a more general focus. It works in
[bolt](https://www.npmjs.com/package/bolt) multi-package repositories, [yarn workspaces] multi-package repositories, and
[bolt](https://www.npmjs.com/package/bolt) multi-package repositories, [yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/) multi-package repositories, and
in single-package repositories.

@@ -13,0 +13,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc