node-mavlink 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-mavlink",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "author": "Matthias Hryniszak <padcom@gmail.com>",
5
5
  "license": "LGPL",
6
6
  "description": "MavLink definitions and parsing library",
package/sanity-check.cjs CHANGED
@@ -1,8 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ const { join } = require('node:path')
3
4
  const { createReadStream } = require('node:fs')
4
5
  const { createMavLinkStream } = require('.')
5
6
 
6
- const port = createReadStream('examples/GH-5.bin')
7
+ const port = createReadStream(join(__dirname, 'examples/GH-5.bin'))
7
8
  const parser = createMavLinkStream(port)
8
9
  parser.on('data', packet => console.log(packet.debug()))
package/sanity-check.mjs CHANGED
@@ -1,8 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import { join } from 'node:path'
4
+ import { fileURLToPath } from 'node:url'
3
5
  import { createReadStream } from 'node:fs'
4
6
  import { createMavLinkStream } from './dist/index.js'
5
7
 
6
- const port = createReadStream('./examples/GH-5.bin')
8
+ const __dirname = fileURLToPath(new URL('.', import.meta.url))
9
+ const port = createReadStream(join(__dirname, 'examples/GH-5.bin'))
7
10
  const parser = createMavLinkStream(port)
8
11
  parser.on('data', packet => console.log(packet.debug()))