wpilog-parser 2.2.0 → 2.3.0

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": "wpilog-parser",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Read WPILib wpilog data log files in TypeScript & JavaScript",
5
5
  "homepage": "https://github.com/jonahsnider/wpilog-parser#readme",
6
6
  "license": "MIT",
@@ -13,6 +13,9 @@
13
13
  "type": "git",
14
14
  "url": "git+https://github.com/jonahsnider/wpilog-parser.git"
15
15
  },
16
+ "bin": {
17
+ "wpilog": "./dist/cli.mjs"
18
+ },
16
19
  "files": [
17
20
  "dist",
18
21
  "skills"
@@ -30,27 +33,23 @@
30
33
  "build": "vp pack",
31
34
  "check": "vp check",
32
35
  "dev": "vp pack --watch",
33
- "generate": "bun run ./src/struct/codegen.ts",
36
+ "generate": "node ./src/struct/codegen.ts",
34
37
  "prepare": "vp config",
35
38
  "prepublishOnly": "vp run build",
39
+ "start": "node ./src/cli.ts",
36
40
  "test": "vp test"
37
41
  },
38
42
  "dependencies": {
39
- "chevrotain": "^12.0.0"
43
+ "@toon-format/toon": "^4.1.1",
44
+ "cac": "^7.0.0",
45
+ "chevrotain": "^13.0.0"
40
46
  },
41
47
  "devDependencies": {
42
- "@codspeed/vitest-plugin": "^5.2.0",
43
- "@types/node": "24.12.2",
44
- "@typescript/native-preview": "7.0.0-dev.20260425.1",
45
- "typescript": "6.0.3",
46
- "vite-plus": "0.1.19"
47
- },
48
- "overrides": {
49
- "vite": "npm:@voidzero-dev/vite-plus-core@latest",
50
- "vitest": "npm:@voidzero-dev/vite-plus-test@latest"
51
- },
52
- "packageManager": "bun@1.3.10",
53
- "patchedDependencies": {
54
- "@codspeed/vitest-plugin@5.2.0": "patches/@codspeed%2Fvitest-plugin@5.2.0.patch"
55
- }
48
+ "@codspeed/vitest-plugin": "5.7.1",
49
+ "@types/node": "26.2.0",
50
+ "@typescript/native-preview": "7.0.0-dev.20260707.2",
51
+ "typescript": "7.0.2",
52
+ "vite-plus": "0.3.0"
53
+ },
54
+ "packageManager": "pnpm@12.0.0-rc.8"
56
55
  }
@@ -10,27 +10,16 @@ WPILOG is the binary log format used by logging libraries in the FRC ecosystem.
10
10
 
11
11
  ## Creating a project
12
12
 
13
- 1. Init a project using `bun init` or similar
13
+ 1. Init a project using `pnpm init` or similar
14
14
  2. Add `wpilog-parser` as a dependency
15
- 3. Create a `.ts` file for catalogging the records in the WPILOG file
16
-
17
- ```ts
18
- import { readFile } from 'node:fs/promises';
19
- import { readRecords, catalogEntries } from 'wpilog-parser';
20
-
21
- const bytes = await readFile('./example.wpilog');
22
-
23
- for (const catalogEntry of catalogEntries(readRecords(bytes))) {
24
- console.log(catalogEntry);
25
- // {
26
- // entryId: 3,
27
- // name: "/Robot/DogLog/Options",
28
- // type: "string",
29
- // metadata: "{\"source\":\"DogLog\"}",
30
- // }
31
- }
15
+ 3. Catalog the entries in the WPILOG file before deciding what to analyze
16
+
17
+ ```sh
18
+ pnpm wpilog catalog ./example.wpilog
32
19
  ```
33
20
 
21
+ The default output is plaintext. Use `--json`, `--jsonl`/`--ndjson`, or `--csv` when another format is more useful.
22
+
34
23
  ## Analyzing logs
35
24
 
36
25
  Use `decodeRecords` to parse record contents. Filter by `name` and narrow on `type`: