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(core): support ESM Forge module loading #3582

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Commits on Jun 23, 2024

  1. refactor(core): try...catch dynamicImport

    This ensures calling dynamicImport will rather result in
    rejected promise than in unhandled exception.
    SpacingBat3 committed Jun 23, 2024
    Configuration menu
    Copy the full SHA
    7740716 View commit details
    Browse the repository at this point in the history
  2. feat(core): support ESM module packages

    Replace some require() calls with dynamicImport() to support loading
    makers/publishers/plugins etc. that are ESM makers
    SpacingBat3 committed Jun 23, 2024
    Configuration menu
    Copy the full SHA
    0f0fbc5 View commit details
    Browse the repository at this point in the history
  3. fix(core): limit path resolving in helper

    Avoid resolving path to file url in dynamicImport to support importing
    modules by identifiers.
    SpacingBat3 committed Jun 23, 2024
    Configuration menu
    Copy the full SHA
    205515b View commit details
    Browse the repository at this point in the history
  4. fix(core): re-order dynamicImportMaybe methods

    Try require first, then import, to avoid .default property for CJS.
    SpacingBat3 committed Jun 23, 2024
    Configuration menu
    Copy the full SHA
    1fda9c8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5bce35c View commit details
    Browse the repository at this point in the history
  6. refactor(core): merge import error messages

    Merge error messages for imports to easier debug potential failures.
    SpacingBat3 committed Jun 23, 2024
    Configuration menu
    Copy the full SHA
    595b084 View commit details
    Browse the repository at this point in the history
  7. refactor(core): improve tests

    Rename require-search test to import-search
    and improve testing the promise rejection.
    
    Co-authored-by: Erick Zhao <erick@hotmail.ca>
    SpacingBat3 and erickzhao committed Jun 23, 2024
    Configuration menu
    Copy the full SHA
    2cf6d60 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2024

  1. generic refactors

    MarshallOfSound committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    d65e18c View commit details
    Browse the repository at this point in the history