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

build!: build packages with ts-bridge #40

Merged
merged 7 commits into from
Nov 15, 2024
Merged

build!: build packages with ts-bridge #40

merged 7 commits into from
Nov 15, 2024

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Sep 18, 2024

This updates all packages to build with ts-bridge instead of tsc. This has the benefit that packages will be built as CJS modules and ESM modules at the same time.

I've also modernised eth-hd-keyring in this process, as it was previously a single JS file. For now it's running TypeScript with allowJs, but this file can be properly converted to TypeScript in the future.

Breaking changes

  • Each package now has an exports field, meaning subpath imports (import '@metamask/eth-hd-keyring/dist/foo';) are no longer possible, unless explicitly stated in the exports field.

Copy link

socket-security bot commented Sep 18, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@ts-bridge/[email protected] None 0 192 kB mrten
npm/@ts-bridge/[email protected] filesystem, unsafe 0 72.9 kB mrten
npm/[email protected] None 0 146 kB guybedford

🚮 Removed packages: npm/[email protected]

View full report↗︎

@Mrtenz Mrtenz changed the title Build packages with ts-bridge BREAKING: Build packages with ts-bridge Sep 18, 2024
@Mrtenz Mrtenz marked this pull request as ready for review September 18, 2024 11:06
@Mrtenz Mrtenz requested a review from a team as a code owner September 18, 2024 11:06
@legobeat
Copy link
Contributor

Might want to couple this with an upgrade of typescript to min 5.5: ts-bridge/ts-bridge#67 (comment)

@Mrtenz Mrtenz enabled auto-merge November 6, 2024 12:14
@ccharly ccharly changed the title BREAKING: Build packages with ts-bridge build!: build packages with ts-bridge Nov 14, 2024
@ccharly
Copy link
Collaborator

ccharly commented Nov 14, 2024

@metamaskbot publish-previews

Copy link

Preview builds have been published. See these instructions (from the core monorepo) for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/keyring-api": "10.1.0-3416820",
  "@metamask-previews/eth-hd-keyring": "7.0.4-3416820",
  "@metamask-previews/eth-ledger-bridge-keyring": "6.0.0-3416820",
  "@metamask-previews/eth-simple-keyring": "6.0.5-3416820",
  "@metamask-previews/eth-trezor-keyring": "4.0.0-3416820",
  "@metamask-previews/eth-snap-keyring": "5.0.1-3416820"
}

@ccharly
Copy link
Collaborator

ccharly commented Nov 15, 2024

I was able to run the E2E tests on the extension side using a bunch of previews builds, everything looks fine.

Some tests are failing, but I truly think this is not related to that PR, but more about the latest changes we made on the mainline (the extension + the core repo are not up-to-date with our latest release).

Here's the PRs I used for tests:

Here's the CI report:
Screenshot 2024-11-15 at 10 13 50
Screenshot 2024-11-15 at 10 23 08

  • The dedupe fail being a non-issue here
  • The 2 failing tests might be because of latest changes, but not related to the move to ts-bridge

@Mrtenz Mrtenz added this pull request to the merge queue Nov 15, 2024
Merged via the queue into main with commit 975bd39 Nov 15, 2024
24 checks passed
@Mrtenz Mrtenz deleted the mrtenz/ts-bridge branch November 15, 2024 09:31
github-merge-queue bot pushed a commit that referenced this pull request Nov 15, 2024
Just upgrading to the latest stable TypeScript version.

This is also related to this comment:
#40 (comment).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants