Skip to content

Commit 08e5b86

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 - Update TypeScript to 5.7.3, Jest to 29.7.0
1 parent b01e251 commit 08e5b86

File tree

6 files changed

+6038
-3791
lines changed

6 files changed

+6038
-3791
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,18 @@ 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 build
2931
- run: yarn run lint:ci
3032
- run: yarn run test
3133

32-
- run: yarn pack
3334
- name: Publish to NPM
3435
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
35-
run: npx npm@11.7.0 publish package.tgz --provenance --access public
36+
run: yarn npm publish --provenance --access public

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,12 @@ dist
105105

106106
# MacOS
107107
.DS_Store
108+
109+
# Yarn
110+
.yarn/*
111+
!.yarn/patches
112+
!.yarn/plugins
113+
!.yarn/releases
114+
!.yarn/sdks
115+
!.yarn/versions
116+
.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.defaultFormatter": "esbenp.prettier-vscode",
77
"editor.formatOnSave": true,

.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: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@foxglove/velodyne-cloud",
33
"version": "1.0.1",
4+
"packageManager": "yarn@4.9.1",
45
"description": "TypeScript library for converting Velodyne LIDAR packet data to point clouds",
56
"license": "MIT",
67
"keywords": [
@@ -39,7 +40,7 @@
3940
"@foxglove/eslint-plugin": "0.13.0",
4041
"@types/eslint": "^7",
4142
"@types/eslint-plugin-prettier": "^3",
42-
"@types/jest": "^26.0.23",
43+
"@types/jest": "29.5.14",
4344
"@types/node": "^16.3.3",
4445
"@types/prettier": "2.3.2",
4546
"@typescript-eslint/eslint-plugin": "4.28.3",
@@ -50,10 +51,10 @@
5051
"eslint-plugin-import": "2.23.4",
5152
"eslint-plugin-jest": "24.3.6",
5253
"eslint-plugin-prettier": "3.4.0",
53-
"jest": "27.0.6",
54+
"jest": "29.7.0",
5455
"kelonio": "0.6.0",
5556
"prettier": "2.3.2",
56-
"ts-jest": "^27.0.3",
57-
"typescript": "4.3.5"
57+
"ts-jest": "29.2.5",
58+
"typescript": "5.7.3"
5859
}
5960
}

0 commit comments

Comments
 (0)