Socket
Socket
Sign inDemoInstall

@changesets/cli

Package Overview
Dependencies
28
Maintainers
3
Versions
89
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.5.2 to 2.6.0

13

CHANGELOG.md
# @changesets/cli
## 2.6.0
### Minor Changes
- [`ca934d7`](https://github.com/atlassian/changesets/commit/ca934d7b9dcd3203f27a4a2cefb19e9cb90cb083) [#282](https://github.com/atlassian/changesets/pull/282) Thanks [@tarang9211](https://github.com/tarang9211)! - Add all packages option to major and minor selects
### Patch Changes
- [`2adfe66`](https://github.com/atlassian/changesets/commit/2adfe66252f9b8b7a6a0c261f608dcb3c9294bfb) [#288](https://github.com/atlassian/changesets/pull/288) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Stop running `npm profile get` when using non-npm registries
- Updated dependencies []:
- @changesets/apply-release-plan@0.4.2
## 2.5.2

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

39

dist/cli.cjs.dev.js

@@ -259,8 +259,11 @@ 'use strict';

let pkgsLeftToGetBumpTypeFor = new Set(packagesToRelease);
let pkgsThatShouldBeMajorBumped = await askCheckboxPlus(bold(`Which packages should have a ${red("major")} bump?`), packagesToRelease.map(pkgName => {
return {
name: pkgName,
message: formatPkgNameAndVersion(pkgName, pkgJsonsByName.get(pkgName).version)
};
}));
let pkgsThatShouldBeMajorBumped = (await askCheckboxPlus(bold(`Which packages should have a ${red("major")} bump?`), [{
name: "all packages",
choices: packagesToRelease.map(pkgName => {
return {
name: pkgName,
message: formatPkgNameAndVersion(pkgName, pkgJsonsByName.get(pkgName).version)
};
})
}])).filter(x => x !== "all packages");

@@ -284,8 +287,11 @@ for (const pkgName of pkgsThatShouldBeMajorBumped) {

if (pkgsLeftToGetBumpTypeFor.size !== 0) {
let pkgsThatShouldBeMinorBumped = await askCheckboxPlus(bold(`Which packages should have a ${green("minor")} bump?`), [...pkgsLeftToGetBumpTypeFor].map(pkgName => {
return {
name: pkgName,
message: formatPkgNameAndVersion(pkgName, pkgJsonsByName.get(pkgName).version)
};
}));
let pkgsThatShouldBeMinorBumped = (await askCheckboxPlus(bold(`Which packages should have a ${green("minor")} bump?`), [{
name: "all packages",
choices: [...pkgsLeftToGetBumpTypeFor].map(pkgName => {
return {
name: pkgName,
message: formatPkgNameAndVersion(pkgName, pkgJsonsByName.get(pkgName).version)
};
})
}])).filter(x => x !== "all packages");

@@ -535,7 +541,4 @@ for (const pkgName of pkgsThatShouldBeMinorBumped) {

if (json.error) {
logger.error(`an error occurred while running \`npm profile get\`: ${json.error.code}`);
logger.error(json.error.summary);
if (json.error.summary) logger.error(json.error.summary);
throw new errors.ExitError(1);
if (json.error || !json.tfa || !json.tfa.mode) {
return false;
}

@@ -675,3 +678,3 @@

token: null,
isRequired: isCI ? Promise.resolve(false) : // note: we're not awaiting this here, we want this request to happen in parallel with getUnpublishedPackages
isRequired: isCI || publicPackages.some(x => x.config.publishConfig && x.config.publishConfig.registry && x.config.publishConfig.registry !== "https://registry.npmjs.org" && x.config.publishConfig.registry !== "https://registry.yarnpkg.com") || process.env.npm_config_registry !== undefined && process.env.npm_config_registry !== "https://registry.npmjs.org" && process.env.npm_config_registry !== "https://registry.yarnpkg.com" ? Promise.resolve(false) : // note: we're not awaiting this here, we want this request to happen in parallel with getUnpublishedPackages
getTokenIsRequired()

@@ -678,0 +681,0 @@ } : {

@@ -176,6 +176,9 @@ "use strict";

const packagesToRelease = await getPackagesToRelease(changedPackages, allPackages);
let pkgJsonsByName = new Map(allPackages.map(({name: name, config: config}) => [ name, config ])), pkgsLeftToGetBumpTypeFor = new Set(packagesToRelease), pkgsThatShouldBeMajorBumped = await askCheckboxPlus(bold(`Which packages should have a ${red("major")} bump?`), packagesToRelease.map(pkgName => ({
name: pkgName,
message: formatPkgNameAndVersion(pkgName, pkgJsonsByName.get(pkgName).version)
})));
let pkgJsonsByName = new Map(allPackages.map(({name: name, config: config}) => [ name, config ])), pkgsLeftToGetBumpTypeFor = new Set(packagesToRelease), pkgsThatShouldBeMajorBumped = (await askCheckboxPlus(bold(`Which packages should have a ${red("major")} bump?`), [ {
name: "all packages",
choices: packagesToRelease.map(pkgName => ({
name: pkgName,
message: formatPkgNameAndVersion(pkgName, pkgJsonsByName.get(pkgName).version)
}))
} ])).filter(x => "all packages" !== x);
for (const pkgName of pkgsThatShouldBeMajorBumped) {

@@ -190,6 +193,9 @@ let pkgJson = pkgJsonsByName.get(pkgName);

if (0 !== pkgsLeftToGetBumpTypeFor.size) {
let pkgsThatShouldBeMinorBumped = await askCheckboxPlus(bold(`Which packages should have a ${green("minor")} bump?`), [ ...pkgsLeftToGetBumpTypeFor ].map(pkgName => ({
name: pkgName,
message: formatPkgNameAndVersion(pkgName, pkgJsonsByName.get(pkgName).version)
})));
let pkgsThatShouldBeMinorBumped = (await askCheckboxPlus(bold(`Which packages should have a ${green("minor")} bump?`), [ {
name: "all packages",
choices: [ ...pkgsLeftToGetBumpTypeFor ].map(pkgName => ({
name: pkgName,
message: formatPkgNameAndVersion(pkgName, pkgJsonsByName.get(pkgName).version)
}))
} ])).filter(x => "all packages" !== x);
for (const pkgName of pkgsThatShouldBeMinorBumped) pkgsLeftToGetBumpTypeFor.delete(pkgName),

@@ -372,6 +378,3 @@ releases.push({

}), json = JSON.parse(result.stdout.toString());
if (json.error) throw logger.error(`an error occurred while running \`npm profile get\`: ${json.error.code}`),
logger.error(json.error.summary), json.error.summary && logger.error(json.error.summary),
new errors.ExitError(1);
return "auth-and-writes" === json.tfa.mode;
return !(json.error || !json.tfa || !json.tfa.mode) && "auth-and-writes" === json.tfa.mode;
}

@@ -447,3 +450,3 @@

token: null,
isRequired: isCI ? Promise.resolve(!1) : getTokenIsRequired()
isRequired: isCI || publicPackages.some(x => x.config.publishConfig && x.config.publishConfig.registry && "https://registry.npmjs.org" !== x.config.publishConfig.registry && "https://registry.yarnpkg.com" !== x.config.publishConfig.registry) || void 0 !== process.env.npm_config_registry && "https://registry.npmjs.org" !== process.env.npm_config_registry && "https://registry.yarnpkg.com" !== process.env.npm_config_registry ? Promise.resolve(!1) : getTokenIsRequired()
} : {

@@ -450,0 +453,0 @@ token: otp,

@@ -255,8 +255,11 @@ import meow from 'meow';

let pkgsLeftToGetBumpTypeFor = new Set(packagesToRelease);
let pkgsThatShouldBeMajorBumped = await askCheckboxPlus(bold(`Which packages should have a ${red("major")} bump?`), packagesToRelease.map(pkgName => {
return {
name: pkgName,
message: formatPkgNameAndVersion(pkgName, pkgJsonsByName.get(pkgName).version)
};
}));
let pkgsThatShouldBeMajorBumped = (await askCheckboxPlus(bold(`Which packages should have a ${red("major")} bump?`), [{
name: "all packages",
choices: packagesToRelease.map(pkgName => {
return {
name: pkgName,
message: formatPkgNameAndVersion(pkgName, pkgJsonsByName.get(pkgName).version)
};
})
}])).filter(x => x !== "all packages");

@@ -280,8 +283,11 @@ for (const pkgName of pkgsThatShouldBeMajorBumped) {

if (pkgsLeftToGetBumpTypeFor.size !== 0) {
let pkgsThatShouldBeMinorBumped = await askCheckboxPlus(bold(`Which packages should have a ${green("minor")} bump?`), [...pkgsLeftToGetBumpTypeFor].map(pkgName => {
return {
name: pkgName,
message: formatPkgNameAndVersion(pkgName, pkgJsonsByName.get(pkgName).version)
};
}));
let pkgsThatShouldBeMinorBumped = (await askCheckboxPlus(bold(`Which packages should have a ${green("minor")} bump?`), [{
name: "all packages",
choices: [...pkgsLeftToGetBumpTypeFor].map(pkgName => {
return {
name: pkgName,
message: formatPkgNameAndVersion(pkgName, pkgJsonsByName.get(pkgName).version)
};
})
}])).filter(x => x !== "all packages");

@@ -531,7 +537,4 @@ for (const pkgName of pkgsThatShouldBeMinorBumped) {

if (json.error) {
error(`an error occurred while running \`npm profile get\`: ${json.error.code}`);
error(json.error.summary);
if (json.error.summary) error(json.error.summary);
throw new ExitError(1);
if (json.error || !json.tfa || !json.tfa.mode) {
return false;
}

@@ -671,3 +674,3 @@

token: null,
isRequired: isCI ? Promise.resolve(false) : // note: we're not awaiting this here, we want this request to happen in parallel with getUnpublishedPackages
isRequired: isCI || publicPackages.some(x => x.config.publishConfig && x.config.publishConfig.registry && x.config.publishConfig.registry !== "https://registry.npmjs.org" && x.config.publishConfig.registry !== "https://registry.yarnpkg.com") || process.env.npm_config_registry !== undefined && process.env.npm_config_registry !== "https://registry.npmjs.org" && process.env.npm_config_registry !== "https://registry.yarnpkg.com" ? Promise.resolve(false) : // note: we're not awaiting this here, we want this request to happen in parallel with getUnpublishedPackages
getTokenIsRequired()

@@ -674,0 +677,0 @@ } : {

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

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

"@babel/runtime": "^7.4.4",
"@changesets/apply-release-plan": "^0.4.1",
"@changesets/apply-release-plan": "^0.4.2",
"@changesets/assemble-release-plan": "^0.3.1",

@@ -30,0 +30,0 @@ "@changesets/config": "^0.3.0",

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc