Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

btea
Copy link
Member

@btea btea commented Jan 9, 2025

close #8935

@btea btea requested a review from zkochan as a code owner January 9, 2025 14:36
@zkochan
Copy link
Member

zkochan commented Jan 9, 2025

This is not so simple. The suggestion was to don't warn about dependencies included in the "never" list.

@btea
Copy link
Member Author

btea commented Jan 10, 2025

Sorry, I misunderstood what he meant. I will try to modify the code logic according to your explanation.

@btea btea marked this pull request as draft January 10, 2025 01:07
@btea btea marked this pull request as ready for review January 11, 2025 12:24
@zkochan
Copy link
Member

zkochan commented Jan 11, 2025

Now the problem with this change is that if someone will add the neverBuiltDependencies field while there is no onlyBuiltDependencies field, all the dependencies will be automatically allowed to be built.

I'll make onlyBuiltDependencies an empty array even if neverBuiltDependencies is set.

But with that change it becomes impossible to allow all dependencies to be built. Which some users might want to get the pre v10 behaviour. Maybe we could allow to disable the behaviour by setting onlyBuiltDependencies to false.

@zkochan
Copy link
Member

zkochan commented Jan 11, 2025

Maybe it would be better to create a new field for excluding dependencies from the warning. Something like ignoredBuiltDependencies.

@zkochan zkochan changed the title feat(config): allow both onlyBuiltDependencies and neverBuiltDependencies feat): pnpm.ignoredBuiltDependencies for muting warnings about ignored dependency builds Jan 11, 2025
@btea
Copy link
Member Author

btea commented Jan 12, 2025

Can we make these configurations global? Configuring each project separately in a project with multiple packages can be troublesome. refer #8891 (comment)

@zkochan zkochan merged commit 7a9473b into pnpm:main Jan 12, 2025
9 checks passed
@btea btea deleted the feat/allow-both-onlyBuiltDependencies-neverBuiltDependencies branch January 12, 2025 01:20
@zkochan
Copy link
Member

zkochan commented Jan 12, 2025

Responded #8891 (comment)

@btea btea changed the title feat): pnpm.ignoredBuiltDependencies for muting warnings about ignored dependency builds feat: pnpm.ignoredBuiltDependencies for muting warnings about ignored dependency builds Jan 12, 2025
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.

Allow both onlyBuiltDependencies and neverBuiltDependencies
2 participants