function-templates
function-templates copied to clipboard
Keeping template dependencies safe
I think we should invest in some automation that keeps the dependencies safe.
Right now we can use Dependabot to keep top level dependencies up-to-date but not the nested ones for the templates themselves. My suggestion is the following:
- Add every dependency that exists in any template as a
devDependency
for the rootpackage.json
- Create the same automation that we use in github.com/twilio-labs/sample-template-nodejs that will run tests on PRs and if they pass and the PR came from
Dependabot
it will automatically be merged - Create a script that can read the root
package.json
and update all the nestedpackage.json
accordingly - Create a GitHub action that is triggered on
push
to master that will run the script from (3) and commit any needed changes
Possible concerns/issues:
- What happens when Dependabot does
package-lock.json
updates? Should we be concerned or only rely on semver. Most of those are nested deps anyways meaning we don't have control over them
@philnash would love your opinion