ITADN

Fix publish not executing in correct directory when --contents flag is used.

#776Pull RequestWillsB3 创建于 2026-01-21
W
WillsB3commented
We have a workflow using `--contents` and I found that after updating `np` our publish no longer worked, as np was reading the root level `package.json` rather than the one inside the directory specified by the `--contents` flag. I _think_ [this commit](https://github.com/sindresorhus/np/commit/e996c6f5c5508305b8869ed53f03b3c9250775b6) caused a regression in this behaviour. The first commit is a failing test which attempts to demonstrate the regression, and the second commit is what I think is a suitable fix. Let me know if my conclusion is accurate or if I've missed something.
合并状态:未合并 关闭于 2026-01-21 1 条评论