twilio-labs / twilio-labs/function-templates
Keeping template dependencies safe
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 406
- Forks
- 348
- PR merge metrics
- No merged PRs in 30d
Description
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
devDependencyfor 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
Dependabotit will automatically be merged - Create a script that can read the root
package.jsonand update all the nestedpackage.jsonaccordingly - Create a GitHub action that is triggered on
pushto master that will run the script from (3) and commit any needed changes
Possible concerns/issues:
- What happens when Dependabot does
package-lock.jsonupdates? Should we be concerned or only rely on semver. Most of those are nested deps anyways meaning we don't have control over them
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the root package.json, the nested template package.json files, and the existing automation in twilio-labs/sample-template-nodejs. Define how dependency updates, package-lock.json changes, Dependabot pull requests, tests, and automatic merges should work. Done means dependencies are synchronized and the GitHub Actions automation updates and commits required changes safely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, javascript, node.js
- Domain
- build-system, ci-cd, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100