mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-19 13:41:10 +02:00
* adds codemod for transforming button element to hds component * runs button codemod on kmip and kubernetes enginges * manully updates kuberenetes roles button * runs button codemod on ldap engine * manually updates remaining ldap buttons * updates button codemod to check if all child nodes were included in text arg construction * runs button codemod on kv engine * adds comment for future kv button update * Update ui/lib/kv/addon/components/page/secret/details.hbs Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com> * updates remaining instance of toolbar-link class on button and adds class name transform to button codemod * adds display inline override to hds button * updates hds button display override to inline-flex * updates ldap account check in button to tertiary * updates ldap library check out icon to tertiary and adds icon --------- Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
Running Codemods
The handlebars codemods use ember-template-recast and can be run with the following:
- navigate to the UI directory of the Vault project
- execute
npx ember-template-recast "**/*.hbs" -t ./path/to/transform-file.js
This will run the transform on all .hbs files within the ui directory which covers the app and all addons. The terminal will output the number of files processed as well as the number of changed, unchanged, skipped and errored files. It's a good idea to validate the output to ensure that the intended transforms have taken place. If there are issues with some of the files, simply revert the changes via git, tweak the codemod and run again.
Example
npx ember-template-recast "**/*.hbs" -t ./scripts/codemods/no-quoteless-attributes.js