Open flapenguin opened 1 month ago
Note that you can get the version from process.versions.sqlite
https://nodejs.org/docs/latest/api/process.html#processversions.
Note that you can get the version from
process.versions.sqlite
https://nodejs.org/docs/latest/api/process.html#processversions.
Awesome. I think that concludes part of the issue about getting version in runtime.
Specify in documentation that sqlite version won't decrease in any future release
I'm not sure that we should explicitly say that in the docs since we don't say it for any of our other dependencies. In general we only update versions, but if we had a reason (security for example) we should be able to move backward if needed. We also have multiple release lines, which could confuse people if they see an older version on an LTS line.
Specify sqlite version in documentation with a direct link to sqlite release page
I'm not sure that we should do this either. For example, V8 is a much more important dependency for Node.js, and we don't specify the version of V8 in the docs as far as I know.
What is the problem this feature will solve?
SQLite is constantly improving. Each version adds something new https://www.sqlite.org/chronology.html Currently it is not clear what version of sqlite baseline you can safely use.
E.g. last version 3.46.0 added
json_pretty
function. Imagine thatnode:sqlite
was added couple of years ago, libraries won't be able to tell if they can use it or even anyjson_*
function.What is the feature you are proposing to solve the problem?
Addrequire('node:sqlite').version
field, so libraries can check version if neededprocess.versions.sqlite
can be used as suggested in the comments https://github.com/nodejs/node/issues/54135#issuecomment-2260125892node:sqlite
is backward compatible)What alternatives have you considered?
You can get version in runtime
You can do feature testing for specific functions in runtime
But libraries should have some better api for this IMO