summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/ci-info
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/ci-info')
-rw-r--r--deps/npm/node_modules/ci-info/CHANGELOG.md17
-rw-r--r--deps/npm/node_modules/ci-info/README.md86
-rw-r--r--deps/npm/node_modules/ci-info/index.js84
-rw-r--r--deps/npm/node_modules/ci-info/package.json27
-rw-r--r--deps/npm/node_modules/ci-info/vendors.json152
5 files changed, 268 insertions, 98 deletions
diff --git a/deps/npm/node_modules/ci-info/CHANGELOG.md b/deps/npm/node_modules/ci-info/CHANGELOG.md
index 0e9f542296..859a0ad12a 100644
--- a/deps/npm/node_modules/ci-info/CHANGELOG.md
+++ b/deps/npm/node_modules/ci-info/CHANGELOG.md
@@ -1,5 +1,22 @@
# Changelog
+## v1.6.0
+
+* feat: add Sail CI support
+* feat: add Buddy support
+* feat: add Bitrise support
+* feat: detect Jenkins PRs
+* feat: detect Drone PRs
+
+## v1.5.1
+
+* fix: use full path to vendors.json
+
+## v1.5.0
+
+* feat: add dsari detection ([#15](https://github.com/watson/ci-info/pull/15))
+* feat: add ci.isPR ([#16](https://github.com/watson/ci-info/pull/16))
+
## v1.4.0
* feat: add Cirrus CI detection ([#13](https://github.com/watson/ci-info/pull/13))
diff --git a/deps/npm/node_modules/ci-info/README.md b/deps/npm/node_modules/ci-info/README.md
index a76fd2e163..c88be8f82d 100644
--- a/deps/npm/node_modules/ci-info/README.md
+++ b/deps/npm/node_modules/ci-info/README.md
@@ -32,28 +32,34 @@ if (ci.isCI) {
Officially supported CI servers:
-- [AWS CodeBuild](https://aws.amazon.com/codebuild/)
-- [AppVeyor](http://www.appveyor.com)
-- [Bamboo](https://www.atlassian.com/software/bamboo) by Atlassian
-- [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines)
-- [Buildkite](https://buildkite.com)
-- [CircleCI](http://circleci.com)
-- [Cirrus CI](https://cirrus-ci.org)
-- [Codeship](https://codeship.com)
-- [Drone](https://drone.io)
-- [GitLab CI](https://about.gitlab.com/gitlab-ci/)
-- [GoCD](https://www.go.cd/)
-- [Hudson](http://hudson-ci.org)
-- [Jenkins CI](https://jenkins-ci.org)
-- [Magnum CI](https://magnum-ci.com)
-- [Semaphore](https://semaphoreci.com)
-- [Shippable](https://www.shippable.com/)
-- [Solano CI](https://www.solanolabs.com/)
-- [Strider CD](https://strider-cd.github.io/)
-- [TaskCluster](http://docs.taskcluster.net)
-- [Team Foundation Server](https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx) by Microsoft
-- [TeamCity](https://www.jetbrains.com/teamcity/) by JetBrains
-- [Travis CI](http://travis-ci.org)
+| Name | Constant |
+|------|----------|
+| [AWS CodeBuild](https://aws.amazon.com/codebuild/) | `ci.CODEBUILD` |
+| [AppVeyor](http://www.appveyor.com) | `ci.APPVEYOR` |
+| [Bamboo](https://www.atlassian.com/software/bamboo) by Atlassian | `ci.BAMBOO` |
+| [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines) | `ci.BITBUCKET` |
+| [Bitrise](https://www.bitrise.io/) | `ci.BITRISE` |
+| [Buddy](https://buddy.works/) | `ci.BUDDY` |
+| [Buildkite](https://buildkite.com) | `ci.BUILDKITE` |
+| [CircleCI](http://circleci.com) | `ci.CIRCLE` |
+| [Cirrus CI](https://cirrus-ci.org) | `ci.CIRRUS` |
+| [Codeship](https://codeship.com) | `ci.CODESHIP` |
+| [Drone](https://drone.io) | `ci.DRONE` |
+| [dsari](https://github.com/rfinnie/dsari) | `ci.DSARI` |
+| [GitLab CI](https://about.gitlab.com/gitlab-ci/) | `ci.GITLAB` |
+| [GoCD](https://www.go.cd/) | `ci.GOCD` |
+| [Hudson](http://hudson-ci.org) | `ci.HUDSON` |
+| [Jenkins CI](https://jenkins-ci.org) | `ci.JENKINS` |
+| [Magnum CI](https://magnum-ci.com) | `ci.MAGNUM` |
+| [Sail CI](https://sail.ci/) | `ci.SAIL` |
+| [Semaphore](https://semaphoreci.com) | `ci.SEMAPHORE` |
+| [Shippable](https://www.shippable.com/) | `ci.SHIPPABLE` |
+| [Solano CI](https://www.solanolabs.com/) | `ci.SOLANO` |
+| [Strider CD](https://strider-cd.github.io/) | `ci.STRIDER` |
+| [TaskCluster](http://docs.taskcluster.net) | `ci.TASKCLUSTER` |
+| [Team Foundation Server](https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx) by Microsoft | `ci.TFS` |
+| [TeamCity](https://www.jetbrains.com/teamcity/) by JetBrains | `ci.TEAMCITY` |
+| [Travis CI](http://travis-ci.org) | `ci.TRAVIS` |
## API
@@ -76,34 +82,20 @@ boolean to be set to `true` if they use certain vendor neutral
environment variables. In those cases `ci.name` will be `null` and no
vendor specific boolean will be set to `true`.
+### `ci.isPR`
+
+A boolean if PR detection is supported for the current CI server. Will
+be `true` if a PR is being tested. Otherwise `false`. If PR detection is
+not supported for the current CI server, the value will be `null`.
+
### `ci.<VENDOR-CONSTANT>`
-The following vendor specific boolean constants are exposed. A constant
-will be `true` if the code is determined to run on the given CI server.
-Otherwise `false`.
+A vendor specific boolean constants is exposed for each support CI
+vendor. A constant will be `true` if the code is determined to run on
+the given CI server. Otherwise `false`.
-- `ci.APPVEYOR`
-- `ci.BAMBOO`
-- `ci.BITBUCKET`
-- `ci.BUILDKITE`
-- `ci.CIRCLE`
-- `ci.CIRRUS`
-- `ci.CODEBUILD`
-- `ci.CODESHIP`
-- `ci.DRONE`
-- `ci.GITLAB`
-- `ci.GOCD`
-- `ci.HUDSON`
-- `ci.JENKINS`
-- `ci.MAGNUM`
-- `ci.SEMAPHORE`
-- `ci.SHIPPABLE`
-- `ci.SOLANO`
-- `ci.STRIDER`
-- `ci.TASKCLUSTER`
-- `ci.TEAMCITY`
-- `ci.TFS` (Team Foundation Server)
-- `ci.TRAVIS`
+Examples of vendor constants are `ci.TRAVIS` or `ci.APPVEYOR`. For a
+complete list, see the support table above.
Deprecated vendor constants that will be removed in the next major
release:
diff --git a/deps/npm/node_modules/ci-info/index.js b/deps/npm/node_modules/ci-info/index.js
index 74750a7c06..27794d49b3 100644
--- a/deps/npm/node_modules/ci-info/index.js
+++ b/deps/npm/node_modules/ci-info/index.js
@@ -1,58 +1,66 @@
'use strict'
-var env = process.env
+var vendors = require('./vendors.json')
-var vendors = [
- // Constant, Name, Envs
- ['APPVEYOR', 'AppVeyor', 'APPVEYOR'],
- ['BAMBOO', 'Bamboo', 'bamboo_planKey'],
- ['BITBUCKET', 'Bitbucket Pipelines', 'BITBUCKET_COMMIT'],
- ['BUILDKITE', 'Buildkite', 'BUILDKITE'],
- ['CIRCLE', 'CircleCI', 'CIRCLECI'],
- ['CIRRUS', 'Cirrus CI', 'CIRRUS_CI'],
- ['CODEBUILD', 'AWS CodeBuild', 'CODEBUILD_BUILD_ARN'],
- ['CODESHIP', 'Codeship', {CI_NAME: 'codeship'}],
- ['DRONE', 'Drone', 'DRONE'],
- ['GITLAB', 'GitLab CI', 'GITLAB_CI'],
- ['GOCD', 'GoCD', 'GO_PIPELINE_LABEL'],
- ['HUDSON', 'Hudson', 'HUDSON_URL'],
- ['JENKINS', 'Jenkins', 'JENKINS_URL', 'BUILD_ID'],
- ['MAGNUM', 'Magnum CI', 'MAGNUM'],
- ['SEMAPHORE', 'Semaphore', 'SEMAPHORE'],
- ['SHIPPABLE', 'Shippable', 'SHIPPABLE'],
- ['SOLANO', 'Solano CI', 'TDDIUM'],
- ['STRIDER', 'Strider CD', 'STRIDER'],
- ['TASKCLUSTER', 'TaskCluster', 'TASK_ID', 'RUN_ID'],
- ['TDDIUM', 'Solano CI', 'TDDIUM'], // Deprecated
- ['TEAMCITY', 'TeamCity', 'TEAMCITY_VERSION'],
- ['TFS', 'Team Foundation Server', 'TF_BUILD'],
- ['TRAVIS', 'Travis CI', 'TRAVIS']
-]
+var env = process.env
// Used for testinging only
Object.defineProperty(exports, '_vendors', {
- value: vendors.map(function (v) { return v[0] })
+ value: vendors.map(function (v) { return v.constant })
})
exports.name = null
+exports.isPR = null
vendors.forEach(function (vendor) {
- var constant = vendor.shift()
- var name = vendor.shift()
- var isCI = vendor.every(function (obj) {
- if (typeof obj === 'string') return !!env[obj]
- return Object.keys(obj).every(function (k) {
- return env[k] === obj[k]
- })
+ var envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]
+ var isCI = envs.every(function (obj) {
+ return checkEnv(obj)
})
- exports[constant] = isCI
- if (isCI) exports.name = name
+
+ exports[vendor.constant] = isCI
+
+ if (isCI) {
+ exports.name = vendor.name
+
+ switch (typeof vendor.pr) {
+ case 'string':
+ // "pr": "CIRRUS_PR"
+ exports.isPR = !!env[vendor.pr]
+ break
+ case 'object':
+ if ('env' in vendor.pr) {
+ // "pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" }
+ exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne
+ } else if ('any' in vendor.pr) {
+ // "pr": { "any": ["ghprbPullId", "CHANGE_ID"] }
+ exports.isPR = vendor.pr.any.some(function (key) {
+ return !!env[key]
+ })
+ } else {
+ // "pr": { "DRONE_BUILD_EVENT": "pull_request" }
+ exports.isPR = checkEnv(vendor.pr)
+ }
+ break
+ default:
+ // PR detection not supported for this vendor
+ exports.isPR = null
+ }
+ }
})
exports.isCI = !!(
- env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip
+ env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari
env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI
env.BUILD_NUMBER || // Jenkins, TeamCity
+ env.RUN_ID || // TaskCluster, dsari
exports.name ||
false
)
+
+function checkEnv (obj) {
+ if (typeof obj === 'string') return !!env[obj]
+ return Object.keys(obj).every(function (k) {
+ return env[k] === obj[k]
+ })
+}
diff --git a/deps/npm/node_modules/ci-info/package.json b/deps/npm/node_modules/ci-info/package.json
index 6c1f1cadab..ac37a5fcc8 100644
--- a/deps/npm/node_modules/ci-info/package.json
+++ b/deps/npm/node_modules/ci-info/package.json
@@ -1,28 +1,28 @@
{
- "_from": "ci-info@1.4.0",
- "_id": "ci-info@1.4.0",
+ "_from": "ci-info@1.6.0",
+ "_id": "ci-info@1.6.0",
"_inBundle": false,
- "_integrity": "sha512-Oqmw2pVfCl8sCL+1QgMywPfdxPJPkC51y4usw0iiE2S9qnEOAqXy8bwl1CpMpnoU39g4iKJTz6QZj+28FvOnjQ==",
+ "_integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==",
"_location": "/ci-info",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "ci-info@1.4.0",
+ "raw": "ci-info@1.6.0",
"name": "ci-info",
"escapedName": "ci-info",
- "rawSpec": "1.4.0",
+ "rawSpec": "1.6.0",
"saveSpec": null,
- "fetchSpec": "1.4.0"
+ "fetchSpec": "1.6.0"
},
"_requiredBy": [
"#USER",
"/",
"/is-ci"
],
- "_resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.4.0.tgz",
- "_shasum": "4841d53cad49f11b827b648ebde27a6e189b412f",
- "_spec": "ci-info@1.4.0",
+ "_resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz",
+ "_shasum": "2ca20dbb9ceb32d4524a683303313f0304b1e497",
+ "_spec": "ci-info@1.6.0",
"_where": "/Users/zkat/Documents/code/work/npm",
"author": {
"name": "Thomas Watson Steen",
@@ -34,15 +34,16 @@
},
"bundleDependencies": false,
"coordinates": [
- 55.0113914,
- 14.9747494
+ 55.778271,
+ 12.593091
],
"dependencies": {},
"deprecated": false,
"description": "Get details about the current Continuous Integration environment",
"devDependencies": {
"clear-require": "^1.0.1",
- "standard": "^11.0.1"
+ "standard": "^12.0.1",
+ "tape": "^4.9.1"
},
"homepage": "https://github.com/watson/ci-info",
"keywords": [
@@ -62,5 +63,5 @@
"scripts": {
"test": "standard && node test.js"
},
- "version": "1.4.0"
+ "version": "1.6.0"
}
diff --git a/deps/npm/node_modules/ci-info/vendors.json b/deps/npm/node_modules/ci-info/vendors.json
new file mode 100644
index 0000000000..a157b78cea
--- /dev/null
+++ b/deps/npm/node_modules/ci-info/vendors.json
@@ -0,0 +1,152 @@
+[
+ {
+ "name": "AppVeyor",
+ "constant": "APPVEYOR",
+ "env": "APPVEYOR",
+ "pr": "APPVEYOR_PULL_REQUEST_NUMBER"
+ },
+ {
+ "name": "Bamboo",
+ "constant": "BAMBOO",
+ "env": "bamboo_planKey"
+ },
+ {
+ "name": "Bitbucket Pipelines",
+ "constant": "BITBUCKET",
+ "env": "BITBUCKET_COMMIT"
+ },
+ {
+ "name": "Bitrise",
+ "constant": "BITRISE",
+ "env": "BITRISE_IO",
+ "pr": "BITRISE_PULL_REQUEST"
+ },
+ {
+ "name": "Buddy",
+ "constant": "BUDDY",
+ "env": "BUDDY_WORKSPACE_ID",
+ "pr": "BUDDY_EXECUTION_PULL_REQUEST_ID"
+ },
+ {
+ "name": "Buildkite",
+ "constant": "BUILDKITE",
+ "env": "BUILDKITE",
+ "pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" }
+ },
+ {
+ "name": "CircleCI",
+ "constant": "CIRCLE",
+ "env": "CIRCLECI",
+ "pr": "CIRCLE_PULL_REQUEST"
+ },
+ {
+ "name": "Cirrus CI",
+ "constant": "CIRRUS",
+ "env": "CIRRUS_CI",
+ "pr": "CIRRUS_PR"
+ },
+ {
+ "name": "AWS CodeBuild",
+ "constant": "CODEBUILD",
+ "env": "CODEBUILD_BUILD_ARN"
+ },
+ {
+ "name": "Codeship",
+ "constant": "CODESHIP",
+ "env": { "CI_NAME": "codeship" }
+ },
+ {
+ "name": "Drone",
+ "constant": "DRONE",
+ "env": "DRONE",
+ "pr": { "DRONE_BUILD_EVENT": "pull_request" }
+ },
+ {
+ "name": "dsari",
+ "constant": "DSARI",
+ "env": "DSARI"
+ },
+ {
+ "name": "GitLab CI",
+ "constant": "GITLAB",
+ "env": "GITLAB_CI"
+ },
+ {
+ "name": "GoCD",
+ "constant": "GOCD",
+ "env": "GO_PIPELINE_LABEL"
+ },
+ {
+ "name": "Hudson",
+ "constant": "HUDSON",
+ "env": "HUDSON_URL"
+ },
+ {
+ "name": "Jenkins",
+ "constant": "JENKINS",
+ "env": ["JENKINS_URL", "BUILD_ID"],
+ "pr": { "any": ["ghprbPullId", "CHANGE_ID"] }
+ },
+ {
+ "name": "Magnum CI",
+ "constant": "MAGNUM",
+ "env": "MAGNUM"
+ },
+ {
+ "name": "Sail CI",
+ "constant": "SAIL",
+ "env": "SAILCI",
+ "pr": "SAIL_PULL_REQUEST_NUMBER"
+ },
+ {
+ "name": "Semaphore",
+ "constant": "SEMAPHORE",
+ "env": "SEMAPHORE",
+ "pr": "PULL_REQUEST_NUMBER"
+ },
+ {
+ "name": "Shippable",
+ "constant": "SHIPPABLE",
+ "env": "SHIPPABLE",
+ "pr": { "IS_PULL_REQUEST": "true" }
+ },
+ {
+ "name": "Solano CI",
+ "constant": "SOLANO",
+ "env": "TDDIUM",
+ "pr": "TDDIUM_PR_ID"
+ },
+ {
+ "name": "Strider CD",
+ "constant": "STRIDER",
+ "env": "STRIDER"
+ },
+ {
+ "name": "TaskCluster",
+ "constant": "TASKCLUSTER",
+ "env": ["TASK_ID", "RUN_ID"]
+ },
+ {
+ "name": "Solano CI",
+ "constant": "TDDIUM",
+ "env": "TDDIUM",
+ "pr": "TDDIUM_PR_ID",
+ "deprecated": true
+ },
+ {
+ "name": "TeamCity",
+ "constant": "TEAMCITY",
+ "env": "TEAMCITY_VERSION"
+ },
+ {
+ "name": "Team Foundation Server",
+ "constant": "TFS",
+ "env": "TF_BUILD"
+ },
+ {
+ "name": "Travis CI",
+ "constant": "TRAVIS",
+ "env": "TRAVIS",
+ "pr": { "env": "TRAVIS_PULL_REQUEST", "ne": "false" }
+ }
+]