Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to node 18.19.0 #531

Merged
merged 5 commits into from
Feb 16, 2024
Merged

Upgrade to node 18.19.0 #531

merged 5 commits into from
Feb 16, 2024

Conversation

rygine
Copy link
Collaborator

@rygine rygine commented Feb 14, 2024

in this PR:

  • updated node version manager version to 18.19.0
  • updated node types
  • upgraded checkout and setup-node actions to v4
  • updated static compressed bytes for a test
  • replaced empty ArrayBuffer with buffer of empty Uint8Array

as of node 18.17.0...

Web Crypto API functions' arguments are now coerced and validated as per their WebIDL definitions like in other Web Crypto API implementations. This further improves interoperability with other implementations of Web Crypto API.

link to PR for more context: nodejs/node#46067

with this change, the crypto.subtle.deriveKey function started complaining that an empty ArrayBuffer was not actually an instance of an ArrayBuffer. to fix this error, i simply instantiate an empty Uint8Array and use its buffer as the value for the info parameter. the values are equivalent (both empty array buffers).

@rygine rygine requested a review from a team February 14, 2024 22:14
5, 85, 84, 70, 45, 56, 40, 0, 34, 48, 120, 156, 51, 52, 48, 209, 49, 52,
48, 212, 49, 52, 176, 128, 96, 67, 67, 29, 99, 35, 29, 67, 67, 75, 48,
211, 208, 208, 4, 42, 101, 0, 22, 30, 85, 61, 170, 122, 84, 53, 237, 85,
3, 0, 139, 43, 173, 229,
])
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i'm not sure why this is necessary. i couldn't find anything in the node release notes that may have changed CompressionStream or DecompressionStream.

@@ -2,7 +2,7 @@ import { ciphertext } from '@xmtp/proto'
import Ciphertext, { AESGCMNonceSize, KDFSaltSize } from './Ciphertext'
import crypto from './crypto'

const hkdfNoInfo = new ArrayBuffer(0)
const hkdfNoInfo = new Uint8Array().buffer
Copy link
Contributor

Choose a reason for hiding this comment

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

Weird, but OK

Copy link

cloudflare-workers-and-pages bot commented Feb 16, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: b623ec5
Status: ✅  Deploy successful!
Preview URL: https://73d4e004.xmtp-js.pages.dev
Branch Preview URL: https://rygine-update-node-version.xmtp-js.pages.dev

View logs

@rygine rygine merged commit 83c30e2 into main Feb 16, 2024
7 checks passed
@rygine rygine deleted the rygine/update-node-version branch February 16, 2024 19:57
Copy link
Contributor

🎉 This PR is included in version 11.3.12 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants