fix: sanitize price parsing consistently#14
Merged
Conversation
added 2 commits
May 15, 2026 23:26
….com - Add .github/workflows/vercel.yml (preview on PR, prod on main) - Add .github/workflows/frontend.yml (lint + build) - Add .github/workflows/security.yml (if missing) - Add SETUP.md with step-by-step Vercel + Cloudflare wiring Workflows skip gracefully when VERCEL_TOKEN / ORG_ID / PROJECT_ID secrets are not configured, so this PR keeps CI green until secrets are added.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR aims to make price-string parsing more robust/consistent (to address CodeQL sanitization findings) and also introduces Vercel deployment automation and setup documentation for publishing the app behind Cloudflare.
Changes:
- Update SQS/Kafka cost parsing in the Compare page to strip
$and all commas via a global regex. - Add GitHub Actions workflows for frontend build and Vercel preview/production deploys.
- Add a Vercel + Cloudflare deployment/setup guide (SETUP.md).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
SETUP.md |
Adds step-by-step instructions for deploying on Vercel and exposing the app via Cloudflare DNS. |
app/compare/page.tsx |
Adjusts currency string sanitization prior to numeric parsing in the cost summary cards. |
.github/workflows/vercel.yml |
Adds automated Vercel preview (PR) and production (main push) deployments. |
.github/workflows/frontend.yml |
Adds a standalone workflow to install, lint, and build the frontend on PRs/pushes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+206
to
+207
| const sqsCost = parseFloat(analysis.pricing.sqs["10M"].replace(/[$,]/g, "")) | ||
| const kafkaCost = parseFloat(analysis.pricing.kafka["10M"].replace(/[$,]/g, "")) |
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write |
Comment on lines
+41
to
+45
| - run: npm install --no-audit --no-fund | ||
| if: steps.secrets.outputs.configured == 'true' | ||
| - run: npx vercel@${VERCEL_CLI_VERSION} pull --yes --environment=preview --token="$VERCEL_TOKEN" | ||
| if: steps.secrets.outputs.configured == 'true' | ||
| - run: npx vercel@${VERCEL_CLI_VERSION} build --token="$VERCEL_TOKEN" |
Comment on lines
+68
to
+72
| - run: npm install --no-audit --no-fund | ||
| if: steps.secrets.outputs.configured == 'true' | ||
| - run: npx vercel@${VERCEL_CLI_VERSION} pull --yes --environment=production --token="$VERCEL_TOKEN" | ||
| if: steps.secrets.outputs.configured == 'true' | ||
| - run: npx vercel@${VERCEL_CLI_VERSION} build --prod --token="$VERCEL_TOKEN" |
Comment on lines
+21
to
+23
| - run: npm install --no-audit --no-fund | ||
| - run: npm run lint --if-present || true | ||
| - run: npm run build |
| with: | ||
| node-version: 22 | ||
| - run: npm install --no-audit --no-fund | ||
| - run: npm run lint --if-present || true |
Comment on lines
+1
to
+6
| # Setup — Vercel + Cloudflare | ||
|
|
||
| Connect this repository to Vercel and expose it on `queue.moretes.com` via | ||
| Cloudflare DNS. | ||
|
|
||
| ## 1. Create the Vercel project |
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.
Summary\n- replaces partial currency string cleanup with a global regex for all currency separators\n- resolves CodeQL incomplete sanitization findings\n\n## Validation\n- pnpm run build\n- pnpm audit --audit-level moderate\n- npm audit --audit-level=moderate