@systemfsoftware/omp-typescript-discipline 1.0.7 → 1.1.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/CHANGELOG.md CHANGED
@@ -1,43 +1,5 @@
1
1
  # @systemfsoftware/omp-typescript-discipline
2
2
 
3
- ## 1.0.7
3
+ # @systemfsoftware/omp-typescript-discipline@1.1.0
4
4
 
5
- ### Patch Changes
6
-
7
- - The tsconfig rule now also covers a package's app project when the package is split into project references, allows `node` types in test projects, and no longer interrupts the agent mid-stream.
8
-
9
- ## 1.0.6
10
-
11
- ### Patch Changes
12
-
13
- - Bump the stryker catalog to pull in the latest patch releases of the stryker-js ecosystem.
14
-
15
- ## 1.0.5
16
-
17
- ### Patch Changes
18
-
19
- - Dependencies resolve to Effect 4.0.0-rc.116 and Vitest 5.
20
-
21
- ## 1.0.4
22
-
23
- ### Patch Changes
24
-
25
- - Releases the workspace so its published versions track the shared dependency graph this change moves.
26
-
27
- ## 1.0.3
28
-
29
- ### Patch Changes
30
-
31
- - Re-published against the oxc-based instrumenter: workspace dependency ranges move to the new instrumenter major; no package's own behavior changes in this release.
32
-
33
- ## 1.0.2
34
-
35
- ### Patch Changes
36
-
37
- - Peer Effect requirement advances to 4.0.0-rc.112. No API changes.
38
-
39
- ## 1.0.1
40
-
41
- ### Patch Changes
42
-
43
- - TypeScript discipline now guides the agent toward standard libraries instead of hand-rolled helpers — `jsr:@std/encoding`, `jsr:@std/async`, `jsr:@std/bytes`, `jsr:@std/path`, and, when you already import from `effect`, the Effect-native `Effect.sleep` and `Schedule` primitives. The guidance appears as an inline hint while the agent writes code.
5
+ No change a consumer can observe. `tsconfigs` now interrupts the write that breaks the tsconfig boundary instead of reminding after it lands. Both it and the `solution-problem-type-enum` project rule pin `interruptMode: tool-only`, so the abort holds even when the consumer sets `ttsr.interruptMode: never`. The `no-hand-rolled-std` rule is removed: its conditions matched most TypeScript. turbo moved 2.11.8 -> 2.11.10
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@systemfsoftware/omp-typescript-discipline",
3
3
  "license": "Apache-2.0",
4
- "version": "1.0.7",
4
+ "version": "1.1.0",
5
5
  "author": "Ryan Lee <drdgvhbh@gmail.com>",
6
6
  "description": "OMP TypeScript discipline plugin: enforces project references for tooling files and pure tsconfig boundaries",
7
7
  "type": "module",
@@ -9,6 +9,7 @@
9
9
  "rules"
10
10
  ],
11
11
  "publishConfig": {
12
+ "access": "public",
12
13
  "provenance": true
13
14
  },
14
15
  "repository": {
@@ -8,10 +8,11 @@ scope:
8
8
  - "tool:write(**/tsconfig.build.json)"
9
9
  - "tool:edit(**/tsconfig.app.json)"
10
10
  - "tool:write(**/tsconfig.app.json)"
11
- interruptMode: never
12
- recurrence: recurring
11
+ interruptMode: tool-only
13
12
  ---
14
13
 
14
+ This call is aborted before the file is written. Write it again with the fix below. Only the call's own payload is matched — an `edit`'s added lines, a `write`'s full content — so a tsconfig that already carries this condition stays silent under an unrelated edit, and rewriting such a file is the write that must apply the fix.
15
+
15
16
  1. **Tooling & Root files:** Root-level tooling files (e.g. `tsdown.config.ts`, `vitest.config.ts`, `vite.config.ts`, scripts, configs) outside `src` / `test` / `tests` / `__tests__` must NOT be included in the package's source project (`tsconfig.app.json`, or `tsconfig.json` where the package has no project split). They belong in a dedicated `tsconfig.node.json` referenced from the root `tsconfig.json`.
16
17
  2. **Node Types Boundary:** `"node"` or `"@types/node"` must not appear in `compilerOptions.types` of the source project. Node types belong in `tsconfig.node.json`, or in `tsconfig.test.json` when the tests themselves need them.
17
18
 
@@ -1,30 +0,0 @@
1
- ---
2
- description: Prefer Effect / JSR @std/* over hand-rolled encoding, async, bytes, path, dates, uuid, and crypto primitives
3
- condition: '(btoa\s*\(|atob\s*\(|Buffer\.from\([^)]*base64|\.toString\([^)]*base64|charCodeAt[^\n]*toString\(16\)|new\s+Date\s*\(|Date\.now\(\)|toISOString\(\)|getTimezoneOffset|randomUUID|createHash|crypto\.subtle|new\s+Promise\s*\(\s*\w+\s*=>\s*setTimeout|clearTimeout\s*\(|for\s*\([^)]*\)\s*\{[^\}]*setTimeout|Uint8Array[\s\S]*?for\s*\(|\.split\(|\+[\x22\x27]\/[\x22\x27])'
4
- scope:
5
- - "tool:edit(**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs})"
6
- - "tool:write(**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs})"
7
- interruptMode: 'tool-only'
8
- ---
9
-
10
- > **Precedence: Effect-native > `@std/*` > hand-rolled.** If the edited file already imports from `"effect"` (portable signal `from "effect"`), prefer Effect for async; otherwise use `@std/*`. Encoding/bytes/path have no Effect overlap — always `@std/*`.
11
-
12
- Hand-rolled primitives reinvent tested correctness, lose typed errors/interruption, and inflate bundle and review cost. Use the stdlib.
13
-
14
- | Hand-rolled signal | Effect-native (if `from "effect"` in file) | `@std/*` fallback | Import example |
15
- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------- | --------------------------------------- | ---------------------------------------------------------------------------- |
16
- | `btoa`/`atob`, `Buffer.from(x,'base64')`, `.toString('base64')` | — | `jsr:@std/encoding` | `import {encodeBase64, decodeBase64} from "jsr:@std/encoding"` |
17
- | hex loop `charCodeAt`→`toString(16)` table | — | `jsr:@std/encoding` | `import {encodeHex, decodeHex} from "jsr:@std/encoding"` |
18
- | `new Promise(r=>setTimeout(r,ms))` | `Effect.sleep(Duration.millis(ms))` | `jsr:@std/async` `delay` | `import {delay} from "jsr:@std/async"` / `yield* Effect.sleep("100 millis")` |
19
- | `clearTimeout`/`setTimeout` debounce/throttle closure | `Schedule` / `Effect` composition | `jsr:@std/async` `debounce` | `import {debounce} from "jsr:@std/async"` |
20
- | retry loop `for/while`+`try/catch`+`setTimeout` | `Effect.retry({schedule: Schedule.exponential("100 millis")})` | `jsr:@std/async` `retry` | `import {retry} from "jsr:@std/async"` |
21
- | concurrency pool `for`+`await` | `Effect.forEach(arr, fn, {concurrency:4})` / `Stream` | `jsr:@std/async` `pooledMap` | `import {pooledMap} from "jsr:@std/async"` |
22
- | `Uint8Array` manual concat/copy `for` loop | — | `jsr:@std/bytes` | `import {concat} from "jsr:@std/bytes"` |
23
- | `dir + "/" + name`, `split("/")` path surgery | — | `jsr:@std/path` | `import {join} from "jsr:@std/path"` |
24
- | `new Date()`, `Date.now()`, `toISOString()`, `getTimezoneOffset` hand-rolled date math | — | `jsr:@std/datetime` / `Temporal` | `import {format} from "jsr:@std/datetime"` |
25
- | `randomUUID`, `uuid()` hand-rolled ids | — | `jsr:@std/uuid` / `crypto.randomUUID()` | `import {v4} from "jsr:@std/uuid"` / `crypto.randomUUID()` |
26
- | `createHash`, `crypto.subtle` hand-rolled hashing | — | `jsr:@std/crypto` | `import {crypto} from "jsr:@std/crypto"` |
27
-
28
- Resolver: `jsr:@std/*` in Deno, or `jsr:` catalog / `npm:@jsr/std__*` in Node/pnpm (one illustrative `catalog:` pin `"@std/encoding": "jsr:^1.0.11"`).
29
-
30
- **When not to apply:** already using `Effect-native` or `jsr:@std/*`; genuine polyfill for legacy runtime with comment; trivial one-off helper justified in review.