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 CJS export of typedef and class w/latebound names #55053

Merged
merged 3 commits into from
Sep 21, 2023

Commits on Jul 17, 2023

  1. Fix CJS export of typedef and class w/latebound names

    Fixes microsoft#53967
    
    The problem is that the weird, ad-hoc CJS merge needs to happen at two different
    times.  The first is its existing location in getCommonJsExportEquals.
    The second is getResolvedMembersOrExportsOfSymbol, which combines
    normal, early-bound symbols with late-bound symbols.
    
    The CJS merge happens before the addition of late-bound symbols, so a
    merge will result in the loss of [Symbol.iterable] from the bug.
    But manually merging the resolvedExports/Members during the CJS merge
    also doesn't work, because it prevents the module's
    resolvedExports/Members from being filled in later.
    
    Instead, this PR delays part of the CJS merge to
    getResolvedMembersOrExportsOfSymbol. Unfortunately, this requires
    retrieving the original, unmerged symbols--since their
    resolvedExports/Members are already cached. I do this by looking at the
    symbols for each of the merged symbol's declarations, which feels wrong.
    
    Please suggest alternate ways to do this. I don't think I understand the
    late-binding machinery well enough, so it's likely there's a cleaner
    way.
    sandersn committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    d7f2109 View commit details
    Browse the repository at this point in the history
  2. add semicolons and newlines

    sandersn committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    f4b96e3 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2023

  1. Configuration menu
    Copy the full SHA
    c3bab86 View commit details
    Browse the repository at this point in the history