Fix publish not executing in correct directory when --contents flag is used.
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 条评论