Skip to content

Conversation

@karl-run
Copy link
Contributor

@karl-run karl-run commented Oct 1, 2025

Should fix #139.

@karl-run
Copy link
Contributor Author

karl-run commented Oct 1, 2025

Diff looks a bit icky, but it's literally just wrapping the vendors.forEach with if (env.CI !== 'false') {.

@karl-run
Copy link
Contributor Author

karl-run commented Oct 1, 2025

Tested with

CI=false deno run --allow-env=CI --allow-read=./ index.js 

Works as expected.

@sibiraj-s sibiraj-s merged commit 3fae1ac into watson:master Oct 2, 2025
9 checks passed
@sibiraj-s
Copy link
Collaborator

Thanks @karl-run

@wraithgar
Copy link
Contributor

wraithgar commented Oct 8, 2025

This may have constituted a breaking change btw. We're still investigating but it broke CI tests in npm's publishing library.

ETA: All good. We had a mocked environment that was setting CI to false but GITHUB_ACTIONS to true, which technically invalid.

wraithgar added a commit to npm/cli that referenced this pull request Oct 8, 2025
@sibiraj-s
Copy link
Collaborator

sibiraj-s commented Oct 9, 2025

@wraithgar . Apologies, Yes its indeed looks like a breaking change, since the vendor constant is set now regardless of CI true/false until v4.3.0.

Screenshot 2025-10-09 at 2 50 12 PM

Though it was the expected, given the no. of users and not sure how the vendor constants are being used currently, I am considering publishing a patch reverting this change.

And may be put this in v5 may be. Open to thoughts.

@wraithgar
Copy link
Contributor

Open to thoughts.

This is an EXTREMELY grey area. What does env.CI=false mean? There is no mention of it in the README so we can't go off of that.

The code says:

// Bypass all checks if CI env is explicitly set to 'false'

But this ONLY applies to isCI. Does it make sense to also set vendor envs here? I think the change does make sense. If I have explicitly set CI to false that's a pretty explicit state I've set.

As one of the developers of npm I am no stranger to users relying on bugs, and when we fix those bugs folks have something break. It's a frustrating experience for everyone.

I would tend towards leaving the change, and adding language to the README.md to avoid confusion in the future.

@sibiraj-s
Copy link
Collaborator

My bad, Missed the comment.

Agreed. And yes, will add this behavior to README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't touch all the envs when not in CI

3 participants