-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: standalone version for each package #23
Conversation
I have pushed some changes to the branch: I'd like to hear your thoughts about those changes. |
create.cjs
Outdated
: {}; | ||
|
||
// exclude version from comparison | ||
if (JSON.stringify({ ...existingPackageJson, version: undefined }) !== JSON.stringify({ ...pkg.packageJson, version: undefined })) { |
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.
Don't know which is faster, dequal
or JSON.stringify
. I will create a naive benchmark to test it.
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.
dequal
is 2x faster: https://replit.com/@isukkaw/dequal-vs-json-stringify
So in 290a697
(#23) I have replaced JSON.stringify
with dequal
.
Feel free to push any changes. Tbh I don't really feel performance is really a concern here, but also sure why not if you prefer. Do you think you have the plan to convert this file to .ts (asking because I saw you write them back to JSDocs), and break it into multiple files (separate the logic and the data, so they can be better organized, as well as expose some raw data to the JS API etc)? I believe https://github.com/esbuild-kit/tsx is quite performant to run directly the ts scripts. |
I'd like to, but TBH this is kind of too much for this PR. Let's do this in a separate PR. |
This PR introduces a "Virtual Package" system, that will compare the package files and automatically bump versions whenever the file changes.
The output would look like this: