Skip to content

Commit

Permalink
Replace the dependency is-ci with ci-info (#1053)
Browse files Browse the repository at this point in the history
* Replace depdendency `is-ci` by `ci-info`

* dedup ci-info

* Update .changeset/many-dodos-shop.md

---------

Co-authored-by: Mateusz Burzy艅ski <mateuszburzynski@gmail.com>
  • Loading branch information
paescuj and Andarist committed Jul 2, 2023
1 parent 47016fc commit 90a870a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 23 deletions.
5 changes: 5 additions & 0 deletions .changeset/many-dodos-shop.md
@@ -0,0 +1,5 @@
---
"@changesets/cli": patch
---

Replace the dependency `is-ci` with `ci-info`.
3 changes: 1 addition & 2 deletions packages/cli/package.json
Expand Up @@ -45,15 +45,14 @@
"@changesets/types": "^5.2.1",
"@changesets/write": "^0.2.3",
"@manypkg/get-packages": "^1.1.3",
"@types/is-ci": "^3.0.0",
"@types/semver": "^7.5.0",
"ansi-colors": "^4.1.3",
"chalk": "^2.1.0",
"ci-info": "^3.7.0",
"enquirer": "^2.3.0",
"external-editor": "^3.1.0",
"fs-extra": "^7.0.1",
"human-id": "^1.0.2",
"is-ci": "^3.0.1",
"meow": "^6.0.0",
"outdent": "^0.5.0",
"p-limit": "^2.2.0",
Expand Down
Expand Up @@ -4,7 +4,9 @@ import { getPackages } from "@manypkg/get-packages";
import { silenceLogsInBlock, testdir } from "@changesets/test-utils";

jest.mock("../npm-utils");
jest.mock("is-ci", () => true);
jest.mock("ci-info", () => ({
isCI: true,
}));

describe("publishPackages", () => {
silenceLogsInBlock();
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/publish/npm-utils.ts
Expand Up @@ -7,7 +7,7 @@ import chalk from "chalk";
import spawn from "spawndamnit";
import semverParse from "semver/functions/parse";
import { askQuestion } from "../../utils/cli-utilities";
import isCI from "is-ci";
import { isCI } from "ci-info";
import { TwoFactorState } from "../../utils/types";
import { getLastJsonObjectFromString } from "../../utils/getLastJsonObjectFromString";

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/publish/publishPackages.ts
Expand Up @@ -7,7 +7,7 @@ import { info, warn } from "@changesets/logger";
import { PreState } from "@changesets/types";
import * as npmUtils from "./npm-utils";
import { TwoFactorState } from "../../utils/types";
import isCI from "is-ci";
import { isCI } from "ci-info";

type PublishedState = "never" | "published" | "only-pre";

Expand Down
22 changes: 4 additions & 18 deletions yarn.lock
Expand Up @@ -1931,13 +1931,6 @@
dependencies:
"@types/node" "*"

"@types/is-ci@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/is-ci/-/is-ci-3.0.0.tgz#7e8910af6857601315592436f030aaa3ed9783c3"
integrity sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==
dependencies:
ci-info "^3.1.0"

"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff"
Expand Down Expand Up @@ -2781,10 +2774,10 @@ ci-info@^2.0.0:
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46"
integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==

ci-info@^3.1.0, ci-info@^3.2.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2"
integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==
ci-info@^3.2.0, ci-info@^3.7.0:
version "3.8.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91"
integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==

cjs-module-lexer@^1.0.0:
version "1.2.2"
Expand Down Expand Up @@ -4484,13 +4477,6 @@ is-ci@^2.0.0:
dependencies:
ci-info "^2.0.0"

is-ci@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867"
integrity sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==
dependencies:
ci-info "^3.2.0"

is-core-module@^2.11.0, is-core-module@^2.8.1, is-core-module@^2.9.0:
version "2.11.0"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144"
Expand Down

0 comments on commit 90a870a

Please sign in to comment.