Skip to content

Commit 2912c01

Browse files
committed
Upgrade to Yarn 4.x for OIDC trusted publishing
- Add packageManager field (yarn@4.9.1) - Add .yarnrc.yml with nodeLinker: node-modules - Update CI: corepack enable, --immutable, yarn npm publish - Update Node.js to 22.x
1 parent 9b78a02 commit 2912c01

File tree

6 files changed

+2615
-1594
lines changed

6 files changed

+2615
-1594
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@ jobs:
1919

2020
steps:
2121
- uses: actions/checkout@v6
22+
- run: corepack enable
2223
- uses: actions/setup-node@v6
2324
with:
24-
node-version: 16.x
25+
node-version: 22.x
2526
registry-url: https://registry.npmjs.org
27+
cache: yarn
2628

27-
- run: yarn install --frozen-lockfile
29+
- run: yarn install --immutable
2830
- run: yarn run lint:ci
2931

30-
- run: yarn pack
3132
- name: Publish to NPM
3233
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
33-
run: npx npm@11.7.0 publish package.tgz --provenance --access public
34+
run: yarn npm publish --provenance --access public

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,12 @@
33
*.tsbuildinfo
44
dist/
55
node_modules/
6+
7+
# Yarn
8+
.yarn/*
9+
!.yarn/patches
10+
!.yarn/plugins
11+
!.yarn/releases
12+
!.yarn/sdks
13+
!.yarn/versions
14+
.pnp.*

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// -*- jsonc -*-
22
{
33
"editor.codeActionsOnSave": {
4-
"source.fixAll.eslint": true
4+
"source.fixAll.eslint": "explicit"
55
},
66
"editor.formatOnSave": true,
77
"editor.defaultFormatter": "esbenp.prettier-vscode",

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@foxglove/just-fetch",
3-
"private": false,
43
"version": "1.3.1",
4+
"packageManager": "yarn@4.9.1",
55
"description": "Isomorphic ponyfill wrapping native browser fetch and node-fetch",
66
"license": "MIT",
77
"repository": {

0 commit comments

Comments
 (0)