Skip to content

Commit

Permalink
fix(pack): missing end of line anchor in package.json regex filter (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
yuna0x0 authored Jan 5, 2025
1 parent cc3bbc9 commit b28a533
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/eleven-cameras-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@pnpm/plugin-commands-publishing": patch
"pnpm": patch
---

Fixed the Regex used to find the package manifest during packing [#8938](https://github.com/pnpm/pnpm/pull/8938).
2 changes: 1 addition & 1 deletion releasing/plugin-commands-publishing/src/pack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ async function packPkg (opts: {
await Promise.all(Object.entries(filesMap).map(async ([name, source]) => {
const isExecutable = bins.some((bin) => path.relative(bin, source) === '')
const mode = isExecutable ? 0o755 : 0o644
if (/^package\/package\.(json|json5|yaml)/.test(name)) {
if (/^package\/package\.(json|json5|yaml)$/.test(name)) {
pack.entry({ mode, mtime, name: 'package/package.json' }, JSON.stringify(manifest, null, 2))
return
}
Expand Down

0 comments on commit b28a533

Please sign in to comment.