From 4f42400908a454d800ce5de5b9a5b3d3086269f9 Mon Sep 17 00:00:00 2001 From: Sibiraj Date: Sat, 28 Jul 2018 12:40:51 +0530 Subject: [PATCH 1/4] cli: don't run update-notifier in CI environment --- bin/npm-cli.js | 3 ++- package.json | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/npm-cli.js b/bin/npm-cli.js index e4da63c9795d3..6488b3b45d4f9 100755 --- a/bin/npm-cli.js +++ b/bin/npm-cli.js @@ -83,9 +83,10 @@ ) { const pkg = require('../package.json') let notifier = require('update-notifier')({pkg}) + const isCI = require('is-ci') if ( notifier.update && - notifier.update.latest !== pkg.version + notifier.update.latest !== pkg.version && !isCI ) { const color = require('ansicolors') const useColor = npm.config.get('color') diff --git a/package.json b/package.json index c144ff23b8bc9..9b114200e50dd 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,7 @@ "inherits": "~2.0.3", "ini": "^1.3.5", "init-package-json": "^1.10.3", + "is-ci": "^1.1.0", "is-cidr": "^2.0.6", "json-parse-better-errors": "^1.0.2", "lazy-property": "~1.0.0", From a200e83a54e3ac5e7c3256e08f368dcfddefd0bf Mon Sep 17 00:00:00 2001 From: Sibiraj <20282546+Sibiraj-S@users.noreply.github.com> Date: Sat, 28 Jul 2018 14:08:15 +0530 Subject: [PATCH 2/4] chore: update bundleDependencies --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 9b114200e50dd..73ff5a3d66c93 100644 --- a/package.json +++ b/package.json @@ -178,6 +178,7 @@ "inherits", "ini", "init-package-json", + "is-ci", "is-cidr", "json-parse-better-errors", "JSONStream", From 158649a2a5591aee892f9c53dcb672db0d00f499 Mon Sep 17 00:00:00 2001 From: Sibiraj Date: Tue, 14 Aug 2018 14:18:13 +0530 Subject: [PATCH 3/4] perf: use `ci-info` instead of `is-ci` --- bin/npm-cli.js | 5 +++-- node_modules/ci-info/package.json | 23 +++++++++++++---------- package-lock.json | 6 +++--- package.json | 4 ++-- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/bin/npm-cli.js b/bin/npm-cli.js index 6488b3b45d4f9..6f76b23828531 100755 --- a/bin/npm-cli.js +++ b/bin/npm-cli.js @@ -83,10 +83,11 @@ ) { const pkg = require('../package.json') let notifier = require('update-notifier')({pkg}) - const isCI = require('is-ci') + const isCI = require('ci-info').isCI if ( notifier.update && - notifier.update.latest !== pkg.version && !isCI + notifier.update.latest !== pkg.version && + !isCI ) { const color = require('ansicolors') const useColor = npm.config.get('color') diff --git a/node_modules/ci-info/package.json b/node_modules/ci-info/package.json index 51a3ed5d22918..47415cb9f25a4 100644 --- a/node_modules/ci-info/package.json +++ b/node_modules/ci-info/package.json @@ -1,27 +1,32 @@ { - "_from": "ci-info@^1.0.0", + "_args": [ + [ + "ci-info@1.1.3", + "." + ] + ], + "_from": "ci-info@1.1.3", "_id": "ci-info@1.1.3", "_inBundle": false, "_integrity": "sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg==", "_location": "/ci-info", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "ci-info@^1.0.0", + "raw": "ci-info@1.1.3", "name": "ci-info", "escapedName": "ci-info", - "rawSpec": "^1.0.0", + "rawSpec": "1.1.3", "saveSpec": null, - "fetchSpec": "^1.0.0" + "fetchSpec": "1.1.3" }, "_requiredBy": [ "/is-ci" ], "_resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.3.tgz", - "_shasum": "710193264bb05c77b8c90d02f5aaf22216a667b2", - "_spec": "ci-info@^1.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/is-ci", + "_spec": "1.1.3", + "_where": ".", "author": { "name": "Thomas Watson Steen", "email": "w@tson.dk", @@ -30,13 +35,11 @@ "bugs": { "url": "https://github.com/watson/ci-info/issues" }, - "bundleDependencies": false, "coordinates": [ 55.777613, 12.589943 ], "dependencies": {}, - "deprecated": false, "description": "Get details about the current Continuous Integration environment", "devDependencies": { "clear-require": "^1.0.1", diff --git a/package-lock.json b/package-lock.json index 24b78ee9ecf70..cfad50c767180 100644 --- a/package-lock.json +++ b/package-lock.json @@ -429,9 +429,9 @@ "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=" }, "ci-info": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.3.tgz", - "integrity": "sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.2.0.tgz", + "integrity": "sha512-U4aoLsSz44FhOyZ2E7bCufaBr2IUzNYujBd+b9vHiFH7SUzIhKcD94PQP5QSFn7ngPof6OF2yPk4/hygqwMJhA==" }, "cidr-regex": { "version": "2.0.9", diff --git a/package.json b/package.json index 73ff5a3d66c93..104c7d71af095 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "cacache": "^11.1.0", "call-limit": "~1.1.0", "chownr": "~1.0.1", + "ci-info": "^1.2.0", "cli-columns": "^3.1.2", "cli-table3": "^0.5.0", "cmd-shim": "~2.0.2", @@ -68,7 +69,6 @@ "inherits": "~2.0.3", "ini": "^1.3.5", "init-package-json": "^1.10.3", - "is-ci": "^1.1.0", "is-cidr": "^2.0.6", "json-parse-better-errors": "^1.0.2", "lazy-property": "~1.0.0", @@ -155,6 +155,7 @@ "bluebird", "bin-links", "chownr", + "ci-info", "cmd-shim", "columnify", "config-chain", @@ -178,7 +179,6 @@ "inherits", "ini", "init-package-json", - "is-ci", "is-cidr", "json-parse-better-errors", "JSONStream", From 62f6b5d50479b432d2d7f212ebda1e036eaf74a2 Mon Sep 17 00:00:00 2001 From: Sibiraj Date: Thu, 16 Aug 2018 22:13:14 +0530 Subject: [PATCH 4/4] chore: bump ci-info to v1.3.1 --- node_modules/ci-info/LICENSE | 2 +- node_modules/ci-info/README.md | 17 +++++++++++++--- node_modules/ci-info/index.js | 33 +++++++++++++++++-------------- node_modules/ci-info/package.json | 29 ++++++++++++++------------- package-lock.json | 6 +++--- package.json | 2 +- 6 files changed, 52 insertions(+), 37 deletions(-) diff --git a/node_modules/ci-info/LICENSE b/node_modules/ci-info/LICENSE index 4a59c94175c2a..67846832ecc30 100644 --- a/node_modules/ci-info/LICENSE +++ b/node_modules/ci-info/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016-2017 Thomas Watson Steen +Copyright (c) 2016-2018 Thomas Watson Steen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/ci-info/README.md b/node_modules/ci-info/README.md index 2c6cccf2be953..8e91c3164c8cf 100644 --- a/node_modules/ci-info/README.md +++ b/node_modules/ci-info/README.md @@ -2,9 +2,11 @@ Get details about the current Continuous Integration environment. -Please [open an issue](https://github.com/watson/ci-info/issues) if your -CI server isn't properly detected :) +Please [open an +issue](https://github.com/watson/ci-info/issues/new?template=ci-server-not-detected.md) +if your CI server isn't properly detected :) +[![npm](https://img.shields.io/npm/v/ci-info.svg)](https://www.npmjs.com/package/ci-info) [![Build status](https://travis-ci.org/watson/ci-info.svg?branch=master)](https://travis-ci.org/watson/ci-info) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard) @@ -44,6 +46,8 @@ Officially supported CI servers: - [Jenkins CI](https://jenkins-ci.org) - [Magnum CI](https://magnum-ci.com) - [Semaphore](https://semaphoreci.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 @@ -89,12 +93,19 @@ Otherwise `false`. - `ci.HUDSON` - `ci.JENKINS` - `ci.MAGNUM` +- `ci.SOLANO` - `ci.SEMAPHORE` +- `ci.STRIDER` - `ci.TASKCLUSTER` - `ci.TEAMCITY` - `ci.TFS` (Team Foundation Server) - `ci.TRAVIS` +Deprecated vendor constants that will be removed in the next major +release: + +- `ci.TDDIUM` (Solano CI) This have been renamed `ci.SOLANO` + ## License -MIT +[MIT](LICENSE) diff --git a/node_modules/ci-info/index.js b/node_modules/ci-info/index.js index e716e34b31680..48a2982305caf 100644 --- a/node_modules/ci-info/index.js +++ b/node_modules/ci-info/index.js @@ -4,24 +4,27 @@ var env = process.env var vendors = [ // Constant, Name, Envs - ['TRAVIS', 'Travis CI', 'TRAVIS'], - ['CIRCLE', 'CircleCI', 'CIRCLECI'], - ['GITLAB', 'GitLab CI', 'GITLAB_CI'], ['APPVEYOR', 'AppVeyor', 'APPVEYOR'], + ['BAMBOO', 'Bamboo', 'bamboo_planKey'], + ['BITBUCKET', 'Bitbucket Pipelines', 'BITBUCKET_COMMIT'], + ['BUILDKITE', 'Buildkite', 'BUILDKITE'], + ['CIRCLE', 'CircleCI', 'CIRCLECI'], + ['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'], - ['JENKINS', 'Jenkins', 'JENKINS_URL', 'BUILD_ID'], - ['BAMBOO', 'Bamboo', 'bamboo_planKey'], - ['TFS', 'Team Foundation Server', 'TF_BUILD'], - ['TEAMCITY', 'TeamCity', 'TEAMCITY_VERSION'], - ['BUILDKITE', 'Buildkite', 'BUILDKITE'], - ['HUDSON', 'Hudson', 'HUDSON_URL'], + ['SOLANO', 'Solano CI', 'TDDIUM'], + ['STRIDER', 'Strider CD', 'STRIDER'], ['TASKCLUSTER', 'TaskCluster', 'TASK_ID', 'RUN_ID'], - ['GOCD', 'GoCD', 'GO_PIPELINE_LABEL'], - ['BITBUCKET', 'Bitbucket Pipelines', 'BITBUCKET_COMMIT'], - ['CODEBUILD', 'AWS CodeBuild', 'CODEBUILD_BUILD_ARN'] + ['TDDIUM', 'Solano CI', 'TDDIUM'], // Deprecated + ['TEAMCITY', 'TeamCity', 'TEAMCITY_VERSION'], + ['TFS', 'Team Foundation Server', 'TF_BUILD'], + ['TRAVIS', 'Travis CI', 'TRAVIS'] ] exports.name = null @@ -40,9 +43,9 @@ vendors.forEach(function (vendor) { }) exports.isCI = !!( - env.CI || // Travis CI, CircleCI, Gitlab CI, Appveyor, CodeShip - env.CONTINUOUS_INTEGRATION || // Travis CI - env.BUILD_NUMBER || // Jenkins, TeamCity + env.CI || // Travis CI, CircleCI, Gitlab CI, Appveyor, CodeShip + env.CONTINUOUS_INTEGRATION || // Travis CI + env.BUILD_NUMBER || // Jenkins, TeamCity exports.name || false ) diff --git a/node_modules/ci-info/package.json b/node_modules/ci-info/package.json index 47415cb9f25a4..7f5c4434a3591 100644 --- a/node_modules/ci-info/package.json +++ b/node_modules/ci-info/package.json @@ -1,31 +1,32 @@ { "_args": [ [ - "ci-info@1.1.3", - "." + "ci-info@1.3.1", + "/Users/sibiraj/Documents/cli" ] ], - "_from": "ci-info@1.1.3", - "_id": "ci-info@1.1.3", + "_from": "ci-info@1.3.1", + "_id": "ci-info@1.3.1", "_inBundle": false, - "_integrity": "sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg==", + "_integrity": "sha512-l4wK/SFEN8VVTQ9RO1I5yzIL2vw1w6My29qA6Gwaec80QeHxfXbruuUWqn1knyMoJn/X5kav3zVY1TlRHSKeIA==", "_location": "/ci-info", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "ci-info@1.1.3", + "raw": "ci-info@1.3.1", "name": "ci-info", "escapedName": "ci-info", - "rawSpec": "1.1.3", + "rawSpec": "1.3.1", "saveSpec": null, - "fetchSpec": "1.1.3" + "fetchSpec": "1.3.1" }, "_requiredBy": [ + "/", "/is-ci" ], - "_resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.3.tgz", - "_spec": "1.1.3", + "_resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.3.1.tgz", + "_spec": "1.3.1", "_where": ".", "author": { "name": "Thomas Watson Steen", @@ -36,14 +37,14 @@ "url": "https://github.com/watson/ci-info/issues" }, "coordinates": [ - 55.777613, - 12.589943 + 55.777514, + 12.592202 ], "dependencies": {}, "description": "Get details about the current Continuous Integration environment", "devDependencies": { "clear-require": "^1.0.1", - "standard": "^10.0.3" + "standard": "^11.0.1" }, "homepage": "https://github.com/watson/ci-info", "keywords": [ @@ -63,5 +64,5 @@ "scripts": { "test": "standard && node test.js" }, - "version": "1.1.3" + "version": "1.3.1" } diff --git a/package-lock.json b/package-lock.json index cfad50c767180..cd6658481f022 100644 --- a/package-lock.json +++ b/package-lock.json @@ -429,9 +429,9 @@ "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=" }, "ci-info": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.2.0.tgz", - "integrity": "sha512-U4aoLsSz44FhOyZ2E7bCufaBr2IUzNYujBd+b9vHiFH7SUzIhKcD94PQP5QSFn7ngPof6OF2yPk4/hygqwMJhA==" + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.3.1.tgz", + "integrity": "sha512-l4wK/SFEN8VVTQ9RO1I5yzIL2vw1w6My29qA6Gwaec80QeHxfXbruuUWqn1knyMoJn/X5kav3zVY1TlRHSKeIA==" }, "cidr-regex": { "version": "2.0.9", diff --git a/package.json b/package.json index 104c7d71af095..2f6456b1ccc63 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "cacache": "^11.1.0", "call-limit": "~1.1.0", "chownr": "~1.0.1", - "ci-info": "^1.2.0", + "ci-info": "^1.3.1", "cli-columns": "^3.1.2", "cli-table3": "^0.5.0", "cmd-shim": "~2.0.2",