Repository navigation
fix(metadata): match restricted words using word boundaries - #4530
Open
DYNOSuprovo wants to merge 2 commits into
Open
DYNOSuprovo wants to merge 2 commits into
DYNOSuprovo wants to merge 2 commits into
Conversation
|
Subscribed to pull request
Generated by CodeMention Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead. |
Contributor
|
eas-cli now uses changesets for changelogs (#4580). The required "Check for a changeset" check fails on PRs that edit To update this PR:
The release adds the PR link and the author to the entry. If this PR needs no changelog entry, revert the |
Author
|
@douglowder Thank you for the guidance! I have synchronized the branch with \upstream/main, reverted the direct modifications to \CHANGELOG.md, and added a patch changeset for \eas-cli\ under .changeset/restricted-words-word-boundaries.md. All set for CI checks and review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Fixes #4501
When running
eas metadata:push,infoRestrictedWordsflagged any word that had"beta"as a substring (such as Danish "Betal" / "betaling", Dutch "betalen", German "Alphabet", English "diabetes", etc.) because it usedsanitized.includes(word). In non-interactive CI environments, this prevented publishing legitimate non-English and English metadata to Apple.How
Updated
infoRestrictedWordsto compile restricted words into case-insensitive regular expressions with word boundaries (\b${word}\b). This ensures standalone references to restricted terms like"beta","(beta)","App Beta", or"v1.0-beta"are flagged according to Apple guidelines, while words merely containing the substring (e.g. "Betal", "Alphabet", "diabetes") are permitted.Test Plan
packages/eas-cli/src/metadata/apple/rules/__tests__/infoRestrictedWords.test.tscovering:apple.inforeturns null."beta"intitle,subtitle,description, andkeywordsis correctly flagged with severity 1."BETA") and punctuation-delimited ("(beta)","v2.0-beta") instances are correctly flagged.yarn --cwd packages/eas-cli test src/metadata/apple/rules