@abide/abide 0.109.0 → 0.110.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,5 +1,11 @@
1
1
  # @abide/abide
2
2
 
3
+ ## 0.110.0
4
+
5
+ ### Minor Changes
6
+
7
+ - bfa7a68: Breaking: a server-only module and a test are named by file rather than by directory — `<name>.server.<ext>` under `lib`, `.test.ts` anywhere; `lib` and `public` are the only fences ([`e8e2666`](https://github.com/briancray/abide/commit/e8e266676a90d4f4534b74c6373116a1cbab277b))
8
+
3
9
  ## 0.109.0
4
10
 
5
11
  ### Minor Changes
package/docs/REGISTRY.md CHANGED
@@ -650,9 +650,10 @@ type Gated<Gate, Accepted> = [Schema<Accepted>] extends [Gate] ? never : Failed<
650
650
  | Path | Meaning | Rules |
651
651
  | --- | --- | --- |
652
652
  | `src/**` | The app's source. | 36.10, 38.25 |
653
- | `**/server/**` | Source the browser never loads. | 16.29, 23.15, 23.16, 23.18, 36.10 |
654
- | `**/lib/**` | The app's code that is no address: components and modules, on both sides. | 23.15, 23.16, 23.18, 23.22, 37.1 |
655
- | `**/tests/**` | The app's tests. | 23.15, 23.16, 23.18, 23.22, 37.1, 38.109 |
653
+ | `**/lib/**` | The app's code that is no address: components and modules. | 23.15, 23.16, 23.18, 23.22, 37.1 |
654
+ | `**/lib/**/<name>.server.<extension>` | A server file: source the browser never loads. | 16.29, 23.23, 34.20, 36.10 |
655
+ | `**/<name>.test.ts` | A test file: one of the app's tests, wherever it lies. | 23.22, 38.109 |
656
+ | `**/<name>.d.ts` | A declaration file: types for the checker, wherever it lies. | 23.22 |
656
657
  | `**/public/**` | The files answered as authored, at their path below that directory. | 23.15, 23.16, 23.18, 36.11, 36.12, 36.13, 36.14, 36.15, 36.17, 21.12, 21.13, 21.14, 38.18, 38.19 |
657
658
  | `src/public/favicon.ico` | The file answered at `/favicon.ico`. | 36.11 |
658
659
  | `src/public/robots.txt` | The file answered at `/robots.txt`. | 36.11 |
package/docs/RULEBOOK.md CHANGED
@@ -115,8 +115,11 @@ REGISTRY.md because none of them is a name an app author writes.
115
115
  | sink | What 35.7 defines. |
116
116
  | implementation | Anything claiming conformance to this document. |
117
117
  | dependency's `.abide` | A `.abide` file under a `node_modules` directory or outside the app's root. |
118
- | fence | A `server`, `public`, `lib` or `tests` directory. |
119
- | handler file | A `.ts` of the app's own, neither a `.d.ts` nor a `.test.ts`, directly in a directory under no fence. |
118
+ | fence | A `public` or `lib` directory. |
119
+ | server file | A file named `<name>.server.<extension>`. |
120
+ | test file | A `.test.ts` file. |
121
+ | declaration file | A `.d.ts` file. |
122
+ | handler file | A `.ts` of the app's own, neither a declaration file, a test file nor a server file, directly in a directory under no fence. |
120
123
  | private handler | A handler a `<script server>` declares. |
121
124
  | chapter app | The app the documentation's story has built by the end of one chapter, kept whole so a reader can download it and run it. |
122
125
 
@@ -915,7 +918,7 @@ read it.
915
918
  16.28 A browser MUST receive a generated `Rpc` wrapper carrying the method, the mount-relative address and
916
919
  the description, and MUST NOT receive the handler file or the `<script server>` that declared it.
917
920
 
918
- 16.29 Importing a module under a `server` directory from the client graph MUST be a compile error,
921
+ 16.29 Importing a server file from the client graph MUST be a compile error,
919
922
  and MUST NOT be a silent stub.
920
923
 
921
924
  16.30 An `Rpc` returning a raw `Value` MUST transport as `application/json`.
@@ -1430,8 +1433,7 @@ segment a page below it adds.
1430
1433
 
1431
1434
  23.15 A file under a fence MUST NOT have a route.
1432
1435
 
1433
- 23.16 A fence under a fence MUST be a build error naming both, save a `server` directory under a
1434
- `lib` or a `tests` directory.
1436
+ 23.16 A fence under a fence MUST be a build error naming both.
1435
1437
 
1436
1438
  23.17 A route whose first segment is `__abide` MUST be a build error.
1437
1439
 
@@ -1447,9 +1449,12 @@ error naming the mount.
1447
1449
  23.21 A `.abide` of the app's own directly in a directory under no fence MUST be a page, save a
1448
1450
  `layout.abide`, an `error.abide` and the root's `launcher.abide`.
1449
1451
 
1450
- 23.22 A file of the app's own directly in a directory under no fence that is neither a `.abide` nor
1451
- a handler file MUST be a build error naming the file and a `lib` directory, save one beside the
1452
- `package.json` of a root that holds it, nor a `.ts`.
1452
+ 23.22 A file of the app's own directly in a directory under no fence that is neither a `.abide`, a
1453
+ handler file, a test file nor a declaration file MUST be a build error naming the file and a `lib` directory, save one
1454
+ beside the `package.json` of a root that holds it, nor a `.ts`.
1455
+
1456
+ 23.23 A server file of the app's own under no `lib` directory MUST be a build error naming the file
1457
+ and a `lib` directory.
1453
1458
 
1454
1459
  # 24. Tracing
1455
1460
 
@@ -2101,8 +2106,8 @@ error.
2101
2106
  34.19 A `<script server>` block MUST be module scope run on a server alone, and the module a browser
2102
2107
  loads MUST NOT carry it.
2103
2108
 
2104
- 34.20 A `<script server>` in a `.abide` file of the app's own under a `server` or `public` directory
2105
- MUST be a compile error.
2109
+ 34.20 A `<script server>` in a `.abide` file of the app's own under a `public` directory MUST be a
2110
+ compile error.
2106
2111
 
2107
2112
  34.21 A file a script block imports `with { type: 'text' }`, a `.abide` among them, MUST be imported
2108
2113
  as its text and typed a `string`, on a server, in a browser and to the checker alike.
@@ -2206,8 +2211,8 @@ navigation from it MUST load the document it asks for.
2206
2211
 
2207
2212
  36.9 `NO_COLOR` MUST beat `FORCE_COLOR`.
2208
2213
 
2209
- 36.10 A module MUST be importable from either graph unless it lies under a `server` directory, per
2210
- 16.29.
2214
+ 36.10 A module MUST be importable from either graph unless it is a server file, per 16.29,
2215
+ whatever imports it.
2211
2216
 
2212
2217
  36.11 A file under a `public` directory MUST be answered at that directory's path below the app's
2213
2218
  `--root` followed by its own path below that directory, rooted at the mount rather than at the
@@ -2237,7 +2242,7 @@ answered per 41.12.
2237
2242
  # 37. Lifecycle hooks
2238
2243
 
2239
2244
  37.1 A lifecycle hook MUST be filed at the route of the `.abide` or the handler file that called it,
2240
- one under a `lib` or a `tests` directory at the route of the directory holding that one, and at the
2245
+ one under a `lib` directory at the route of the directory holding that one, and at the
2241
2246
  root route where neither did; a call MUST be read as a hook only where it names a hook the module
2242
2247
  imports from abide, under any name, or a member of a namespace it imports from abide.
2243
2248