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: JavaScript file configuration of apps #474

Merged
merged 7 commits into from
May 26, 2023

Commits on May 23, 2023

  1. feat: JavaScript file configuration of apps

    This adds the ability to configure an application via an env.config.js file rather than environment variables or .env files.  This mechanism is much more flexible and powerful than environment variables as described in the associated ADR.
    
    It also improves documentation around how to configure applications, providing more detail on the various methods.
    
    Finally, it allows the logging, analytics, and auth services to be configured via the configuration document now that we can supply an alternate implementation in an env.config.js file.  This allows configuration of these services without forking the MFE.
    davidjoy committed May 23, 2023
    Configuration menu
    Copy the full SHA
    f626eff View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a67784d View commit details
    Browse the repository at this point in the history
  3. docs: JS file config ADR review feedback

    fixing a few typos, adding a section about the relationship between JS file config and runtime config, and cleaning up some formatting.
    davidjoy committed May 23, 2023
    Configuration menu
    Copy the full SHA
    bda306a View commit details
    Browse the repository at this point in the history
  4. docs: improving documentation around when to use config methods

    Based on PR feedback - be clearer about how the configuration methods overlap and what their best use cases are.
    davidjoy committed May 23, 2023
    Configuration menu
    Copy the full SHA
    1458037 View commit details
    Browse the repository at this point in the history
  5. test: improving test coverage for js file config

    Turns out if you put each test in its own file, jest.mock can be used to change the implementation of env.config.js for each test file.  This lets us test all the clauses in jsFileConfig.  It also means we no longer need the actual env.config.js file, since we’re mocking it!
    davidjoy committed May 23, 2023
    Configuration menu
    Copy the full SHA
    7cc7155 View commit details
    Browse the repository at this point in the history
  6. test: we actually need the env.config.js file for the example app

    Previous commit removed this file, forgetting that it’s also necessary for the example app.  Reinstated it here with a value specific to the example app so we can still prove the test suite works.
    davidjoy committed May 23, 2023
    Configuration menu
    Copy the full SHA
    e44f959 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2023

  1. docs: accepting the js file config ADR

    We have agreed we’d like to DEPR environment variable config, so I’m going to merge the ADR as “Accepted”
    davidjoy committed May 24, 2023
    Configuration menu
    Copy the full SHA
    84adafd View commit details
    Browse the repository at this point in the history