Skip to content

Add cache clearing info to JS Build config docs#3297

Merged
s-stumbo merged 8 commits into
mainfrom
js-clear-cache
May 6, 2026
Merged

Add cache clearing info to JS Build config docs#3297
s-stumbo merged 8 commits into
mainfrom
js-clear-cache

Conversation

@s-stumbo
Copy link
Copy Markdown
Collaborator

@s-stumbo s-stumbo commented May 5, 2026

[ ] Check if this is a typo or other quick fix and ignore the rest :)

Type of change

Update to JS build config docs

What should this PR do?

Adds info about clearing the caches, from Angela's draft: https://docs.google.com/document/d/13kMq9F1mUooOoLsIXN_EuAs51J8TLshw4D0-uZTK7p0/edit?tab=t.0#heading=h.pqhjvgw1gl4l

Why are we making this change?

Reduce friction in the user experience

What are the acceptance criteria?

Content should be clear and accurate and appear in expected location

How should this PR be tested?

Review deploy preview

Signed-off-by: s-stumbo <sally.stumbo@chainguard.dev>
@s-stumbo s-stumbo requested a review from a team as a code owner May 5, 2026 14:25
@netlify
Copy link
Copy Markdown

netlify Bot commented May 5, 2026

Deploy Preview for ornate-narwhal-088216 ready!

Name Link
🔨 Latest commit 84d4553
🔍 Latest deploy log https://app.netlify.com/projects/ornate-narwhal-088216/deploys/69fa4edf150b3700082896ca
😎 Deploy Preview https://deploy-preview-3297--ornate-narwhal-088216.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

s-stumbo added 4 commits May 5, 2026 10:28
Signed-off-by: s-stumbo <sally.stumbo@chainguard.dev>
Signed-off-by: s-stumbo <sally.stumbo@chainguard.dev>
Signed-off-by: s-stumbo <sally.stumbo@chainguard.dev>
Signed-off-by: s-stumbo <sally.stumbo@chainguard.dev>
Copy link
Copy Markdown
Collaborator

@matthewhelmke matthewhelmke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@indexzero indexzero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍 net-net positive change that can be merged as-is. Called out some spots we could consider for future improvements

Comment thread content/chainguard/libraries/javascript/build-configuration.md
Comment on lines +735 to +736
//libraries.cgr.dev/javascript/:_auth="$token"
//libraries.cgr.dev/javascript/:always-auth=true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When Universal Repository is enabled this would aldo need to include:

//libraries.cgr.dev/javascript-upstream/:_auth="$token"
//libraries.cgr.dev/javascript-upstream/:always-auth=true

Copy link
Copy Markdown
Contributor

@angela-zhang angela-zhang May 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@indexzero just checking this is specific to yarn classic?

Then, set auth and set the registry URL to point to Chainguard in your user `.npmrc` file:

```bash
cat > .npmrc << 'EOF'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is non-blocking food for thought but: almost all package managers respect .npmrc. It may be less confusing / easier to follow if we unify documentation about .npmrc under a section dedicated to that particular file.

Copy link
Copy Markdown

@fritzy fritzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnpm v10 includes pnpm cache delete

pnpm also has a separate cache dir
rm -rf ${XDG_CACHE_HOME:-$HOME/.cache}/pnpm

and with pnpm you may need to delete your node_modules.

This may still not be enough. We have customers really struggling with this.

s-stumbo added 3 commits May 5, 2026 15:54
Signed-off-by: s-stumbo <sally.stumbo@chainguard.dev>
Signed-off-by: s-stumbo <sally.stumbo@chainguard.dev>
Signed-off-by: s-stumbo <sally.stumbo@chainguard.dev>
Copy link
Copy Markdown
Contributor

@angela-zhang angela-zhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown

@fritzy fritzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good now

@s-stumbo s-stumbo merged commit 2902f12 into main May 6, 2026
13 checks passed
@s-stumbo s-stumbo deleted the js-clear-cache branch May 6, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants