ipld / js-dag-pb

An implementation of the DAG-PB spec for JavaScript (for use with multiformats or @ipld/block)
Other
12 stars 5 forks source link

feat!: publish as esm-only #56

Closed achingbrain closed 1 year ago

achingbrain commented 2 years ago

Following on from the conversation in https://github.com/ipld/ipld/issues/224 this converts this repo to use the latest aegir with Unified CI.

  1. Remove all dev deps apart from aegir
  2. Run the npx aegir check-project command to update project config
  3. Remove non-Unified-CI github actions
  4. Update imports to import from src/index.js instead of @ipld/dag-pb
  5. Rename test/*.js to test/*.spec.js so aegir can find them
  6. Update tsconfig.json to extend config from aegir
  7. Remove "main" and other unused fields from package.json
  8. Use chai from aegir pre-configured with plugins we use
  9. Fixes everything the linter complains about

This will need a follow up PR to protocol/.github to add this repo to the Unified CI config file so it'll get automated config updates in the future.

Apologies that this PR is so noisy, most of it is from the check-project command

RangerMauve commented 1 year ago

@achingbrain Do you think you'd have time to review Rod's latest changes in the v10.0.0 branch of multiformats to see if there's stuff in there that should be ported here?

achingbrain commented 1 year ago

We may wish to roll #59 into this but it's blocked by https://github.com/multiformats/js-multiformats/issues/208 (fixed by https://github.com/multiformats/js-multiformats/pull/210)

rvagg commented 1 year ago

:thumbsup: this all looks good to me, minus the multiformats@10 problems; I wouldn't mind confirming for myself that the types are going out to the place identified by the package.json, it looks all right but we keep on having problems with type exports!

rvagg commented 1 year ago

how about we just switch to cid1.equals(cid2) or cid1.toString() === cid2.toString() here for now to get over that particular hump and get this unblocked for a release?

achingbrain commented 1 year ago

Seems reasonable in places where we just compare two CIDs, but it won't work in places where we do deep equality checks on objects with CID fields without pulling those fields out or overwriting them.

achingbrain commented 1 year ago

https://github.com/multiformats/js-multiformats/pull/215 makes the tests in this PR pass for me

achingbrain commented 1 year ago

Not this PR, I mean rolling multiformats@10.x.x into this PR.

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 3.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: