@nifrajs/ts-plugin 5.0.0 → 5.2.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 ADDED
@@ -0,0 +1,607 @@
1
+ # @nifrajs/ts-plugin
2
+
3
+ ## 5.2.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 9498cf8: The package ships its `CHANGELOG.md`, so the installed package has the notes for every version, as the GitHub release does. Before, the tarball held only the code, `README.md`, `LICENSE` and `package.json`.
8
+ - Updated dependencies [9498cf8]
9
+ - Updated dependencies [1f3ff32]
10
+ - Updated dependencies [4bb8e52]
11
+ - Updated dependencies [cdff19d]
12
+ - Updated dependencies [5edd0ba]
13
+ - Updated dependencies [000b4cb]
14
+ - Updated dependencies [c5455fb]
15
+ - Updated dependencies [6082ba5]
16
+ - Updated dependencies [fd58beb]
17
+ - Updated dependencies [ea25a61]
18
+ - Updated dependencies [ed13e36]
19
+ - Updated dependencies [281a48e]
20
+ - Updated dependencies [746ada9]
21
+ - Updated dependencies [1d20d1f]
22
+ - Updated dependencies [b9e7c6b]
23
+ - @nifrajs/core@5.2.0
24
+ - @nifrajs/web@5.2.0
25
+
26
+ ## 5.1.0
27
+
28
+ ### Patch Changes
29
+
30
+ - abb4354: The package now ships the MIT `LICENSE` text, as every other @nifrajs package already did.
31
+ - 5372e3a: A package's own `"nifra": { "environment": ... }` may give each export entry its own side: `{ ".": "backend", "./react": "frontend", "./schema": "library" }`. An import is judged by the entry it names, the exact subpath first and then the most specific `*` pattern, so two entries backed by one file keep their own sides; importing an entry the map leaves out is an error, as is a key or side the map cannot use. A file reached by path alone, through a relative or aliased deep import, takes the side of every mapped entry that reaches it through the package's own imports under any export condition, and a file no mapped entry reaches is an error. An import that binds only types (`import type`, `export type`, or a `{ }` list of `type` specifiers) grants no ownership, so a backend file a frontend entry only types against stays backend. The Bun and Vite client and server builds, both dev servers, `nifra check` (NF-C028 and NF-C004) and the editor plugin apply the same rules. The Vite builds record the specifier behind each such import, since Rollup keeps only the resolved file. `classify(file, specifier)` on a zone classifier takes the import as written, and `declaredSide(environment, specifier)` reads one declaration. A package-wide string and the app's `"zones": { "packages": ... }` defaults behave as before, and a package's own declaration outranks them. A third-party package's side is read from its root manifest, past a nested `package.json` such as `dist/esm/package.json`.
32
+ - 9cdd956: The editor plugin's zone check now resolves a package.json import such as `#server/db`. It used to cut the specifier at its first `?` or `#`, counting the leading `#`, so TypeScript got an empty specifier and the import was never checked. A query after the name (`#server/db?raw`) is still dropped.
33
+ - 3c747e8: Go-to-definition on a route path compiles and sorts the app's route patterns once per route set instead of on every request. The cache was keyed by the route array, and route discovery returns a new array each time, so it never hit and every cursor move recompiled every route. A route set that changes (a route added, renamed or removed) still compiles afresh.
34
+ - Updated dependencies [78b2a04]
35
+ - Updated dependencies [638efe5]
36
+ - Updated dependencies [2a0a5d3]
37
+ - Updated dependencies [5372e3a]
38
+ - Updated dependencies [b276c67]
39
+ - Updated dependencies [29d6649]
40
+ - Updated dependencies [2a0a5d3]
41
+ - Updated dependencies [72e1b4b]
42
+ - Updated dependencies [7bb8a67]
43
+ - Updated dependencies [513ec28]
44
+ - @nifrajs/web@5.1.0
45
+ - @nifrajs/core@5.1.0
46
+
47
+ ## 5.0.0
48
+
49
+ ### Patch Changes
50
+
51
+ - ff25387: Workspace symbol search (navigate to) is no longer slowed by the plugin: a search string is passed to TypeScript as-is instead of being looked up as a file name across the whole program.
52
+ - Updated dependencies [7169820]
53
+ - Updated dependencies [22e3df7]
54
+ - Updated dependencies [a0a02f4]
55
+ - Updated dependencies [0aed425]
56
+ - Updated dependencies [eaf030b]
57
+ - Updated dependencies [7de0397]
58
+ - Updated dependencies [674c658]
59
+ - Updated dependencies [de27557]
60
+ - Updated dependencies [2173644]
61
+ - Updated dependencies [4d894b0]
62
+ - Updated dependencies [61901cd]
63
+ - Updated dependencies [5e366e2]
64
+ - Updated dependencies [2938a0d]
65
+ - Updated dependencies [dc8439c]
66
+ - Updated dependencies [b19cb37]
67
+ - Updated dependencies [4330e40]
68
+ - Updated dependencies [4199ff3]
69
+ - Updated dependencies [90d9ee6]
70
+ - Updated dependencies [364a234]
71
+ - Updated dependencies [c06cba5]
72
+ - Updated dependencies [f4d3852]
73
+ - Updated dependencies [4a82ae0]
74
+ - Updated dependencies [0ff867a]
75
+ - Updated dependencies [e7391bf]
76
+ - Updated dependencies [0b80a59]
77
+ - Updated dependencies [c64db12]
78
+ - Updated dependencies [3753104]
79
+ - Updated dependencies [4b3b1fa]
80
+ - Updated dependencies [3562557]
81
+ - Updated dependencies [53087f3]
82
+ - Updated dependencies [2def6c7]
83
+ - Updated dependencies [b5b5bc3]
84
+ - Updated dependencies [22e1777]
85
+ - Updated dependencies [3a483cd]
86
+ - Updated dependencies [35f52c7]
87
+ - Updated dependencies [343cb81]
88
+ - Updated dependencies [412a9ee]
89
+ - Updated dependencies [65883e5]
90
+ - Updated dependencies [0e20529]
91
+ - Updated dependencies [d91fd44]
92
+ - Updated dependencies [f7e36ec]
93
+ - Updated dependencies [262e46d]
94
+ - Updated dependencies [b13e071]
95
+ - Updated dependencies [944623d]
96
+ - Updated dependencies [6d9869d]
97
+ - Updated dependencies [077657f]
98
+ - Updated dependencies [b9cc68c]
99
+ - Updated dependencies [de2cc1d]
100
+ - Updated dependencies [a5963cb]
101
+ - Updated dependencies [05aac0e]
102
+ - Updated dependencies [1a6616f]
103
+ - Updated dependencies [7775c2b]
104
+ - Updated dependencies [3db36b3]
105
+ - Updated dependencies [7775c2b]
106
+ - Updated dependencies [09c47c5]
107
+ - Updated dependencies [326caee]
108
+ - Updated dependencies [f8e0ed5]
109
+ - Updated dependencies [a588c18]
110
+ - Updated dependencies [1cdcfe5]
111
+ - Updated dependencies [e195fe8]
112
+ - Updated dependencies [846e2f6]
113
+ - Updated dependencies [7775c2b]
114
+ - Updated dependencies [d3e79c4]
115
+ - Updated dependencies [d922f65]
116
+ - Updated dependencies [aadd9fc]
117
+ - Updated dependencies [ea16748]
118
+ - Updated dependencies [a1eda0a]
119
+ - Updated dependencies [fc0284a]
120
+ - Updated dependencies [5b22f4d]
121
+ - Updated dependencies [1b94593]
122
+ - Updated dependencies [9f58295]
123
+ - Updated dependencies [2f7299a]
124
+ - Updated dependencies [29e62a0]
125
+ - Updated dependencies [c613e7d]
126
+ - Updated dependencies [5975163]
127
+ - Updated dependencies [b9608ac]
128
+ - Updated dependencies [7a165de]
129
+ - Updated dependencies [4064f36]
130
+ - Updated dependencies [d8f11a5]
131
+ - Updated dependencies [e9e02cf]
132
+ - Updated dependencies [b70b18a]
133
+ - Updated dependencies [6f42b38]
134
+ - Updated dependencies [870227d]
135
+ - Updated dependencies [48aad8c]
136
+ - Updated dependencies [2fbb4f0]
137
+ - Updated dependencies [1d66252]
138
+ - Updated dependencies [a6a6834]
139
+ - Updated dependencies [166a6ff]
140
+ - Updated dependencies [79be5af]
141
+ - Updated dependencies [41050ed]
142
+ - Updated dependencies [fc837cb]
143
+ - Updated dependencies [bf6eeb0]
144
+ - Updated dependencies [5a3c27a]
145
+ - Updated dependencies [15a3a66]
146
+ - Updated dependencies [b80ce77]
147
+ - Updated dependencies [9b971fc]
148
+ - Updated dependencies [2577fc7]
149
+ - Updated dependencies [9b1acc9]
150
+ - Updated dependencies [391ab3c]
151
+ - Updated dependencies [3bf7d6b]
152
+ - Updated dependencies [7775c2b]
153
+ - Updated dependencies [ab1935b]
154
+ - Updated dependencies [740109f]
155
+ - Updated dependencies [e0a25fe]
156
+ - Updated dependencies [3630b6e]
157
+ - Updated dependencies [1290c6d]
158
+ - Updated dependencies [d0a7d58]
159
+ - @nifrajs/web@5.0.0
160
+ - @nifrajs/core@5.0.0
161
+
162
+ ## 4.0.2
163
+
164
+ ### Patch Changes
165
+
166
+ - Updated dependencies [fcd6a5b]
167
+ - @nifrajs/web@4.0.2
168
+ - @nifrajs/core@4.0.2
169
+
170
+ ## 4.0.1
171
+
172
+ ### Patch Changes
173
+
174
+ - Updated dependencies [bbb2b27]
175
+ - Updated dependencies [2957acd]
176
+ - Updated dependencies [4bd292a]
177
+ - Updated dependencies [55e813b]
178
+ - @nifrajs/web@4.0.1
179
+ - @nifrajs/core@4.0.1
180
+
181
+ ## 4.0.0
182
+
183
+ ### Minor Changes
184
+
185
+ - d50f73e: feat(ts-plugin): the frontend/backend zone rules as editor errors
186
+
187
+ A value import the build would refuse is an error on the import itself: backend code or a route's
188
+ backend half in a page or under `frontend/`, frontend code under `backend/`, anything but shared code
189
+ under `shared/`, and a Node or Bun built-in, a server package or `@nifrajs/web/backend-only` in browser
190
+ code. `import type` is always allowed, and files in no zone (tests, scripts, config) are not checked.
191
+ The rules are `@nifrajs/web/zones`, the classifier the builds and `nifra check` use.
192
+
193
+ ### Patch Changes
194
+
195
+ - Updated dependencies [dde125b]
196
+ - Updated dependencies [22e2af8]
197
+ - Updated dependencies [72b62fa]
198
+ - Updated dependencies [aa44e93]
199
+ - Updated dependencies [4a3ee60]
200
+ - Updated dependencies [963694f]
201
+ - Updated dependencies [aad6297]
202
+ - Updated dependencies [dad0d41]
203
+ - Updated dependencies [538adc2]
204
+ - Updated dependencies [f47edd1]
205
+ - Updated dependencies [df9530a]
206
+ - Updated dependencies [3e6973f]
207
+ - Updated dependencies [25e8edf]
208
+ - Updated dependencies [2b5e5fc]
209
+ - Updated dependencies [3b090de]
210
+ - Updated dependencies [da7d792]
211
+ - Updated dependencies [612a296]
212
+ - Updated dependencies [fb14dfa]
213
+ - Updated dependencies [8ae97f6]
214
+ - Updated dependencies [4af6f39]
215
+ - Updated dependencies [ca8b50d]
216
+ - Updated dependencies [b00a889]
217
+ - Updated dependencies [b53d64f]
218
+ - Updated dependencies [66fd712]
219
+ - Updated dependencies [9c3d524]
220
+ - Updated dependencies [738e7a1]
221
+ - Updated dependencies [4801cac]
222
+ - Updated dependencies [1b2d53a]
223
+ - Updated dependencies [25fe13d]
224
+ - Updated dependencies [0852290]
225
+ - Updated dependencies [0589dbe]
226
+ - Updated dependencies [2e2d8c0]
227
+ - Updated dependencies [856f5ce]
228
+ - Updated dependencies [18aa5aa]
229
+ - Updated dependencies [cfd86b3]
230
+ - Updated dependencies [8ff96c9]
231
+ - Updated dependencies [4c46199]
232
+ - Updated dependencies [eef4932]
233
+ - Updated dependencies [6de8686]
234
+ - Updated dependencies [86e2d0f]
235
+ - Updated dependencies [a0cfffa]
236
+ - Updated dependencies [d7892ea]
237
+ - Updated dependencies [93e5e7f]
238
+ - Updated dependencies [214d674]
239
+ - Updated dependencies [4936309]
240
+ - Updated dependencies [ff5a779]
241
+ - Updated dependencies [4936309]
242
+ - Updated dependencies [0e9b167]
243
+ - Updated dependencies [bbdc5a1]
244
+ - Updated dependencies [10bc446]
245
+ - Updated dependencies [e8270d9]
246
+ - Updated dependencies [d942c33]
247
+ - Updated dependencies [ef28ef9]
248
+ - Updated dependencies [ff4a062]
249
+ - Updated dependencies [43ba944]
250
+ - Updated dependencies [46c741a]
251
+ - Updated dependencies [7bfa25e]
252
+ - Updated dependencies [216fe27]
253
+ - Updated dependencies [4936309]
254
+ - Updated dependencies [6e257a6]
255
+ - Updated dependencies [4a03d30]
256
+ - Updated dependencies [8e30090]
257
+ - Updated dependencies [28f3aaf]
258
+ - Updated dependencies [6d20355]
259
+ - Updated dependencies [08250bf]
260
+ - Updated dependencies [6907cbe]
261
+ - Updated dependencies [4b8d8de]
262
+ - Updated dependencies [ba5dd1c]
263
+ - Updated dependencies [d50f73e]
264
+ - Updated dependencies [8fa902c]
265
+ - Updated dependencies [085e852]
266
+ - Updated dependencies [0dac7ec]
267
+ - Updated dependencies [b64c3ee]
268
+ - Updated dependencies [dc2d4d3]
269
+ - Updated dependencies [bda9637]
270
+ - Updated dependencies [81c720e]
271
+ - Updated dependencies [ed60b23]
272
+ - Updated dependencies [0150ed4]
273
+ - Updated dependencies [ae815ab]
274
+ - Updated dependencies [ea2ee87]
275
+ - Updated dependencies [3442e1c]
276
+ - Updated dependencies [85d636b]
277
+ - Updated dependencies [6c978a1]
278
+ - Updated dependencies [bfe29b6]
279
+ - Updated dependencies [8b99424]
280
+ - Updated dependencies [87783f0]
281
+ - Updated dependencies [135aba4]
282
+ - Updated dependencies [47b0d65]
283
+ - Updated dependencies [e32268d]
284
+ - Updated dependencies [432fec3]
285
+ - Updated dependencies [0e14068]
286
+ - Updated dependencies [8f1b780]
287
+ - Updated dependencies [dcc9ff6]
288
+ - Updated dependencies [5a63dd4]
289
+ - Updated dependencies [c49882f]
290
+ - Updated dependencies [dfd19d8]
291
+ - Updated dependencies [28e091f]
292
+ - Updated dependencies [046e79d]
293
+ - Updated dependencies [6393b1e]
294
+ - Updated dependencies [a158b74]
295
+ - Updated dependencies [ee19d29]
296
+ - Updated dependencies [293d3c8]
297
+ - Updated dependencies [7e1e1c3]
298
+ - Updated dependencies [0cd5f6e]
299
+ - Updated dependencies [2245bee]
300
+ - Updated dependencies [feeec4a]
301
+ - Updated dependencies [3eb6339]
302
+ - Updated dependencies [f784c32]
303
+ - Updated dependencies [e3b2b97]
304
+ - Updated dependencies [5934b5d]
305
+ - Updated dependencies [03a3729]
306
+ - Updated dependencies [bd11269]
307
+ - Updated dependencies [579d9a9]
308
+ - Updated dependencies [3554ad8]
309
+ - Updated dependencies [64e7a42]
310
+ - Updated dependencies [ee19d29]
311
+ - Updated dependencies [d6f806f]
312
+ - Updated dependencies [38cf032]
313
+ - Updated dependencies [b94e5cb]
314
+ - Updated dependencies [0f6babe]
315
+ - Updated dependencies [00f18bf]
316
+ - Updated dependencies [a84f546]
317
+ - Updated dependencies [669b6a2]
318
+ - Updated dependencies [ff25d68]
319
+ - @nifrajs/core@4.0.0
320
+ - @nifrajs/web@4.0.0
321
+
322
+ ## 3.5.0
323
+
324
+ ### Patch Changes
325
+
326
+ - Updated dependencies [6046984]
327
+ - Updated dependencies [ac27343]
328
+ - Updated dependencies [d5b7c22]
329
+ - @nifrajs/core@3.5.0
330
+ - @nifrajs/web@3.5.0
331
+
332
+ ## 3.4.0
333
+
334
+ ### Patch Changes
335
+
336
+ - Updated dependencies [8d23613]
337
+ - Updated dependencies [8d23613]
338
+ - Updated dependencies
339
+ - Updated dependencies [719d82e]
340
+ - @nifrajs/web@3.4.0
341
+ - @nifrajs/core@3.4.0
342
+
343
+ ## 3.3.0
344
+
345
+ ### Patch Changes
346
+
347
+ - @nifrajs/core@3.3.0
348
+ - @nifrajs/web@3.3.0
349
+
350
+ ## 3.2.0
351
+
352
+ ### Patch Changes
353
+
354
+ - 4c81384: Harden Windows Bun dev re-exec entry detection and TypeScript route navigation across short/long path aliases.
355
+ - 469b998: Fix Windows path handling in the TypeScript route plugin and Svelte/Vue build plugins, including file-URL inputs, virtual stylesheet modules, and platform-neutral generated output.
356
+ - Updated dependencies [652201a]
357
+ - Updated dependencies [3aefb12]
358
+ - Updated dependencies [8b58d1f]
359
+ - Updated dependencies [c4ed8f7]
360
+ - Updated dependencies [25305bb]
361
+ - Updated dependencies [095c320]
362
+ - Updated dependencies [7504864]
363
+ - Updated dependencies [e88c23a]
364
+ - Updated dependencies [c39712e]
365
+ - Updated dependencies [9010fd3]
366
+ - Updated dependencies [7551709]
367
+ - Updated dependencies [ea2356e]
368
+ - Updated dependencies [a816b87]
369
+ - @nifrajs/web@3.2.0
370
+ - @nifrajs/core@3.2.0
371
+
372
+ ## 3.1.0
373
+
374
+ ### Patch Changes
375
+
376
+ - Updated dependencies [5b78473]
377
+ - Updated dependencies [1400f6c]
378
+ - Updated dependencies [8b136ee]
379
+ - Updated dependencies [a7db515]
380
+ - @nifrajs/core@3.1.0
381
+ - @nifrajs/web@3.1.0
382
+
383
+ ## 3.0.0
384
+
385
+ ### Patch Changes
386
+
387
+ - Updated dependencies [f3d2a35]
388
+ - Updated dependencies [6e43c15]
389
+ - Updated dependencies [293a7fe]
390
+ - Updated dependencies [485ae60]
391
+ - Updated dependencies [627b0ba]
392
+ - Updated dependencies [f0fd370]
393
+ - Updated dependencies [004deee]
394
+ - Updated dependencies [86a555b]
395
+ - Updated dependencies [8c5f4cf]
396
+ - Updated dependencies [f0fd370]
397
+ - Updated dependencies [381bbf3]
398
+ - Updated dependencies [36801ae]
399
+ - Updated dependencies [9acadba]
400
+ - Updated dependencies [99fc683]
401
+ - Updated dependencies [73d894d]
402
+ - @nifrajs/core@3.0.0
403
+ - @nifrajs/web@3.0.0
404
+
405
+ ## 2.14.1
406
+
407
+ ### Patch Changes
408
+
409
+ - Updated dependencies [bf93902]
410
+ - @nifrajs/core@2.14.1
411
+ - @nifrajs/web@2.14.1
412
+
413
+ ## 2.14.0
414
+
415
+ ### Patch Changes
416
+
417
+ - Updated dependencies [489c6b6]
418
+ - Updated dependencies [701961a]
419
+ - Updated dependencies [62e22e2]
420
+ - Updated dependencies [62e22e2]
421
+ - Updated dependencies [62133bf]
422
+ - Updated dependencies [8dffdf4]
423
+ - Updated dependencies [489c6b6]
424
+ - @nifrajs/web@2.14.0
425
+ - @nifrajs/core@2.14.0
426
+
427
+ ## 2.13.0
428
+
429
+ ### Patch Changes
430
+
431
+ - Updated dependencies [e0b2dd6]
432
+ - Updated dependencies [7535ce1]
433
+ - Updated dependencies [1704308]
434
+ - Updated dependencies [6510fdc]
435
+ - @nifrajs/core@2.13.0
436
+ - @nifrajs/web@2.13.0
437
+
438
+ ## 2.12.1
439
+
440
+ ### Patch Changes
441
+
442
+ - Updated dependencies [fba30c7]
443
+ - @nifrajs/core@2.12.1
444
+ - @nifrajs/web@2.12.1
445
+
446
+ ## 2.12.0
447
+
448
+ ### Patch Changes
449
+
450
+ - Updated dependencies [df100d3]
451
+ - Updated dependencies [0efacea]
452
+ - Updated dependencies [cd1732c]
453
+ - Updated dependencies [df100d3]
454
+ - Updated dependencies [9a9346e]
455
+ - Updated dependencies [b5f47c0]
456
+ - Updated dependencies [fc33c0f]
457
+ - Updated dependencies [fa51aba]
458
+ - Updated dependencies [c4e8bb0]
459
+ - Updated dependencies [11d1658]
460
+ - Updated dependencies [33ee9ff]
461
+ - Updated dependencies [5f71c23]
462
+ - Updated dependencies [3788b36]
463
+ - Updated dependencies [0863ef0]
464
+ - Updated dependencies [ae5338f]
465
+ - Updated dependencies [8847825]
466
+ - Updated dependencies [9a9346e]
467
+ - Updated dependencies [4c2123d]
468
+ - Updated dependencies [5e4e31a]
469
+ - Updated dependencies [24f1787]
470
+ - Updated dependencies [9a9346e]
471
+ - Updated dependencies [b045f9e]
472
+ - Updated dependencies [df07059]
473
+ - Updated dependencies [9a9346e]
474
+ - Updated dependencies [9a9346e]
475
+ - Updated dependencies [dbc0b79]
476
+ - Updated dependencies [bd5c624]
477
+ - Updated dependencies [a5d3f5b]
478
+ - Updated dependencies [00819c5]
479
+ - Updated dependencies [e2bdd4a]
480
+ - Updated dependencies [e2d1939]
481
+ - Updated dependencies [e83e6eb]
482
+ - Updated dependencies [64d25db]
483
+ - Updated dependencies [c55f7a3]
484
+ - Updated dependencies [f8b0097]
485
+ - @nifrajs/core@2.12.0
486
+ - @nifrajs/web@2.12.0
487
+
488
+ ## 2.11.0
489
+
490
+ ### Patch Changes
491
+
492
+ - Updated dependencies [ed5e91c]
493
+ - Updated dependencies [30f5ea3]
494
+ - Updated dependencies [c29e0d0]
495
+ - @nifrajs/web@2.11.0
496
+ - @nifrajs/core@2.11.0
497
+
498
+ ## 2.10.0
499
+
500
+ ### Patch Changes
501
+
502
+ - Updated dependencies [5263c4e]
503
+ - Updated dependencies [15bffdd]
504
+ - Updated dependencies [15bffdd]
505
+ - Updated dependencies [15bffdd]
506
+ - @nifrajs/web@2.10.0
507
+ - @nifrajs/core@2.10.0
508
+
509
+ ## 2.9.1
510
+
511
+ ### Patch Changes
512
+
513
+ - Updated dependencies [01e36fb]
514
+ - @nifrajs/core@2.9.1
515
+ - @nifrajs/web@2.9.1
516
+
517
+ ## 2.9.0
518
+
519
+ ### Patch Changes
520
+
521
+ - Updated dependencies [e05e56d]
522
+ - @nifrajs/core@2.9.0
523
+ - @nifrajs/web@2.9.0
524
+
525
+ ## 2.8.2
526
+
527
+ ### Patch Changes
528
+
529
+ - Updated dependencies [f7d68e8]
530
+ - @nifrajs/core@2.8.2
531
+ - @nifrajs/web@2.8.2
532
+
533
+ ## 2.8.1
534
+
535
+ ### Patch Changes
536
+
537
+ - Updated dependencies [78d66a4]
538
+ - Updated dependencies [93fdc89]
539
+ - @nifrajs/core@2.8.1
540
+ - @nifrajs/web@2.8.1
541
+
542
+ ## 2.8.0
543
+
544
+ ### Patch Changes
545
+
546
+ - Updated dependencies [118e4a5]
547
+ - @nifrajs/web@2.8.0
548
+ - @nifrajs/core@2.8.0
549
+
550
+ ## 2.7.1
551
+
552
+ ### Patch Changes
553
+
554
+ - Updated dependencies [52c89e0]
555
+ - @nifrajs/core@2.7.1
556
+ - @nifrajs/web@2.7.1
557
+
558
+ ## 2.7.0
559
+
560
+ ### Patch Changes
561
+
562
+ - @nifrajs/core@2.7.0
563
+ - @nifrajs/web@2.7.0
564
+
565
+ ## 2.6.1
566
+
567
+ ### Patch Changes
568
+
569
+ - Updated dependencies [5840c98]
570
+ - Updated dependencies [80419f5]
571
+ - @nifrajs/core@2.6.1
572
+ - @nifrajs/web@2.6.1
573
+
574
+ ## 2.6.0
575
+
576
+ ### Patch Changes
577
+
578
+ - Updated dependencies [e6349e5]
579
+ - Updated dependencies [08fe221]
580
+ - Updated dependencies [8383063]
581
+ - @nifrajs/web@2.6.0
582
+ - @nifrajs/core@2.6.0
583
+
584
+ ## 2.5.0
585
+
586
+ ### Patch Changes
587
+
588
+ - Updated dependencies [02d9aa8]
589
+ - @nifrajs/web@2.5.0
590
+ - @nifrajs/core@2.5.0
591
+
592
+ ## 2.4.0
593
+
594
+ ### Minor Changes
595
+
596
+ - 00cfd0e: New package: a TypeScript language-service plugin. Go-to-definition on a route-path string literal jumps to the `routes/` file that serves it.
597
+
598
+ Put your cursor on `"/orders"` in `navigate({ to: "/orders" })`, `<Link to="/orders">`, or `href="/orders"`, and jump straight to the file. The routing is nifra's own - routes discovered with `@nifrajs/web`, matched with `@nifrajs/core`'s pattern matcher - so a path resolves to exactly the file it would serve at runtime, dynamic segments included (`/users/42` → `routes/users/[id].tsx`). Enable it with `{ "compilerOptions": { "plugins": [{ "name": "@nifrajs/ts-plugin" }] } }`.
599
+
600
+ ### Patch Changes
601
+
602
+ - 1c2bf5a: Go-to-definition on a route path now resolves to the most specific route, matching how the app routes at runtime: a static segment wins over a dynamic one, so `/users/new` jumps to `routes/users/new.tsx` rather than `routes/users/[id].tsx`, regardless of the order routes were discovered. The plugin also ships a CommonJS type entry, so editors that resolve its types through `require` see the correct factory shape.
603
+ - Updated dependencies [1c2bf5a]
604
+ - Updated dependencies [138bfba]
605
+ - Updated dependencies [23e6eb1]
606
+ - @nifrajs/web@2.4.0
607
+ - @nifrajs/core@2.4.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nifra Authors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.cjs CHANGED
@@ -50,13 +50,20 @@ var import_fs = require("@nifrajs/web/fs");
50
50
 
51
51
  // src/resolve.ts
52
52
  var import_pattern = require("@nifrajs/core/pattern");
53
- var compiledRouteCache = new WeakMap;
53
+ var compiledRouteCache = new Map;
54
+ var MAX_CACHED_ROUTE_SETS = 8;
54
55
  function compiledRoutes(routes) {
55
- const cached = compiledRouteCache.get(routes);
56
+ const key = JSON.stringify(routes.map((route) => [route.pattern, route.file]));
57
+ const cached = compiledRouteCache.get(key);
56
58
  if (cached !== undefined)
57
59
  return cached;
58
60
  const compiled = import_pattern.sortRoutesBySpecificity(routes.map((route) => ({ route, pattern: import_pattern.compileRoutePattern(route.pattern) })));
59
- compiledRouteCache.set(routes, compiled);
61
+ if (compiledRouteCache.size >= MAX_CACHED_ROUTE_SETS) {
62
+ const oldest = compiledRouteCache.keys().next();
63
+ if (oldest.done !== true)
64
+ compiledRouteCache.delete(oldest.value);
65
+ }
66
+ compiledRouteCache.set(key, compiled);
60
67
  return compiled;
61
68
  }
62
69
  function resolveRouteFile(path, routes) {
@@ -113,7 +120,10 @@ function valueImports(tsm, source) {
113
120
  return edges;
114
121
  }
115
122
  function resolveImport(tsm, source, edge, options) {
116
- const specifier = edge.specifier.replace(/[?#].*$/, "");
123
+ const query = edge.specifier.indexOf("?", 1);
124
+ const hash = edge.specifier.indexOf("#", 1);
125
+ const cut = query === -1 ? hash : hash === -1 ? query : Math.min(query, hash);
126
+ const specifier = cut === -1 ? edge.specifier : edge.specifier.slice(0, cut);
117
127
  const mode = tsm.getModeForUsageLocation(source, edge.literal, options);
118
128
  const resolved = tsm.resolveModuleName(specifier, source.fileName, options, tsm.sys, undefined, undefined, mode).resolvedModule?.resolvedFileName;
119
129
  if (resolved !== undefined)
@@ -131,7 +141,7 @@ var real = (file) => {
131
141
  }
132
142
  };
133
143
  function libraryAsImported(target, specifier) {
134
- if (target.zone !== "library")
144
+ if (target.zone !== "library" || target.entry !== undefined)
135
145
  return target;
136
146
  const named = import_zones.specifierPackage(specifier);
137
147
  if (named === undefined || named === target.packageName)
@@ -148,7 +158,7 @@ function edgeProblem(classifier, display, fileName, from, specifier, target) {
148
158
  }
149
159
  if (target === undefined)
150
160
  return;
151
- const to = classifier.classify(target);
161
+ const to = classifier.classify(target, specifier);
152
162
  if (to.zone === "error")
153
163
  return `${display(fileName)} imports ${display(target)}: ${to.reason}`;
154
164
  if (to.zone === "library") {
@@ -1 +1 @@
1
- {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAYA,0FAA0F;AAC1F,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAsBD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,SAAS,aAAa,EAAE,GAC/B,MAAM,GAAG,SAAS,CASpB"}
1
+ {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAYA,0FAA0F;AAC1F,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AA6BD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,SAAS,aAAa,EAAE,GAC/B,MAAM,GAAG,SAAS,CASpB"}
package/dist/resolve.js CHANGED
@@ -5,16 +5,24 @@
5
5
  * it would at runtime - the plugin never re-derives the file-based routing rules.
6
6
  */
7
7
  import { compileRoutePattern, matchRoutePattern, sortRoutesBySpecificity, } from "@nifrajs/core/pattern";
8
- // The language service asks for definitions repeatedly while the cursor moves. Cache the immutable
9
- // compilation/specificity sort by manifest identity so each query only performs route matching; a new
10
- // manifest array naturally gets a fresh entry when routes are added or removed.
11
- const compiledRouteCache = new WeakMap();
8
+ // The language service asks for definitions repeatedly while the cursor moves, and route discovery
9
+ // hands over a new array each time. So the compilation/specificity sort is cached by what the routes
10
+ // are, not by the array: each query then only matches, and a changed route set compiles afresh.
11
+ const compiledRouteCache = new Map();
12
+ /** Route sets kept compiled at once: a workspace's apps, plus the sets an edit just replaced. */
13
+ const MAX_CACHED_ROUTE_SETS = 8;
12
14
  function compiledRoutes(routes) {
13
- const cached = compiledRouteCache.get(routes);
15
+ const key = JSON.stringify(routes.map((route) => [route.pattern, route.file]));
16
+ const cached = compiledRouteCache.get(key);
14
17
  if (cached !== undefined)
15
18
  return cached;
16
19
  const compiled = sortRoutesBySpecificity(routes.map((route) => ({ route, pattern: compileRoutePattern(route.pattern) })));
17
- compiledRouteCache.set(routes, compiled);
20
+ if (compiledRouteCache.size >= MAX_CACHED_ROUTE_SETS) {
21
+ const oldest = compiledRouteCache.keys().next();
22
+ if (oldest.done !== true)
23
+ compiledRouteCache.delete(oldest.value);
24
+ }
25
+ compiledRouteCache.set(key, compiled);
18
26
  return compiled;
19
27
  }
20
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"resolve.js","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,uBAAuB,CAAA;AAa9B,mGAAmG;AACnG,sGAAsG;AACtG,gFAAgF;AAChF,MAAM,kBAAkB,GAAG,IAAI,OAAO,EAA8D,CAAA;AAEpG,SAAS,cAAc,CAAC,MAAgC;IACtD,MAAM,MAAM,GAAG,kBAAkB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IAC7C,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAA;IACvC,MAAM,QAAQ,GAAG,uBAAuB,CACtC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,mBAAmB,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAChF,CAAA;I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AY,CAAA;AAErC,yGAAyG;AACzG,eAAO,MAAM,oBAAoB,SAAS,CAAA;AAmI1C;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,OAAO,EAAE,EACd,MAAM,EAAE,EAAE,CAAC,UAAU,EACrB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,EAAE,CAAC,eAAe,GAC1B,EAAE,CAAC,UAAU,EAAE,CA+BjB"}
1
+ {"version":3,"file":"zones.d.ts","sourceRoot":"","sources":["../src/zones.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAA;AAErC,yGAAyG;AACzG,eAAO,MAAM,oBAAoB,SAAS,CAAA;AAyI1C;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,OAAO,EAAE,EACd,MAAM,EAAE,EAAE,CAAC,UAAU,EACrB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,EAAE,CAAC,eAAe,GAC1B,EAAE,CAAC,UAAU,EAAE,CA+BjB"}
package/dist/zones.js CHANGED
@@ -62,7 +62,12 @@ function valueImports(tsm, source) {
62
62
  /** Where an import lands: TypeScript's resolution (tsconfig `paths` included), else a relative path
63
63
  * that exists on disk (an `.svelte` or `.vue` file TypeScript only knows through a shim). */
64
64
  function resolveImport(tsm, source, edge, options) {
65
- const specifier = edge.specifier.replace(/[?#].*$/, "");
65
+ // Cut by index: `/[?#].*$/` retries from every `#` and is quadratic on a long run of them. The
66
+ // search starts past a leading `#`, which names a package.json import rather than a hash.
67
+ const query = edge.specifier.indexOf("?", 1);
68
+ const hash = edge.specifier.indexOf("#", 1);
69
+ const cut = query === -1 ? hash : hash === -1 ? query : Math.min(query, hash);
70
+ const specifier = cut === -1 ? edge.specifier : edge.specifier.slice(0, cut);
66
71
  const mode = tsm.getModeForUsageLocation(source, edge.literal, options);
67
72
  const resolved = tsm.resolveModuleName(specifier, source.fileName, options, tsm.sys, undefined, undefined, mode).resolvedModule?.resolvedFileName;
68
73
  if (resolved !== undefined)
@@ -83,7 +88,7 @@ const real = (file) => {
83
88
  /** A third-party target as the specifier names it: TypeScript resolves `pg` to `@types/pg`, and the
84
89
  * server-package list knows `pg`. */
85
90
  function libraryAsImported(target, specifier) {
86
- if (target.zone !== "library")
91
+ if (target.zone !== "library" || target.entry !== undefined)
87
92
  return target;
88
93
  const named = specifierPackage(specifier);
89
94
  if (named === undefined || named === target.packageName)
@@ -101,7 +106,8 @@ function edgeProblem(classifier, display, fileName, from, specifier, target) {
101
106
  }
102
107
  if (target === undefined)
103
108
  return undefined;
104
- const to = classifier.classify(target);
109
+ // A package that gives each entry its own side is judged by the entry the import names.
110
+ const to = classifier.classify(target, specifier);
105
111
  if (to.zone === "error")
106
112
  return `${display(fileName)} imports ${display(target)}: ${to.reason}`;
107
113
  if (to.zone === "library") {
package/dist/zones.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"zones.js","sourceRoot":"","sources":["../src/zones.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAClE,OAAO,EACL,mBAAmB,EACnB,aAAa,EAEb,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,GAGjB,MAAM,oBAAoB,CAAA;AAG3B,yGAAyG;AACzG,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAA;AAE1C,8CAA8C;AAC9C,MAAM,YAAY,GAAsB,IAAI,GAAG,CAAC,CAAC,gBAAgB,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAA;AAOzF,MAAM,QAAQ,GAAG,CAAC,QAA+D,EAAW,EAAE,CAC5F,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OA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4
4
  "description": "TypeScript language-service plugin for nifra - go-to-definition from a route-path string literal to the routes/ file that serves it, and the frontend/backend zone rules as editor errors.",
5
5
  "keywords": [
6
6
  "bun",
@@ -40,15 +40,16 @@
40
40
  },
41
41
  "files": [
42
42
  "dist",
43
- "src"
43
+ "src",
44
+ "CHANGELOG.md"
44
45
  ],
45
46
  "sideEffects": false,
46
47
  "scripts": {
47
48
  "build": "bun run build.ts"
48
49
  },
49
50
  "dependencies": {
50
- "@nifrajs/core": "5.0.0",
51
- "@nifrajs/web": "5.0.0"
51
+ "@nifrajs/core": "5.2.0",
52
+ "@nifrajs/web": "5.2.0"
52
53
  },
53
54
  "peerDependencies": {
54
55
  "typescript": ">=5.5.0"
package/src/resolve.ts CHANGED
@@ -21,18 +21,25 @@ type CompiledRouteLocation = {
21
21
  readonly pattern: ReturnType<typeof compileRoutePattern>
22
22
  }
23
23
 
24
- // The language service asks for definitions repeatedly while the cursor moves. Cache the immutable
25
- // compilation/specificity sort by manifest identity so each query only performs route matching; a new
26
- // manifest array naturally gets a fresh entry when routes are added or removed.
27
- const compiledRouteCache = new WeakMap<readonly RouteLocation[], readonly CompiledRouteLocation[]>()
24
+ // The language service asks for definitions repeatedly while the cursor moves, and route discovery
25
+ // hands over a new array each time. So the compilation/specificity sort is cached by what the routes
26
+ // are, not by the array: each query then only matches, and a changed route set compiles afresh.
27
+ const compiledRouteCache = new Map<string, readonly CompiledRouteLocation[]>()
28
+ /** Route sets kept compiled at once: a workspace's apps, plus the sets an edit just replaced. */
29
+ const MAX_CACHED_ROUTE_SETS = 8
28
30
 
29
31
  function compiledRoutes(routes: readonly RouteLocation[]): readonly CompiledRouteLocation[] {
30
- const cached = compiledRouteCache.get(routes)
32
+ const key = JSON.stringify(routes.map((route) => [route.pattern, route.file]))
33
+ const cached = compiledRouteCache.get(key)
31
34
  if (cached !== undefined) return cached
32
35
  const compiled = sortRoutesBySpecificity(
33
36
  routes.map((route) => ({ route, pattern: compileRoutePattern(route.pattern) })),
34
37
  )
35
- compiledRouteCache.set(routes, compiled)
38
+ if (compiledRouteCache.size >= MAX_CACHED_ROUTE_SETS) {
39
+ const oldest = compiledRouteCache.keys().next()
40
+ if (oldest.done !== true) compiledRouteCache.delete(oldest.value)
41
+ }
42
+ compiledRouteCache.set(key, compiled)
36
43
  return compiled
37
44
  }
38
45
 
package/src/zones.ts CHANGED
@@ -91,7 +91,12 @@ function resolveImport(
91
91
  edge: ImportEdge,
92
92
  options: ts.CompilerOptions,
93
93
  ): string | undefined {
94
- const specifier = edge.specifier.replace(/[?#].*$/, "")
94
+ // Cut by index: `/[?#].*$/` retries from every `#` and is quadratic on a long run of them. The
95
+ // search starts past a leading `#`, which names a package.json import rather than a hash.
96
+ const query = edge.specifier.indexOf("?", 1)
97
+ const hash = edge.specifier.indexOf("#", 1)
98
+ const cut = query === -1 ? hash : hash === -1 ? query : Math.min(query, hash)
99
+ const specifier = cut === -1 ? edge.specifier : edge.specifier.slice(0, cut)
95
100
  const mode = tsm.getModeForUsageLocation(source, edge.literal, options)
96
101
  const resolved = tsm.resolveModuleName(
97
102
  specifier,
@@ -119,7 +124,7 @@ const real = (file: string): string => {
119
124
  /** A third-party target as the specifier names it: TypeScript resolves `pg` to `@types/pg`, and the
120
125
  * server-package list knows `pg`. */
121
126
  function libraryAsImported(target: Classification, specifier: string): Classification {
122
- if (target.zone !== "library") return target
127
+ if (target.zone !== "library" || target.entry !== undefined) return target
123
128
  const named = specifierPackage(specifier)
124
129
  if (named === undefined || named === target.packageName) return target
125
130
  return { zone: "library", packageName: named }
@@ -142,7 +147,8 @@ function edgeProblem(
142
147
  return `"${BACKEND_ONLY_MARKER}" marks a module backend-only, but ${display(fileName)} reaches the browser. Move it under backend/ or into a route's backend half`
143
148
  }
144
149
  if (target === undefined) return undefined
145
- const to = classifier.classify(target)
150
+ // A package that gives each entry its own side is judged by the entry the import names.
151
+ const to = classifier.classify(target, specifier)
146
152
  if (to.zone === "error") return `${display(fileName)} imports ${display(target)}: ${to.reason}`
147
153
  if (to.zone === "library") {
148
154
  const reason = browser ? browserDenial(libraryAsImported(to, specifier), specifier) : undefined