-
Notifications
You must be signed in to change notification settings - Fork 5
Conversation
…e to typescript errors. Pushing WIP to continue on other machine.
Hey @DoubleOTheven, can you give this a try and see if this works for you. As mentioned in the PR description I think it has some key advantages over the current deno setup. Please let me know what you think, if we go with this monorepo node approach I will adapt the gh actions as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice changes. Let's get the new Chain config and Notification PRs in first, then update this PR.
Amazing direction! |
Yes that would be the next step. Not sure if turborepo or nx. I personally I'm a fan and user of nx but haven't tried turborepo in the last 8 months or so. We got it on our radar for further improvement of the development experience. |
heya 👋 if there are any ways I can help with this, let me know |
Version 1.1.0 has been released. Do you want to look into migrating to node based off of the latest main branch? |
Yep will give it another go. 👍:) |
Just updated the code in this branch to the most recent Fyi it does not have multiple packages as the original deno code doesn't. It's just multiple entry points in a single packages as the deno version did it. So for this initial switch we only have two projects in this this monorepo workspace, Please give it a try @DoubleOTheven if everything works as expected. Also happy to get some feedback from @nicolad and @felixpolimec (#46). At best fresh copy of this branch then use Haven't tested it myself as much yet. But one issues still open are these module version errors from pnpm. 🤔
|
f5f2f57
to
6154947
Compare
8a2d21a
to
34ce417
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes all look good, but there are a lot of collisions with the main branch. Would you please resolve them and make this PR a single commit with chore: change Deno to node and pnpm
(or something similar?)
I tried doing rebasing but there are too many changes. You might be better off converting mod.ts to index.ts as you did the first time.
pnpm
monorepodeno
to node
with pnpm
merged with main to resolve conflicts. Fixed lint and spellcheck actions. Had to fix some lint issues so lint ci will succeed. This commit includes the fixes: 071d27c Release action should work as well 🤞 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that these file changes are out of sync. useEventSubscription
was changed to useEvents
, but you added it in your commit
Exchanges
deno
with traditionalnode
tooling.pnpm
is a widely used supported package manager for node, which offers lean monorepo capabilities.It ships with
node>=16
and can be enable withcorepack
which is part of the node installation.The
pnpm-workspace.yaml
defines the path to individual projects of the monorepo.https://github.com/paritytech/useink/blob/5df27adcf0cc110965a097a77ca9acc04d50e8c3/pnpm-workspace.yaml#L1-L3
Each project can have it's own node setup. As of now we have
useink/core
anduseink/chains
under packages andplayground
contains theuseink-kitchen-sink
frontend.Soon we should also add the
docs
to the repo as well. This way we have everything in a single repo and can create PRs which push changes to all related code in one PR.Use
pnpm install
at the root to install all dependencies of defined monorepo projects.I added some convenience scripts in the root package.json to build a the packages or to start a development environment running the "kitchen-sink" frontend.
https://github.com/paritytech/useink/blob/ac11bff016b4484f8aad71d5294a9e8dd16a8b89/package.json#L6-L9
Build packages:
Run development setup:
The development setup runs the
tsup
tooling in watch mode and starts the kitchen sink nextjs setup in development mode for recompilation on file changes.tsup
is a popular choice for bundling ts libraries.tsup docs
The setup was heavily inspired by the repo setup of wagmi. However, I have great experience using these tools in the past.
Why?
I struggled with compiling useink with deno in "watch" mode for speeding up development cycles
dnt
(Deno Node Transform) was super slow for me and I don't want to invoke it manually all the time.dnt
states itself it's under early development and may not be suitable for production:This tool is under active early development and hasn't been tested in a lot of scenarios.
we are catering to the node world first and foremost. We are building a frontend library here,
deno
norbun
are not as widely used for this just yet. IMHO I don't find it worthwhile to drop all the existing mature tooling and struggling with comparability for {insert deno advantage here}. 🤷