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

fix: Resolve config modules with ESM createRequire() #1082

Merged
merged 4 commits into from Jan 7, 2022

Commits on Jan 6, 2022

  1. fix: Resolve config modules with ESM createRequire()

    ES modules do not have require() available, we must construct it first.
    This fixes the CLI when passing `--config my-config-package`, broken in
    v12.0.0.
    
    The tests didn't catch this because Jest still doesn't support mocking
    ESM, and there's really no way to write a test for this right now.
    
    I wasn't able to get the automatic `test/__mocks__/resolveConfig.js` to
    work, probably a race condition between the module parser and the mocker.
    evocateur committed Jan 6, 2022
    Copy the full SHA
    4d98715 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    74b39f5 View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2022

  1. Copy the full SHA
    237fcab View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    1321674 View commit details
    Browse the repository at this point in the history