Use standard Uint8Array instead of Node.js Buffer#1097
Merged
EzraBrooks merged 2 commits intodevelopfrom Nov 18, 2025
Merged
Conversation
Contributor
Author
|
I can confirm that this passes the PNG compression test locally that is currently disabled in CI due to #1061 |
2aa81e1 to
4e74a7d
Compare
Contributor
Author
|
After this PR, we are back to being able to run in the browser from a CDN like so: <head>
<script type="importmap">
{
"imports": {
"roslib": "https://unpkg.com/roslib@2.0.0/dist/RosLib.js",
"bson": "https://unpkg.com/bson@7.0.0/lib/bson.mjs",
"cbor2": "https://unpkg.com/cbor2@2.0.1/lib/index.js",
"@cto.af/wtf8": "https://unpkg.com/@cto.af/wtf8@0.0.4/lib/index.js",
"eventemitter3": "https://unpkg.com/eventemitter3@5.0.1/dist/eventemitter3.esm.js",
"fast-png": "https://unpkg.com/fast-png@7.0.1/lib/index.js",
"uuid": "https://unpkg.com/uuid@13.0.0/dist/index.js",
"iobuffer": "https://unpkg.com/iobuffer@6.0.1/lib/iobuffer.js",
"pako": "https://unpkg.com/pako@2.1.0/dist/pako.esm.mjs"
}
}
</script>
<script type="module">
import { Ros } from "roslib";
const ros = new Ros({
url: "ws://localhost:9090",
});
ros.on("connection", () => {
console.log("Connected to ROS!");
});
</script>
</head> |
Contributor
Author
|
We can consider auto-generating that import map via |
sea-bass
approved these changes
Nov 18, 2025
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.
fixes #1098
more removing ancient dependencies (that aren't exposed in our API) as I run through real-world usage of roslibjs 2.0 and encounter hurdles.