You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Does node-config support Bun? If not, any plan to support it?
I'm not sure if this is a bug or lack of feature, I saw in one old issue people mentioned some failure while using node-config in Bun, but I suspect it's not in TS.
Describe the solution you'd like
I'd like to use node-config in Bun in TS. The current codebase works flawlessly with node-config in TS in Node. Migrating to Bun, it fails, complaining that it couldn't find ts-node in node_modules. (Looking at the code, this is not surprising since the parser for .ts files is indeed ts-node.)
Describe alternatives you've considered
Right now I converted all files to JSON, but the default file contains some logic (e.g. reading secrets from AWS SecretManager) which can't be converted to JSON. Converting it to JS does seem to be working. But it's a bit off to have a single JS file in a fully TS codebase.
Please tell us about your environment:
node-config version: 3.3.12
node-version: #N/A
bun-version: 1.1.18
Thanks.
The text was updated successfully, but these errors were encountered:
I have not used Bun, but my guess is it'll work if you add ts-node to your package.json dependencies.
By default, node-config only loads a couple of parsers - JSON and JSON5. Every other parser has to be specified as a dependency in your package.json file. This is so every app doesn't download every parser that has ever been integrated.
There's a short mention of this in the docs, but documentation is for wimps ;)
Right, but that's kinda the point; if people use Bun then they don't have Node and (I'm guessing that) ts-node is not an option for them. So the idea is to use Bun instead of ts-node as a Parser. (I'm not sure if ts-node can utilize Bun instead of Node.)
Does that make sense?
Is your feature request related to a problem? Please describe.
Does node-config support Bun? If not, any plan to support it?
I'm not sure if this is a bug or lack of feature, I saw in one old issue people mentioned some failure while using node-config in Bun, but I suspect it's not in TS.
Describe the solution you'd like
I'd like to use node-config in Bun in TS. The current codebase works flawlessly with node-config in TS in Node. Migrating to Bun, it fails, complaining that it couldn't find
ts-node
innode_modules
. (Looking at the code, this is not surprising since the parser for .ts files is indeed ts-node.)Describe alternatives you've considered
Right now I converted all files to JSON, but the default file contains some logic (e.g. reading secrets from AWS SecretManager) which can't be converted to JSON. Converting it to JS does seem to be working. But it's a bit off to have a single JS file in a fully TS codebase.
Please tell us about your environment:
Thanks.
The text was updated successfully, but these errors were encountered: