Remove deprecated npm packages, use Node.js built-in#96
Merged
Conversation
…to module
Remove "crypto": "latest" from hyco-websocket, hyco-ws, and hyco-https
package.json files. The require('crypto') calls in source code already
resolve to the built-in Node.js crypto module. Add unit tests to verify
crypto functionality works correctly with the built-in module.
Co-authored-by: jbjordan <108886350+jbjordan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Switch to built-in crypto library
Remove deprecated npm crypto package in favor of Node.js built-in
Feb 13, 2026
The three lib files imported crypto but never used it. The three
index.js files correctly use require('crypto') for createHmac and
are left unchanged.
Co-authored-by: jbjordan <108886350+jbjordan@users.noreply.github.com>
Copilot
AI
changed the title
Remove deprecated npm crypto package in favor of Node.js built-in
Remove deprecated npm crypto package, use Node.js built-in
Feb 13, 2026
jbjordan
approved these changes
Feb 13, 2026
axisc
approved these changes
Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All three packages (
hyco-ws,hyco-websocket,hyco-https) declared a dependency on the deprecated npmcryptoshim package. Node.js providescryptoas a built-in module — the npm package is unnecessary.Changes
"crypto": "latest"frompackage.jsonin all three packagesrequire('crypto')imports from three lib files that imported but never referenced it:hyco-ws/lib/HybridConnectionWebSocketServer.jshyco-websocket/lib/HybridConnectionsWebSocketRequest.jshyco-https/lib/HybridConnectionHttpsServer.jscreateRelayToken.test.js) in each package validating HMAC-SHA256 token generation against the built-in moduleThe
require('crypto')calls in the threeindex.jsfiles are intentionally unchanged — they usecrypto.createHmac()for SAS token generation and correctly resolve to the Node.js built-in.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.