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

Migrate to yarn, vitest #539

Merged
merged 21 commits into from
Feb 26, 2024
Merged

Migrate to yarn, vitest #539

merged 21 commits into from
Feb 26, 2024

Conversation

rygine
Copy link
Collaborator

@rygine rygine commented Feb 26, 2024

Summary

  • Replaced NPM with yarn
  • Replaced jest with vitest
  • Enabled testing in parallel (~42s => ~12s)
  • Updated some tests to accommodate parallel testing
  • Replaced assert with expect
  • Added typechecking to GH actions
  • Upgraded dd-trace dependency
  • Updated GH action test workflow, removed dd-trace from browser testing
  • Added prettier-plugin-packagejson
  • Separated lint and format checks

This PR updates the tooling of this repo to match our other TypeScript repos.

@rygine rygine requested a review from a team February 26, 2024 16:19
Copy link

cloudflare-workers-and-pages bot commented Feb 26, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: c61360a
Status: ✅  Deploy successful!
Preview URL: https://a95ee965.xmtp-js.pages.dev
Branch Preview URL: https://rygine-yarn.xmtp-js.pages.dev

View logs

Copy link
Contributor

@neekolas neekolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very excited for vitest here. It really is a superior product

@rygine rygine requested a review from humanagent as a code owner February 26, 2024 20:07
import { BackupType } from '../src/message-backup/BackupClient'
import { newLocalHostClient, newDevClient } from './helpers'

describe('Backup configuration', () => {
it('Uses XMTP backup for localhost', async function () {
const c = await newLocalHostClient()
assert.equal(c.backupType, BackupType.xmtpTopicStore)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good riddance to these. I think our use of assert actually predates my time at XMTP

Copy link
Contributor

@neekolas neekolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to see this in line with the other JS repos.

CC @fabriguespe for any other docs changes that may need to come out of this

Copy link
Contributor

@neekolas neekolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the plan to also replace semantic-release with changesets too?

package.json Show resolved Hide resolved
"@xmtp/user-preferences-bindings-wasm": "0.3.6",
"async-mutex": "0.4.0",
"elliptic": "6.5.4",
"ethers": "5.5.3",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I worry about these exact matches for common deps causing dependency bloat for integrators who use slightly different versions of common libraries like ethers

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a temporary measure to prevent issues when switching from NPM to yarn. once this PR merges, i'll start upgrading the dependencies with proper versions.

@rygine
Copy link
Collaborator Author

rygine commented Feb 26, 2024

Is the plan to also replace semantic-release with changesets too?

i'm OK keeping semantic release for now, but just as happy to switch to changesets.

@neekolas
Copy link
Contributor

i'm OK keeping semantic release for now, but just as happy to switch to changesets.

Mostly just curious. No urgency on making changes there. For a single package repo semantic release works just fine.

@rygine rygine merged commit 845d6f1 into main Feb 26, 2024
9 checks passed
@rygine rygine deleted the rygine/yarn branch February 26, 2024 21:22
Copy link
Contributor

🎉 This PR is included in version 11.3.13 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants