cargo-messages 0.0.57 → 0.0.59

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.
Files changed (2) hide show
  1. package/cjs/index.cjs +5 -10
  2. package/package.json +1 -1
package/cjs/index.cjs CHANGED
@@ -1,9 +1,4 @@
1
- const {
2
- fromFile,
3
- fromStdin,
4
- findArtifact,
5
- findFileByCrateType
6
- } = require('./load.cjs');
1
+ const addon = require('./load.cjs');
7
2
 
8
3
  const PRIVATE = {};
9
4
 
@@ -20,7 +15,7 @@ class CargoArtifact {
20
15
  }
21
16
 
22
17
  findFileByCrateType(crateType) {
23
- return findFileByCrateType(this._kernel, crateType);
18
+ return addon.findFileByCrateType(this._kernel, crateType);
24
19
  }
25
20
  }
26
21
 
@@ -30,12 +25,12 @@ class CargoMessages {
30
25
  this._mount = options.mount || null;
31
26
  this._manifestPath = options.manifestPath || null;
32
27
  this._kernel = options.file
33
- ? fromFile(options.file, this._mount, this._manifestPath)
34
- : fromStdin(this._mount, this._manifestPath);
28
+ ? addon.fromFile(options.file, this._mount, this._manifestPath)
29
+ : addon.fromStdin(this._mount, this._manifestPath);
35
30
  }
36
31
 
37
32
  findArtifact(crateName) {
38
- const found = findArtifact(this._kernel, crateName);
33
+ const found = addon.findArtifact(this._kernel, crateName);
39
34
  return found
40
35
  ? new CargoArtifact(PRIVATE, found)
41
36
  : null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cargo-messages",
3
3
  "private": false,
4
- "version": "0.0.57",
4
+ "version": "0.0.59",
5
5
  "description": "A streaming reader for JSON messages emitted from Cargo.",
6
6
  "type": "module",
7
7
  "exports": {