@kayjs/kay 1.107.0 → 1.109.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.
Files changed (576) hide show
  1. package/dist/eslint.js +1875 -3815
  2. package/editors/zed/extension.toml +2 -2
  3. package/llms/action-protection.md +1 -1
  4. package/llms/actions-from-islands.md +5 -5
  5. package/llms/actions-refused-fields.md +4 -4
  6. package/llms/api-from-islands.md +6 -6
  7. package/llms/browser-only.md +2 -2
  8. package/llms/cdn-caching.md +1 -1
  9. package/llms/checks.md +1 -1
  10. package/llms/code-lints.md +1 -2
  11. package/llms/component-libraries.md +1 -1
  12. package/llms/component-library-conventions.md +1 -1
  13. package/llms/components.md +4 -4
  14. package/llms/deprecated-lints.md +1 -7
  15. package/llms/effects.md +1 -1
  16. package/llms/errors.md +2 -2
  17. package/llms/events.md +1 -1
  18. package/llms/guards.md +1 -1
  19. package/llms/head.md +1 -1
  20. package/llms/hooks.md +2 -2
  21. package/llms/images.md +1 -1
  22. package/llms/island-and-form-lints.md +2 -1
  23. package/llms/island-sources.md +1 -1
  24. package/llms/islands-state-to-ids.md +2 -2
  25. package/llms/islands.md +5 -3
  26. package/llms/lints.md +1 -1
  27. package/llms/live-values.md +3 -3
  28. package/llms/local-collections.md +1 -1
  29. package/llms/locales.md +1 -1
  30. package/llms/mcp.md +2 -2
  31. package/llms/metrics.md +1 -1
  32. package/llms/navigation-from-code.md +6 -6
  33. package/llms/prerendering.md +1 -0
  34. package/llms/production.md +2 -2
  35. package/llms/project-new-and-add.md +1 -1
  36. package/llms/project.md +4 -4
  37. package/llms/proxy-and-security.md +1 -1
  38. package/llms/queues.md +1 -1
  39. package/llms/rate-limits.md +4 -4
  40. package/llms/rendering.md +1 -1
  41. package/llms/server-islands.md +2 -2
  42. package/llms/server.md +1 -1
  43. package/llms/stores.md +1 -1
  44. package/llms/styles-and-assets.md +1 -1
  45. package/llms/testing-mount.md +49 -0
  46. package/llms/testing.md +4 -45
  47. package/llms/upgrading-1-105-config.md +13 -13
  48. package/llms/upgrading-archive.md +42 -82
  49. package/llms/upgrading.md +92 -58
  50. package/llms/whats-new-archive.md +36 -1
  51. package/llms/whats-new.md +18 -39
  52. package/llms.txt +6 -7
  53. package/package.json +6 -10
  54. package/src/build/client.ts +7 -6
  55. package/src/build/icon-slots.ts +140 -0
  56. package/src/build/libraries.ts +24 -2
  57. package/src/build/plugin.ts +10 -0
  58. package/src/build/route-sizes.ts +2 -3
  59. package/src/build/runtime-chunk.ts +2 -2
  60. package/src/build/source-files.ts +8 -3
  61. package/src/build/variants.ts +90 -1
  62. package/src/check/browser-global-reads.ts +2 -2
  63. package/src/check/config-objects.ts +1 -1
  64. package/src/check/diagnose.ts +0 -22
  65. package/src/check/export-homes.ts +1 -1
  66. package/src/check/guards.ts +3 -3
  67. package/src/check/index.ts +2 -7
  68. package/src/check/moved-keys.ts +1 -1
  69. package/src/check/project.ts +4 -9
  70. package/src/check/renamed-packages.ts +3 -63
  71. package/src/check/shadow-types.ts +4 -104
  72. package/src/commands/check.ts +2 -2
  73. package/src/commands/env.ts +25 -3
  74. package/src/compiler/ast.ts +18 -16
  75. package/src/compiler/browser.ts +2 -14
  76. package/src/compiler/class-items.ts +16 -0
  77. package/src/compiler/codegen.ts +8 -8
  78. package/src/compiler/dead-code.ts +22 -0
  79. package/src/compiler/deprecated-library.ts +0 -12
  80. package/src/compiler/deprecated-lints.ts +4 -505
  81. package/src/compiler/deprecated-ui-props.ts +5 -5
  82. package/src/compiler/dom-property.ts +23 -0
  83. package/src/compiler/dom.ts +15 -15
  84. package/src/compiler/errors.ts +2 -2
  85. package/src/compiler/fence-checks.ts +2 -121
  86. package/src/compiler/hand-parts.ts +55 -0
  87. package/src/compiler/helper-imports.ts +2 -2
  88. package/src/compiler/image-attributes.ts +1 -3
  89. package/src/compiler/index.ts +20 -21
  90. package/src/compiler/island-arguments.ts +8 -95
  91. package/src/compiler/island-cause.ts +7 -7
  92. package/src/compiler/island-declaration.ts +2 -8
  93. package/src/compiler/island-lints.ts +12 -0
  94. package/src/compiler/island-marker.ts +3 -3
  95. package/src/compiler/island-problems.ts +25 -0
  96. package/src/compiler/jsx-class.ts +1 -25
  97. package/src/compiler/jsx.ts +2 -2
  98. package/src/compiler/kay-exports.ts +0 -2
  99. package/src/compiler/link-flags.ts +9 -38
  100. package/src/compiler/lints.ts +7 -14
  101. package/src/compiler/markup.ts +23 -26
  102. package/src/compiler/module-signals.ts +2 -2
  103. package/src/compiler/names.ts +1 -1
  104. package/src/compiler/page-settings.ts +11 -0
  105. package/src/compiler/parser.ts +6 -8
  106. package/src/compiler/plan.ts +1 -3
  107. package/src/compiler/rewrite.ts +3 -18
  108. package/src/compiler/script-server.ts +8 -3
  109. package/src/compiler/validate.ts +3 -8
  110. package/src/config-loader.ts +14 -4
  111. package/src/config-resolve.ts +18 -142
  112. package/src/config-shape.ts +44 -34
  113. package/src/config.ts +10 -114
  114. package/src/dev/preload.ts +4 -1
  115. package/src/lsp/server.ts +4 -0
  116. package/src/migrate/markup.ts +4 -1
  117. package/src/package-names.ts +1 -1
  118. package/src/runtime/action-call.ts +39 -335
  119. package/src/runtime/action-encode.ts +26 -0
  120. package/src/runtime/action-error.ts +3 -11
  121. package/src/runtime/action-protection.ts +2 -2
  122. package/src/runtime/action-run.ts +332 -0
  123. package/src/runtime/action-shared.ts +14 -37
  124. package/src/runtime/action-stream.ts +0 -1
  125. package/src/runtime/action.ts +1 -1
  126. package/src/runtime/call-result.ts +2 -10
  127. package/src/runtime/checks.ts +11 -11
  128. package/src/runtime/client.ts +2 -2
  129. package/src/runtime/core.ts +5 -23
  130. package/src/runtime/dom.ts +1 -1
  131. package/src/runtime/html.ts +1 -1
  132. package/src/runtime/i18n.client.ts +1 -4
  133. package/src/runtime/i18n.server.ts +1 -4
  134. package/src/runtime/i18n.ts +3 -3
  135. package/src/runtime/index.ts +2 -2
  136. package/src/runtime/island.server.ts +18 -5
  137. package/src/runtime/live-resource.server.ts +0 -1
  138. package/src/runtime/live-value.server.ts +2 -2
  139. package/src/runtime/live-value.shared.ts +7 -20
  140. package/src/runtime/live.ts +1 -12
  141. package/src/runtime/local-types.ts +1 -11
  142. package/src/runtime/local.ts +4 -14
  143. package/src/runtime/navigate-api.ts +2 -5
  144. package/src/runtime/navigation-state.ts +0 -12
  145. package/src/runtime/page-swap.ts +6 -6
  146. package/src/runtime/persist.ts +11 -3
  147. package/src/runtime/persisted.ts +4 -30
  148. package/src/runtime/presence.ts +6 -7
  149. package/src/runtime/query-param.ts +20 -12
  150. package/src/runtime/reactive.ts +3 -1
  151. package/src/runtime/refuse.ts +3 -17
  152. package/src/runtime/store-base.ts +4 -6
  153. package/src/runtime/swap-fetch.ts +1 -1
  154. package/src/runtime/values.ts +40 -23
  155. package/src/runtime/with-query.ts +9 -0
  156. package/src/server/action-hooks.ts +8 -8
  157. package/src/server/actions.ts +13 -14
  158. package/src/server/api-modules.ts +2 -3
  159. package/src/server/app-stages.ts +15 -33
  160. package/src/server/app.ts +10 -5
  161. package/src/server/auth-mails.ts +0 -2
  162. package/src/server/env-state.ts +40 -10
  163. package/src/server/flash.ts +1 -1
  164. package/src/server/guard-requirement.ts +4 -4
  165. package/src/server/image.ts +2 -2
  166. package/src/server/index.ts +0 -2
  167. package/src/server/job-context.ts +3 -3
  168. package/src/server/jobs-page.ts +1 -1
  169. package/src/server/jobs.ts +5 -9
  170. package/src/server/kept-exports.ts +0 -2
  171. package/src/server/kv.ts +11 -14
  172. package/src/server/library.ts +1 -3
  173. package/src/server/live.ts +2 -2
  174. package/src/server/mcp.ts +3 -9
  175. package/src/server/metrics.ts +2 -4
  176. package/src/server/page-settings.ts +10 -19
  177. package/src/server/prerender.ts +19 -2
  178. package/src/server/protection.ts +15 -18
  179. package/src/server/queue.ts +3 -6
  180. package/src/server/rate-limit.ts +0 -3
  181. package/src/server/render-document.ts +1 -1
  182. package/src/server/routes.ts +7 -3
  183. package/src/server/scope.ts +3 -2
  184. package/src/server/session.ts +5 -6
  185. package/src/server/setup.ts +1 -1
  186. package/src/server/signals.ts +17 -7
  187. package/src/server/signed.ts +1 -3
  188. package/src/server/source.ts +20 -4
  189. package/src/server/speculation.ts +1 -1
  190. package/src/server/storage.ts +3 -8
  191. package/src/server/validate.ts +1 -1
  192. package/src/server/vitals.ts +1 -3
  193. package/src/server/work-scope.ts +2 -4
  194. package/src/server/work.ts +1 -1
  195. package/src/server/workflow.ts +1 -1
  196. package/src/test/index.ts +2 -1
  197. package/src/test/site-actions.ts +16 -6
  198. package/src/test/site-keys.ts +10 -15
  199. package/src/test/site-socket.ts +1 -2
  200. package/src/test/site-types.ts +0 -8
  201. package/types/build/client.d.ts +1 -1
  202. package/types/build/client.d.ts.map +1 -1
  203. package/types/build/icon-slots.d.ts +7 -0
  204. package/types/build/icon-slots.d.ts.map +1 -0
  205. package/types/build/libraries.d.ts +2 -0
  206. package/types/build/libraries.d.ts.map +1 -1
  207. package/types/build/plugin.d.ts +1 -0
  208. package/types/build/plugin.d.ts.map +1 -1
  209. package/types/build/route-sizes.d.ts.map +1 -1
  210. package/types/build/source-files.d.ts.map +1 -1
  211. package/types/build/variants.d.ts.map +1 -1
  212. package/types/check/diagnose.d.ts.map +1 -1
  213. package/types/check/index.d.ts +1 -2
  214. package/types/check/index.d.ts.map +1 -1
  215. package/types/check/project.d.ts.map +1 -1
  216. package/types/check/renamed-packages.d.ts +0 -3
  217. package/types/check/renamed-packages.d.ts.map +1 -1
  218. package/types/check/shadow-types.d.ts.map +1 -1
  219. package/types/commands/env.d.ts.map +1 -1
  220. package/types/compiler/ast.d.ts +1 -2
  221. package/types/compiler/ast.d.ts.map +1 -1
  222. package/types/compiler/browser.d.ts.map +1 -1
  223. package/types/compiler/class-items.d.ts +7 -0
  224. package/types/compiler/class-items.d.ts.map +1 -0
  225. package/types/compiler/dead-code.d.ts +9 -0
  226. package/types/compiler/dead-code.d.ts.map +1 -0
  227. package/types/compiler/deprecated-library.d.ts.map +1 -1
  228. package/types/compiler/deprecated-lints.d.ts +0 -560
  229. package/types/compiler/deprecated-lints.d.ts.map +1 -1
  230. package/types/compiler/deprecated-ui-props.d.ts +1 -8
  231. package/types/compiler/deprecated-ui-props.d.ts.map +1 -1
  232. package/types/compiler/dom-property.d.ts +9 -0
  233. package/types/compiler/dom-property.d.ts.map +1 -0
  234. package/types/compiler/dom.d.ts +1 -0
  235. package/types/compiler/dom.d.ts.map +1 -1
  236. package/types/compiler/errors.d.ts +2 -2
  237. package/types/compiler/errors.d.ts.map +1 -1
  238. package/types/compiler/fence-checks.d.ts +0 -1
  239. package/types/compiler/fence-checks.d.ts.map +1 -1
  240. package/types/compiler/hand-parts.d.ts +7 -0
  241. package/types/compiler/hand-parts.d.ts.map +1 -0
  242. package/types/compiler/image-attributes.d.ts +0 -1
  243. package/types/compiler/image-attributes.d.ts.map +1 -1
  244. package/types/compiler/index.d.ts.map +1 -1
  245. package/types/compiler/island-arguments.d.ts +2 -11
  246. package/types/compiler/island-arguments.d.ts.map +1 -1
  247. package/types/compiler/island-cause.d.ts +1 -1
  248. package/types/compiler/island-cause.d.ts.map +1 -1
  249. package/types/compiler/island-declaration.d.ts +1 -3
  250. package/types/compiler/island-declaration.d.ts.map +1 -1
  251. package/types/compiler/island-lints.d.ts +10 -0
  252. package/types/compiler/island-lints.d.ts.map +1 -0
  253. package/types/compiler/island-problems.d.ts +7 -0
  254. package/types/compiler/island-problems.d.ts.map +1 -0
  255. package/types/compiler/jsx-class.d.ts +1 -2
  256. package/types/compiler/jsx-class.d.ts.map +1 -1
  257. package/types/compiler/kay-exports.d.ts.map +1 -1
  258. package/types/compiler/link-flags.d.ts +0 -6
  259. package/types/compiler/link-flags.d.ts.map +1 -1
  260. package/types/compiler/lints.d.ts +11 -572
  261. package/types/compiler/lints.d.ts.map +1 -1
  262. package/types/compiler/markup.d.ts +1 -1
  263. package/types/compiler/markup.d.ts.map +1 -1
  264. package/types/compiler/module-signals.d.ts.map +1 -1
  265. package/types/compiler/names.d.ts.map +1 -1
  266. package/types/compiler/page-settings.d.ts +4 -0
  267. package/types/compiler/page-settings.d.ts.map +1 -1
  268. package/types/compiler/parser.d.ts.map +1 -1
  269. package/types/compiler/plan.d.ts.map +1 -1
  270. package/types/compiler/script-server.d.ts.map +1 -1
  271. package/types/compiler/validate.d.ts.map +1 -1
  272. package/types/config-loader.d.ts.map +1 -1
  273. package/types/config-resolve.d.ts.map +1 -1
  274. package/types/config-shape.d.ts +1 -1
  275. package/types/config-shape.d.ts.map +1 -1
  276. package/types/config.d.ts +5 -105
  277. package/types/config.d.ts.map +1 -1
  278. package/types/dev/preload.d.ts.map +1 -1
  279. package/types/lsp/server.d.ts.map +1 -1
  280. package/types/migrate/markup.d.ts.map +1 -1
  281. package/types/runtime/action-call.d.ts.map +1 -1
  282. package/types/runtime/action-encode.d.ts +1 -0
  283. package/types/runtime/action-encode.d.ts.map +1 -1
  284. package/types/runtime/action-error.d.ts +1 -2
  285. package/types/runtime/action-error.d.ts.map +1 -1
  286. package/types/runtime/action-run.d.ts +23 -0
  287. package/types/runtime/action-run.d.ts.map +1 -0
  288. package/types/runtime/action-shared.d.ts +1 -27
  289. package/types/runtime/action-shared.d.ts.map +1 -1
  290. package/types/runtime/action-stream.d.ts.map +1 -1
  291. package/types/runtime/action.d.ts +1 -1
  292. package/types/runtime/action.d.ts.map +1 -1
  293. package/types/runtime/call-result.d.ts +0 -10
  294. package/types/runtime/call-result.d.ts.map +1 -1
  295. package/types/runtime/checks.d.ts +6 -9
  296. package/types/runtime/checks.d.ts.map +1 -1
  297. package/types/runtime/core.d.ts +2 -20
  298. package/types/runtime/core.d.ts.map +1 -1
  299. package/types/runtime/dom.d.ts +1 -1
  300. package/types/runtime/dom.d.ts.map +1 -1
  301. package/types/runtime/html.d.ts +1 -1
  302. package/types/runtime/html.d.ts.map +1 -1
  303. package/types/runtime/i18n.client.d.ts +0 -1
  304. package/types/runtime/i18n.client.d.ts.map +1 -1
  305. package/types/runtime/i18n.d.ts +1 -1
  306. package/types/runtime/i18n.d.ts.map +1 -1
  307. package/types/runtime/i18n.server.d.ts +0 -1
  308. package/types/runtime/i18n.server.d.ts.map +1 -1
  309. package/types/runtime/index.d.ts +2 -2
  310. package/types/runtime/index.d.ts.map +1 -1
  311. package/types/runtime/island.server.d.ts +1 -0
  312. package/types/runtime/island.server.d.ts.map +1 -1
  313. package/types/runtime/live-resource.server.d.ts.map +1 -1
  314. package/types/runtime/live-value.shared.d.ts +7 -15
  315. package/types/runtime/live-value.shared.d.ts.map +1 -1
  316. package/types/runtime/live.d.ts +0 -11
  317. package/types/runtime/live.d.ts.map +1 -1
  318. package/types/runtime/local-types.d.ts +0 -14
  319. package/types/runtime/local-types.d.ts.map +1 -1
  320. package/types/runtime/navigate-api.d.ts +0 -4
  321. package/types/runtime/navigate-api.d.ts.map +1 -1
  322. package/types/runtime/navigation-state.d.ts +0 -4
  323. package/types/runtime/navigation-state.d.ts.map +1 -1
  324. package/types/runtime/page-swap.d.ts.map +1 -1
  325. package/types/runtime/persist.d.ts +1 -0
  326. package/types/runtime/persist.d.ts.map +1 -1
  327. package/types/runtime/persisted.d.ts +0 -15
  328. package/types/runtime/persisted.d.ts.map +1 -1
  329. package/types/runtime/presence.d.ts +0 -2
  330. package/types/runtime/presence.d.ts.map +1 -1
  331. package/types/runtime/query-param.d.ts.map +1 -1
  332. package/types/runtime/reactive.d.ts +2 -1
  333. package/types/runtime/reactive.d.ts.map +1 -1
  334. package/types/runtime/refuse.d.ts +0 -7
  335. package/types/runtime/refuse.d.ts.map +1 -1
  336. package/types/runtime/store-base.d.ts +1 -2
  337. package/types/runtime/store-base.d.ts.map +1 -1
  338. package/types/runtime/values.d.ts +2 -1
  339. package/types/runtime/values.d.ts.map +1 -1
  340. package/types/runtime/with-query.d.ts +2 -0
  341. package/types/runtime/with-query.d.ts.map +1 -1
  342. package/types/server/action-hooks.d.ts +4 -4
  343. package/types/server/action-hooks.d.ts.map +1 -1
  344. package/types/server/actions.d.ts.map +1 -1
  345. package/types/server/api-modules.d.ts +0 -1
  346. package/types/server/api-modules.d.ts.map +1 -1
  347. package/types/server/app-stages.d.ts +5 -13
  348. package/types/server/app-stages.d.ts.map +1 -1
  349. package/types/server/app.d.ts +3 -8
  350. package/types/server/app.d.ts.map +1 -1
  351. package/types/server/auth-mails.d.ts +0 -5
  352. package/types/server/auth-mails.d.ts.map +1 -1
  353. package/types/server/env-state.d.ts +1 -0
  354. package/types/server/env-state.d.ts.map +1 -1
  355. package/types/server/guard-requirement.d.ts +0 -1
  356. package/types/server/guard-requirement.d.ts.map +1 -1
  357. package/types/server/image.d.ts +0 -1
  358. package/types/server/image.d.ts.map +1 -1
  359. package/types/server/index.d.ts +0 -2
  360. package/types/server/index.d.ts.map +1 -1
  361. package/types/server/job-context.d.ts +1 -1
  362. package/types/server/job-context.d.ts.map +1 -1
  363. package/types/server/jobs.d.ts +0 -4
  364. package/types/server/jobs.d.ts.map +1 -1
  365. package/types/server/kept-exports.d.ts.map +1 -1
  366. package/types/server/kv.d.ts +4 -4
  367. package/types/server/kv.d.ts.map +1 -1
  368. package/types/server/library.d.ts +1 -3
  369. package/types/server/library.d.ts.map +1 -1
  370. package/types/server/mcp.d.ts +0 -1
  371. package/types/server/mcp.d.ts.map +1 -1
  372. package/types/server/metrics.d.ts +0 -5
  373. package/types/server/metrics.d.ts.map +1 -1
  374. package/types/server/page-settings.d.ts +3 -3
  375. package/types/server/page-settings.d.ts.map +1 -1
  376. package/types/server/prerender.d.ts.map +1 -1
  377. package/types/server/protection.d.ts +6 -6
  378. package/types/server/protection.d.ts.map +1 -1
  379. package/types/server/queue.d.ts +1 -3
  380. package/types/server/queue.d.ts.map +1 -1
  381. package/types/server/rate-limit.d.ts +0 -2
  382. package/types/server/rate-limit.d.ts.map +1 -1
  383. package/types/server/routes.d.ts +1 -1
  384. package/types/server/routes.d.ts.map +1 -1
  385. package/types/server/scope.d.ts.map +1 -1
  386. package/types/server/session.d.ts +1 -1
  387. package/types/server/session.d.ts.map +1 -1
  388. package/types/server/signals.d.ts.map +1 -1
  389. package/types/server/signed.d.ts +0 -2
  390. package/types/server/signed.d.ts.map +1 -1
  391. package/types/server/source.d.ts +1 -1
  392. package/types/server/source.d.ts.map +1 -1
  393. package/types/server/storage.d.ts +0 -4
  394. package/types/server/storage.d.ts.map +1 -1
  395. package/types/server/vitals.d.ts +0 -1
  396. package/types/server/vitals.d.ts.map +1 -1
  397. package/types/server/work-scope.d.ts +0 -2
  398. package/types/server/work-scope.d.ts.map +1 -1
  399. package/types/server/workflow.d.ts +1 -1
  400. package/types/server/workflow.d.ts.map +1 -1
  401. package/types/test/index.d.ts.map +1 -1
  402. package/types/test/site-actions.d.ts +1 -1
  403. package/types/test/site-actions.d.ts.map +1 -1
  404. package/types/test/site-keys.d.ts +1 -1
  405. package/types/test/site-keys.d.ts.map +1 -1
  406. package/types/test/site-socket.d.ts +1 -1
  407. package/types/test/site-socket.d.ts.map +1 -1
  408. package/types/test/site-types.d.ts +0 -8
  409. package/types/test/site-types.d.ts.map +1 -1
  410. package/llms/deprecated-lints-1-105-libraries.md +0 -32
  411. package/llms/deprecated-lints-1-105.md +0 -58
  412. package/src/check/action-readers.ts +0 -115
  413. package/src/check/action-type.ts +0 -44
  414. package/src/check/ai-language.ts +0 -56
  415. package/src/check/app-hooks.ts +0 -90
  416. package/src/check/auth-methods.ts +0 -85
  417. package/src/check/auth-rate-limits.ts +0 -99
  418. package/src/check/call-result.ts +0 -242
  419. package/src/check/client-keys.ts +0 -10
  420. package/src/check/cms-options.ts +0 -81
  421. package/src/check/config-groups.ts +0 -22
  422. package/src/check/config-switches.ts +0 -38
  423. package/src/check/context-import.ts +0 -51
  424. package/src/check/env-files.ts +0 -31
  425. package/src/check/format-duration.ts +0 -75
  426. package/src/check/guard-options.ts +0 -58
  427. package/src/check/handler-events.ts +0 -149
  428. package/src/check/hook-context.ts +0 -94
  429. package/src/check/hook-names.ts +0 -104
  430. package/src/check/i18n-keys.ts +0 -50
  431. package/src/check/images-keys.ts +0 -54
  432. package/src/check/job-shapes.ts +0 -273
  433. package/src/check/link-flag-tests.ts +0 -130
  434. package/src/check/live-api.ts +0 -137
  435. package/src/check/mail-api.ts +0 -67
  436. package/src/check/one-state-api.ts +0 -357
  437. package/src/check/pages-options.ts +0 -35
  438. package/src/check/rate-enforce.ts +0 -53
  439. package/src/check/refusal-calls.ts +0 -185
  440. package/src/check/retired-lints.ts +0 -49
  441. package/src/check/route-keys.ts +0 -166
  442. package/src/check/secret-keys.ts +0 -83
  443. package/src/check/socket-frames.ts +0 -102
  444. package/src/check/source-readers.ts +0 -257
  445. package/src/check/store-ms.ts +0 -72
  446. package/src/check/store-names.ts +0 -88
  447. package/src/check/test-helpers.ts +0 -98
  448. package/src/check/ttl-names.ts +0 -142
  449. package/src/compiler/deprecated-ai-labels.ts +0 -97
  450. package/src/compiler/deprecated-ai-links.ts +0 -63
  451. package/src/compiler/deprecated-allow.ts +0 -50
  452. package/src/compiler/deprecated-auth-lints.ts +0 -14
  453. package/src/compiler/deprecated-auth-signed.ts +0 -29
  454. package/src/compiler/deprecated-children.ts +0 -66
  455. package/src/compiler/deprecated-image.ts +0 -116
  456. package/src/compiler/deprecated-island.ts +0 -155
  457. package/src/compiler/deprecated-lints-1-105.ts +0 -41
  458. package/src/compiler/deprecated-page.ts +0 -125
  459. package/src/compiler/deprecated-parts.ts +0 -22
  460. package/src/compiler/deprecated-typed-lints.ts +0 -23
  461. package/src/compiler/deprecated-ui-callbacks.ts +0 -66
  462. package/src/compiler/deprecated-ui-input.ts +0 -97
  463. package/src/compiler/deprecated-ui-items.ts +0 -47
  464. package/src/compiler/old-parts.ts +0 -84
  465. package/src/runtime/mount.compat.ts +0 -8
  466. package/src/server/moved-exports.ts +0 -17
  467. package/types/check/action-readers.d.ts +0 -3
  468. package/types/check/action-readers.d.ts.map +0 -1
  469. package/types/check/action-type.d.ts +0 -3
  470. package/types/check/action-type.d.ts.map +0 -1
  471. package/types/check/ai-language.d.ts +0 -3
  472. package/types/check/ai-language.d.ts.map +0 -1
  473. package/types/check/app-hooks.d.ts +0 -3
  474. package/types/check/app-hooks.d.ts.map +0 -1
  475. package/types/check/auth-methods.d.ts +0 -3
  476. package/types/check/auth-methods.d.ts.map +0 -1
  477. package/types/check/auth-rate-limits.d.ts +0 -3
  478. package/types/check/auth-rate-limits.d.ts.map +0 -1
  479. package/types/check/call-result.d.ts +0 -7
  480. package/types/check/call-result.d.ts.map +0 -1
  481. package/types/check/client-keys.d.ts +0 -3
  482. package/types/check/client-keys.d.ts.map +0 -1
  483. package/types/check/cms-options.d.ts +0 -3
  484. package/types/check/cms-options.d.ts.map +0 -1
  485. package/types/check/config-groups.d.ts +0 -3
  486. package/types/check/config-groups.d.ts.map +0 -1
  487. package/types/check/config-switches.d.ts +0 -3
  488. package/types/check/config-switches.d.ts.map +0 -1
  489. package/types/check/context-import.d.ts +0 -3
  490. package/types/check/context-import.d.ts.map +0 -1
  491. package/types/check/env-files.d.ts +0 -3
  492. package/types/check/env-files.d.ts.map +0 -1
  493. package/types/check/format-duration.d.ts +0 -5
  494. package/types/check/format-duration.d.ts.map +0 -1
  495. package/types/check/guard-options.d.ts +0 -3
  496. package/types/check/guard-options.d.ts.map +0 -1
  497. package/types/check/handler-events.d.ts +0 -9
  498. package/types/check/handler-events.d.ts.map +0 -1
  499. package/types/check/hook-context.d.ts +0 -3
  500. package/types/check/hook-context.d.ts.map +0 -1
  501. package/types/check/hook-names.d.ts +0 -3
  502. package/types/check/hook-names.d.ts.map +0 -1
  503. package/types/check/i18n-keys.d.ts +0 -3
  504. package/types/check/i18n-keys.d.ts.map +0 -1
  505. package/types/check/images-keys.d.ts +0 -3
  506. package/types/check/images-keys.d.ts.map +0 -1
  507. package/types/check/job-shapes.d.ts +0 -6
  508. package/types/check/job-shapes.d.ts.map +0 -1
  509. package/types/check/link-flag-tests.d.ts +0 -4
  510. package/types/check/link-flag-tests.d.ts.map +0 -1
  511. package/types/check/live-api.d.ts +0 -3
  512. package/types/check/live-api.d.ts.map +0 -1
  513. package/types/check/mail-api.d.ts +0 -3
  514. package/types/check/mail-api.d.ts.map +0 -1
  515. package/types/check/one-state-api.d.ts +0 -9
  516. package/types/check/one-state-api.d.ts.map +0 -1
  517. package/types/check/pages-options.d.ts +0 -3
  518. package/types/check/pages-options.d.ts.map +0 -1
  519. package/types/check/rate-enforce.d.ts +0 -3
  520. package/types/check/rate-enforce.d.ts.map +0 -1
  521. package/types/check/refusal-calls.d.ts +0 -3
  522. package/types/check/refusal-calls.d.ts.map +0 -1
  523. package/types/check/retired-lints.d.ts +0 -3
  524. package/types/check/retired-lints.d.ts.map +0 -1
  525. package/types/check/route-keys.d.ts +0 -3
  526. package/types/check/route-keys.d.ts.map +0 -1
  527. package/types/check/secret-keys.d.ts +0 -3
  528. package/types/check/secret-keys.d.ts.map +0 -1
  529. package/types/check/socket-frames.d.ts +0 -3
  530. package/types/check/socket-frames.d.ts.map +0 -1
  531. package/types/check/source-readers.d.ts +0 -3
  532. package/types/check/source-readers.d.ts.map +0 -1
  533. package/types/check/store-ms.d.ts +0 -3
  534. package/types/check/store-ms.d.ts.map +0 -1
  535. package/types/check/store-names.d.ts +0 -3
  536. package/types/check/store-names.d.ts.map +0 -1
  537. package/types/check/test-helpers.d.ts +0 -3
  538. package/types/check/test-helpers.d.ts.map +0 -1
  539. package/types/check/ttl-names.d.ts +0 -3
  540. package/types/check/ttl-names.d.ts.map +0 -1
  541. package/types/compiler/deprecated-ai-labels.d.ts +0 -5
  542. package/types/compiler/deprecated-ai-labels.d.ts.map +0 -1
  543. package/types/compiler/deprecated-ai-links.d.ts +0 -5
  544. package/types/compiler/deprecated-ai-links.d.ts.map +0 -1
  545. package/types/compiler/deprecated-allow.d.ts +0 -5
  546. package/types/compiler/deprecated-allow.d.ts.map +0 -1
  547. package/types/compiler/deprecated-auth-lints.d.ts +0 -12
  548. package/types/compiler/deprecated-auth-lints.d.ts.map +0 -1
  549. package/types/compiler/deprecated-auth-signed.d.ts +0 -5
  550. package/types/compiler/deprecated-auth-signed.d.ts.map +0 -1
  551. package/types/compiler/deprecated-children.d.ts +0 -4
  552. package/types/compiler/deprecated-children.d.ts.map +0 -1
  553. package/types/compiler/deprecated-image.d.ts +0 -5
  554. package/types/compiler/deprecated-image.d.ts.map +0 -1
  555. package/types/compiler/deprecated-island.d.ts +0 -9
  556. package/types/compiler/deprecated-island.d.ts.map +0 -1
  557. package/types/compiler/deprecated-lints-1-105.d.ts +0 -39
  558. package/types/compiler/deprecated-lints-1-105.d.ts.map +0 -1
  559. package/types/compiler/deprecated-page.d.ts +0 -4
  560. package/types/compiler/deprecated-page.d.ts.map +0 -1
  561. package/types/compiler/deprecated-parts.d.ts +0 -3
  562. package/types/compiler/deprecated-parts.d.ts.map +0 -1
  563. package/types/compiler/deprecated-typed-lints.d.ts +0 -21
  564. package/types/compiler/deprecated-typed-lints.d.ts.map +0 -1
  565. package/types/compiler/deprecated-ui-callbacks.d.ts +0 -5
  566. package/types/compiler/deprecated-ui-callbacks.d.ts.map +0 -1
  567. package/types/compiler/deprecated-ui-input.d.ts +0 -5
  568. package/types/compiler/deprecated-ui-input.d.ts.map +0 -1
  569. package/types/compiler/deprecated-ui-items.d.ts +0 -5
  570. package/types/compiler/deprecated-ui-items.d.ts.map +0 -1
  571. package/types/compiler/old-parts.d.ts +0 -9
  572. package/types/compiler/old-parts.d.ts.map +0 -1
  573. package/types/runtime/mount.compat.d.ts +0 -7
  574. package/types/runtime/mount.compat.d.ts.map +0 -1
  575. package/types/server/moved-exports.d.ts +0 -12
  576. package/types/server/moved-exports.d.ts.map +0 -1
@@ -0,0 +1,140 @@
1
+ import type { ImportGraph, KayLibrary } from './libraries'
2
+ import { existsSync, readFileSync, realpathSync } from 'node:fs'
3
+ import { dirname, join, resolve, sep } from 'node:path'
4
+ import { importEdges, importsOf, reachedFrom } from './libraries'
5
+
6
+ // kayjs-ui draws its icons from a registry keyed by slot, `settings.icons[slot]`, which a bundler cannot shrink: an island would carry every icon of it. The build instead reads the slots the project and the modules it reaches write, and loads the registry holding those alone.
7
+ // A slot is named where the code writes it as a string, `icon="close"` or `icon: 'close'`; pages hand them to islands as props, so every `.kay` file of the build is read, not only what an island imports. One taken from a variable in the project's own code may be any slot, so the whole registry stays.
8
+ const WORD = /(["'`])(\w+)\1/g
9
+ const ICON_PROP = /\b\w*[iI]con\w*=\{((?:[^{}]|\{[^{}]*\})*)\}/g
10
+ const ICON_KEY = /\b\w*[iI]con\w*\s*:\s*([^,}\n]+)/g
11
+ const ICON_IMPORT = /^import\s+(\w+)\s+from\s+(["'])~icons\/[^"'\n]+\2/gm
12
+ const LITERAL = /^(["'])\w+\1$/
13
+ const CHOICE = /^[^'"`?]+\?\s*(["'])\w+\1\s*:\s*(["'])\w+\2$/
14
+ const IDENTIFIER = /^[\w$]+$/
15
+ const TYPE_WORD = /^(?:string|undefined|null|true|false|any|unknown|number|boolean)\b/
16
+ const LOWERCASE = /^[a-z]/
17
+ const SLOT_NAME = /^\w+/
18
+ const IN_PACKAGES = /[\\/]node_modules[\\/]/
19
+ const UI_ICON = /[\\/](?:packages[\\/]ui|node_modules[\\/]@kayjs[\\/]ui)[\\/]src[\\/]icon\.kay$/
20
+ // A component called with a spread, `Button({...opts})`: the props it takes, an icon among them, are not written here.
21
+ const SPREAD_CALL = /\b[A-Z]\w*\([^)\n]*\.\.\./
22
+ const JSON_IMPORT = /(?:from\s*|import\(\s*)((["'])\.[^"'\n]*\.json\2)/g
23
+ const SCANNED = /\.(?:kay|[cm]?[jt]sx?)$/
24
+
25
+ // The registry modules of kayjs-ui, by where the project reaches it: in a checkout or under `node_modules`.
26
+ export const REGISTRY_FILE = /[\\/](?:packages[\\/]ui|node_modules[\\/]@kayjs[\\/]ui)[\\/]src[\\/](?:defaults|added-icons)\.ts$/
27
+
28
+ // Whether a registry module belongs to kayjs-ui itself, not to an app's own `packages/ui`.
29
+ export function isUiRegistry(file: string): boolean {
30
+ try {
31
+ return (JSON.parse(readFileSync(join(dirname(file), '../package.json'), 'utf8')) as { name?: string }).name === '@kayjs/ui'
32
+ }
33
+ catch {
34
+ return false
35
+ }
36
+ }
37
+
38
+ // Whether the value written for an icon is a slot or an icon of a set, and not something computed.
39
+ function isStatic(value: string, imported: ReadonlySet<string>): boolean {
40
+ const written = value.trim()
41
+
42
+ return LITERAL.test(written) || CHOICE.test(written) || (IDENTIFIER.test(written) && imported.has(written))
43
+ }
44
+
45
+ // Whether a file belongs to kayjs-ui, by the package.json above it.
46
+ function inUi(file: string): boolean {
47
+ for (let dir = dirname(file); dir !== dirname(dir); dir = dirname(dir)) {
48
+ if (existsSync(join(dir, 'package.json')))
49
+ return isUiRegistry(join(dir, 'src/x'))
50
+ }
51
+
52
+ return false
53
+ }
54
+
55
+ // The words written as strings in the files of the build and what they import, or undefined when a slot may come from a variable.
56
+ export async function iconSlotsOf(root: string, entries: Iterable<string>, libraries: KayLibrary[], graph?: ImportGraph): Promise<ReadonlySet<string> | undefined> {
57
+ const project = realpathSync(root) + sep
58
+ const reached = await reachedFrom([...entries], importEdges(root, libraries, graph))
59
+ const slots = new Set<string>()
60
+ let dynamic = false
61
+
62
+ await Promise.all([...reached].map(async (file) => {
63
+ if (REGISTRY_FILE.test(file) || !SCANNED.test(file))
64
+ return
65
+
66
+ const text = await Bun.file(file).text()
67
+
68
+ for (const [, , word] of text.matchAll(WORD))
69
+ slots.add(word!)
70
+
71
+ // Data a file imports hands icons to components as props, which no component writes.
72
+ for (const [, written] of text.matchAll(JSON_IMPORT)) {
73
+ const data = resolve(dirname(file), JSON.parse(written!.replaceAll('\'', '"')) as string)
74
+
75
+ if (existsSync(data)) {
76
+ for (const [, , word] of readFileSync(data, 'utf8').matchAll(WORD))
77
+ slots.add(word!)
78
+ }
79
+ }
80
+
81
+ // A kayjs-ui file the file imports and the walk did not follow, which its slots would be missing from.
82
+ for (const specifier of await importsOf(file, text)) {
83
+ try {
84
+ const path = realpathSync(Bun.resolveSync(specifier, dirname(file)))
85
+
86
+ if (SCANNED.test(path) && !reached.has(path) && inUi(path))
87
+ dynamic = true
88
+ }
89
+ catch {
90
+ // Not a file of the project's: a builtin or a package.
91
+ }
92
+ }
93
+
94
+ if (!file.startsWith(project) || IN_PACKAGES.test(file.slice(project.length)))
95
+ return
96
+
97
+ if (SPREAD_CALL.test(text))
98
+ dynamic = true
99
+
100
+ const imported = new Set([...text.matchAll(ICON_IMPORT)].map(hit => hit[1]!))
101
+
102
+ for (const [, value] of text.matchAll(ICON_PROP)) {
103
+ if (!isStatic(value!, imported))
104
+ dynamic = true
105
+ }
106
+
107
+ for (const [, value] of text.matchAll(ICON_KEY)) {
108
+ const written = value!.trim()
109
+
110
+ // A type annotation, `icon: IconSlot`, writes no value.
111
+ if (!isStatic(written, imported) && (written.includes('.') || written.includes('(') || written.includes('[') || (LOWERCASE.test(written) && !TYPE_WORD.test(written))))
112
+ dynamic = true
113
+ }
114
+ }))
115
+
116
+ // Without kayjs-ui's Icon among the files read, its components were not followed (a library the project does not declare), and their slots are unknown.
117
+ return dynamic || ![...reached].some(file => UI_ICON.test(file)) ? undefined : slots
118
+ }
119
+
120
+ const REGISTRY = /^(\s*icons: |export const addedIcons\b[^=\n]*= )\{ ([^{}\n]*) \}(,?)$/m
121
+ const ICON_IMPORT_LINE = /^import (\w+) from '~icons\/[^'\n]+'\n/gm
122
+
123
+ // A registry module with the entries of `slots` only, the imports of the others dropped with them. A module whose registry is not written on one line as `{ slot, other: local }` is left as it is.
124
+ export function registryWith(source: string, slots: ReadonlySet<string>): string {
125
+ const hit = REGISTRY.exec(source)
126
+
127
+ if (hit === null)
128
+ return source
129
+
130
+ const kept = hit[2]!.split(', ').filter(entry => slots.has(SLOT_NAME.exec(entry)![0]))
131
+ const body = source.replace(REGISTRY, () => `${hit[1]}{ ${kept.join(', ')} }${hit[3]}`)
132
+ const names = new Set(kept.map(entry => entry.split(':').at(-1)!.trim()))
133
+
134
+ return body.replace(ICON_IMPORT_LINE, (line, name: string) => names.has(name) ? line : '')
135
+ }
136
+
137
+ // What a cache keyed on the slots holds of them.
138
+ export function slotsKey(slots: ReadonlySet<string> | undefined): string {
139
+ return slots === undefined ? '*' : [...slots].sort().join(',')
140
+ }
@@ -1,7 +1,7 @@
1
1
  import type { Manifest } from './manifests'
2
2
  import { existsSync, readFileSync, realpathSync, statSync } from 'node:fs'
3
3
  import { isBuiltin } from 'node:module'
4
- import { dirname, join, relative, resolve, sep } from 'node:path'
4
+ import { basename, dirname, join, relative, resolve, sep } from 'node:path'
5
5
  import { KayError } from '../compiler/errors'
6
6
  import { parseKay } from '../compiler/parser'
7
7
  import { findKayFiles, KAY_FILE, readSource, scoped, SCRIPT_FILE, scriptLoader, transpilerFor } from './files'
@@ -222,7 +222,28 @@ export function packageRoot(dir: string): string {
222
222
  }
223
223
  }
224
224
 
225
- // The library holding `file`, by its path under `node_modules` or its real one: the deepest, for a library installed inside another's `node_modules`.
225
+ // Whether `path` exists outside the project's own files and is no install: a linked library or a folder above the root, whose real path is outside any `node_modules`.
226
+ export function linkedOutside(root: string, path: string): boolean {
227
+ const own = relative(resolve(root), path)
228
+
229
+ return (own.startsWith('..') || own.split(sep).includes('node_modules')) && existsSync(path) && !realpathSync(path).split(sep).includes('node_modules')
230
+ }
231
+
232
+ // The package holding each of `extensionDirs`, an extension's routes or its editor's directory, that no kay library holds, the nearest directory above them with a package.json, as a library: its components are shadowed and reached as one's are.
233
+ export async function extensionPackages(root: string, libraries: KayLibrary[], extensionDirs: string[]): Promise<KayLibrary[]> {
234
+ const dirs = new Set(extensionDirs.filter(dir => libraryOf(libraries, join(dir, 'page.kay')) === undefined).map(packageRoot))
235
+
236
+ const realRoot = realpathSync(root)
237
+
238
+ return Promise.all([...dirs].map(async (dir) => {
239
+ // Left out: the app itself, when the package holds it as a fixture; the other projects inside it, to their own checks; a kay library's files, to the library. A package linked into `node_modules` goes by that path, as the app imports it.
240
+ const files = (await findKayFiles(dir, { project: true, ownOnly: true, ownKayOnly: true })).filter(file => !realpathSync(file).startsWith(realRoot + sep) && libraryOf(libraries, file) === undefined)
241
+
242
+ return { name: basename(dir), dir, realDir: realpathSync(dir), files, specifiers: new Map<string, string>(), exports: undefined, extension: true as const }
243
+ }))
244
+ }
245
+
246
+ // Whether the package.json at `manifest` names a package.
226
247
  function namesPackage(manifest: string): boolean {
227
248
  try {
228
249
  return typeof (JSON.parse(readFileSync(manifest, 'utf8')) as { name?: unknown }).name === 'string'
@@ -232,6 +253,7 @@ function namesPackage(manifest: string): boolean {
232
253
  }
233
254
  }
234
255
 
256
+ // The library holding `file`, by its path under `node_modules` or its real one: the deepest, for a library installed inside another's `node_modules`.
235
257
  export function libraryOf(libraries: KayLibrary[], file: string): KayLibrary | undefined {
236
258
  const holding = (dir: string) => file.startsWith(dir + sep) ? dir.length : 0
237
259
 
@@ -16,6 +16,7 @@ import { cacheIds } from './cache-ids'
16
16
  import { directImports } from './direct-imports'
17
17
  import { KAY_MODULE, SCRIPT_FILE, scriptLoader } from './files'
18
18
  import { expandGlobs } from './glob'
19
+ import { isUiRegistry, REGISTRY_FILE, registryWith } from './icon-slots'
19
20
  import { iconModule, iconNames, installedIconSets } from './icons'
20
21
  import { linkedKayCopies, settingsReplacements } from './libraries'
21
22
  import { liveIds } from './live-ids'
@@ -67,6 +68,8 @@ export interface KayPluginOptions {
67
68
  rewrite?: ((file: string, source: string) => string) | undefined
68
69
  // What the build knows of the call sites of its components with features, shared by every bundle of it; one of its own, over the project's files, when unset.
69
70
  variants?: VariantIndex | undefined
71
+ // The icon slots of kayjs-ui the islands can draw: its registry loads with these alone. Unset, it loads whole.
72
+ iconSlots?: ReadonlySet<string> | undefined
70
73
  }
71
74
 
72
75
  // A static component imports its `?island` twin, the build of it that renders inside islands, as a module of its own.
@@ -302,6 +305,13 @@ export function kayPlugin(options: KayPluginOptions, workers: string[]): BunPlug
302
305
  build.onLoad({ filter: new RegExp(`^${RegExp.escape(path)}$`) }, () => ({ contents: `export * from ${JSON.stringify(replacement)}\nexport { default } from ${JSON.stringify(replacement)}\n`, loader: 'ts' }))
303
306
  }
304
307
 
308
+ // After the app's own settings, which stay whole: only kayjs-ui's default registry is cut.
309
+ if (target === 'dom' && options.iconSlots !== undefined) {
310
+ const slots = options.iconSlots
311
+
312
+ build.onLoad({ filter: REGISTRY_FILE }, async ({ path }) => isUiRegistry(path) ? { contents: registryWith(await Bun.file(path).text(), slots), loader: 'ts' } : undefined)
313
+ }
314
+
305
315
  // A linked library's own copy of kay loads as the app's: each of its modules re-exports the app's module at the same place, so the library and the app share one kay. A module the app's copy lacks, as another version may, stays the library's.
306
316
  for (const { from, to } of linkedKayCopies(root)) {
307
317
  build.onLoad({ filter: new RegExp(`^${RegExp.escape(from + sep)}(?!(?:.*[\\\\/])?node_modules[\\\\/]).*\\.[cm]?[jt]sx?$`) }, async ({ path }) => {
@@ -8,7 +8,6 @@ import type { RouteSize, SizeReport } from './report'
8
8
  import { realpathSync } from 'node:fs'
9
9
  import { join, relative, sep } from 'node:path'
10
10
  import { actionOf, elementsIn, serverIslandOf, someNode } from '../compiler/ast'
11
- import { exportedHydrate } from '../compiler/island-arguments'
12
11
  import { parseKay } from '../compiler/parser'
13
12
  import { analyzeScript } from '../compiler/script'
14
13
  import { bindingNames, scopedBlocks } from '../compiler/template-reads'
@@ -365,10 +364,10 @@ function isWaiting(hydrate: string | undefined): boolean {
365
364
  return hydrate === 'visible' || hydrate === 'idle' || hydrate === 'interaction' || hydrate?.startsWith('media(') === true
366
365
  }
367
366
 
368
- // Whether the component's `--- module` fence exports `island = { hydrate: 'visible' }` or another waiting value, which every use that writes no `hydrate` of its own gets.
367
+ // Whether the component's `island()` asks for `hydrate: 'visible'` or another waiting value, which every use that writes no `hydrate` of its own gets.
369
368
  function asksToWait(source: string): boolean {
370
369
  const parsed = parseKay(source)
371
- const hydrate = exportedHydrate(analyzeScript(source, parsed.script, [], parsed.module))
370
+ const hydrate = analyzeScript(source, parsed.script, [], parsed.module).island?.hydrate
372
371
 
373
372
  return isWaiting(hydrate)
374
373
  }
@@ -25,8 +25,8 @@ const DEFAULT_IMPORT = /^[\w$]+\s*(?:,|$)/
25
25
  const NAMED = /\{([^}]*)\}/
26
26
  const ALIAS = /\s+as\s+/
27
27
  const KAY_SPECIFIER = /^kay(?:\/|$)/
28
- // Lazy modules whose imports of the runtime stay with them rather than join the chunk a page loads: the code reviving an action, which only a page passing an island one loads, carries the action runtime along, the code posting an action call, which the first call loads, and the reader of a streaming action's answer, whose `ended()`, `onData()` and `retry()` a page with no such action does not carry.
29
- const STANDALONE = new Set([resolve(RUNTIME_DIR, 'action-reviver.ts'), resolve(RUNTIME_DIR, 'action-stream.ts'), resolve(RUNTIME_DIR, 'action-post.ts')])
28
+ // Lazy modules whose imports of the runtime stay with them rather than join the chunk a page loads: the code reviving an action, which only a page passing an island one loads, carries the action runtime along, the code running an action call, which the first call loads, and the reader of a streaming action's answer, whose `ended()`, `onData()` and `retry()` a page with no such action does not carry.
29
+ const STANDALONE = new Set([resolve(RUNTIME_DIR, 'action-reviver.ts'), resolve(RUNTIME_DIR, 'action-stream.ts'), resolve(RUNTIME_DIR, 'action-run.ts')])
30
30
  // Entries of the runtime that bundle a package, or that few pages use, which stay in the chunks of the islands importing them rather than weigh on every page: the `for`, `await` and `try` blocks, the spread and the localizing of the links an island writes, which most islands do without.
31
31
  const OWN_CHUNK = new Set(['kay/markdown', 'kay/internal/title', 'kay/dom-loop', 'kay/dom-await', 'kay/dom-try', 'kay/dom-spread', 'kay/dom-lazy', 'kay/i18n-links'])
32
32
  const RELATIVE = /^\.\.?\//
@@ -1,9 +1,10 @@
1
1
  import type { KayExtension } from '../config'
2
2
  import type { ImportGraph, KayLibrary } from './libraries'
3
3
  import { existsSync } from 'node:fs'
4
+ import { dirname } from 'node:path'
4
5
  import { extensionEditor, routeMounts } from '../server/routes'
5
6
  import { findKayFiles } from './files'
6
- import { findKayLibraries, reachableLibraryFiles } from './libraries'
7
+ import { extensionPackages, findKayLibraries, linkedOutside, reachableLibraryFiles } from './libraries'
7
8
 
8
9
  export interface BuildFiles {
9
10
  // The project's own components, the pages of the libraries it mounts and the components of the libraries it reaches, in that order.
@@ -22,9 +23,13 @@ export async function buildFiles(root: string, extensions: KayExtension[] | unde
22
23
  const ownFiles = new Set(own)
23
24
  const editor = extensionEditor(root, extensions)
24
25
  // The pages of the libraries the app mounts, which it reaches through its config rather than an import.
25
- const mountedFiles = (await Promise.all(routeMounts(root, extensions).map(async mount => existsSync(mount.dir) ? findKayFiles(mount.dir) : []))).flat()
26
+ const mounts = routeMounts(root, extensions)
27
+ const mountedFiles = (await Promise.all(mounts.map(async mount => existsSync(mount.dir) ? findKayFiles(mount.dir) : []))).flat()
26
28
  const mounted = [...new Set([...mountedFiles, ...editor === undefined ? [] : [editor]])].filter(file => !ownFiles.has(file))
27
- const libraries = await findKayLibraries(root)
29
+ const installed = await findKayLibraries(root)
30
+ // An extension reached with no dependency on it, as a workspace link or a folder above the root, is a library whose islands the pages it wraps still render.
31
+ const mountDirs = mounts.filter(mount => mount.reaching !== 'context' && linkedOutside(root, mount.dir)).map(mount => mount.dir)
32
+ const libraries = [...installed, ...await extensionPackages(root, installed, [...mountDirs, ...editor === undefined || !linkedOutside(root, editor) ? [] : [dirname(editor)]])]
28
33
  const fromLibraries = await reachableLibraryFiles(root, libraries, [...own, ...mounted], graph)
29
34
 
30
35
  return { files: [...own, ...mounted, ...fromLibraries.components], own, mounted, editor, libraries, fromLibraries }
@@ -299,6 +299,95 @@ function splitTop(text: string, operator: '&&' | '||'): string[] | undefined {
299
299
  return parts
300
300
  }
301
301
 
302
+ // The depth-0 positions of `char` in `text`, outside brackets and strings; a `?.` and a `??` are no ternary.
303
+ function topLevel(text: string, char: '?' | ':'): number[] {
304
+ const found: number[] = []
305
+ let depth = 0
306
+ let quote = ''
307
+
308
+ for (let at = 0; at < text.length; at++) {
309
+ const here = text[at]!
310
+
311
+ if (quote !== '') {
312
+ if (here === '\\')
313
+ at++
314
+ else if (here === quote)
315
+ quote = ''
316
+ }
317
+ else if (here === '\'' || here === '"' || here === '`') {
318
+ quote = here
319
+ }
320
+ else if (here === '(' || here === '[' || here === '{') {
321
+ depth++
322
+ }
323
+ else if (here === ')' || here === ']' || here === '}') {
324
+ depth--
325
+ }
326
+ else if (here === char && depth === 0 && (char === ':' || (text[at + 1] !== '.' && text[at + 1] !== '?'))) {
327
+ found.push(at)
328
+ }
329
+ }
330
+
331
+ return found
332
+ }
333
+
334
+ // Where the brace opened just before `from` closes, past the strings in between; -1 when it never does, or a template literal holds a `${`, whose nesting is not tracked.
335
+ function closingBrace(text: string, from: number): number {
336
+ let depth = 1
337
+ let quote = ''
338
+
339
+ for (let at = from; at < text.length; at++) {
340
+ const char = text[at]!
341
+
342
+ if (quote !== '') {
343
+ if (char === '\\')
344
+ at++
345
+ else if (quote === '`' && char === '$' && text[at + 1] === '{')
346
+ return -1
347
+ else if (char === quote)
348
+ quote = ''
349
+ }
350
+ else if (char === '\'' || char === '"' || char === '`') {
351
+ quote = char
352
+ }
353
+ else if (char === '{') {
354
+ depth++
355
+ }
356
+ else if (char === '}' && --depth === 0) {
357
+ return at
358
+ }
359
+ }
360
+
361
+ return -1
362
+ }
363
+
364
+ // An arrow, an assignment or a comma in a condition binds looser than the ternary, so what comes before the `?` is not the whole test.
365
+ const LOWER_THAN_TERNARY = /=>|,|(?<![=!<>])=(?!=)/
366
+
367
+ // An attribute `name={cond ? value : undefined}` whose condition is false is `{undefined}`, which the compiler leaves unbound. Only a ternary with no other at its top level is read.
368
+ function foldAbsentAttributes(line: string): string {
369
+ let result = line
370
+ let from = 0
371
+
372
+ for (;;) {
373
+ const open = result.indexOf('={', from)
374
+
375
+ if (open === -1)
376
+ return result
377
+
378
+ const start = open + 2
379
+ const end = closingBrace(result, start)
380
+ const inner = result.slice(start, end)
381
+ const question = topLevel(inner, '?')[0]
382
+ const colons = topLevel(inner, ':')
383
+
384
+ from = start
385
+
386
+ if (end !== -1 && question !== undefined && colons.length === 1 && inner.slice(colons[0]! + 1).trim() === 'undefined' && !LOWER_THAN_TERNARY.test(inner.slice(0, question)) && alwaysFalse(inner.slice(0, question)))
387
+ result = `${result.slice(0, start)}undefined${result.slice(end)}`
388
+ }
389
+ }
390
+
302
391
  // A destructured default that only an absent feature reads, `label = uses('x') ? wording('a', 'A') : ''` once the call is false: the closure it would make is left out.
303
392
  const ABSENT_DEFAULT = / = false(?: \|\| false)* \? wording\([^()]*\) : ''/g
304
393
  const DEAD_SPREAD = /^(\s*)\.\.\.\(false(?: \|\| false)*\)\s*$/
@@ -343,7 +432,7 @@ export function specializedSource(source: string, present: ReadonlySet<string>,
343
432
  if (hit === null) {
344
433
  // A call in an attribute or a text expression is folded as one in the script.
345
434
  if (lines[at]!.includes('uses('))
346
- lines[at] = replaced(lines[at]!)
435
+ lines[at] = foldAbsentAttributes(replaced(lines[at]!))
347
436
 
348
437
  continue
349
438
  }
@@ -33,7 +33,7 @@ export interface LoadTimeBrowserRead {
33
33
  diagnostic: Diagnostic
34
34
  }
35
35
 
36
- // A module of the project that touches a browser-only global as it loads and that a server render imports: a page, a layout or a component they render, which is not `--- client`, and the modules they pull in. It throws on the server the first time the page is rendered, as the module is evaluated.
36
+ // A module of the project that touches a browser-only global as it loads and that a server render imports: a page, a layout or a component they render, which is not client-only, and the modules they pull in. It throws on the server the first time the page is rendered, as the module is evaluated.
37
37
  // A read inside a function is left out, as only a call decides whether it runs, and so is one a `typeof` or a `try` guards.
38
38
  // Reported at the read, naming the first component reaching the module. What the server never renders is left out: a component used only with `render="client"`, and an island the build demotes to the browser for a package it imports, asked as the build asks.
39
39
  export async function browserGlobalAtLoad(root: string, components: Map<string, string>, routes: string, cacheDir?: string): Promise<LoadTimeBrowserRead[]> {
@@ -101,7 +101,7 @@ function clientOnlyImports(source: string): Set<string> {
101
101
 
102
102
  visitNodes(file.template, (node) => {
103
103
  if (node.kind === 'element' && node.component) {
104
- const client = node.attributes.some(attribute => attribute.kind === 'static' && ['hydrate', 'render'].includes(source.slice(attribute.name.start, attribute.name.end)) && attribute.text === 'client')
104
+ const client = node.attributes.some(attribute => attribute.kind === 'static' && source.slice(attribute.name.start, attribute.name.end) === 'render' && attribute.text === 'client')
105
105
 
106
106
  uses.set(node.name, (uses.get(node.name) ?? true) && client)
107
107
  }
@@ -9,7 +9,7 @@ type ObjectExpression = NodeOfType<'ObjectExpression'>
9
9
 
10
10
  // The options of `pages()` and `testSite()` that are no config key.
11
11
  const PAGES_OPTIONS = ['root', 'dev', 'prebuilt', 'config']
12
- const TEST_OPTIONS = [...PAGES_OPTIONS, 'outgoing', 'headers', 'use', 'locals', 'mcpKey', 'browser', 'islands', 'styles', 'proxyKey']
12
+ const TEST_OPTIONS = [...PAGES_OPTIONS, 'outgoing', 'headers', 'use', 'locals', 'browser', 'islands', 'styles']
13
13
 
14
14
  const FROM_SERVER = (source: string): boolean => source === 'kay/server' || source === 'kay'
15
15
  const FROM_TEST = (source: string): boolean => source === 'kay/test'
@@ -4,7 +4,6 @@ import type { Fix, Span } from '../compiler/ast'
4
4
  import type { LintLevel, LintName } from '../compiler/lints'
5
5
  import type { I18nConfig } from '../config'
6
6
  import type { RouteMount } from '../server/routes'
7
- import type { OldFormLint } from './handler-events'
8
7
  import type { ShadowFile } from './shadow'
9
8
  import { existsSync, realpathSync } from 'node:fs'
10
9
  import { basename, dirname, relative, resolve, sep } from 'node:path'
@@ -18,9 +17,7 @@ import { WRITABLE } from '../compiler/names'
18
17
  import { parseKay } from '../compiler/parser'
19
18
  import { UNSERVED_MESSAGE } from '../runtime/checks'
20
19
  import { localePrefixes, localeSettings } from '../server/i18n'
21
- import { callResultLint } from './call-result'
22
20
  import { unknownNameHelp } from './export-homes'
23
- import { handlerEventLint } from './handler-events'
24
21
  import { loopIndexFix, positionalKeyFix } from './loop-index-fix'
25
22
  import { sourceSpan } from './shadow'
26
23
  import { lastOverload, richCallHint, templateHint } from './template-hints'
@@ -131,18 +128,6 @@ function blockWithoutParameters(diagnostic: TsgoDiagnostic, source: string, span
131
128
  return `the component calls \`@${name}\` with (${parameters}): write it with them, as \`@${name}(${[...parameters.matchAll(PARAMETER_NAME)].map(match => `${match[1] ?? ''}${match[2]}`).join(', ')})\``
132
129
  }
133
130
 
134
- // What the types say of a callback given a function written for its arguments before 1.105, or of an island's call read as data: the deprecated lint that names it, with its fix.
135
- function oldForm(message: string, source: string, span: Span | undefined): (OldFormLint & { code: LintName }) | undefined {
136
- const handler = handlerEventLint(message, source, span)
137
-
138
- if (handler !== undefined)
139
- return { code: 'deprecated-callback-handler', ...handler }
140
-
141
- const result = callResultLint(message, source, span, true)
142
-
143
- return result && { code: 'deprecated-call-result', ...result }
144
- }
145
-
146
131
  // A diagnostic in a .kay file's shadow TSX, read at the levels its source gives the lints.
147
132
  export function diagnoseShadow(shadow: ShadowFile, reported: TsgoDiagnostic, levelAt: (lint: LintName, offset: number) => LintLevel, messageKeys: readonly string[] = []): Diagnosed | undefined {
148
133
  const span = sourceSpan(shadow, reported.start, reported.end, 'loose')
@@ -164,13 +149,6 @@ export function diagnoseShadow(shadow: ShadowFile, reported: TsgoDiagnostic, lev
164
149
  return level === 'allow' ? undefined : { ...lint, severity: severityOf(level), span, ...offered }
165
150
  }
166
151
 
167
- // A type error that is an old form of before 1.105, with the fix that writes the new one.
168
- const old = oldForm(diagnostic.message, shadow.source, span)
169
- const oldLevel = old === undefined ? 'allow' : levelAt(old.code, offset)
170
-
171
- if (old !== undefined && oldLevel !== 'allow')
172
- return { ...old, severity: severityOf(oldLevel) }
173
-
174
152
  // Unread code is the `unread-name` lint; a name kay generated, which the template reads in a way it does not spell out, is no code of the user's.
175
153
  if (diagnostic.code !== undefined && UNUSED_CODES.has(diagnostic.code)) {
176
154
  const level = shadow.map.isExact(diagnostic.start) ? levelAt('unread-name', offset) : 'allow'
@@ -2,7 +2,7 @@ import { readFileSync } from 'node:fs'
2
2
  import { dirname, resolve } from 'node:path'
3
3
 
4
4
  // The entries an app imports from, in the order a name found in several is attributed: `kay` first, as its values need no import in a component.
5
- const ENTRIES = ['kay', 'kay/server', 'kay/cache', 'kay/i18n', 'kay/words', 'kay/content', 'kay/seo', 'kay/image', 'kay/icons', 'kay/markdown', 'kay/params', 'kay/edit', 'kay/island', 'kay/await', 'kay/html', 'kay/test', 'kay/dev-tool', 'kay/analytics', 'kay/pg-orm', 'kay/mount', 'kay/compiler', 'kay/bun', 'kay/library']
5
+ const ENTRIES = ['kay', 'kay/server', 'kay/cache', 'kay/i18n', 'kay/words', 'kay/content', 'kay/seo', 'kay/image', 'kay/icons', 'kay/markdown', 'kay/params', 'kay/edit', 'kay/island', 'kay/await', 'kay/html', 'kay/test', 'kay/dev-tool', 'kay/analytics', 'kay/pg-orm', 'kay/compiler', 'kay/bun', 'kay/library']
6
6
  const EXPORT_ALL = /^export\s*\*\s*from\s*['"](\.[^'"]+)['"]/gm
7
7
  const UNKNOWN_NAME = /^Cannot find name '([\w$]+)'/
8
8
  const EXTENSIONS = ['', '.ts', '/index.ts']
@@ -7,8 +7,8 @@ import { guardRequirement, requiredBy } from '../server/guard-requirement'
7
7
 
8
8
  const HELP = 'add a `_guard.ts` to its directory or one above it, or, if anyone may reach it, set `guards: false`'
9
9
 
10
- // On a site with `requireGuards`, what the server answers 403 for: each page, layout with actions, endpoint and API module of the app no guard covers that does not set `guards: false`.
11
- // A site that leaves `requireGuards` unset but guards some route of its own is held to it for its routes alone (not layouts or action modules), as its start refuses them; `requireGuards: false` keeps it open.
10
+ // On a site with `guards: { default: 'closed' }`, what the server answers 403 for: each page, layout with actions, endpoint and API module of the app no guard covers that does not set `guards: false`.
11
+ // A site that leaves `guards.default` unset but guards some route of its own is held to it for its routes alone (not layouts or action modules), as its start refuses them; `guards: { default: 'open' }` keeps it open.
12
12
  export async function unguardedRoutes(options: CheckOptions, { routes, endpoints, apiModules }: ServedProject): Promise<CheckDiagnostic[]> {
13
13
  const level = lintLevel('unguarded-route', options.lints)
14
14
 
@@ -50,7 +50,7 @@ export async function unguardedRoutes(options: CheckOptions, { routes, endpoints
50
50
  }
51
51
  }
52
52
 
53
- // Layouts and action modules are not routes: a site that leaves `requireGuards` unset is told of its routes alone.
53
+ // Layouts and action modules are not routes: a site that leaves `guards.default` unset is told of its routes alone.
54
54
  for (const [layout, guarded] of required === 'routes' ? [] : layouts) {
55
55
  const source = guarded ? '' : await Bun.file(layout).text()
56
56
  const actions = guarded ? [] : analyzeServer(source, parseKay(source).server)?.actionNames ?? []
@@ -14,7 +14,6 @@ import { lintLevels } from '../compiler/lints'
14
14
  import { offsetAt, positionAt } from '../compiler/mapping'
15
15
  import { nativeExe } from '../compiler/native-typescript'
16
16
  import { pickConfig } from '../config'
17
- import { moduleCallResult } from './call-result'
18
17
  import { diagnoseShadow, reportsTypeErrors, servedByTheApp, shownOutsideKay, unusedCodesOf } from './diagnose'
19
18
  import { unknownNameHelp } from './export-homes'
20
19
  import { generatedProblem } from './generated'
@@ -69,7 +68,6 @@ export const CHECK_CONFIG = [
69
68
  'seo',
70
69
  'assets',
71
70
  // Reports each route of the app no guard covers, which the server refuses.
72
- 'requireGuards',
73
71
  'guards',
74
72
  // Reports the actions offered as tools that bot protection alone stands before.
75
73
  'mcp',
@@ -89,8 +87,6 @@ export interface CheckOptions extends Omit<Pick<KayConfig, (typeof CHECK_CONFIG)
89
87
  launch?: boolean | undefined
90
88
  // Set by `kay build --static`: a static host reads no `SITE_URL` once built, so a missing site is reported.
91
89
  exported?: boolean | undefined
92
- // The header `proxy.key` names, which the fix of `testSite({ proxyKey })` writes beside the secret.
93
- proxyHeader?: string | undefined
94
90
  }
95
91
 
96
92
  export interface CheckDiagnostic extends Pick<Diagnostic, 'label' | 'related' | 'note' | 'help' | 'severity' | 'fixes'> {
@@ -116,9 +112,8 @@ function helped({ message, help }: CheckDiagnostic): Pick<CheckDiagnostic, 'help
116
112
  export function configCheckOptions(config: LoadedConfig): CheckOptions {
117
113
  const { ops, ...picked } = pickConfig(config, CHECK_CONFIG)
118
114
  const { observe } = ops ?? {}
119
- const proxyHeader = typeof config.proxy === 'object' ? config.proxy.key?.header : undefined
120
115
 
121
- return { ...picked, ...proxyHeader !== undefined && { proxyHeader }, ...config.store?.database !== undefined && { storeDatabase: config.store.database }, ...ops !== undefined && { ops: { health: ops.health, ...observe !== undefined && { observe: { requestIdHeader: observe.requestIdHeader, loadBudget: observe.loadBudget } } } }, ...config.publicEnv !== undefined && { publicEnv: config.publicEnv } }
116
+ return { ...picked, ...config.store?.database !== undefined && { storeDatabase: config.store.database }, ...ops !== undefined && { ops: { health: ops.health, ...observe !== undefined && { observe: { requestIdHeader: observe.requestIdHeader, loadBudget: observe.loadBudget } } } }, ...config.publicEnv !== undefined && { publicEnv: config.publicEnv } }
122
117
  }
123
118
 
124
119
  // Type-checks a project, .kay components included, and reports every error at the line and column the user wrote.
@@ -211,7 +206,7 @@ async function runCheck(root: string, given: CheckOptions, probes?: ProbeMemory)
211
206
 
212
207
  const mapped: CheckDiagnostic = shadow && diagnosed
213
208
  ? { ...diagnostic, file: shadow.file, ...positionAt(shadow.source, diagnosed.span?.start ?? 0), code: diagnosed.code ?? diagnostic.code, severity: diagnosed.severity, message: diagnosed.message, note: diagnosed.note, help: diagnosed.help ?? (shadow.route === true ? helped(diagnostic).help : undefined), ...diagnosed.fixes && { fixes: diagnosed.fixes } }
214
- : { ...diagnostic, ...helped(diagnostic), ...await moduleCallResult(diagnostic, options.lints) }
209
+ : { ...diagnostic, ...helped(diagnostic) }
215
210
  const generated = generatedProblem(root, mapped, types, content)
216
211
 
217
212
  // A guard file imported for two lines of the exports check is reported once.
@@ -31,7 +31,7 @@ export async function movedKeys(root: string, options: CheckOptions, { lint, nee
31
31
  return scan(root, options, lint, needle, ({ file, parsed, report }) => {
32
32
  for (const { ast, base, text } of parsed) {
33
33
  for (const { object, call } of configObjects(file, ast)) {
34
- // The options of a call are moved into `config` by `deprecated-pages-options` first.
34
+ // The options of a call are written in `config`.
35
35
  if (call !== undefined)
36
36
  continue
37
37
 
@@ -17,7 +17,6 @@ import { isPageFile, pageDirs } from '../build/page-dirs'
17
17
  import { mentionsServerOnly } from '../build/server-only'
18
18
  import { importedSignals } from '../build/signals'
19
19
  import { browserRole, onceReadChecks } from '../compiler'
20
- import { RETIRED_LINTS } from '../compiler/deprecated-allow'
21
20
  import { moduleChecks, turnsCaptchaOff } from '../compiler/fence-checks'
22
21
  import { isLaunchLint, isLint, isLintGroup, LEVELS, lintLevel, lintLevels } from '../compiler/lints'
23
22
  import { CONFIG_FILE } from '../config'
@@ -32,9 +31,8 @@ import { dockerfileProblems } from './dockerfile'
32
31
  import { CONTENT_CHECK, contentPropsCheck } from './generated'
33
32
  import { browserModules, islandEdges } from './island-modules'
34
33
  import { componentImporters, islandOnlyComponents, renderedInIslands } from './island-only'
35
- import { linkFlagTests } from './link-flag-tests'
36
34
  import { FILES_MARKER, stampOf } from './loaded'
37
- import { renamedPackages } from './renamed-packages'
35
+
38
36
  import { configSeoLints } from './seo'
39
37
  import { serverOnlyInIsland } from './server-only-reads'
40
38
  import { fromCompile } from './shadow-types'
@@ -106,13 +104,13 @@ export function configProblems(root: string, options: CheckOptions, types: Shado
106
104
  // The collections may still be read, which only the feeds and their own problems wait for.
107
105
  export async function projectProblems(root: string, options: CheckOptions, collections: ContentChecks | Promise<ContentChecks>, memory?: ProbeMemory, scanned?: ServedProject): Promise<CheckDiagnostic[]> {
108
106
  return inWalkScope(async () => {
109
- const [content, messages, boot, modules, packages, linkTests] = await Promise.all([collections, checkMessages(root, options, memory), (async () => {
107
+ const [content, messages, boot, modules] = await Promise.all([collections, checkMessages(root, options, memory), (async () => {
110
108
  const read = await collections
111
109
 
112
110
  return bootProblems(resolve(root), options, read.feeds, scanned, read.routes)
113
- })(), moduleLints(root, options), renamedPackages(root, options.lints), linkFlagTests(root, options.lints)])
111
+ })(), moduleLints(root, options)])
114
112
 
115
- return [...content.problems, ...messages, ...boot, ...modules, ...packages, ...linkTests, ...uiProblems(root), ...contextModuleProblems(root)]
113
+ return [...content.problems, ...messages, ...boot, ...modules, ...uiProblems(root), ...contextModuleProblems(root)]
116
114
  })
117
115
  }
118
116
 
@@ -297,9 +295,6 @@ function lintConfigProblems(root: string, lints: LintLevels = {}): CheckDiagnost
297
295
  return levelEntries(lints).flatMap(([name, level]) => {
298
296
  const at = { file, ...locate(['lints', name]) }
299
297
 
300
- if (RETIRED_LINTS.has(name))
301
- return []
302
-
303
298
  if (!isLint(name) && !isLintGroup(name))
304
299
  return [{ ...at, message: `\`lints\` names \`${name}\`, which is no lint or group`, help: '`kay explain` lists them' }]
305
300