Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chainguard-libraries-javascript

This repository contains tools and example configuration for Chainguard Libraries for JavaScript.

The focus is on showing how to configure the common JavaScript package managers to consume Chainguard Libraries directly from libraries.cgr.dev.

Each package manager has its own folder with a demo.sh script and a README. The script creates a fresh throwaway project, applies that manager's registry and authentication configuration, and installs a couple of packages so you can confirm they resolve through Chainguard Libraries. The projects are hollow shells with no application code — they exist only to prove the configuration and dependency resolution work, but the config steps are a faithful template for a real project.

Folder Package manager
tools Shared access setup — chainctl commands and authentication, the same for every package manager
npm npm
pnpm pnpm
yarn-berry Yarn Berry (v4+)
yarn-classic Yarn Classic (v1)
bun Bun

Prerequisites

  • A Chainguard account with a JavaScript libraries entitlement
  • chainctl installed and authenticated
  • Node.js (current LTS) and the package manager you want to try

Getting started

Set up access with the chainctl commands and authentication notes in tools. Creating an entitlement and a pull token is identical across package managers; only the per-tool registry configuration differs, and that lives with each package manager's folder.

Once a pull token is exported into your shell:

eval "$(chainctl auth pull-token --output env --repository=javascript)"

run any package manager's demo, for example:

./npm/demo.sh

See each package manager's folder README for the per-tool configuration details and how to swap in your own dependencies to test.

These examples all use direct access to libraries.cgr.dev/javascript/. If your organization fronts Chainguard Libraries with a repository manager (Nexus, Artifactory, Cloudsmith, Harbor, Amazon ECR, or Google Artifact Registry) instead, see Repository managers and the global configuration docs.

Resources

About

Collection of demo projects and resources for Chainguard Libraries for JavaScript

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages