Skip to content

Replace is-ci with ci-info.isCI #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TheDevMinerTV opened this issue Oct 31, 2024 · 7 comments
Open

Replace is-ci with ci-info.isCI #128

TheDevMinerTV opened this issue Oct 31, 2024 · 7 comments
Labels
umbrella issue This issue contains a list of dependents of a package and tracks the progress in each

Comments

@TheDevMinerTV
Copy link

is-ci is literally just an export wrapper for ci-info's isCI field, so we can just replace it everywhere we see it. That'd save 3KB and 2 HTTP roundtrips during installation.

@TheDevMinerTV
Copy link
Author

TheDevMinerTV commented Oct 31, 2024

Replaced it in Cypress: cypress-io/cypress#30465
Edit: got merged 🎉

@TheDevMinerTV
Copy link
Author

TheDevMinerTV commented Nov 18, 2024

Replaced it in html-minifier-terser: terser/html-minifier-terser#189

@Fuzzyma
Copy link
Collaborator

Fuzzyma commented Nov 18, 2024

Here is a list of the top 20 packages using is-ci according to npm.js (which does not contain all dependents because it only allows the first 396 to be crawled):

Stats are downloads last-month.

# Downloads Traffic Package
1 5.25M 11.28 GB lerna
2 5.15M 11.08 GB @lerna/create
3 2.08M 4.47 GB update-notifier-cjs
4 2.07M 4.46 GB yorkie
5 2.03M 4.37 GB @lerna/command
6 1.43M 3.08 GB builder-util
7 1.43M 3.07 GB yurnalist
8 1.39M 2.99 GB app-builder-lib
9 1.32M 2.85 GB electron-builder
10 1.29M 2.77 GB npm-check
11 908.76k 1.95 GB testcafe
12 709.21k 1.52 GB @aws-amplify/platform-core
13 612.93k 1.32 GB @lerna/legacy-package-management
14 234.66k 504.53 MB @aws-amplify/graphql-api-construct
15 224.21k 482.05 MB @aws-amplify/data-construct
16 214.74k 461.70 MB @aws-amplify/backend-cli
17 174.72k 375.64 MB is-ci-cli
18 106.89k 229.81 MB hint
19 102.37k 220.10 MB @hint/connector-puppeteer
20 94.58k 203.35 MB @prisma/sdk

@43081j
Copy link
Collaborator

43081j commented Nov 19, 2024

update-notifier-cjs looks like it has these we can replace:

  • chalk
  • is-ci
  • strip-ansi

Could be a good couple of PRs!

@Fuzzyma Fuzzyma added the umbrella issue This issue contains a list of dependents of a package and tracks the progress in each label Dec 18, 2024
@talentlessguy
Copy link

PR to electron-builder: electron-userland/electron-builder#9117

@TheDevMinerTV
Copy link
Author

FYI, lerna is still using it as well

dependants as of 12.05.2025 (I updated the metadata mirror again).

# Downloads Traffic Version Package
1 6.24M 14.63 GB 3.0.1 lerna
2 6.16M 14.45 GB 3.0.1 @lerna/create
3 2.86M 6.71 GB ^2.0.0 update-notifier-cjs
4 2.47M 5.80 GB ^2.0.0 @lerna/command
5 2.26M 5.29 GB ^3.0.0 builder-util
6 2.22M 5.21 GB ^3.0.0 app-builder-lib
7 2.19M 5.13 GB ^1.0.10 yorkie
8 2.09M 4.91 GB ^3.0.0 electron-builder
9 1.48M 3.46 GB ^2.0.0 npm-check
10 1.21M 2.84 GB ^2.0.0 yurnalist
11 984.89k 2.31 GB ^1.0.10 testcafe
12 651.82k 1.53 GB ^4.1.0 @aws-amplify/platform-core
13 627.55k 1.47 GB 3.0.1 @lerna/legacy-package-management
14 307.65k 721.75 MB ^3.0.1 @aws-amplify/graphql-api-construct
15 282.88k 663.64 MB ^4.1.0 @aws-amplify/backend-cli
16 257.06k 603.07 MB ^3.0.1 @aws-amplify/data-construct
17 250.42k 587.49 MB ^2.0.0 is-ci-cli
18 165.85k 389.09 MB ^1.0.10 @dependabot/yarn-lib
19 139.52k 327.31 MB ^4.1.0 @lerna-lite/core
20 103.12k 241.91 MB 3.0.1 @prisma/sdk
21 93.76k 219.96 MB 2.0.0 snap-shot-core
22 91.10k 213.72 MB ^3.0.1 hint
23 83.31k 195.44 MB ^2.0.0 gatsby-plugin-s3
24 79.56k 186.64 MB ^3.0.1 @hint/connector-puppeteer
25 58.29k 136.76 MB ^2.0.0 ovsx
26 41.70k 97.82 MB ^3.0.1 @milahu/patch-package
27 40.77k 95.64 MB ^2.0.0 @pika/pack
28 32.04k 75.17 MB ^3.0.0 @netlify/eslint-config-node
29 31.29k 73.40 MB ^1.0.10 amex-jest-preset
30 30.89k 72.47 MB ^2.0.0 japa

@absidue
Copy link

absidue commented May 20, 2025

Looks like ci-info ships a 6KB, 350 line unmimified JSON file in the npm package. Mimifying that file would shave a few bytes off the install size, which is probably worth it with it having 52 million downloads per week. Unfortunately it doesn't look like they have a proper build step there yet. The existing "build" script sorts the JSON file and creates the index.d.ts file, but they check the results into the git repo, which you wouldn't want to do for the mimified JSON file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
umbrella issue This issue contains a list of dependents of a package and tracks the progress in each
Projects
None yet
Development

No branches or pull requests

5 participants