Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: set up dashboard to deploy js configs #304

Merged
merged 6 commits into from
Mar 28, 2024

Conversation

jsnwesson
Copy link
Contributor

This PR introduces a patch in Learner Dashboard's frontend-build dependency that allows for JS configs to be handled in a production build. This also includes further handling in the Jest config to accept both JS and JSX configs.

APER-3085

Scenarios I tested for (via npm run test and npm run start:

  1. No env.config.js exists, .env.* files untouched
  2. env.config.js file exists and .env.* files untouched

@jsnwesson jsnwesson requested a review from a team as a code owner March 28, 2024 17:01
Copy link

codecov bot commented Mar 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.62%. Comparing base (731fbe2) to head (57d3b5a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #304   +/-   ##
=======================================
  Coverage   96.62%   96.62%           
=======================================
  Files         182      182           
  Lines        1747     1747           
  Branches      308      308           
=======================================
  Hits         1688     1688           
  Misses         55       55           
  Partials        4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 26 to 28
// This mergeConfig ensures that any variables assigned by process.env are still overwritten if declared in JS config
mergeConfig(envConfig);

Copy link
Member

Choose a reason for hiding this comment

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

Does this not already happen in frontend-platform?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, it does, and I realize now that I added this additional mergeConfig because at one point I was trying to handle the scenario where the .env.* files would be removed, but I now know that that isn't something I should have to anticipate while adding the risk of variables over-writing each other repeatedly. Removing this logic for now.

@jsnwesson jsnwesson merged commit e045932 into master Mar 28, 2024
6 checks passed
@jsnwesson jsnwesson deleted the jwesson/set-up-dashboard-to-deploy-js-configs branch March 28, 2024 18:02
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