ipld / js-car

Content Addressable aRchive format reader and writer for JavaScript
Other
46 stars 7 forks source link

feat!: publish as esm-only #99

Closed achingbrain closed 2 years 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 build related 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. Moved source files into src
  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
  10. Updates multiformats to 10.x.x

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

achingbrain commented 2 years ago
rvagg commented 2 years ago

@achingbrain the next problem I have with this is I can't run the electron tests when I npm t this; most of my dev is on a Linux machine and mostly without a local DISPLAY; so properly headless. Does there need to be an a special xvfb incantation for this; can I get by without having to install anything special? And if it does require special pieces then we'll need to document that for others who might be contributing; or we remove those from the test script and just do it in CI (I'd be fine with that, locally I just want basic confirmation and am happy to defer full test confirmation to CI).

achingbrain commented 2 years ago

@rvagg I guess you'd need to run it via xvfb-maybe for your setup? Sounds fiddly to me.

We could just make the test command do the default aegir test - that would test in node, browsers and webworkers which would be consistent with other libp2p/ipfs modules. The other test:* scripts are available for testing other platforms and CI is the gatekeeper for PRs etc.

It does linting as well at the moment which I think is your preference?

rvagg commented 2 years ago

@achingbrain yeah, although I'm not too fussed if we do comprehensive in CI. Basic Node, maybe at least one (easy) browser, linting and typing would be my preference but really I just want people to (a) not have too many hurdles to getting a contribution up but (b) lower the chance of hitting a CI problem with their contribution. So aegir test is the same as what's there now but without -t electron-main?

achingbrain commented 2 years ago

So aegir test is the same as what's there now but without -t electron-main?

Yes, exactly - I've simplified it to that so it'll just lint, run tests in node/browsers/webworkers and test the examples.

github-actions[bot] commented 2 years ago

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

The release is available on:

Your semantic-release bot :package::rocket: