No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Lewis Jones 76ede28a9f
Merge pull request #191 from github/dependabot/npm_and_yarn/npm_and_yarn-25d53a678e
Bump undici from 6.25.0 to 6.27.0 in the npm_and_yarn group across 1 directory
2026-07-16 12:51:23 +01:00
.github Restore GitHub-owned action refs 2026-05-21 17:48:06 -04:00
example Update to vitest 3.2.7 in the example as well 2026-07-07 19:18:07 +00:00
src Upgrade dependencies 2026-04-20 14:46:28 +01:00
.gitignore Example tsconfig: Don't require rebuild for example project, hide example project code from git (#15) 2022-06-30 15:15:58 -07:00
.npmrc Add supply chain security defaults 2026-05-21 10:47:34 -04:00
action.yml upgrade to Node 20 2024-01-12 15:45:34 +01:00
biome.json Remove files.ignoreUnknown from biome.json 2024-01-22 09:53:29 +09:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2022-05-11 14:58:25 -05:00
CODEOWNERS Rename team from dsp 2022-10-10 10:39:51 -07:00
CONTRIBUTING.md Update CONTRIBUTING.md 2024-07-12 15:56:48 -05:00
LICENSE Initial commit 2022-05-11 10:11:50 -05:00
package-lock.json Bump undici in the npm_and_yarn group across 1 directory 2026-07-16 11:26:27 +00:00
package.json Update to vitest 3.2.7 in the example as well 2026-07-07 19:18:07 +00:00
README.md npm update 2024-01-22 10:39:07 +09:00
tsconfig.json Native ESM 2024-01-12 21:46:59 +09:00
tsup.config.ts upgrade to Node 20 2024-01-12 15:45:34 +01:00

Dependency Submission Toolkit

@github/dependency-submission-toolkit is a TypeScript library for creating dependency snapshots and submitting them to the dependency submission API. Snapshots are a set of dependencies grouped by manifest with some related metadata. A manifest can be a physical file or a more abstract representation of a dependency grouping (such processing of program outputs). After submission to the API, the included dependencies appear in the repository's dependency graph.

Installation

npm install @github/dependency-submission-toolkit

Writing Your Own Dependency Submission Action

You may use classes from @github/dependency-submission-toolkit to help in building your own GitHub Action for submitting dependencies to the Dependency Submission API. At a high level, the steps to use the classes are:

  1. Create a PackageCache of all of the packages that could be included in your manifest, as well define as the relationships between them.

  2. Using the packages defined in PackageCache, create a Manifest or a BuildTarget, which defines the dependencies of the build environment or specific build artifact.

  3. Create a Snapshot to include one or more Manifests or BuildTargets. The snapshot is the base container for submitting dependencies to the Dependency Submission API.

  4. Follow the instructions for Creating a JavaScript Action. These include:

    • Defining an action.yml action metadata file
    • Compiling the JavaScript into a single script using ncc
    • Testing your action in a workflow

A full example action using this library is included in the example/ directory. This example uses the output from the npm list to create an accurate and complete graph of the dependencies used in this library. This action is also included in a workflow in this repository and runs for each commit to the main branch.