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

BREAKING: Use tsup and refactor exports #2210

Merged
merged 4 commits into from
Feb 26, 2024
Merged

BREAKING: Use tsup and refactor exports #2210

merged 4 commits into from
Feb 26, 2024

Commits on Feb 26, 2024

  1. Build packages with tsup (#2120)

    This changes all packages to be built with `tsup`, instead of SWC.
    `tsup` uses `esbuild` under the hood, so performance should be
    comparable.
    
    More context here: MetaMask/utils#144.
    Mrtenz committed Feb 26, 2024
    Configuration menu
    Copy the full SHA
    2724a2a View commit details
    Browse the repository at this point in the history
  2. Update packages to be browser-first and use separate export for Node.…

    …js (#2211)
    
    This refactors all packages to be browser-first: All APIs and packages
    used should be compatible with browsers. This means no use of Node.js
    builtins, or native packages. Node-specific APIs have been moved to a
    separate export `/node` (e.g., `@metamask/snaps-controllers/node`). For
    the `snaps-controllers` package I've also added a `/react-native`
    export, which exports the React Native webview service.
    
    This also means we can remove the "browser" field from the packages that
    were using it.
    
    ## Breaking changes
    
    - Anything that uses Node.js was removed from the default export, and
    needs to be imported from `/node`.
    - The React Native webview service was moved, and needs to be imported
    from `/react-native`.
    Mrtenz committed Feb 26, 2024
    Configuration menu
    Copy the full SHA
    a3207a7 View commit details
    Browse the repository at this point in the history
  3. Update example shasums

    Mrtenz committed Feb 26, 2024
    Configuration menu
    Copy the full SHA
    e2f3677 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    231d108 View commit details
    Browse the repository at this point in the history