commit-message-install
Advanced tools
Comparing version 1.6.1 to 1.7.0
@@ -1,1 +0,1 @@ | ||
{"name":"commit-message-install","description":"NPM install a package by name taken from the last commit message","version":"1.6.1","author":"Gleb Bahmutov <gleb.bahmutov@gmail.com>","bugs":"https://github.com/cypress-io/commit-message-install/issues","bin":{"commit-message-install":"bin/commit-message-install.js","cmi":"bin/commit-message-install.js","run-if":"bin/commit-message-run.js"},"config":{"pre-git":{"commit-msg":"simple","pre-commit":["npm prune","npm run deps","npm test","git add src/*.js bin/*.js","npm run ban"],"pre-push":["npm run secure","npm run license","npm run ban -- --all","npm run size"],"post-commit":[],"post-merge":[]}},"engines":{"node":">=6"},"files":["bin","src/*.js","!src/*-spec.js"],"homepage":"https://github.com/cypress-io/commit-message-install#readme","keywords":["ci","commit","git","install","npm","utility"],"license":"MIT","main":"src/","publishConfig":{"registry":"http://registry.npmjs.org/"},"repository":{"type":"git","url":"https://github.com/cypress-io/commit-message-install.git"},"scripts":{"ban":"ban","deps":"deps-ok && dependency-check --no-dev .","issues":"git-issues","license":"license-checker --production --onlyunknown --csv","lint":"standard --verbose --fix src/*.js bin/*.js","prelint":"npm run pretty","pretest":"npm run lint","pretty":"echo ⚠️ disable prettier-standard 'src/*.js' 'bin/*.js'","secure":"echo disabled nsp check","size":"t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";","test":"npm run unit","unit":"mocha src/*-spec.js","semantic-release":"semantic-release pre && npm publish && semantic-release post","demo":"node bin/commit-message-run.js -f test/run-if.txt echo Foo is \\$FOO"},"release":{"verifyConditions":{"path":"condition-node-version","node":"8"},"analyzeCommits":"simple-commit-message","generateNotes":"github-post-release","verifyRelease":{"path":"dont-crack","test-against":[]}},"devDependencies":{"ban-sensitive-files":"1.9.0","common-tags":"1.5.1","condition-node-version":"1.3.0","dependency-check":"2.9.1","deps-ok":"1.2.1","dont-crack":"1.2.1","git-issues":"1.3.1","github-post-release":"1.13.1","if-node-version":"1.1.1","license-checker":"15.0.0","mocha":"4.0.1","nsp":"2.8.1","pre-git":"3.15.3","prettier-standard":"7.0.3","schema-shot":"1.9.0","semantic-release":"8.2.0","simple-commit-message":"3.3.1","snap-shot-it":"4.0.1","standard":"10.0.3","stub-spawn-once":"2.3.0"},"dependencies":{"chalk":"2.3.0","check-more-types":"2.24.0","debug":"3.1.0","execa":"0.8.0","lazy-ass":"1.6.0","minimist":"1.2.0"}} | ||
{"name":"commit-message-install","description":"NPM install a package by name taken from the last commit message","version":"1.7.0","author":"Gleb Bahmutov <gleb.bahmutov@gmail.com>","bugs":"https://github.com/cypress-io/commit-message-install/issues","bin":{"commit-message-install":"bin/commit-message-install.js","cmi":"bin/commit-message-install.js","run-if":"bin/commit-message-run.js"},"config":{"pre-git":{"commit-msg":"simple","pre-commit":["npm prune","npm run deps","npm test","git add src/*.js bin/*.js","npm run ban"],"pre-push":["npm run secure","npm run license","npm run ban -- --all","npm run size"],"post-commit":[],"post-merge":[]}},"engines":{"node":">=6"},"files":["bin","src/*.js","!src/*-spec.js"],"homepage":"https://github.com/cypress-io/commit-message-install#readme","keywords":["ci","commit","git","install","npm","utility"],"license":"MIT","main":"src/","publishConfig":{"registry":"http://registry.npmjs.org/"},"repository":{"type":"git","url":"https://github.com/cypress-io/commit-message-install.git"},"scripts":{"ban":"ban","deps":"deps-ok && dependency-check --no-dev .","issues":"git-issues","license":"license-checker --production --onlyunknown --csv","lint":"standard --verbose --fix src/*.js bin/*.js","prelint":"npm run pretty","pretest":"npm run lint","pretty":"echo ⚠️ disable prettier-standard 'src/*.js' 'bin/*.js'","secure":"echo disabled nsp check","size":"t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";","test":"npm run unit","unit":"mocha src/*-spec.js","semantic-release":"semantic-release pre && npm publish && semantic-release post","demo":"node bin/commit-message-run.js -f test/run-if.txt echo Foo is \\$FOO"},"release":{"verifyConditions":{"path":"condition-node-version","node":"8"},"analyzeCommits":"simple-commit-message","generateNotes":"github-post-release","verifyRelease":{"path":"dont-crack","test-against":[]}},"devDependencies":{"ban-sensitive-files":"1.9.0","common-tags":"1.5.1","condition-node-version":"1.3.0","dependency-check":"2.9.1","deps-ok":"1.2.1","dont-crack":"1.2.1","git-issues":"1.3.1","github-post-release":"1.13.1","if-node-version":"1.1.1","license-checker":"15.0.0","mocha":"4.0.1","nsp":"2.8.1","pre-git":"3.15.3","prettier-standard":"7.0.3","schema-shot":"1.9.0","semantic-release":"8.2.0","simple-commit-message":"3.3.1","snap-shot-it":"4.0.1","standard":"10.0.3","stub-spawn-once":"2.3.0"},"dependencies":{"chalk":"2.3.0","check-more-types":"2.24.0","debug":"3.1.0","execa":"0.8.0","lazy-ass":"1.6.0","minimist":"1.2.0"}} |
@@ -102,10 +102,10 @@ # commit-message-install | ||
const {getInstallJson} = require('commit-message-install') | ||
// package(s), env, platform | ||
const json = getInstallJson('foo', {foo: 42}, 'linux') | ||
// package(s), env, platform, branch name (optional) | ||
const json = getInstallJson('foo', {foo: 42}, 'linux', 'test-branch') | ||
// returns an object | ||
// {platform: "linux", env: {foo: 42}, packages: "foo"} | ||
// {platform: "linux", env: {foo: 42}, packages: "foo", branch: "test-branch"} | ||
``` | ||
You can pass individual package name like `debug` or several as a single string `debug chalk` | ||
or a list `['debug', 'chalk']` | ||
You can pass individual package name like `debug` or several as a single string | ||
`debug chalk` or a list `['debug', 'chalk']` | ||
@@ -112,0 +112,0 @@ You can pass for platform either individual `os.platform()` or a "*"" for all, and even |
@@ -170,3 +170,3 @@ 'use strict' | ||
// forms JSON object that can be parsed later | ||
function getInstallJson (packages, env, platform) { | ||
function getInstallJson (packages, env, platform, branch) { | ||
if (!env) { | ||
@@ -194,2 +194,8 @@ env = {} | ||
} | ||
if (branch) { | ||
la(is.unemptyString(branch), 'invalid branch name', branch) | ||
debug('branch name', branch) | ||
json.branch = branch | ||
} | ||
la( | ||
@@ -196,0 +202,0 @@ isNpmInstall(json), |
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
16201
304