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

Only emit APIs that are standards track and not experimental #239

Merged
merged 6 commits into from
May 21, 2024

Commits on May 13, 2024

  1. Only emit APIs that are standards track and not experimental

    The current implementation only emits APIs that are on the
    standards track and supported in Chrome, Firefox, and Safari.
    This leaves out widely used APIs like Trusted Types, so this
    change relaxes those requirements. In order to support this
    change, a number of changes are included:
    
    - BrowserCompatData is modified to handle some slight
    discrepancies in how compatibility data is stored, including
    global APIs, namespaces, static members, and event handlers.
    - Interfaces and namespaces are generated based on whether they
    are standards track and experimental. If they are not generated,
    any references to them will be replaced by the equivalent JS
    type.
    - Likewise, inheritance for interfaces is modified to subtype
    the first generated interface in the inheritance hierarchy.
    - Dictionaries and typedef-like types are generated based on
    whether they are used as they don't have compatibility data. In
    order to determine this, whenever we generate a _RawType, we
    mark it as used, and recursively generate the types needed.
    - For each API within an interface, compat data in that interface
    and its superinterfaces are used to determine if an API is
    generated.
    - In order to support the above changes, intermediate
    representations for some members (attributes, fields, constants)
    are added. There are other members that might be worth moving to
    an IR, but that refactoring can be done in a future CL.
    
    Closes a number of issues:
    
    dart-lang#209
    dart-lang#234
    dart-lang#216
    dart-lang#205
    dart-lang#203
    dart-lang#192
    srujzs committed May 13, 2024
    Configuration menu
    Copy the full SHA
    7ed6d20 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4e9e15b View commit details
    Browse the repository at this point in the history
  3. Handle some TODOs that came up when addressing dart-lang#209

    - Removes an unnecessary null-check
    - Refactors getTypeForUnionCalculation to a shared
    _getJSTypeEquivalent function
    - Avoids shadowing an instance variable
    srujzs committed May 13, 2024
    Configuration menu
    Copy the full SHA
    708f294 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2024

  1. Address some lints

    srujzs committed May 14, 2024
    Configuration menu
    Copy the full SHA
    3cfe941 View commit details
    Browse the repository at this point in the history
  2. Update CHANGELOG and README

    srujzs committed May 14, 2024
    Configuration menu
    Copy the full SHA
    bdb5c4b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fe9fce2 View commit details
    Browse the repository at this point in the history