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: use ESM-compatible JSON imports #3964

Merged
merged 2 commits into from
Dec 17, 2021
Merged

fix: use ESM-compatible JSON imports #3964

merged 2 commits into from
Dec 17, 2021

Conversation

ehmicky
Copy link
Contributor

@ehmicky ehmicky commented Dec 16, 2021

Part of #3742

JSON imports are not available yet with pure ES modules without using experimental flags. As part of the ES modules migration, this PR refactors them so they are compatible.


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures your code follows our style guide and
    passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

@ehmicky ehmicky added the type: chore work needed to keep the product and development running smoothly label Dec 16, 2021
@ehmicky ehmicky self-assigned this Dec 16, 2021
@github-actions github-actions bot added the type: bug code to address defects in shipped code label Dec 16, 2021
@ehmicky ehmicky removed the type: bug code to address defects in shipped code label Dec 16, 2021
Copy link
Contributor

@lukasholzer lukasholzer left a comment

Choose a reason for hiding this comment

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

LGTM 🎸


const ROOT_PACKAGE_JSON_PATH = `${__dirname}/../../package.json`

// TODO: Replace with dynamic `import()` once it is supported without
Copy link
Contributor

Choose a reason for hiding this comment

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

nice todo :) 🚀

@kodiakhq kodiakhq bot merged commit 91b9063 into main Dec 17, 2021
@kodiakhq kodiakhq bot deleted the fix/json-imports branch December 17, 2021 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: chore work needed to keep the product and development running smoothly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants