Skip to content

Commit a351685

Browse files
authoredNov 16, 2022
deps: move from @npmcli/ci-detect to ci-info (#5858)
See watson/ci-info#95 for more context on achieving parity between these two modules. This changes npm to use `ci-info` instead of `@npmcli/ci-detect`. Everything that npm currently flags as a CI environment should still be doing so, so there is no breaking change there. There is going to be a subtle difference in the `ci-name` config, which nothing in npm currently looks at anyways, as well as the ci name that shows up in the default `user-agent` string. Some providers will be slightly different (i.e. circle-ci vs circleci and cirrus vs cirrus-ci)
1 parent 3f13818 commit a351685

24 files changed

+515
-167
lines changed
 

‎DEPENDENCIES.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ graph LR;
3232
libnpmexec-->minify-registry-metadata;
3333
libnpmexec-->npm-package-arg;
3434
libnpmexec-->npmcli-arborist["@npmcli/arborist"];
35-
libnpmexec-->npmcli-ci-detect["@npmcli/ci-detect"];
3635
libnpmexec-->npmcli-eslint-config["@npmcli/eslint-config"];
3736
libnpmexec-->npmcli-run-script["@npmcli/run-script"];
3837
libnpmexec-->npmcli-template-oss["@npmcli/template-oss"];
@@ -113,7 +112,6 @@ graph LR;
113112
npm-->npm-registry-fetch;
114113
npm-->npm-user-validate;
115114
npm-->npmcli-arborist["@npmcli/arborist"];
116-
npm-->npmcli-ci-detect["@npmcli/ci-detect"];
117115
npm-->npmcli-config["@npmcli/config"];
118116
npm-->npmcli-docs["@npmcli/docs"];
119117
npm-->npmcli-eslint-config["@npmcli/eslint-config"];
@@ -353,11 +351,11 @@ graph LR;
353351
libnpmdiff-->tar;
354352
libnpmexec-->bin-links;
355353
libnpmexec-->chalk;
354+
libnpmexec-->ci-info;
356355
libnpmexec-->minify-registry-metadata;
357356
libnpmexec-->mkdirp;
358357
libnpmexec-->npm-package-arg;
359358
libnpmexec-->npmcli-arborist["@npmcli/arborist"];
360-
libnpmexec-->npmcli-ci-detect["@npmcli/ci-detect"];
361359
libnpmexec-->npmcli-eslint-config["@npmcli/eslint-config"];
362360
libnpmexec-->npmcli-run-script["@npmcli/run-script"];
363361
libnpmexec-->npmcli-template-oss["@npmcli/template-oss"];
@@ -476,6 +474,7 @@ graph LR;
476474
npm-->archy;
477475
npm-->cacache;
478476
npm-->chalk;
477+
npm-->ci-info;
479478
npm-->cli-columns;
480479
npm-->cli-table3;
481480
npm-->columnify;
@@ -519,7 +518,6 @@ graph LR;
519518
npm-->npm-registry-fetch;
520519
npm-->npm-user-validate;
521520
npm-->npmcli-arborist["@npmcli/arborist"];
522-
npm-->npmcli-ci-detect["@npmcli/ci-detect"];
523521
npm-->npmcli-config["@npmcli/config"];
524522
npm-->npmcli-docs["@npmcli/docs"];
525523
npm-->npmcli-eslint-config["@npmcli/eslint-config"];
@@ -783,4 +781,4 @@ packages higher up the chain.
783781
- @npmcli/git, make-fetch-happen, @npmcli/config, init-package-json
784782
- @npmcli/installed-package-contents, @npmcli/map-workspaces, cacache, npm-pick-manifest, @npmcli/run-script, read-package-json, promzard
785783
- @npmcli/docs, @npmcli/fs, npm-bundled, read-package-json-fast, unique-filename, npm-install-checks, npm-package-arg, npm-packlist, normalize-package-data, @npmcli/package-json, bin-links, nopt, npmlog, parse-conflict-json, read
786-
- @npmcli/eslint-config, @npmcli/template-oss, ignore-walk, semver, npm-normalize-package-bin, @npmcli/name-from-folder, json-parse-even-better-errors, fs-minipass, ssri, unique-slug, @npmcli/promise-spawn, hosted-git-info, proc-log, validate-npm-package-name, @npmcli/node-gyp, minipass-fetch, @npmcli/query, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, are-we-there-yet, gauge, treeverse, minify-registry-metadata, ini, @npmcli/disparity-colors, @npmcli/ci-detect, mute-stream, npm-audit-report, npm-user-validate
784+
- @npmcli/eslint-config, @npmcli/template-oss, ignore-walk, semver, npm-normalize-package-bin, @npmcli/name-from-folder, json-parse-even-better-errors, fs-minipass, ssri, unique-slug, @npmcli/promise-spawn, hosted-git-info, proc-log, validate-npm-package-name, @npmcli/node-gyp, minipass-fetch, @npmcli/query, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, are-we-there-yet, gauge, treeverse, minify-registry-metadata, ini, @npmcli/disparity-colors, mute-stream, npm-audit-report, npm-user-validate

‎lib/utils/config/definitions.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ module.exports = definitions
44
const Definition = require('./definition.js')
55

66
const { version: npmVersion } = require('../../../package.json')
7-
const ciDetect = require('@npmcli/ci-detect')
8-
const ciName = ciDetect()
7+
const ciInfo = require('ci-info')
98
const querystring = require('querystring')
109
const { isWindows } = require('../is-windows.js')
1110
const { join } = require('path')
@@ -433,7 +432,7 @@ define('cert', {
433432
})
434433

435434
define('ci-name', {
436-
default: ciName || null,
435+
default: ciInfo.name ? ciInfo.name.toLowerCase().split(' ').join('-') : null,
437436
defaultDescription: `
438437
The name of the current CI system, or \`null\` when not on a known CI
439438
platform.
@@ -442,7 +441,7 @@ define('ci-name', {
442441
description: `
443442
The name of a continuous integration system. If not set explicitly, npm
444443
will detect the current CI environment using the
445-
[\`@npmcli/ci-detect\`](http://npm.im/@npmcli/ci-detect) module.
444+
[\`ci-info\`](http://npm.im/@npmcli/ci-info) module.
446445
`,
447446
flatten,
448447
})
@@ -1597,7 +1596,7 @@ define('production', {
15971596
})
15981597

15991598
define('progress', {
1600-
default: !ciName,
1599+
default: !ciInfo.isCI,
16011600
defaultDescription: `
16021601
\`true\` unless running in a known CI system
16031602
`,

‎lib/utils/update-notifier.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Check daily for betas, and weekly otherwise.
44

55
const pacote = require('pacote')
6-
const ciDetect = require('@npmcli/ci-detect')
6+
const ciInfo = require('ci-info')
77
const semver = require('semver')
88
const chalk = require('chalk')
99
const { promisify } = require('util')
@@ -39,7 +39,7 @@ const updateNotifier = async (npm, spec = 'latest') => {
3939
// never check for updates in CI, when updating npm already, or opted out
4040
if (!npm.config.get('update-notifier') ||
4141
isGlobalNpmUpdate(npm) ||
42-
ciDetect()) {
42+
ciInfo.isCI) {
4343
return SKIP
4444
}
4545

‎node_modules/.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
!/@npmcli/
1616
/@npmcli/*
1717
!/@npmcli/arborist
18-
!/@npmcli/ci-detect
1918
!/@npmcli/config
2019
!/@npmcli/disparity-colors
2120
!/@npmcli/fs
@@ -55,6 +54,7 @@
5554
!/cacache
5655
!/chalk
5756
!/chownr
57+
!/ci-info
5858
!/cidr-regex
5959
!/clean-stack
6060
!/cli-columns

‎node_modules/@npmcli/ci-detect/LICENSE

-15
This file was deleted.

‎node_modules/@npmcli/ci-detect/lib/index.js

-52
This file was deleted.

‎node_modules/@npmcli/ci-detect/package.json

-44
This file was deleted.

‎node_modules/ci-info/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016-2021 Thomas Watson Steen
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎node_modules/ci-info/index.d.ts

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/**
2+
* Returns a boolean. Will be `true` if the code is running on a CI server,
3+
* otherwise `false`.
4+
*
5+
* Some CI servers not listed here might still trigger the `ci.isCI`
6+
* boolean to be set to `true` if they use certain vendor neutral environment
7+
* variables. In those cases `ci.name` will be `null` and no vendor specific
8+
* boolean will be set to `true`.
9+
*/
10+
export const isCI: boolean;
11+
/**
12+
* Returns a boolean if PR detection is supported for the current CI server.
13+
* Will be `true` if a PR is being tested, otherwise `false`. If PR detection is
14+
* not supported for the current CI server, the value will be `null`.
15+
*/
16+
export const isPR: boolean | null;
17+
/**
18+
* Returns a string containing name of the CI server the code is running on. If
19+
* CI server is not detected, it returns `null`.
20+
*
21+
* Don't depend on the value of this string not to change for a specific vendor.
22+
* If you find your self writing `ci.name === 'Travis CI'`, you most likely want
23+
* to use `ci.TRAVIS` instead.
24+
*/
25+
export const name: string | null;
26+
27+
export const APPVEYOR: boolean;
28+
export const AZURE_PIPELINES: boolean;
29+
export const APPCIRCLE: boolean;
30+
export const BAMBOO: boolean;
31+
export const BITBUCKET: boolean;
32+
export const BITRISE: boolean;
33+
export const BUDDY: boolean;
34+
export const BUILDKITE: boolean;
35+
export const CIRCLE: boolean;
36+
export const CIRRUS: boolean;
37+
export const CODEBUILD: boolean;
38+
export const CODEMAGIC: boolean;
39+
export const CODEFRESH: boolean;
40+
export const CODESHIP: boolean;
41+
export const DRONE: boolean;
42+
export const DSARI: boolean;
43+
export const EAS: boolean;
44+
export const GERRIT: boolean;
45+
export const GITHUB_ACTIONS: boolean;
46+
export const GITLAB: boolean;
47+
export const GOCD: boolean;
48+
export const GOOGLE_CLOUD_BUILD: boolean;
49+
export const HEROKU: boolean;
50+
export const HUDSON: boolean;
51+
export const JENKINS: boolean;
52+
export const LAYERCI: boolean;
53+
export const MAGNUM: boolean;
54+
export const NETLIFY: boolean;
55+
export const NEVERCODE: boolean;
56+
export const RENDER: boolean;
57+
export const SAIL: boolean;
58+
export const SEMAPHORE: boolean;
59+
export const SCREWDRIVER: boolean;
60+
export const SHIPPABLE: boolean;
61+
export const SOLANO: boolean;
62+
export const STRIDER: boolean;
63+
export const TASKCLUSTER: boolean;
64+
export const TEAMCITY: boolean;
65+
export const TRAVIS: boolean;
66+
export const VERCEL: boolean;
67+
export const APPCENTER: boolean;
68+
export const XCODE_CLOUD: boolean;
69+
export const XCODE_SERVER: boolean;
70+
export const WOODPECKER: boolean;

‎node_modules/ci-info/index.js

+89
Original file line numberDiff line numberDiff line change

‎node_modules/ci-info/package.json

+37
Original file line numberDiff line numberDiff line change

‎node_modules/ci-info/vendors.json

+248
Original file line numberDiff line numberDiff line change

‎package-lock.json

+12-11
Original file line numberDiff line numberDiff line change

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
"dependencies": {
5959
"@isaacs/string-locale-compare": "^1.1.0",
6060
"@npmcli/arborist": "^6.1.2",
61-
"@npmcli/ci-detect": "^3.0.1",
6261
"@npmcli/config": "^6.1.0",
6362
"@npmcli/map-workspaces": "^3.0.0",
6463
"@npmcli/package-json": "^3.0.0",
@@ -67,6 +66,7 @@
6766
"archy": "~1.0.0",
6867
"cacache": "^17.0.2",
6968
"chalk": "^4.1.2",
69+
"ci-info": "^3.6.1",
7070
"cli-columns": "^4.0.0",
7171
"cli-table3": "^0.6.3",
7272
"columnify": "^1.6.0",
@@ -128,7 +128,6 @@
128128
"bundleDependencies": [
129129
"@isaacs/string-locale-compare",
130130
"@npmcli/arborist",
131-
"@npmcli/ci-detect",
132131
"@npmcli/config",
133132
"@npmcli/map-workspaces",
134133
"@npmcli/package-json",
@@ -137,6 +136,7 @@
137136
"archy",
138137
"cacache",
139138
"chalk",
139+
"ci-info",
140140
"cli-columns",
141141
"cli-table3",
142142
"columnify",

‎scripts/dependency-graph.js

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ const aliases = {
2020
// If we see a bare package with just this name, it's NOT ours
2121
const namespaced = [
2222
'arborist',
23-
'ci-detect',
2423
'config',
2524
'disparity-colors',
2625
'eslint-config',

‎scripts/npm-cli-repos.txt

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ are-we-there-yet
44
benchmarks
55
bin-links
66
cacache
7-
ci-detect
87
cli
98
cmd-shim
109
config

‎tap-snapshots/test/lib/docs.js.test.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ npm exec --package yo --package generator-node --call "yo node"
758758
759759
The name of a continuous integration system. If not set explicitly, npm will
760760
detect the current CI environment using the
761-
[\`@npmcli/ci-detect\`](http://npm.im/@npmcli/ci-detect) module.
761+
[\`ci-info\`](http://npm.im/@npmcli/ci-info) module.
762762
763763
#### \`cidr\`
764764

‎test/lib/utils/config/definitions.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -731,10 +731,10 @@ YYYY\r
731731

732732
t.test('detect CI', t => {
733733
const defnNoCI = mockDefs({
734-
'@npmcli/ci-detect': () => false,
734+
'ci-info': { isCI: false, name: null },
735735
})
736736
const defnCIFoo = mockDefs({
737-
'@npmcli/ci-detect': () => 'foo',
737+
'ci-info': { isCI: false, name: 'foo' },
738738
})
739739
t.equal(defnNoCI['ci-name'].default, null, 'null when not in CI')
740740
t.equal(defnCIFoo['ci-name'].default, 'foo', 'name of CI when in CI')

‎test/lib/utils/update-notifier.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const t = require('tap')
2-
let ciMock = null
2+
let ciMock = {}
33
const flatOptions = { global: false, cache: t.testdir() + '/_cacache' }
44

55
const MANIFEST_REQUEST = []
@@ -86,7 +86,7 @@ t.afterEach(() => {
8686
const runUpdateNotifier = async ({ color = true, ...npmOptions } = {}) => {
8787
const _npm = { ...defaultNpm, ...npmOptions, logColor: color }
8888
return t.mock('../../../lib/utils/update-notifier.js', {
89-
'@npmcli/ci-detect': () => ciMock,
89+
'ci-info': ciMock,
9090
pacote,
9191
fs,
9292
})(_npm)
@@ -159,9 +159,9 @@ t.test('situations in which we do not notify', t => {
159159

160160
t.test('do not update in CI', async t => {
161161
t.teardown(() => {
162-
ciMock = null
162+
ciMock = {}
163163
})
164-
ciMock = 'something'
164+
ciMock = { isCI: true, name: 'something' }
165165
t.equal(await runUpdateNotifier(), null)
166166
t.strictSame(MANIFEST_REQUEST, [], 'no requests for manifests')
167167
})

‎workspaces/libnpmexec/lib/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const { mkdir } = require('fs/promises')
44
const { promisify } = require('util')
55

66
const Arborist = require('@npmcli/arborist')
7-
const ciDetect = require('@npmcli/ci-detect')
7+
const ciInfo = require('ci-info')
88
const crypto = require('crypto')
99
const log = require('proc-log')
1010
const npa = require('npm-package-arg')
@@ -242,7 +242,7 @@ const exec = async (opts) => {
242242
throw new Error('canceled')
243243
}
244244

245-
if (noTTY() || ciDetect()) {
245+
if (noTTY() || ciInfo.isCI) {
246246
log.warn('exec', `The following package${
247247
add.length === 1 ? ' was' : 's were'
248248
} not found and will be installed: ${

‎workspaces/libnpmexec/lib/run-script.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const chalk = require('chalk')
2-
const ciDetect = require('@npmcli/ci-detect')
2+
const ciInfo = require('ci-info')
33
const runScript = require('@npmcli/run-script')
44
const readPackageJson = require('read-package-json-fast')
55
const npmlog = require('npmlog')
@@ -44,10 +44,8 @@ const run = async ({
4444

4545
try {
4646
if (script === scriptShell) {
47-
const isTTY = !noTTY()
48-
49-
if (isTTY) {
50-
if (ciDetect()) {
47+
if (!noTTY()) {
48+
if (ciInfo.isCI) {
5149
return log.warn('exec', 'Interactive mode disabled in CI environment')
5250
}
5351

‎workspaces/libnpmexec/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@
5959
},
6060
"dependencies": {
6161
"@npmcli/arborist": "^6.1.2",
62-
"@npmcli/ci-detect": "^3.0.1",
6362
"@npmcli/run-script": "^6.0.0",
6463
"chalk": "^4.1.0",
64+
"ci-info": "^3.6.1",
6565
"npm-package-arg": "^10.0.0",
6666
"npmlog": "^7.0.1",
6767
"pacote": "^15.0.2",

‎workspaces/libnpmexec/test/index.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ require('fs').writeFileSync(process.argv.slice(2)[0], 'LOCAL PKG')`,
475475
fs.chmodSync(executable, 0o775)
476476

477477
const mockexec = t.mock('../lib/index.js', {
478-
'@npmcli/ci-detect': () => true,
478+
'ci-info': { isCI: true },
479479
'proc-log': {
480480
warn (title, msg) {
481481
t.fail('should not warn about local file package install')
@@ -850,7 +850,7 @@ t.test('prompt, accepts', async t => {
850850
const npxCache = resolve(testdir, 'npxCache')
851851
t.test('with clearProgress function', async t => {
852852
const mockexec = t.mock('../lib/index.js', {
853-
'@npmcli/ci-detect': () => false,
853+
'ci-info': { isCI: false },
854854
npmlog: {
855855
clearProgress () {
856856
t.ok(true, 'should call clearProgress function')
@@ -881,7 +881,7 @@ t.test('prompt, accepts', async t => {
881881

882882
t.test('without clearProgress function', async t => {
883883
const mockexec = t.mock('../lib/index.js', {
884-
'@npmcli/ci-detect': () => false,
884+
'ci-info': { isCI: false },
885885
read (opts, cb) {
886886
cb(null, 'y')
887887
},
@@ -916,7 +916,7 @@ t.test('prompt, refuses', async t => {
916916
const npxCache = resolve(testdir, 'npxCache')
917917
t.test('with clearProgress function', async t => {
918918
const mockexec = t.mock('../lib/index.js', {
919-
'@npmcli/ci-detect': () => false,
919+
'ci-info': { isCI: false },
920920
npmlog: {
921921
clearProgress () {
922922
t.ok(true, 'should call clearProgress function')
@@ -955,7 +955,7 @@ t.test('prompt, refuses', async t => {
955955

956956
t.test('without clearProgress function', async t => {
957957
const mockexec = t.mock('../lib/index.js', {
958-
'@npmcli/ci-detect': () => false,
958+
'ci-info': { isCI: false },
959959
read (opts, cb) {
960960
cb(null, 'n')
961961
},
@@ -1062,7 +1062,7 @@ t.test('no prompt if CI', async t => {
10621062
const cache = resolve(testdir, 'cache')
10631063
const npxCache = resolve(testdir, 'npxCache')
10641064
const mockexec = t.mock('../lib/index.js', {
1065-
'@npmcli/ci-detect': () => true,
1065+
'ci-info': { isCI: true },
10661066
})
10671067

10681068
await mockexec({
@@ -1091,7 +1091,7 @@ t.test('no prompt if CI, multiple packages', async t => {
10911091
const cache = resolve(testdir, 'cache')
10921092
const npxCache = resolve(testdir, 'npxCache')
10931093
const mockexec = t.mock('../lib/index.js', {
1094-
'@npmcli/ci-detect': () => true,
1094+
'ci-info': { isCI: true },
10951095
'proc-log': {
10961096
warn (title, msg) {
10971097
t.equal(title, 'exec', 'should warn exec title')

‎workspaces/libnpmexec/test/run-script.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ t.test('disable, enable log progress', t => {
2121
}),
2222
})
2323
const runScript = t.mock('../lib/run-script.js', {
24-
'@npmcli/ci-detect': () => false,
24+
'ci-info': { isCI: false },
2525
'@npmcli/run-script': async () => {
2626
t.ok('should call run-script')
2727
},
@@ -46,7 +46,7 @@ t.test('no package.json', t => {
4646
t.plan(1)
4747

4848
const runScript = t.mock('../lib/run-script.js', {
49-
'@npmcli/ci-detect': () => false,
49+
'ci-info': { isCI: false },
5050
'@npmcli/run-script': async () => {
5151
t.ok('should call run-script')
5252
},
@@ -60,7 +60,7 @@ t.test('colorized interactive mode msg', async t => {
6060
t.plan(2)
6161

6262
const runScript = t.mock('../lib/run-script.js', {
63-
'@npmcli/ci-detect': () => false,
63+
'ci-info': { isCI: false },
6464
'@npmcli/run-script': async () => {
6565
t.ok('should call run-script')
6666
},
@@ -83,7 +83,7 @@ t.test('no color interactive mode msg', async t => {
8383
t.plan(2)
8484

8585
const runScript = t.mock('../lib/run-script.js', {
86-
'@npmcli/ci-detect': () => false,
86+
'ci-info': { isCI: false },
8787
'@npmcli/run-script': async () => {
8888
t.ok('should call run-script')
8989
},
@@ -105,7 +105,7 @@ t.test('no tty', t => {
105105
t.plan(1)
106106

107107
const runScript = t.mock('../lib/run-script.js', {
108-
'@npmcli/ci-detect': () => false,
108+
'ci-info': { isCI: false },
109109
'@npmcli/run-script': async () => {
110110
t.ok('should call run-script')
111111
},
@@ -119,7 +119,7 @@ t.test('ci env', t => {
119119
t.plan(2)
120120

121121
const runScript = t.mock('../lib/run-script.js', {
122-
'@npmcli/ci-detect': () => true,
122+
'ci-info': { isCI: true },
123123
'@npmcli/run-script': async () => {
124124
throw new Error('should not call run-script')
125125
},

0 commit comments

Comments
 (0)
Please sign in to comment.