lat.md 0.1.2 → 0.1.3

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.
@@ -1,4 +1,8 @@
1
1
  #!/usr/bin/env node
2
+ // Suppress deprecation warnings from transitive dependencies unless --verbose
3
+ if (!process.argv.includes('--verbose')) {
4
+ process.noDeprecation = true;
5
+ }
2
6
  import { readFileSync } from 'node:fs';
3
7
  import { dirname, join } from 'node:path';
4
8
  import { fileURLToPath } from 'node:url';
@@ -27,7 +31,8 @@ program
27
31
  .description('Anchor source code to high-level concepts defined in markdown')
28
32
  .version(version)
29
33
  .option('--dir <path>', 'project root to look for lat.md in (default: cwd)')
30
- .option('--no-color', 'disable color output');
34
+ .option('--no-color', 'disable color output')
35
+ .option('--verbose', 'show deprecation warnings and extra diagnostics');
31
36
  program
32
37
  .command('locate')
33
38
  .description('Find sections by id')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lat.md",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "A knowledge graph for your codebase, written in markdown",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.30.2",
@@ -53,4 +53,16 @@ lat:
53
53
  ### Handles missing password
54
54
  ```
55
55
 
56
- Each test in code should reference its spec: `// @lat: [[tests#User login#Rejects expired tokens]]`. Running `lat check` will flag any spec section not covered by a code reference, and any code reference pointing to a nonexistent section.
56
+ Each test in code should reference its spec with exactly one comment placed next to the relevant test not at the top of the file:
57
+
58
+ ```python
59
+ # @lat: [[tests#User login#Rejects expired tokens]]
60
+ def test_rejects_expired_tokens():
61
+ ...
62
+
63
+ # @lat: [[tests#User login#Handles missing password]]
64
+ def test_handles_missing_password():
65
+ ...
66
+ ```
67
+
68
+ Do not duplicate refs. One `@lat:` comment per spec section, placed at the test that covers it. `lat check` will flag any spec section not covered by a code reference, and any code reference pointing to a nonexistent section.