Repository navigation
fix(monitors): read USD prices written after the amount - #236
Open
chuiwenwei wants to merge 1 commit into
Open
chuiwenwei wants to merge 1 commit into
chuiwenwei wants to merge 1 commit into
Conversation
A price watch only recognized "$9.99" and "USD 9.99". Pages that write the currency after the amount, such as "9.99 USD", never matched even though the price is explicit. Match the trailing spelling too, keeping the existing comma and decimal rules. Adds coverage for suffix, prefix and unrelated USD text.
This branch has not been deployed
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.
What changed
A
price_belowwatch only recognized$orUSDbefore the number ($9.99,USD 9.99). A page that writes9.99 USDwas treated as having no price, so the watch stayed silent on an explicit USD price.matchesPricenow also matches the amount followed byUSD, with the same comma/decimal grammar and the same threshold comparison as the prefix forms.Verification
pnpm lintpnpm typecheckpnpm --dir apps/worker typecheckpnpm build:serverpnpm test— 529 passingNew
tests/monitor-usd-suffix.test.tscovers suffix, prefix, mixed prices, and a page that mentionsUSDwithout an amount.Integration limits
None. No network or provider access is needed. Matching is still limited to explicit
$/USDspellings; other currencies are unchanged.