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] ExportMap / flat config: include languageOptions in context #3052

Merged

Commits on Sep 5, 2024

  1. [Fix] ExportMap / flat config: include languageOptions in context

    This change fixes a bug with flat config support.
    There is a function called `childContext` that's used by the ExportBuilder to "cleanse" the context object.
    This function wasn't including the new `languageOptions` object, which contains the parser.
    So by the time this cleansed context made it to the parse function, `languageOptions` wasn't there anymore.
    
    Since `parserPath` was still being included in non-flat config scenarios, the parse function made it through ok and used `parserPath`.
    However, once you shift to flat config, `parserPath` is no longer defined, and the actual parser object needs to be there.
    
    Fixes import-js#3051
    michaelfaith authored and ljharb committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    186f248 View commit details
    Browse the repository at this point in the history