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
When running readme-generator -r README.md -v values.yaml I expect the values.yaml file to be parsed correctly. However it crashes with:
readme-generator-for-helm/lib/parser.js:147
_.get(valuesJSON, arrayPrefix).forEach((e) => {
^
TypeError: Cannot read properties of undefined (reading 'forEach')
at createValuesObject (/home/andre/workspace/readme-generator-for-helm/lib/parser.js:147:39)
at getParsedMetadata (/home/andre/workspace/readme-generator-for-helm/index.js:22:24)
at runReadmeGenerator (/home/andre/workspace/readme-generator-for-helm/index.js:52:28)
at Object.<anonymous> (/home/andre/workspace/readme-generator-for-helm/bin/index.js:22:1)
at Module._compile (node:internal/modules/cjs/loader:1253:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47
This is caused by passing the value path determined by dot-object to the Lodash get function. Taking this yaml as example:
Thanks a lot @andre-aktivconsultancy for sharing your finding and such detailed explanation. Would you like to contribute by creating a PR to solve the issue? The Bitnami team will be happy to review it and provide feedback. Here you can find the contributing guidelines.
Given any of the following values files
When running
readme-generator -r README.md -v values.yaml
I expect the values.yaml file to be parsed correctly. However it crashes with:This is caused by passing the value path determined by dot-object to the Lodash
get
function. Taking this yaml as example:dot-object generates this path: "foo.bar.[0]". This makes Lodash
get
expect foo to have a property bar.https://github.com/bitnami-labs/readme-generator-for-helm/blob/24c5ba9220ee9464147d4947c5e0613f8e2487a5/lib/parser.js#L147C55-L147C55
The text was updated successfully, but these errors were encountered: