Socket
Socket
Sign inDemoInstall

release-it

Package Overview
Dependencies
Maintainers
1
Versions
400
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

release-it - npm Package Compare versions

Comparing version 14.12.5 to 14.13.0

1

config/release-it.json

@@ -29,2 +29,3 @@ {

"ignoreVersion": false,
"allowSameVersion": false,
"skipChecks": false,

@@ -31,0 +32,0 @@ "timeout": 10

3

lib/plugin/git/Git.js
const { EOL } = require('os');
const _ = require('lodash');
const execa = require('execa');
const matcher = require('wildcard-match');
const { format, e } = require('../../util');

@@ -97,3 +98,3 @@ const GitBase = require('../GitBase');

const requiredBranches = _.castArray(this.options.requireBranch);
return requiredBranches.includes(branch);
return matcher(requiredBranches)(branch);
}

@@ -100,0 +101,0 @@

@@ -85,3 +85,4 @@ const path = require('path');

const task = () => this.exec(`npm version ${version} --no-git-tag-version`);
const allowSameVersion = this.options.allowSameVersion ? ' --allow-same-version' : '';
const task = () => this.exec(`npm version ${version} --no-git-tag-version${allowSameVersion}`);
return this.spinner.show({ task, label: 'npm version' });

@@ -88,0 +89,0 @@ }

{
"name": "release-it",
"version": "14.12.5",
"version": "14.13.0",
"description": "Generic CLI tool to automate versioning and package publishing related tasks.",

@@ -84,2 +84,3 @@ "keywords": [

"uuid": "8.3.2",
"wildcard-match": "5.1.2",
"yaml": "1.10.2",

@@ -86,0 +87,0 @@ "yargs-parser": "20.2.9"

@@ -27,2 +27,15 @@ const test = require('ava');

test.serial('should not throw if required branch matches', async t => {
const options = { git: { requireBranch: 'ma?*' } };
const gitClient = factory(Git, { options });
await t.notThrowsAsync(gitClient.init());
});
test.serial('should not throw if one of required branch matches', async t => {
const options = { git: { requireBranch: ['release/*', 'hotfix/*'] } };
const gitClient = factory(Git, { options });
sh.exec('git checkout -b release/v1');
await t.notThrowsAsync(gitClient.init());
});
test.serial('should throw if there is no remote Git url', async t => {

@@ -29,0 +42,0 @@ const gitClient = factory(Git, { options: { git } });

@@ -352,1 +352,10 @@ const path = require('path');

});
test('should add allow-same-version argument', async t => {
const options = { npm: { skipChecks: true, allowSameVersion: true } };
const npmClient = factory(npm, { options });
const exec = sinon.stub(npmClient.shell, 'exec').resolves();
await runTasks(npmClient);
const version = exec.args.filter(arg => arg[0].startsWith('npm version'));
t.regex(version[0][0], / --allow-same-version/);
});
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