@foxglove/rosbag2
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -15,3 +15,3 @@ "use strict"; | ||
function parseMetadata(data) { | ||
const parsed = yaml_1.parseYaml(data); | ||
const parsed = (0, yaml_1.parseYaml)(data); | ||
if (parsed == undefined) { | ||
@@ -81,3 +81,3 @@ return undefined; | ||
function parseQosProfiles(data) { | ||
const parsed = yaml_1.parseYaml(data); | ||
const parsed = (0, yaml_1.parseYaml)(data); | ||
return Array.isArray(parsed) ? getQosProfiles(parsed) : []; | ||
@@ -172,4 +172,4 @@ } | ||
isNaN(duration.nsec) || | ||
rostime_1.areEqual(duration, TIME_ZERO) || | ||
rostime_1.areEqual(duration, DURATION_INFINITY)) { | ||
(0, rostime_1.areEqual)(duration, TIME_ZERO) || | ||
(0, rostime_1.areEqual)(duration, DURATION_INFINITY)) { | ||
return undefined; | ||
@@ -188,3 +188,3 @@ } | ||
} | ||
return rostime_1.fromNanoSec(nsec); | ||
return (0, rostime_1.fromNanoSec)(nsec); | ||
} | ||
@@ -200,4 +200,4 @@ function getVerboseDuration(obj, field) { | ||
} | ||
return rostime_1.fromNanoSec(nsec); | ||
return (0, rostime_1.fromNanoSec)(nsec); | ||
} | ||
//# sourceMappingURL=metadata.js.map |
@@ -12,3 +12,3 @@ "use strict"; | ||
it("parses a single QOS profile", () => { | ||
const profiles = metadata_1.parseQosProfiles(`- history: 3\n depth: 0\n reliability: 1\n durability: 2\n deadline:\n sec: 0\n nsec: 0\n lifespan:\n sec: 10\n nsec: 0\n liveliness: 1\n liveliness_lease_duration:\n sec: 0\n nsec: 0\n avoid_ros_namespace_conventions: false`); | ||
const profiles = (0, metadata_1.parseQosProfiles)(`- history: 3\n depth: 0\n reliability: 1\n durability: 2\n deadline:\n sec: 0\n nsec: 0\n lifespan:\n sec: 10\n nsec: 0\n liveliness: 1\n liveliness_lease_duration:\n sec: 0\n nsec: 0\n avoid_ros_namespace_conventions: false`); | ||
expect(profiles).toHaveLength(1); | ||
@@ -29,4 +29,4 @@ const profile = profiles[0]; | ||
it("parses example metadata", async () => { | ||
const metadataYamlStr = await promises_1.readFile(path_1.default.join(__dirname, "..", "tests", "bags", "talker", "metadata.yaml"), { encoding: "utf8" }); | ||
const metadata = metadata_1.parseMetadata(metadataYamlStr); | ||
const metadataYamlStr = await (0, promises_1.readFile)(path_1.default.join(__dirname, "..", "tests", "bags", "talker", "metadata.yaml"), { encoding: "utf8" }); | ||
const metadata = (0, metadata_1.parseMetadata)(metadataYamlStr); | ||
expect(metadata).toBeDefined(); | ||
@@ -33,0 +33,0 @@ expect(metadata.version).toEqual(4); |
@@ -25,3 +25,3 @@ "use strict"; | ||
} | ||
const timestamp = rostime_1.fromNanoSec(row.timestamp); | ||
const timestamp = (0, rostime_1.fromNanoSec)(row.timestamp); | ||
const value = { topic, timestamp, data: row.data }; | ||
@@ -28,0 +28,0 @@ return { value, done: false }; |
@@ -75,3 +75,3 @@ "use strict"; | ||
await metadataFile.file.close(); | ||
this.metadata_ = metadata_1.parseMetadata(metadataStr); | ||
this.metadata_ = (0, metadata_1.parseMetadata)(metadataStr); | ||
} | ||
@@ -173,7 +173,7 @@ else { | ||
function minTime(a, b) { | ||
return rostime_1.isLessThan(a, b) ? a : b; | ||
return (0, rostime_1.isLessThan)(a, b) ? a : b; | ||
} | ||
function maxTime(a, b) { | ||
return rostime_1.isLessThan(a, b) ? b : a; | ||
return (0, rostime_1.isLessThan)(a, b) ? b : a; | ||
} | ||
//# sourceMappingURL=Rosbag2.js.map |
{ | ||
"name": "@foxglove/rosbag2", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "ROS2 (Robot Operating System) bag reader and writer abstract implementation", | ||
@@ -42,8 +42,7 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@foxglove/eslint-plugin": "0.14.0", | ||
"@types/jest": "^27.0.1", | ||
"@types/js-yaml": "^4.0.2", | ||
"@types/prettier": "2.3.2", | ||
"@typescript-eslint/eslint-plugin": "4.29.2", | ||
"@typescript-eslint/parser": "4.29.2", | ||
"@foxglove/eslint-plugin": "0.17.1", | ||
"@types/jest": "^27.0.3", | ||
"@types/js-yaml": "^4.0.5", | ||
"@typescript-eslint/eslint-plugin": "5.5.0", | ||
"@typescript-eslint/parser": "5.5.0", | ||
"eslint": "7.32.0", | ||
@@ -53,16 +52,16 @@ "eslint-config-prettier": "8.3.0", | ||
"eslint-plugin-filenames": "1.3.2", | ||
"eslint-plugin-import": "2.24.0", | ||
"eslint-plugin-jest": "24.4.0", | ||
"eslint-plugin-prettier": "3.4.0", | ||
"jest": "27.0.6", | ||
"prettier": "2.3.2", | ||
"ts-jest": "27.0.5", | ||
"typescript": "4.3.5" | ||
"eslint-plugin-import": "2.25.3", | ||
"eslint-plugin-jest": "25.3.0", | ||
"eslint-plugin-prettier": "4.0.0", | ||
"jest": "27.4.0", | ||
"prettier": "2.5.0", | ||
"ts-jest": "27.0.7", | ||
"typescript": "4.5.2" | ||
}, | ||
"dependencies": { | ||
"@foxglove/rosmsg-msgs-common": "^1.0.1", | ||
"@foxglove/rosmsg2-serialization": "^1.0.2", | ||
"@foxglove/rostime": "^1.1.0", | ||
"@foxglove/rosmsg-msgs-common": "^1.0.4", | ||
"@foxglove/rosmsg2-serialization": "^1.0.5", | ||
"@foxglove/rostime": "^1.1.1", | ||
"js-yaml": "^4.1.0" | ||
} | ||
} |
@@ -98,3 +98,3 @@ import { Duration, Time, areEqual as areTimesEqual, fromNanoSec } from "@foxglove/rostime"; | ||
const parsed = parseYaml(data); | ||
return Array.isArray(parsed) ? getQosProfiles(parsed) : []; | ||
return Array.isArray(parsed) ? getQosProfiles(parsed as Obj[]) : []; | ||
} | ||
@@ -101,0 +101,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
86908
16