-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundle registry in npm package #29
Conversation
b671b79
to
3740270
Compare
npm/src/utils.ts
Outdated
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.
Instead of adding to utils relocated to utils files. Should see diffs below, but they are not new.
it looks like this git commit plugin will also encounter penumbra-zone/web#1046 |
i would configure the build to ship json files in dist, instead of bundling the json into js, so a consumer may easily access the raw json if they have some specific need. |
npm/package.json
Outdated
"name": "@penumbra-zone/test-publish", | ||
"version": "0.7.0", |
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.
do these need to revert before merge?
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.
Fixed
One disadvantage of this solution would be that when adding a new asset or channel to the registry we will have to update the extension in chrome store |
I suppose we are not because the action/checkout doesn't have that kind of url. Can save this for later.
This was a fairly non-trivial thing I was playing around with for a few hours. Will open an issue about this.
Yes, indeed. It is trading off freshness for safety. Think it's ok for now, but we can revisit later if it becomes an issue. |
Related to: penumbra-zone/web#1033
At the moment, the registry fetches the latest on github. Treating this github repo as a kind of remote service for our extension is a bit of an iffy dependency (has caused issues with schema change and recycling old jsons). This PR switches this npm package to bundle the registry and ship it together.
This means, when we update our registry, we should bump the version along with it so consumers can download the latest.
====
New addition: Adding vite to inject commit at build time so consumer can know what version of the registry it is.
The big utils file has been relocated to the /utils folder in separate files