Skip to content

fix(pack): missing end of line anchor in package.json regex filter#8938

Merged
zkochan merged 2 commits intopnpm:mainfrom
yuna0x0:fix-pack
Jan 5, 2025
Merged

fix(pack): missing end of line anchor in package.json regex filter#8938
zkochan merged 2 commits intopnpm:mainfrom
yuna0x0:fix-pack

Conversation

@yuna0x0
Copy link
Copy Markdown
Contributor

@yuna0x0 yuna0x0 commented Jan 2, 2025

Regression #3608.

Missing end of line anchors in regex ($) will cause every files under package root that has prefixed package.(json|json5|yaml) being matched and replaced with package.json:

/^package\/package\.(json|json5|yaml)/.test("package/package.json.meta")
true

/^package\/package\.(json|json5|yaml)/.test("package/package.yamlol")
true

/^package\/package\.(json|json5|yaml)/.test("package/package.json567")
true

@yuna0x0 yuna0x0 requested a review from zkochan as a code owner January 2, 2025 23:30
@welcome
Copy link
Copy Markdown

welcome bot commented Jan 2, 2025

💖 Thanks for opening this pull request! 💖
Please be patient and we will get back to you as soon as we can.

@yuna0x0 yuna0x0 changed the title fix(pack): missing end of line anchors in regex in package/package.js… fix(pack): missing end of line anchors in regex in package.json filter Jan 2, 2025
@yuna0x0 yuna0x0 changed the title fix(pack): missing end of line anchors in regex in package.json filter fix(pack): missing end of line anchors in package.json regex filter Jan 3, 2025
@yuna0x0 yuna0x0 changed the title fix(pack): missing end of line anchors in package.json regex filter fix(pack): missing end of line anchor in package.json regex filter Jan 3, 2025
@zkochan zkochan merged commit b28a533 into pnpm:main Jan 5, 2025
@welcome
Copy link
Copy Markdown

welcome bot commented Jan 5, 2025

Congrats on merging your first pull request! 🎉🎉🎉

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.

2 participants