Skip to content

Commit a873baa

Browse files
authored
Upgrade yarn and node-crc (#248)
### Changelog None ### Docs None ### Description Closes #215 Includes patch to work around node-crc build issue: magiclen/node-crc#18
1 parent d53f764 commit a873baa

6 files changed

Lines changed: 6941 additions & 4767 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@v4
2121

22+
- run: corepack enable
2223
- uses: actions/setup-node@v4
2324
with:
24-
node-version: 20.x
25+
node-version: 22
2526
registry-url: https://registry.npmjs.org
2627
cache: yarn
2728

28-
- run: yarn install --frozen-lockfile
29+
- run: yarn install --immutable
2930

3031
- run: yarn run build
3132
- run: yarn run lint:ci
@@ -34,12 +35,12 @@ jobs:
3435
- run: yarn pack
3536
- name: Publish to NPM (dry run)
3637
# `yarn publish` does not support --provenance
37-
run: npm publish foxglove-crc-*.tgz --provenance --access public --dry-run
38+
run: npm publish package.tgz --provenance --access public --dry-run
3839
env:
3940
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
4041
- name: Publish to NPM
4142
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
4243
# `yarn publish` does not support --provenance
43-
run: npm publish foxglove-crc-*.tgz --provenance --access public
44+
run: npm publish package.tgz --provenance --access public
4445
env:
4546
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@
44
*.tsbuildinfo
55
dist/
66
node_modules/
7+
8+
# Yarn
9+
.yarn/*
10+
!.yarn/patches
11+
!.yarn/plugins
12+
!.yarn/sdks
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/Cargo.toml b/Cargo.toml
2+
index a967508960d8b6b686b23401ea14333b858a675c..1a210f1d7481d29b4ab62e4448cd9a2f81bf75bc 100644
3+
--- a/Cargo.toml
4+
+++ b/Cargo.toml
5+
@@ -3,7 +3,7 @@ name = "node-crc"
6+
version = "4.0.0"
7+
authors = ["Magic Len <len@magiclen.org>"]
8+
edition = "2021"
9+
-rust-version = "1.65"
10+
+rust-version = "1.77"
11+
repository = "https://github.com/magiclen/node-crc"
12+
homepage = "https://magiclen.org/node-js-crc/"
13+
keywords = ["nodejs", "crc8", "crc16", "crc32", "crc64"]

.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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"name": "@foxglove/crc",
3-
"private": false,
43
"version": "1.0.1",
54
"description": "Fast CRC32 computation in TypeScript",
65
"license": "MIT",
@@ -45,13 +44,14 @@
4544
"eslint": "9.23.0",
4645
"globals": "15.14.0",
4746
"jest": "29.7.0",
48-
"node-crc": "3.0.2",
47+
"node-crc": "patch:node-crc@npm%3A4.0.0#~/.yarn/patches/node-crc-npm-4.0.0-e4e98b2532.patch",
4948
"polycrc": "1.1.1",
5049
"prettier": "3.4.2",
5150
"rimraf": "6.0.1",
5251
"ts-jest": "29.2.5",
5352
"ts-node": "10.9.2",
5453
"typescript": "5.7.3",
5554
"typescript-eslint": "8.29.0"
56-
}
55+
},
56+
"packageManager": "yarn@4.9.2"
5757
}

0 commit comments

Comments
 (0)