2023-10-15


Test snapshots should be in alphabetical order
I submitted a PR and was surprised (not really) when CI failed, it turns out snapshots should be in alphabetical order.
…makes sense!
I also learned that you shouldn’t really type the snapshots by hand, it’s easier to add a test, run it, see what comes in (vs what the snapshot was before), if it was the correct thing just copy paste the snapshot. And place it in alphabetical order. 😊
Go back to all posts

2023-10-14


Using/adding changesets
I was asked to add a changeset when submitting a PR. There was a nice guide here: changesets/docs/adding-a-changeset.md at main · changesets/changesets (github.com)
  1. Run npx changeset
  2. Select the packages using arrows and space to select, enter to confirm. (in monorepo)
  3. Select what kind of bump you want (major, minor or patch).
  4. Provide a message. Optional, add markdown to make it look nicer.
  5. Commit!
npm link (using your forks as packages)
I wanted to make a change in a package and then use the package in my other project to see if my change fixed a bug.
I was wondering how to do that but it was pretty easy:
  1. In the forked project, run npm link.
  2. In the other project, run npm link forked-package-name-here.
  3. Now you can use your forked package as a dependency in your other project!
I also think you need to run npm unlink at some point.
Go back to all posts