Skip to content

fix(deploy): exclude source maps from website uploads#1738

Merged
paulfalgout merged 1 commit into
developfrom
feature/fe-179-prevent-source-maps-from-being-publicly-deployed
Jul 15, 2026
Merged

fix(deploy): exclude source maps from website uploads#1738
paulfalgout merged 1 commit into
developfrom
feature/fe-179-prevent-source-maps-from-being-publicly-deployed

Conversation

@paulfalgout

@paulfalgout paulfalgout commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Closes FE-179

What

  • Exclude .map files from recursive website-bucket uploads.
  • Add a deployment test covering root and nested source maps while preserving normal uploads.

Why

Source maps are needed by Datadog and remain in the private release artifact, but they should not be publicly retrievable from application website buckets.

Scope

Deployment uploader and its Node tests only. Datadog upload, artifact packaging, checksums, release semantics, and Cypress behavior are unchanged.

Deployment Impact

Applies to future app deployments: source maps in release artifacts will no longer be copied to website buckets. No forms or bundles require a separate redeploy beyond the normal app deployment.

Testing

  • node --test scripts/deploy.test.js (30 passed)
  • npm run lint
  • Cypress not run; this changes deployment-only Node code with focused Node coverage.

Summary by cubic

Exclude source maps from public website uploads while keeping them in release artifacts for Datadog. Prevents public access to .map files and applies to future deployments.

  • Bug Fixes
    • Skip .map files during recursive uploads via shouldSkipUploadEntry (handles nested paths; only skips files, not directories).
    • Exported uploadDirectory and added a unit test proving maps are excluded at every depth and normal files still upload.
    • Aligns with FE-179: Datadog uploads unchanged; no .map files reach website buckets; other deployment behavior unchanged.

Written for commit 2416a79. Summary will update on new commits.

Review in cubic

Copilot AI review requested due to automatic review settings July 14, 2026 17:10
@paulfalgout paulfalgout added the ci:defer-cypress Hold required Cypress jobs for approval during AI review iteration label Jul 14, 2026
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@paulfalgout, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 13 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d3adcf14-b045-48a1-a3cc-bfa46c174678

📥 Commits

Reviewing files that changed from the base of the PR and between 037a0fa and 2416a79.

📒 Files selected for processing (2)
  • scripts/deploy.js
  • scripts/deploy.test.js
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fe-179-prevent-source-maps-from-being-publicly-deployed

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the deployment uploader to prevent source map files (.map) from being uploaded to public website S3 buckets, while keeping sourcemaps available in release artifacts for Datadog/debug workflows.

Changes:

  • Filter out .map files (at any directory depth) during recursive S3 uploads.
  • Export uploadDirectory so it can be directly covered by Node tests.
  • Add a Node test verifying nested sourcemaps are excluded while normal assets still upload.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
scripts/deploy.js Skips .map files during recursive uploads and exports uploadDirectory for test coverage.
scripts/deploy.test.js Adds a test that asserts .map files are excluded across nested paths while preserving upload order of remaining files.

Comment thread scripts/deploy.js
@paulfalgout
paulfalgout force-pushed the feature/fe-179-prevent-source-maps-from-being-publicly-deployed branch from 859310c to 2416a79 Compare July 14, 2026 17:13
@cypress

cypress Bot commented Jul 14, 2026

Copy link
Copy Markdown

RoundingWell Care Ops Frontend    Run #9063

Run Properties:  status check passed Passed #9063  •  git commit 2416a790ba: fix(deploy): exclude source maps from website uploads
Project RoundingWell Care Ops Frontend
Branch Review feature/fe-179-prevent-source-maps-from-being-publicly-deployed
Run status status check passed Passed #9063
Run duration 02m 08s
Commit git commit 2416a790ba: fix(deploy): exclude source maps from website uploads
Committer Paul Falgout
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 240
View all changes introduced in this branch ↗︎

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 19

Coverage increased (+0.01%) to 100.0%

Details

  • Coverage increased (+0.01%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 6218
Covered Lines: 6218
Line Coverage: 100.0%
Relevant Branches: 1933
Covered Branches: 1933
Branch Coverage: 100.0%
Branches in Coverage %: Yes
Coverage Strength: 299.18 hits per line

💛 - Coveralls

@paulfalgout
paulfalgout requested a review from nmajor25 July 14, 2026 17:49
@paulfalgout
paulfalgout merged commit 8fb5645 into develop Jul 15, 2026
7 checks passed
@paulfalgout
paulfalgout deleted the feature/fe-179-prevent-source-maps-from-being-publicly-deployed branch July 15, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:defer-cypress Hold required Cypress jobs for approval during AI review iteration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants