twilio-labs / twilio-labs/function-templates

Keeping template dependencies safe

Open
#87 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue help wanted
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:

  1. Add every dependency that exists in any template as a devDependency for the root package.json
  2. 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
  3. Create a script that can read the root package.json and update all the nested package.json accordingly
  4. 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.