Fix npm package files inclusion
build: fix npm package files inclusion
Fix npm package files inclusionbuildfix npm package files inclusion
Committed by yyx990803
commit message
build: fix npm package files inclusion
We are publishing with yarn 1, which has a problem with negation
patterns in "files" list, causing the npm package to include every
file in the directory.
Since the original reason to expose src files was to address #3652,
which is a client-only concern, we can include the `/client` dir only.
This avoids having to exclude tests in `/node` and also reduces
package size.Editor assessment
The subject `build: fix npm package files inclusion` names the pipeline and the defect precisely. The body then teaches: it identifies yarn 1's negation-pattern limitation as the root cause, explains that the original reason for exposing src files was a client-only concern from an issue, and draws the conclusion — ship only the client directory, avoiding node test exclusions and shrinking the package. That is cause, constraint, and trade-off in one paragraph. The build type is exactly right, hygiene is clean, and no footer is needed. An exemplar of explanatory commit writing.