Skip to content
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: bundle databases with package #88

Closed
wants to merge 1 commit into from
Closed

Conversation

JamieMagee
Copy link
Contributor

@JamieMagee JamieMagee commented Oct 8, 2022

Closes #39

This is hard to test without running semantic-release locally, but when running the prepack script manually the databases are included in the dist directory:

$ ls packages/osv-offline/dist/
db  index.d.ts  index.js  lib


$ ls packages/osv-offline/dist/db/
crates.io.nedb  go.nedb  maven.nedb  npm.nedb  nuget.nedb  pypi.nedb  rubygems.nedb

@JamieMagee JamieMagee force-pushed the feat/prepack branch 2 times, most recently from 22a4e73 to b541a1a Compare January 25, 2023 06:53
@JamieMagee JamieMagee marked this pull request as ready for review January 25, 2023 06:55
@JamieMagee
Copy link
Contributor Author

@Churro I'd appreciate your review here too 😄

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we bundle the database, we always need a new renovate release to get latest db.
this is the same issue like we currently have with the azure pipeline tasks.

I'll add a new idea to the issue

@JamieMagee
Copy link
Contributor Author

That's not the intention of this change. The bundled database is designed to be a fallback if we're unable to download the latest database. For example if the GitHub API is down, or there are other network issues, we can fallback to a stale version of the database. It might not be the most up-to-date, but it is better than nothing.

@Churro
Copy link
Contributor

Churro commented Jan 25, 2023

I appreciate the idea, as it adds resilience to download errors due to rate limiting or unavailability.

However, I'm not yet enirely convinced it will work as intended:

Please correct me if I'm overlooking something here.

@viceice
Copy link
Member

viceice commented Jan 25, 2023

ok, but it'll also blow up a lot. so we should weight that too.

@rarkins WDYT?

@rarkins
Copy link
Collaborator

rarkins commented Mar 27, 2023

I use Renovate as a dependency downstream so would prefer to avoid any major increase in install size.

@JamieMagee
Copy link
Contributor Author

It would add ~7MB to the install size.

@rarkins
Copy link
Collaborator

rarkins commented Mar 28, 2023

Really seems too much. Can you publish two packages - slim and full and Renovate uses the slim?

@JamieMagee
Copy link
Contributor Author

No worries, I'll just close this instead.

@JamieMagee JamieMagee closed this Mar 28, 2023
@JamieMagee JamieMagee deleted the feat/prepack branch April 1, 2023 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publish osv-offline with bundled databases
4 participants