Tooling refactor + @ucans/core integration #152
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please forgive this monstrosity of a PR 👹
As I was pulling ucans core in, I was running into tooling issues & decided to revamp everything.
Whole new monorepo setup + build tools + testing tools.
Alrighty things that happened:
tsc
builds foresbuild
this bundles everything as one package and will be significantly better in web. esbuild is fast, handles both cjs and esm, and can output as cjs/esm/umd.react-scripts
for Vite. This is faster, runs on esbuild, more easily configurable, etccomposite
tsconfig with references to each package in it. This means that packages directly reference the typescript code of the packages that they rely on. So for instance@adxp/auth
directly builds in thesrc/*.ts
of@adxp/crypto
instead of building in the already compileddist/*.js
. Better bundling & no more building submodules and restarting your TS server!yarn
in root, it installs all dependencies & builds all packages.@ucans/core
library. We don't rely on any of the crypto from the original library right now, only the crypto we bring ourselves. It's totally pluggable so we can add in did resolution methods or new crypto at will. I also only pull this library into@adxp/crypto
and@adxp/auth
and then build + export abstractions around it. All of our auth semantics are directly in the auth library so developers don't have to worry about them or understand them. This keeps downstream developers from having to mess with the nitty gritty of UCANs which can be overwhelming at first.