Skip to content

Commit bfcf4cc

Browse files
raymondklwshangclaude
authored
chore: bump package versions (#472)
Co-authored-by: Linwei Shang <linwei.shang@dfinity.org> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e1a1b6c commit bfcf4cc

8 files changed

Lines changed: 979 additions & 1033 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,13 @@ If you want to submit a pull request to fix an issue or add a feature, here's a
6363
git add path-to-changed-file
6464
```
6565
8. Commit your changes to store the contents you added to the index along with a descriptive message by running a command similar to the following:
66+
6667
```shell
6768
cz commit
6869
```
70+
6971
- See [Conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) for more information on the commit message formats.
72+
7073
9. Push the changes to the remote repository by running a command similar to the following:
7174
```shell
7275
git push origin my-branch-name-here

examples/certification/certified-counter/src/frontend/src/index.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
import { verifyCertification } from '@dfinity/certificate-verification';
2-
import { Actor, HttpAgent, compare, lookup_path } from '@dfinity/agent';
2+
import {
3+
Actor,
4+
HttpAgent,
5+
compare,
6+
lookup_path,
7+
lookupResultToBuffer,
8+
} from '@dfinity/agent';
39
import { Principal } from '@dfinity/principal';
410
import {
511
idlFactory,
@@ -65,13 +71,13 @@ buttonElement.addEventListener('click', async event => {
6571
maxCertificateTimeOffsetMs: 50000,
6672
});
6773

68-
const treeHash = lookup_path(['count'], tree);
74+
const treeHash = lookupResultToBuffer(lookup_path(['count'], tree));
6975
if (!treeHash) {
7076
throw new Error('Count not found in tree');
7177
}
7278

7379
const responseHash = await hashUInt32(count);
74-
if (!(treeHash instanceof ArrayBuffer) || !equal(responseHash, treeHash)) {
80+
if (!equal(responseHash, treeHash)) {
7581
throw new Error('Count hash does not match');
7682
}
7783

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
body {
22
margin: 0;
3-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4-
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5-
sans-serif;
3+
font-family:
4+
-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
5+
'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
66
-webkit-font-smoothing: antialiased;
77
-moz-osx-font-smoothing: grayscale;
88
}
99

1010
code {
11-
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12-
monospace;
11+
font-family:
12+
source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
1313
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
body {
22
margin: 0;
3-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4-
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5-
sans-serif;
3+
font-family:
4+
-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
5+
'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
66
-webkit-font-smoothing: antialiased;
77
-moz-osx-font-smoothing: grayscale;
88
}
99

1010
code {
11-
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12-
monospace;
11+
font-family:
12+
source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
1313
}

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@
1414
"test": "pnpm run -r test"
1515
},
1616
"devDependencies": {
17-
"@dfinity/agent": "^1.0.1",
18-
"@dfinity/candid": "^1.0.1",
19-
"@dfinity/principal": "^1.0.1",
17+
"@dfinity/agent": "^1.4.0",
18+
"@dfinity/candid": "^1.4.0",
2019
"@dfinity/pic": "0.12.0",
21-
"@types/jest": "^29.5.13",
22-
"@types/node": "~22.10.2",
20+
"@dfinity/principal": "^1.4.0",
21+
"@types/jest": "^29.5.14",
22+
"@types/node": "~22.10.10",
2323
"jest": "^29.7.0",
24-
"prettier": "^3.3.3",
25-
"ts-jest": "^29.2.5",
26-
"typescript": "~5.6.2",
24+
"prettier": "^3.8.1",
25+
"solid-js": "^1.9.11",
26+
"ts-jest": "^29.4.6",
27+
"typescript": "~5.6.3",
2728
"vite": "^7.3.1",
2829
"vite-plugin-checker": "^0.12.0",
29-
"vite-plugin-static-copy": "^3.1.4",
30-
"vite-plugin-compression2": "^2.3.1",
30+
"vite-plugin-compression2": "^2.4.0",
3131
"vite-plugin-solid": "^2.11.10",
32-
"vitest": "^4.0.17",
33-
"solid-js": "^1.9.11"
32+
"vite-plugin-static-copy": "^3.2.0",
33+
"vitest": "^4.0.18"
3434
}
3535
}

packages/certificate-verification-js/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
"test:coverage": "vitest run --coverage"
2828
},
2929
"peerDependencies": {
30-
"@dfinity/agent": "^1.0.1",
31-
"@dfinity/candid": "^1.0.1",
32-
"@dfinity/principal": "^1.0.1"
30+
"@dfinity/agent": "^1.4.0",
31+
"@dfinity/candid": "^1.4.0",
32+
"@dfinity/principal": "^1.4.0"
3333
},
3434
"devDependencies": {
3535
"@dfinity/certification-testing": "workspace:*"

packages/certificate-verification-js/src/index.ts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
HashTree,
55
reconstruct,
66
compare,
7+
lookupResultToBuffer,
78
} from '@dfinity/agent';
89
import { Principal } from '@dfinity/principal';
910
import { PipeArrayBuffer, lebDecode } from '@dfinity/candid';
@@ -43,9 +44,11 @@ function validateCertificateTime(
4344
maxCertificateTimeOffsetMs: number,
4445
nowMs: number,
4546
): void {
46-
const certificateTimeNs = lebDecode(
47-
new PipeArrayBuffer(certificate.lookup(['time'])),
48-
);
47+
const timeBuf = lookupResultToBuffer(certificate.lookup(['time']));
48+
if (!timeBuf) {
49+
throw new CertificateTimeError('Could not find time in the certificate.');
50+
}
51+
const certificateTimeNs = lebDecode(new PipeArrayBuffer(timeBuf));
4952
const certificateTimeMs = Number(certificateTimeNs / BigInt(1_000_000));
5053

5154
if (certificateTimeMs - maxCertificateTimeOffsetMs > nowMs) {
@@ -67,11 +70,13 @@ async function validateTree(
6770
canisterId: Principal,
6871
): Promise<void> {
6972
const treeRootHash = await reconstruct(tree);
70-
const certifiedData = certificate.lookup([
71-
'canister',
72-
canisterId.toUint8Array(),
73-
'certified_data',
74-
]);
73+
const certifiedData = lookupResultToBuffer(
74+
certificate.lookup([
75+
'canister',
76+
canisterId.toUint8Array(),
77+
'certified_data',
78+
]),
79+
);
7580

7681
if (!certifiedData) {
7782
throw new CertificateVerificationError(

0 commit comments

Comments
 (0)