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

ci: enable ESM loader for Docusaurus #4041

Merged
merged 1 commit into from Jan 31, 2022

Conversation

merceyz
Copy link
Member

@merceyz merceyz commented Jan 30, 2022

What's the problem this PR addresses?

The Docusaurus e2e test started failing at 2022-01-26T20:01:17Z because it tries to import ESM but the ESM loader isn't enabled.

How did you fix it?

Enable the ESM loader

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@merceyz merceyz requested a review from arcanis as a code owner January 30, 2022 21:33
Comment on lines +27 to +30

# TODO: Remove once https://github.com/yarnpkg/berry/blob/bd146ccddf95aae9c99c0c48d86b1d8997f1dccf/scripts/e2e-setup-ci.sh#L31-L38 is fixed
YARN_PNP_ENABLE_ESM_LOADER=true

Copy link
Member

@arcanis arcanis Jan 31, 2022

Choose a reason for hiding this comment

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

I think the comment here has been fixed in 17.4.0 (PR), correct? Perhaps we should just upgrade the Node version here?

# TODO: Remove when either of these issues are fixed
# - https://github.com/nodejs/node/issues/39140
# - https://github.com/nodejs/node/issues/37782
# - https://github.com/facebook/jest/issues/12060
# Due to a bug in `jest-worker` and/or Node.js adding a loader
# causes our e2e tests to time out so require the tests that needs it
# to explicitly enable it
export YARN_PNP_ENABLE_ESM_LOADER=false

Copy link
Member Author

Choose a reason for hiding this comment

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

Assuming you meant to link to nodejs/node#41221 then yes, it has been fixed in 17.4.0 but I don't want to upgrade the CI to that version due to the OpenSSL changes causing webpack@4 builds to not work. I'd rather wait for that PR to be backported.

@arcanis arcanis merged commit 3214bfa into master Jan 31, 2022
@arcanis arcanis deleted the merceyz/ci/docusaurus-esm-loader branch January 31, 2022 11:29
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.

None yet

2 participants