@kayjs/kay 1.108.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.
- package/dist/eslint.js +1790 -3751
- package/editors/zed/extension.toml +2 -2
- package/llms/action-protection.md +1 -1
- package/llms/actions-from-islands.md +4 -4
- package/llms/actions-refused-fields.md +4 -4
- package/llms/api-from-islands.md +6 -6
- package/llms/browser-only.md +2 -2
- package/llms/cdn-caching.md +1 -1
- package/llms/checks.md +1 -1
- package/llms/code-lints.md +1 -2
- package/llms/component-library-conventions.md +1 -1
- package/llms/components.md +4 -4
- package/llms/deprecated-lints.md +1 -6
- package/llms/effects.md +1 -1
- package/llms/errors.md +2 -2
- package/llms/events.md +1 -1
- package/llms/guards.md +1 -1
- package/llms/head.md +1 -1
- package/llms/hooks.md +2 -2
- package/llms/images.md +1 -1
- package/llms/island-and-form-lints.md +2 -1
- package/llms/island-sources.md +1 -1
- package/llms/islands-state-to-ids.md +2 -2
- package/llms/islands.md +4 -2
- package/llms/lints.md +1 -1
- package/llms/live-values.md +3 -3
- package/llms/local-collections.md +1 -1
- package/llms/locales.md +1 -1
- package/llms/mcp.md +2 -2
- package/llms/metrics.md +1 -1
- package/llms/navigation-from-code.md +6 -6
- package/llms/prerendering.md +1 -0
- package/llms/production.md +2 -2
- package/llms/project-new-and-add.md +1 -1
- package/llms/project.md +4 -4
- package/llms/proxy-and-security.md +1 -1
- package/llms/queues.md +1 -1
- package/llms/rate-limits.md +4 -4
- package/llms/rendering.md +1 -1
- package/llms/server-islands.md +2 -2
- package/llms/server.md +1 -1
- package/llms/stores.md +1 -1
- package/llms/styles-and-assets.md +1 -1
- package/llms/testing-mount.md +49 -0
- package/llms/testing.md +4 -45
- package/llms/upgrading-1-105-config.md +13 -13
- package/llms/upgrading-archive.md +42 -82
- package/llms/upgrading.md +91 -63
- package/llms/whats-new.md +9 -0
- package/llms.txt +5 -6
- package/package.json +6 -10
- package/src/build/route-sizes.ts +2 -3
- package/src/check/browser-global-reads.ts +2 -2
- package/src/check/config-objects.ts +1 -1
- package/src/check/diagnose.ts +0 -22
- package/src/check/export-homes.ts +1 -1
- package/src/check/guards.ts +3 -3
- package/src/check/index.ts +2 -7
- package/src/check/moved-keys.ts +1 -1
- package/src/check/project.ts +3 -8
- package/src/check/shadow-types.ts +0 -86
- package/src/commands/check.ts +2 -2
- package/src/commands/env.ts +25 -3
- package/src/compiler/ast.ts +18 -16
- package/src/compiler/browser.ts +2 -14
- package/src/compiler/class-items.ts +16 -0
- package/src/compiler/codegen.ts +8 -8
- package/src/compiler/deprecated-library.ts +0 -12
- package/src/compiler/deprecated-lints.ts +3 -495
- package/src/compiler/deprecated-ui-props.ts +5 -5
- package/src/compiler/errors.ts +2 -2
- package/src/compiler/fence-checks.ts +2 -121
- package/src/compiler/hand-parts.ts +55 -0
- package/src/compiler/helper-imports.ts +2 -2
- package/src/compiler/image-attributes.ts +1 -3
- package/src/compiler/index.ts +20 -21
- package/src/compiler/island-arguments.ts +8 -95
- package/src/compiler/island-cause.ts +7 -7
- package/src/compiler/island-declaration.ts +2 -8
- package/src/compiler/island-lints.ts +12 -0
- package/src/compiler/island-marker.ts +3 -3
- package/src/compiler/island-problems.ts +25 -0
- package/src/compiler/jsx-class.ts +1 -25
- package/src/compiler/jsx.ts +2 -2
- package/src/compiler/kay-exports.ts +0 -2
- package/src/compiler/link-flags.ts +9 -38
- package/src/compiler/lints.ts +7 -14
- package/src/compiler/markup.ts +23 -26
- package/src/compiler/module-signals.ts +2 -2
- package/src/compiler/names.ts +1 -1
- package/src/compiler/page-settings.ts +11 -0
- package/src/compiler/parser.ts +6 -8
- package/src/compiler/plan.ts +1 -3
- package/src/compiler/rewrite.ts +3 -18
- package/src/compiler/script-server.ts +8 -3
- package/src/compiler/validate.ts +3 -8
- package/src/config-loader.ts +14 -4
- package/src/config-resolve.ts +18 -142
- package/src/config-shape.ts +44 -34
- package/src/config.ts +10 -114
- package/src/dev/preload.ts +4 -1
- package/src/lsp/server.ts +4 -0
- package/src/migrate/markup.ts +4 -1
- package/src/runtime/action-call.ts +0 -8
- package/src/runtime/action-encode.ts +26 -0
- package/src/runtime/action-error.ts +3 -11
- package/src/runtime/action-protection.ts +2 -2
- package/src/runtime/action-run.ts +2 -27
- package/src/runtime/action-shared.ts +14 -37
- package/src/runtime/action-stream.ts +0 -1
- package/src/runtime/action.ts +1 -1
- package/src/runtime/call-result.ts +2 -10
- package/src/runtime/checks.ts +11 -11
- package/src/runtime/client.ts +2 -2
- package/src/runtime/core.ts +5 -23
- package/src/runtime/dom.ts +1 -1
- package/src/runtime/html.ts +1 -1
- package/src/runtime/i18n.client.ts +1 -4
- package/src/runtime/i18n.server.ts +1 -4
- package/src/runtime/i18n.ts +3 -3
- package/src/runtime/index.ts +2 -2
- package/src/runtime/island.server.ts +18 -5
- package/src/runtime/live-resource.server.ts +0 -1
- package/src/runtime/live-value.server.ts +2 -2
- package/src/runtime/live-value.shared.ts +7 -20
- package/src/runtime/live.ts +1 -12
- package/src/runtime/local-types.ts +1 -11
- package/src/runtime/local.ts +4 -14
- package/src/runtime/navigate-api.ts +2 -5
- package/src/runtime/navigation-state.ts +0 -12
- package/src/runtime/page-swap.ts +6 -6
- package/src/runtime/persist.ts +11 -3
- package/src/runtime/persisted.ts +4 -30
- package/src/runtime/presence.ts +6 -7
- package/src/runtime/query-param.ts +20 -12
- package/src/runtime/reactive.ts +3 -1
- package/src/runtime/refuse.ts +3 -17
- package/src/runtime/store-base.ts +4 -6
- package/src/runtime/swap-fetch.ts +1 -1
- package/src/runtime/values.ts +40 -23
- package/src/runtime/with-query.ts +9 -0
- package/src/server/action-hooks.ts +8 -8
- package/src/server/actions.ts +13 -14
- package/src/server/api-modules.ts +2 -3
- package/src/server/app-stages.ts +15 -33
- package/src/server/app.ts +10 -5
- package/src/server/auth-mails.ts +0 -2
- package/src/server/env-state.ts +40 -10
- package/src/server/flash.ts +1 -1
- package/src/server/guard-requirement.ts +4 -4
- package/src/server/image.ts +2 -2
- package/src/server/index.ts +0 -2
- package/src/server/job-context.ts +3 -3
- package/src/server/jobs-page.ts +1 -1
- package/src/server/jobs.ts +5 -9
- package/src/server/kept-exports.ts +0 -2
- package/src/server/kv.ts +11 -14
- package/src/server/library.ts +1 -3
- package/src/server/live.ts +2 -2
- package/src/server/mcp.ts +3 -9
- package/src/server/metrics.ts +2 -4
- package/src/server/page-settings.ts +10 -19
- package/src/server/prerender.ts +19 -2
- package/src/server/protection.ts +15 -18
- package/src/server/queue.ts +3 -6
- package/src/server/rate-limit.ts +0 -3
- package/src/server/render-document.ts +1 -1
- package/src/server/routes.ts +7 -3
- package/src/server/scope.ts +3 -2
- package/src/server/session.ts +5 -6
- package/src/server/setup.ts +1 -1
- package/src/server/signals.ts +17 -7
- package/src/server/signed.ts +1 -3
- package/src/server/source.ts +20 -4
- package/src/server/speculation.ts +1 -1
- package/src/server/storage.ts +3 -8
- package/src/server/validate.ts +1 -1
- package/src/server/vitals.ts +1 -3
- package/src/server/work-scope.ts +2 -4
- package/src/server/work.ts +1 -1
- package/src/server/workflow.ts +1 -1
- package/src/test/index.ts +2 -1
- package/src/test/site-actions.ts +16 -6
- package/src/test/site-keys.ts +10 -15
- package/src/test/site-socket.ts +1 -2
- package/src/test/site-types.ts +0 -8
- package/types/build/route-sizes.d.ts.map +1 -1
- package/types/check/diagnose.d.ts.map +1 -1
- package/types/check/index.d.ts +1 -2
- package/types/check/index.d.ts.map +1 -1
- package/types/check/project.d.ts.map +1 -1
- package/types/check/shadow-types.d.ts.map +1 -1
- package/types/commands/env.d.ts.map +1 -1
- package/types/compiler/ast.d.ts +1 -2
- package/types/compiler/ast.d.ts.map +1 -1
- package/types/compiler/browser.d.ts.map +1 -1
- package/types/compiler/class-items.d.ts +7 -0
- package/types/compiler/class-items.d.ts.map +1 -0
- package/types/compiler/deprecated-library.d.ts.map +1 -1
- package/types/compiler/deprecated-lints.d.ts +0 -551
- package/types/compiler/deprecated-lints.d.ts.map +1 -1
- package/types/compiler/deprecated-ui-props.d.ts +1 -8
- package/types/compiler/deprecated-ui-props.d.ts.map +1 -1
- package/types/compiler/errors.d.ts +2 -2
- package/types/compiler/errors.d.ts.map +1 -1
- package/types/compiler/fence-checks.d.ts +0 -1
- package/types/compiler/fence-checks.d.ts.map +1 -1
- package/types/compiler/hand-parts.d.ts +7 -0
- package/types/compiler/hand-parts.d.ts.map +1 -0
- package/types/compiler/image-attributes.d.ts +0 -1
- package/types/compiler/image-attributes.d.ts.map +1 -1
- package/types/compiler/index.d.ts.map +1 -1
- package/types/compiler/island-arguments.d.ts +2 -11
- package/types/compiler/island-arguments.d.ts.map +1 -1
- package/types/compiler/island-cause.d.ts +1 -1
- package/types/compiler/island-cause.d.ts.map +1 -1
- package/types/compiler/island-declaration.d.ts +1 -3
- package/types/compiler/island-declaration.d.ts.map +1 -1
- package/types/compiler/island-lints.d.ts +10 -0
- package/types/compiler/island-lints.d.ts.map +1 -0
- package/types/compiler/island-problems.d.ts +7 -0
- package/types/compiler/island-problems.d.ts.map +1 -0
- package/types/compiler/jsx-class.d.ts +1 -2
- package/types/compiler/jsx-class.d.ts.map +1 -1
- package/types/compiler/kay-exports.d.ts.map +1 -1
- package/types/compiler/link-flags.d.ts +0 -6
- package/types/compiler/link-flags.d.ts.map +1 -1
- package/types/compiler/lints.d.ts +11 -563
- package/types/compiler/lints.d.ts.map +1 -1
- package/types/compiler/markup.d.ts +1 -1
- package/types/compiler/markup.d.ts.map +1 -1
- package/types/compiler/module-signals.d.ts.map +1 -1
- package/types/compiler/names.d.ts.map +1 -1
- package/types/compiler/page-settings.d.ts +4 -0
- package/types/compiler/page-settings.d.ts.map +1 -1
- package/types/compiler/parser.d.ts.map +1 -1
- package/types/compiler/plan.d.ts.map +1 -1
- package/types/compiler/script-server.d.ts.map +1 -1
- package/types/compiler/validate.d.ts.map +1 -1
- package/types/config-loader.d.ts.map +1 -1
- package/types/config-resolve.d.ts.map +1 -1
- package/types/config-shape.d.ts +1 -1
- package/types/config-shape.d.ts.map +1 -1
- package/types/config.d.ts +5 -105
- package/types/config.d.ts.map +1 -1
- package/types/dev/preload.d.ts.map +1 -1
- package/types/lsp/server.d.ts.map +1 -1
- package/types/migrate/markup.d.ts.map +1 -1
- package/types/runtime/action-call.d.ts.map +1 -1
- package/types/runtime/action-encode.d.ts +1 -0
- package/types/runtime/action-encode.d.ts.map +1 -1
- package/types/runtime/action-error.d.ts +1 -2
- package/types/runtime/action-error.d.ts.map +1 -1
- package/types/runtime/action-run.d.ts.map +1 -1
- package/types/runtime/action-shared.d.ts +1 -27
- package/types/runtime/action-shared.d.ts.map +1 -1
- package/types/runtime/action-stream.d.ts.map +1 -1
- package/types/runtime/action.d.ts +1 -1
- package/types/runtime/action.d.ts.map +1 -1
- package/types/runtime/call-result.d.ts +0 -10
- package/types/runtime/call-result.d.ts.map +1 -1
- package/types/runtime/checks.d.ts +6 -9
- package/types/runtime/checks.d.ts.map +1 -1
- package/types/runtime/core.d.ts +2 -20
- package/types/runtime/core.d.ts.map +1 -1
- package/types/runtime/dom.d.ts +1 -1
- package/types/runtime/dom.d.ts.map +1 -1
- package/types/runtime/html.d.ts +1 -1
- package/types/runtime/html.d.ts.map +1 -1
- package/types/runtime/i18n.client.d.ts +0 -1
- package/types/runtime/i18n.client.d.ts.map +1 -1
- package/types/runtime/i18n.d.ts +1 -1
- package/types/runtime/i18n.d.ts.map +1 -1
- package/types/runtime/i18n.server.d.ts +0 -1
- package/types/runtime/i18n.server.d.ts.map +1 -1
- package/types/runtime/index.d.ts +2 -2
- package/types/runtime/index.d.ts.map +1 -1
- package/types/runtime/island.server.d.ts +1 -0
- package/types/runtime/island.server.d.ts.map +1 -1
- package/types/runtime/live-resource.server.d.ts.map +1 -1
- package/types/runtime/live-value.shared.d.ts +7 -15
- package/types/runtime/live-value.shared.d.ts.map +1 -1
- package/types/runtime/live.d.ts +0 -11
- package/types/runtime/live.d.ts.map +1 -1
- package/types/runtime/local-types.d.ts +0 -14
- package/types/runtime/local-types.d.ts.map +1 -1
- package/types/runtime/navigate-api.d.ts +0 -4
- package/types/runtime/navigate-api.d.ts.map +1 -1
- package/types/runtime/navigation-state.d.ts +0 -4
- package/types/runtime/navigation-state.d.ts.map +1 -1
- package/types/runtime/page-swap.d.ts.map +1 -1
- package/types/runtime/persist.d.ts +1 -0
- package/types/runtime/persist.d.ts.map +1 -1
- package/types/runtime/persisted.d.ts +0 -15
- package/types/runtime/persisted.d.ts.map +1 -1
- package/types/runtime/presence.d.ts +0 -2
- package/types/runtime/presence.d.ts.map +1 -1
- package/types/runtime/query-param.d.ts.map +1 -1
- package/types/runtime/reactive.d.ts +2 -1
- package/types/runtime/reactive.d.ts.map +1 -1
- package/types/runtime/refuse.d.ts +0 -7
- package/types/runtime/refuse.d.ts.map +1 -1
- package/types/runtime/store-base.d.ts +1 -2
- package/types/runtime/store-base.d.ts.map +1 -1
- package/types/runtime/values.d.ts +2 -1
- package/types/runtime/values.d.ts.map +1 -1
- package/types/runtime/with-query.d.ts +2 -0
- package/types/runtime/with-query.d.ts.map +1 -1
- package/types/server/action-hooks.d.ts +4 -4
- package/types/server/action-hooks.d.ts.map +1 -1
- package/types/server/actions.d.ts.map +1 -1
- package/types/server/api-modules.d.ts +0 -1
- package/types/server/api-modules.d.ts.map +1 -1
- package/types/server/app-stages.d.ts +5 -13
- package/types/server/app-stages.d.ts.map +1 -1
- package/types/server/app.d.ts +3 -8
- package/types/server/app.d.ts.map +1 -1
- package/types/server/auth-mails.d.ts +0 -5
- package/types/server/auth-mails.d.ts.map +1 -1
- package/types/server/env-state.d.ts +1 -0
- package/types/server/env-state.d.ts.map +1 -1
- package/types/server/guard-requirement.d.ts +0 -1
- package/types/server/guard-requirement.d.ts.map +1 -1
- package/types/server/image.d.ts +0 -1
- package/types/server/image.d.ts.map +1 -1
- package/types/server/index.d.ts +0 -2
- package/types/server/index.d.ts.map +1 -1
- package/types/server/job-context.d.ts +1 -1
- package/types/server/job-context.d.ts.map +1 -1
- package/types/server/jobs.d.ts +0 -4
- package/types/server/jobs.d.ts.map +1 -1
- package/types/server/kept-exports.d.ts.map +1 -1
- package/types/server/kv.d.ts +4 -4
- package/types/server/kv.d.ts.map +1 -1
- package/types/server/library.d.ts +1 -3
- package/types/server/library.d.ts.map +1 -1
- package/types/server/mcp.d.ts +0 -1
- package/types/server/mcp.d.ts.map +1 -1
- package/types/server/metrics.d.ts +0 -5
- package/types/server/metrics.d.ts.map +1 -1
- package/types/server/page-settings.d.ts +3 -3
- package/types/server/page-settings.d.ts.map +1 -1
- package/types/server/prerender.d.ts.map +1 -1
- package/types/server/protection.d.ts +6 -6
- package/types/server/protection.d.ts.map +1 -1
- package/types/server/queue.d.ts +1 -3
- package/types/server/queue.d.ts.map +1 -1
- package/types/server/rate-limit.d.ts +0 -2
- package/types/server/rate-limit.d.ts.map +1 -1
- package/types/server/routes.d.ts +1 -1
- package/types/server/routes.d.ts.map +1 -1
- package/types/server/scope.d.ts.map +1 -1
- package/types/server/session.d.ts +1 -1
- package/types/server/session.d.ts.map +1 -1
- package/types/server/signals.d.ts.map +1 -1
- package/types/server/signed.d.ts +0 -2
- package/types/server/signed.d.ts.map +1 -1
- package/types/server/source.d.ts +1 -1
- package/types/server/source.d.ts.map +1 -1
- package/types/server/storage.d.ts +0 -4
- package/types/server/storage.d.ts.map +1 -1
- package/types/server/vitals.d.ts +0 -1
- package/types/server/vitals.d.ts.map +1 -1
- package/types/server/work-scope.d.ts +0 -2
- package/types/server/work-scope.d.ts.map +1 -1
- package/types/server/workflow.d.ts +1 -1
- package/types/server/workflow.d.ts.map +1 -1
- package/types/test/index.d.ts.map +1 -1
- package/types/test/site-actions.d.ts +1 -1
- package/types/test/site-actions.d.ts.map +1 -1
- package/types/test/site-keys.d.ts +1 -1
- package/types/test/site-keys.d.ts.map +1 -1
- package/types/test/site-socket.d.ts +1 -1
- package/types/test/site-socket.d.ts.map +1 -1
- package/types/test/site-types.d.ts +0 -8
- package/types/test/site-types.d.ts.map +1 -1
- package/llms/deprecated-lints-1-105-libraries.md +0 -32
- package/llms/deprecated-lints-1-105.md +0 -58
- package/src/check/action-readers.ts +0 -115
- package/src/check/action-type.ts +0 -44
- package/src/check/ai-language.ts +0 -56
- package/src/check/app-hooks.ts +0 -90
- package/src/check/auth-methods.ts +0 -85
- package/src/check/auth-rate-limits.ts +0 -99
- package/src/check/call-result.ts +0 -242
- package/src/check/client-keys.ts +0 -10
- package/src/check/cms-options.ts +0 -81
- package/src/check/config-groups.ts +0 -22
- package/src/check/config-switches.ts +0 -38
- package/src/check/context-import.ts +0 -51
- package/src/check/env-files.ts +0 -31
- package/src/check/format-duration.ts +0 -75
- package/src/check/guard-options.ts +0 -58
- package/src/check/handler-events.ts +0 -149
- package/src/check/hook-context.ts +0 -94
- package/src/check/hook-names.ts +0 -104
- package/src/check/i18n-keys.ts +0 -50
- package/src/check/images-keys.ts +0 -54
- package/src/check/job-shapes.ts +0 -273
- package/src/check/link-flag-tests.ts +0 -130
- package/src/check/live-api.ts +0 -137
- package/src/check/mail-api.ts +0 -67
- package/src/check/one-state-api.ts +0 -357
- package/src/check/pages-options.ts +0 -35
- package/src/check/rate-enforce.ts +0 -53
- package/src/check/refusal-calls.ts +0 -185
- package/src/check/retired-lints.ts +0 -49
- package/src/check/route-keys.ts +0 -166
- package/src/check/secret-keys.ts +0 -83
- package/src/check/socket-frames.ts +0 -102
- package/src/check/source-readers.ts +0 -257
- package/src/check/store-ms.ts +0 -72
- package/src/check/store-names.ts +0 -88
- package/src/check/test-helpers.ts +0 -98
- package/src/check/ttl-names.ts +0 -142
- package/src/compiler/deprecated-ai-labels.ts +0 -97
- package/src/compiler/deprecated-ai-links.ts +0 -63
- package/src/compiler/deprecated-allow.ts +0 -50
- package/src/compiler/deprecated-auth-lints.ts +0 -14
- package/src/compiler/deprecated-auth-signed.ts +0 -29
- package/src/compiler/deprecated-children.ts +0 -66
- package/src/compiler/deprecated-image.ts +0 -116
- package/src/compiler/deprecated-island.ts +0 -155
- package/src/compiler/deprecated-lints-1-105.ts +0 -41
- package/src/compiler/deprecated-page.ts +0 -125
- package/src/compiler/deprecated-parts.ts +0 -22
- package/src/compiler/deprecated-typed-lints.ts +0 -23
- package/src/compiler/deprecated-ui-callbacks.ts +0 -66
- package/src/compiler/deprecated-ui-input.ts +0 -97
- package/src/compiler/deprecated-ui-items.ts +0 -47
- package/src/compiler/old-parts.ts +0 -84
- package/src/runtime/mount.compat.ts +0 -8
- package/src/server/moved-exports.ts +0 -17
- package/types/check/action-readers.d.ts +0 -3
- package/types/check/action-readers.d.ts.map +0 -1
- package/types/check/action-type.d.ts +0 -3
- package/types/check/action-type.d.ts.map +0 -1
- package/types/check/ai-language.d.ts +0 -3
- package/types/check/ai-language.d.ts.map +0 -1
- package/types/check/app-hooks.d.ts +0 -3
- package/types/check/app-hooks.d.ts.map +0 -1
- package/types/check/auth-methods.d.ts +0 -3
- package/types/check/auth-methods.d.ts.map +0 -1
- package/types/check/auth-rate-limits.d.ts +0 -3
- package/types/check/auth-rate-limits.d.ts.map +0 -1
- package/types/check/call-result.d.ts +0 -7
- package/types/check/call-result.d.ts.map +0 -1
- package/types/check/client-keys.d.ts +0 -3
- package/types/check/client-keys.d.ts.map +0 -1
- package/types/check/cms-options.d.ts +0 -3
- package/types/check/cms-options.d.ts.map +0 -1
- package/types/check/config-groups.d.ts +0 -3
- package/types/check/config-groups.d.ts.map +0 -1
- package/types/check/config-switches.d.ts +0 -3
- package/types/check/config-switches.d.ts.map +0 -1
- package/types/check/context-import.d.ts +0 -3
- package/types/check/context-import.d.ts.map +0 -1
- package/types/check/env-files.d.ts +0 -3
- package/types/check/env-files.d.ts.map +0 -1
- package/types/check/format-duration.d.ts +0 -5
- package/types/check/format-duration.d.ts.map +0 -1
- package/types/check/guard-options.d.ts +0 -3
- package/types/check/guard-options.d.ts.map +0 -1
- package/types/check/handler-events.d.ts +0 -9
- package/types/check/handler-events.d.ts.map +0 -1
- package/types/check/hook-context.d.ts +0 -3
- package/types/check/hook-context.d.ts.map +0 -1
- package/types/check/hook-names.d.ts +0 -3
- package/types/check/hook-names.d.ts.map +0 -1
- package/types/check/i18n-keys.d.ts +0 -3
- package/types/check/i18n-keys.d.ts.map +0 -1
- package/types/check/images-keys.d.ts +0 -3
- package/types/check/images-keys.d.ts.map +0 -1
- package/types/check/job-shapes.d.ts +0 -6
- package/types/check/job-shapes.d.ts.map +0 -1
- package/types/check/link-flag-tests.d.ts +0 -4
- package/types/check/link-flag-tests.d.ts.map +0 -1
- package/types/check/live-api.d.ts +0 -3
- package/types/check/live-api.d.ts.map +0 -1
- package/types/check/mail-api.d.ts +0 -3
- package/types/check/mail-api.d.ts.map +0 -1
- package/types/check/one-state-api.d.ts +0 -9
- package/types/check/one-state-api.d.ts.map +0 -1
- package/types/check/pages-options.d.ts +0 -3
- package/types/check/pages-options.d.ts.map +0 -1
- package/types/check/rate-enforce.d.ts +0 -3
- package/types/check/rate-enforce.d.ts.map +0 -1
- package/types/check/refusal-calls.d.ts +0 -3
- package/types/check/refusal-calls.d.ts.map +0 -1
- package/types/check/retired-lints.d.ts +0 -3
- package/types/check/retired-lints.d.ts.map +0 -1
- package/types/check/route-keys.d.ts +0 -3
- package/types/check/route-keys.d.ts.map +0 -1
- package/types/check/secret-keys.d.ts +0 -3
- package/types/check/secret-keys.d.ts.map +0 -1
- package/types/check/socket-frames.d.ts +0 -3
- package/types/check/socket-frames.d.ts.map +0 -1
- package/types/check/source-readers.d.ts +0 -3
- package/types/check/source-readers.d.ts.map +0 -1
- package/types/check/store-ms.d.ts +0 -3
- package/types/check/store-ms.d.ts.map +0 -1
- package/types/check/store-names.d.ts +0 -3
- package/types/check/store-names.d.ts.map +0 -1
- package/types/check/test-helpers.d.ts +0 -3
- package/types/check/test-helpers.d.ts.map +0 -1
- package/types/check/ttl-names.d.ts +0 -3
- package/types/check/ttl-names.d.ts.map +0 -1
- package/types/compiler/deprecated-ai-labels.d.ts +0 -5
- package/types/compiler/deprecated-ai-labels.d.ts.map +0 -1
- package/types/compiler/deprecated-ai-links.d.ts +0 -5
- package/types/compiler/deprecated-ai-links.d.ts.map +0 -1
- package/types/compiler/deprecated-allow.d.ts +0 -5
- package/types/compiler/deprecated-allow.d.ts.map +0 -1
- package/types/compiler/deprecated-auth-lints.d.ts +0 -12
- package/types/compiler/deprecated-auth-lints.d.ts.map +0 -1
- package/types/compiler/deprecated-auth-signed.d.ts +0 -5
- package/types/compiler/deprecated-auth-signed.d.ts.map +0 -1
- package/types/compiler/deprecated-children.d.ts +0 -4
- package/types/compiler/deprecated-children.d.ts.map +0 -1
- package/types/compiler/deprecated-image.d.ts +0 -5
- package/types/compiler/deprecated-image.d.ts.map +0 -1
- package/types/compiler/deprecated-island.d.ts +0 -9
- package/types/compiler/deprecated-island.d.ts.map +0 -1
- package/types/compiler/deprecated-lints-1-105.d.ts +0 -39
- package/types/compiler/deprecated-lints-1-105.d.ts.map +0 -1
- package/types/compiler/deprecated-page.d.ts +0 -4
- package/types/compiler/deprecated-page.d.ts.map +0 -1
- package/types/compiler/deprecated-parts.d.ts +0 -3
- package/types/compiler/deprecated-parts.d.ts.map +0 -1
- package/types/compiler/deprecated-typed-lints.d.ts +0 -21
- package/types/compiler/deprecated-typed-lints.d.ts.map +0 -1
- package/types/compiler/deprecated-ui-callbacks.d.ts +0 -5
- package/types/compiler/deprecated-ui-callbacks.d.ts.map +0 -1
- package/types/compiler/deprecated-ui-input.d.ts +0 -5
- package/types/compiler/deprecated-ui-input.d.ts.map +0 -1
- package/types/compiler/deprecated-ui-items.d.ts +0 -5
- package/types/compiler/deprecated-ui-items.d.ts.map +0 -1
- package/types/compiler/old-parts.d.ts +0 -9
- package/types/compiler/old-parts.d.ts.map +0 -1
- package/types/runtime/mount.compat.d.ts +0 -7
- package/types/runtime/mount.compat.d.ts.map +0 -1
- package/types/server/moved-exports.d.ts +0 -12
- package/types/server/moved-exports.d.ts.map +0 -1
|
@@ -6,53 +6,53 @@ What 1.105 changed in kay.config.ts, the hooks, the stores and the guards of fea
|
|
|
6
6
|
|
|
7
7
|
### Secrets are one shape
|
|
8
8
|
|
|
9
|
-
`
|
|
9
|
+
`mcp: { key }` is `mcp: { token }` and `proxy: { key: 'x-upstream-key' }` is `proxy: { key: { header: 'x-upstream-key' } }`; the old keys went in 1.109, with their `deprecated-secret-keys` lint. The loaded `KayConfig` has `mcp.token` and `proxy.key` as `{ header, secret? }` only, so code reading `config.mcp.key` or a string `config.proxy.key` reads the new fields. A secret is a string, `{ env: 'NAME' }` or `{ file: 'path' }`. One behaviour changes with the rename: `mcp.key: { file }` read `KAY_MCP_KEY` first, and `mcp.token: { file }` reads the file alone (`token: true` still reads the environment). `testSite({ mcpKey, proxyKey })` went in 1.109: write `config: { mcp: { token }, proxy: { key: { header, secret } } }`. The `config` of a `KayExtension` takes the keys `kay.config.ts` does, the keys of before 1.105 (`fonts`, `favicon`, `observe`...) no longer among them.
|
|
10
10
|
|
|
11
11
|
### `links`, `offline` and `search` are keys of `client`
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
The old top-level keys went in 1.109, with their `deprecated-client-keys` lint, and the type of the loaded `KayConfig` no longer has them, so code reading `config.offline`, `config.search` or `config.links` reads `config.client?.offline`, `.search` and `.links`. A `client` already written is kept as it is and the key is reported with no fix.
|
|
14
14
|
|
|
15
15
|
### Every route the config moves is a key of `endpoints`, and `mcp` and `metrics` are under `/_kay`
|
|
16
16
|
|
|
17
|
-
`serve.apiPrefix` is `endpoints.api`, and the `path` of `openapi`, `mcp`, `health`, `metrics` and `jobs` is `endpoints.openapi`, `.mcp`, `.health`, `.metrics` and `.jobs`; `openapi.referencePath` is `openapi: { reference: { path } }`.
|
|
17
|
+
`serve.apiPrefix` is `endpoints.api`, and the `path` of `openapi`, `mcp`, `health`, `metrics` and `jobs` is `endpoints.openapi`, `.mcp`, `.health`, `.metrics` and `.jobs`; `openapi.referencePath` is `openapi: { reference: { path } }`. The old keys went in 1.109 with their `deprecated-route-keys` lint, and the loaded `KayConfig` no longer has them (read `config.endpoints?.api` for `config.serve?.apiPrefix`). The defaults move: the MCP endpoint is `/_kay/mcp` and the metrics `/_kay/metrics`, where they were `/mcp` and `/metrics`. The old `/metrics` and `/mcp` answer 404 since 1.109; point MCP clients and the metrics collector at the new path, or set `endpoints: { mcp: '/mcp', metrics: '/metrics' }` to keep them. The OAuth resource an MCP client signed in for is the endpoint's URL, so a client that registered for `/mcp` signs in again for `/_kay/mcp`.
|
|
18
18
|
|
|
19
19
|
### `defineContext` from `kay/server`, `env` is `envFiles`
|
|
20
20
|
|
|
21
|
-
`import { defineContext } from 'kay/server'`, as `defineEnv`; `kay/library`
|
|
21
|
+
`import { defineContext } from 'kay/server'`, as `defineEnv`; `kay/library` dropped it in 1.109. The `env: { compose, example }` of kay.config.ts is `envFiles`, which also takes `false`; `env` went in 1.109. The session cookie now takes its `SameSite` and `Secure` from `security.cookies` unless `session({ sameSite })` is set: an app that set `sameSite: 'strict'` there gets a strict session cookie, which signs a visitor out on a link from another site, so set `session({ sameSite: 'lax' })` beside it where that matters.
|
|
22
22
|
|
|
23
23
|
### `assets`, `ops` and `i18n` group the config's keys
|
|
24
24
|
|
|
25
|
-
`images`, `fonts`, `favicon`, `manifest` and `publicCache` are keys of `assets`, `observe`, `health`, `metrics` and `jobs` are keys of `ops`, and `i18n`'s `defaultLocale` is `default`, `prefixDefault: true` is `mode: 'always'` and `domains` is `mode: { domains }`. `
|
|
25
|
+
`images`, `fonts`, `favicon`, `manifest` and `publicCache` are keys of `assets`, `observe`, `health`, `metrics` and `jobs` are keys of `ops`, and `i18n`'s `defaultLocale` is `default`, `prefixDefault: true` is `mode: 'always'` and `domains` is `mode: { domains }`. The old `i18n` keys went in 1.109 with their `deprecated-i18n-keys` lint, and so did the other old keys with `deprecated-config-groups`, and the loaded `KayConfig` no longer has them, so code reading `config.images` reads `config.assets?.images`, `config.observe` reads `config.ops?.observe` and `i18n.defaultLocale` reads `i18n.default`. An old key is refused at boot, naming the new one.
|
|
26
26
|
|
|
27
27
|
### Feature keys of kay.config.ts are `false`, `true` or options
|
|
28
28
|
|
|
29
|
-
`robots`, `sitemap`, `favicon`, `security`, `security.cookies`, `security.csp`, `health`, `preview`, `offline`, `proxy`, `images.avif`, `images.placeholder`, `images.rateLimit`, `live.rateLimit`, `mcp.rateLimit` and `env` take `false` for off, `true` for the defaults, which is the same as leaving the key out except for `preview` and `offline`, off until set, and an object of options. `
|
|
29
|
+
`robots`, `sitemap`, `favicon`, `security`, `security.cookies`, `security.csp`, `health`, `preview`, `offline`, `proxy`, `images.avif`, `images.placeholder`, `images.rateLimit`, `live.rateLimit`, `mcp.rateLimit` and `env` take `false` for off, `true` for the defaults, which is the same as leaving the key out except for `preview` and `offline`, off until set, and an object of options. `proxy: 2` is `proxy: { hops: 2 }` and `proxy: 1` is `proxy: true`; the number went in 1.109, with its `deprecated-config-switch` lint.
|
|
30
30
|
|
|
31
31
|
- `defineConfig` refuses a key it does not know in every option bag, however deep (`images: { widht: 1 }`, `security: { cookies: { httpOnlee: true } }`), where it checked 11 of them and let a typo in the others through.
|
|
32
32
|
|
|
33
33
|
### `images` is grouped, and lists may come from a function
|
|
34
34
|
|
|
35
|
-
`images: { remote: { hosts, maxSize, timeout }, formats: { quality, webp, avif }, limits: { variants, queue } }` replaces the flat `remoteMaxSize`, `remoteTimeout`, `quality`, `webp`, `avif`, `maxVariants` and `queue`; `remote: [...]` stays for hosts alone.
|
|
35
|
+
`images: { remote: { hosts, maxSize, timeout }, formats: { quality, webp, avif }, limits: { variants, queue } }` replaces the flat `remoteMaxSize`, `remoteTimeout`, `quality`, `webp`, `avif`, `maxVariants` and `queue`; `remote: [...]` stays for hosts alone. The flat keys went in 1.109, with their `deprecated-images-keys` lint.
|
|
36
36
|
|
|
37
37
|
### `ttl` is how long data lives
|
|
38
38
|
|
|
39
|
-
`signed.sign(use, value, { ttl })`, `files.url(key, { ttl })`, `workChallenge(scope, { ttl })`, kayjs-auth's `proofOfWork({ ttl })`, the `ttl` of an action's `protect.minTime` and `protect.proofOfWork`, and the `ttl: { link, code }` a kayjs-auth mail's data carries to a template replace `maxAge`, which stays for an HTTP header or a cookie. `
|
|
39
|
+
`signed.sign(use, value, { ttl })`, `files.url(key, { ttl })`, `workChallenge(scope, { ttl })` from `kay/server`, kayjs-auth's `proofOfWork({ ttl })`, the `ttl` of an action's `protect.minTime` and `protect.proofOfWork`, and the `ttl: { link, code }` a kayjs-auth mail's data carries to a template replace `maxAge`, which stays for an HTTP header or a cookie. `maxAge` went from them in 1.109, with the `deprecated-ttl-names` lint (a mail template destructuring `{ maxAge }` reads `{ ttl }`). `window` of a rate limit and `failedTtl` of a queue keep their names: a window is a span counted in, not how long data lives, and `failedTtl` already is a `ttl`.
|
|
40
40
|
|
|
41
|
-
A store receives its lengths as a `Duration`: `RateStore.hit(key, window)`, `KvStore`'s `set(key, value, ttl)` and `once(key, ttl)`, `SessionStore.set(id, data, maxAge)` and `LiveStore.endAll(id, ttl)`.
|
|
41
|
+
A store receives its lengths as a `Duration`: `RateStore.hit(key, window)`, `KvStore`'s `set(key, value, ttl)` and `once(key, ttl)`, `SessionStore.set(id, data, maxAge)` and `LiveStore.endAll(id, ttl)`. Since 1.109 kay hands every store a `Duration`, and `durations: true` is no longer a member of a store: read the length with `lengthMs(value)` from `kay`. `kv(ns).set(key, value, 60_000)` written with milliseconds is `'60000ms'`, which the `deprecated-store-ms` lint went with.
|
|
42
42
|
|
|
43
43
|
### Hooks are flat keys named by the moment they run
|
|
44
44
|
|
|
45
|
-
`onListen` replaces the config's `onStart` (a job's, queue's and workflow's `onStart` keep theirs), `onError` is a key of the config beside `observe`, and every hook event carries one `context`: an action's `beforeRun`, `onSuccess` and `onError` read `context` where they read `ctx`, which holds the action's own context besides `ip`, `userAgent` and `userId`. `observe.log` is `false`, `true` or `{ format: 'json', requests, sink }`, replacing `'json'` and a function. `deprecated-app-hooks` and `deprecated-hook-context`
|
|
45
|
+
`onListen` replaces the config's `onStart` (a job's, queue's and workflow's `onStart` keep theirs), `onError` is a key of the config beside `observe`, and every hook event carries one `context`: an action's `beforeRun`, `onSuccess` and `onError` read `context` where they read `ctx`, which holds the action's own context besides `ip`, `userAgent` and `userId`. `observe.log` is `false`, `true` or `{ format: 'json', requests, sink }`, replacing `'json'` and a function. The old forms went in 1.109, with the `deprecated-app-hooks` and `deprecated-hook-context` lints.
|
|
46
46
|
|
|
47
47
|
- The resolved `KayConfig` (what the server reads) no longer has `onStart` or `observe.onError`: read `onListen` and `onError`.
|
|
48
48
|
|
|
49
49
|
### `pages()` and `testSite()` take `{ config }`
|
|
50
50
|
|
|
51
|
-
The config keys written beside `root` in the options (`pages({ root, client: { navigation: false } })`) go under `config`: `pages({ root, config: { client: { navigation: false } } })`; `root`, `dev`, `prebuilt` and a test site's own options (`browser`, `headers`, `outgoing
|
|
51
|
+
The config keys written beside `root` in the options (`pages({ root, client: { navigation: false } })`) go under `config`: `pages({ root, config: { client: { navigation: false } } })`; `root`, `dev`, `prebuilt` and a test site's own options (`browser`, `headers`, `outgoing` and the rest) stay. A config key beside `root` is refused since 1.109, with the `deprecated-pages-options` lint.
|
|
52
52
|
|
|
53
53
|
### Library stores and tables share one naming
|
|
54
54
|
|
|
55
|
-
Each library takes its data store as `store`, and each `/pg` and `/sqlite` entry names its helpers the same way. The old names
|
|
55
|
+
Each library takes its data store as `store`, and each `/pg` and `/sqlite` entry names its helpers the same way. The old names went in 1.109, with the `deprecated-store-names` lint:
|
|
56
56
|
|
|
57
57
|
- kayjs-ai: `ai({ store })` for `conversations`; `pgAi(db)`, `sqliteAi(path)`, `createAiTables(db)` and `aiTables` for `pgConversations`, `sqliteConversations`, `createConversationTable` and `conversationTable`.
|
|
58
58
|
- kayjs-mail: `mailer({ store: { lists, suppressions } })` for `listStore` and `suppressionStore`, `pgMail(db)` and `sqliteMail(path)` for both at once, and `mail.list(name, { store: sqliteMail(path) })` for `mail.list(name, { file })`, which the lint does not find; `sqliteLists`, `createMailTables` and `mailTables` for `openLists`, `createMailListTables` and `mailListTableNames`.
|
|
@@ -63,7 +63,7 @@ An app with no `store` now keeps sessions, jobs and every library in one SQLite
|
|
|
63
63
|
|
|
64
64
|
### Every guard option is `guards`, and a feature with none is closed
|
|
65
65
|
|
|
66
|
-
`
|
|
66
|
+
`guard` is `guards` in `vitals()` and in the `jobs` and `images` of kay.config.ts, and `requireGuards` is `guards: { default }`; the old forms and the `deprecated-guard-option` lint that rewrote them went in 1.109.
|
|
67
67
|
|
|
68
68
|
- `vitals({ guard })`, `jobs: { guard }` and `images: { guard }` are `guards`, taking a guard, a list, `{ load }` or `false`, as a page's and an API module's `guards` do. `cms()` keeps `access`, which also takes a role.
|
|
69
69
|
- `jobs` with no `guards` mounts the page and answers 403 instead of stopping the boot, and `jobs: { guards: false }` opens it.
|
|
@@ -1,124 +1,84 @@
|
|
|
1
1
|
# Upgrading, older releases
|
|
2
2
|
|
|
3
|
-
What each minor release before 1.
|
|
3
|
+
What each minor release before 1.106 broke, and what an app changed to move to it. The newer releases are in [Upgrading](upgrading.md).
|
|
4
4
|
|
|
5
|
-
## 1.105.0
|
|
5
|
+
## 1.105.0
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The changes to kay.config.ts, the hooks, the stores and the guards of features are in [Upgrading to 1.105: kay.config.ts and library options](upgrading-1-105-config.md).
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### `UserMenu` links a visitor to sign in
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
`UserMenu` now draws a sign-in link for a visitor, where it drew nothing: remove the `SignedOut` link you kept beside it, or pass `signIn={false}`. `SignOutButton` and `SignInLink` ([components](../../auth/llms/signed-in-components.md)) replace a hand-written sign-out form and sign-in link.
|
|
12
|
+
### `SignedIn` takes `require` and an `@else` block
|
|
12
13
|
|
|
13
|
-
`
|
|
14
|
+
`SignedIn(role="admin")` is `SignedIn(require="admin")`, which takes what `auth.guard({ require })` does (a role, a list of which any one passes, a predicate answering at once), and `SignedOut` is the `@else` block of a `SignedIn`: `SignedIn` holds what a user sees and `@else` what anyone else does. The old forms went in 1.109.
|
|
14
15
|
|
|
15
|
-
###
|
|
16
|
+
### kayjs-auth's methods share one set of verbs
|
|
16
17
|
|
|
17
|
-
`
|
|
18
|
+
Every group lists with `list`, reads with `get`, writes with `create` and `update`, removes with `delete` and takes back with `revoke`, and a method that sat on `auth` itself went into its group. `organizations.members()`, `invitations()`, `myInvitations()` and `invitation()` are `listMembers()`, `listInvitations()`, `listMyInvitations()` and `getInvitation()`; `setMemberRoles()` and `removeMember()` are `updateMemberRoles()` and `deleteMember()`; `admin.roles()` and `admin.auditLog()` are `listRoles()` and `listAuditLog()`; `oauthServer.clients()` is `listClients()`; `passkeys.rename()` is `passkeys.update()`; `account.changeUsername()`, `profile()` and `saveProfile()` are `updateUsername()`, `getProfile()` and `updateProfile()`; `oauth.identities()` and `providerToken()` are `listIdentities()` and `getProviderToken()`; `magicLink.signInWithCode()` is `email.signInWithCode()`. On `auth`: `requireAdmin()` is `admin.require()`, `captchaRequired()` and `captchaChallenge()` are `captcha.required()` and `captcha.challenge()`, `provedLately()` and `reprove()` are `proof.recent()` and `proof.renew()`, `scopes()` and `hasScope()` are `tokens.scopes()` and `tokens.hasScope()`, and `oauthResource()`, `oauthOrigin()` and `oauthFixed()` are `oauthServer.resource()`, `origin()` and `fixed()`. The old names went in 1.109. `admin.deleteUser()` and `password.change()` keep their names, a verb followed by what it acts on.
|
|
18
19
|
|
|
19
|
-
###
|
|
20
|
+
### An island's call answers a result
|
|
20
21
|
|
|
21
|
-
`
|
|
22
|
+
`await add(input)` and `await call(api, '/path')` from an island resolved with the data and threw `ActionError` or `ApiError` for a refusal. They resolve `{ ok: true, data }` or `{ ok: false, status, message, errors, data, error }` now, and throw for no visitor's mistake: a refusal, a handler that threw, a network failure and a timeout (status 0) are results; an abort and a redirect still reject. The `deprecated-call-result` lint that reported the old use went in 1.109, so the type error on the result's field is what shows it. Write `const { ok, data } = await add(input)`, or append `.orThrow()` to keep the throwing style: `const id = await add(input).orThrow()` resolves the data and throws what the call threw (an `ActionError`, or an `ApiError` of status 0 for a call with no answer). A `try` around a call whose `catch` shows the refusal now never runs: read `result.error`, `result.message` or `add.form.error('field')`. A call awaited with its result left out (`await add(input)` in a `try` to know it failed) needs `.orThrow()` or a look at `result.ok`. `track()` handles answer the same, a call with no answer included. A call awaited with its result left out has no read to find and stays by hand. kayjs-ui's `attempt` and `toast.promise` take a call's result as they took what it threw, and `site.call` of a test site is unchanged.
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
### A callback of a library component takes one event object
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
A function handed by name to a callback of a kayjs-ui, kayjs-ai or kayjs-cms component (`onValueChange={query.set}`, `onChange={toggle}` with `toggle(on: boolean)`, `onFiles={upload}`) was called with the value and now gets `{ value }`, `{ checked }` or `{ files }`, so it fails the type check, and would be handed the event where it took the value. The `deprecated-callback-handler` lint that named it went in 1.109: write `onChange={event => toggle(event.checked)}` yourself, passing the fields the handler took.
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
### An action's form readers sit under `form`
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
- kayjs-mail: `onSend` and `onSuppress` of `mailer()`, `onSend` of `contactForm()` are `afterSend` and `afterSuppress`; a list's `onSubscribe`, `onConfirm`, `onUnsubscribe` and `onBroadcast` are `afterSubscribe`, `afterConfirm`, `afterUnsubscribe` and `afterBroadcast`. Sources follow (`mail.afterSend`, `mail.list.afterSubscribe`).
|
|
31
|
-
- kayjs-cms: `onSave` and `onUpload` of `cms()` and of a collection are `afterSave` and `afterUpload` (sources `cms.afterSave`, `cms.afterUpload`).
|
|
32
|
-
- kayjs-ai: `onStep` and `onToolCall` are `afterStep` and `afterToolCall`, and `onSuccess` is `afterRequest`, beside `beforeRequest`, in `ai()` and in the options of `ask`, `speak`, `embed`, `transcribe` and `describeImage` (sources `ai.afterStep`, `ai.afterToolCall`, `ai.afterRequest`).
|
|
33
|
-
- A test or a log reading a hook's `source` from `observe.onError` reads the new name.
|
|
30
|
+
`add.failed()`, `add.error(field)` and `add.validate(form, field)` are `add.form.failed()`, `add.form.error(field)` and `add.form.validate(form, field)`: what a form shows is read apart from the call state (`pending()`, `status()`, `data()`, `track()`) the action keeps, and a `track()` handle's own `error()` (an `ApiError`) no longer shares a name with the field message. The old names went in 1.109 with the `deprecated-action-readers` lint.
|
|
34
31
|
|
|
32
|
+
### An auth call answers one `Result`, and a rejection's `errors` are strings
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
kayjs-auth's sixty `*Result` aliases (`PasswordSignInResult`, `RevokeTokenResult`...) are one `Result<Ok, Code, Fields>`: `Result<{ redirect: string }, 'invalid' | 'limited'>` is `{ ok: true, redirect }` or a failure of those kinds. A failure is also a kay `Failure`, so an action returns `auth.password.signIn(...)` as it is and its island call reads `{ ok: false, status, data: { code, message } }`. A rejected input's `errors` holds one string per field (the code for `'taken'` or `'too-short'`, the message of a profile field's `{ message }`), so a profile page reads `errors.<field>` as the text; the old names no longer exist, write `Result<...>` or let the method's return type be inferred.
|
|
37
35
|
|
|
38
|
-
|
|
36
|
+
### A refusal is one call
|
|
39
37
|
|
|
40
|
-
|
|
41
|
-
- `schedule('@hourly', job, options)` is `schedule({ cron: '@hourly', ...options }, job)`, `schedule('30s', job)` is `schedule({ every: '30s' }, job)`; the table form is unchanged. Both work until 1.108.
|
|
42
|
-
- `lostAfter` on `queue()` and `workflow()` is `timeout`, as a schedule's; `lostAfter` works until 1.108. `diskFiles('dir', hooks)` is `diskFiles({ dir, ...hooks })`.
|
|
43
|
-
- Queues, workflows and schedules move to `src/jobs/*.ts` when an app wants no `export default` and no `.use`; `src/plugins/jobs.ts` keeps working.
|
|
38
|
+
`ctx.deny(status, { message, errors, data })` refuses in a guard, a page, an action and an endpoint, and `refuse(status, { message, errors, data })` throws the same from anywhere; `deny(403, 'text', data)`, `return ctx.fail(status, data, errors)` and `refuse('text', { status, errors, data })` went in 1.109 with the `deprecated-deny-call`, `deprecated-ctx-fail` and `deprecated-refuse-call` lints. In an action, `ctx.deny(status, { message, data, errors })` fails the post as `ctx.fail` did (the page again with the message and the fields, an `ActionError` for a call), while a deny with no options stops with plain text as `deny(status, 'text')` did; a helper called in a handler with its `ctx`, such as a guard's or `limit.check(ctx)`, therefore fails the form with its message now; a `ctx.fail('text')` text is the `message`. The argument checks of `webPush.send`, `rooms`, `signed` and notifications throw a `KayError` with code `argument-invalid`, not a `RangeError` or `TypeError`.
|
|
44
39
|
|
|
45
|
-
###
|
|
40
|
+
### A top-level `const` follows the prop or signal it reads
|
|
46
41
|
|
|
47
|
-
|
|
42
|
+
In the browser, `const last = items.length - 1` or `const twice = count() * 2` at the top of a script was computed once and now follows what it reads, so a `memo(() => ...)` or a function written for it can go. A `const` that meant the first value of a prop is written `// kay-allow once-read-prop: why` (`kay check` asks for it as before), and of a signal `untrack(() => count())`; it cannot be assigned. Nothing to rewrite otherwise.
|
|
48
43
|
|
|
49
|
-
|
|
50
|
-
- `persisted(name, value)` is `persisted.cookie(name, value)`: a call names its storage (`deprecated-persisted-call`).
|
|
51
|
-
- `navigate({ query: changes }, options)` is `navigate.query(changes, options)`: `navigate(href)` goes to a page, `navigate.query()` changes the query of this one (`deprecated-navigate-query`).
|
|
52
|
-
- `onNavigate(fn)` and `onBeforeNavigate(fn)` are `navigation.onNavigate(fn)` and `navigation.onBeforeNavigate(fn)`, the hooks of the source (`deprecated-navigation-hooks`).
|
|
53
|
-
- An island listening to `kay:navigate`, `kay:navigate-start`, `kay:navigate-error`, `kay:navigate-stall`, `kay:action-start`, `kay:action-success`, `kay:action-error`, `kay:consent` or `kay:install` with `listen` uses the function hook: `navigation.onNavigate`, `onStart`, `onError` and `onStall`, `add.onStart`, `onData` and `onError` of an action (`{ input }`, `{ error, input }`), the `consent` signal, `installPrompt.available()`. The events still fire for a plain script, and the old listener works until 1.108 (`deprecated-island-events`, which rewrites the swap's events when the handler takes no parameter; the others are reported with the hook to write).
|
|
54
|
-
- `listen(window, ...)` is `listen(() => window, ...)`: the target is one form, a function (`deprecated-listen-target`).
|
|
55
|
-
- `mount` and `Mounted` are imported from `kay`, not `kay/mount`; `s`, `RateLimit` and `RateLimitRefusal` from `kay`, not `kay/server`; `sqliteCache` from `kay/cache`, not `kay/server` (`deprecated-import-path`).
|
|
44
|
+
### Eight mistakes that ship a broken page refuse
|
|
56
45
|
|
|
57
|
-
|
|
46
|
+
`unreturned-fail`, `brace-in-attribute`, `signal-set-call`, `constant-signal`, `literal-tag`, `positional-key`, `unkeyed-rows` and `once-read-prop` were warnings and are now `deny`: `kay check` reports each as an error, so the `check` script of an app fails on one it still has. `kay check --fix` applies the fixes of `unreturned-fail`, `brace-in-attribute`, `signal-set-call` and `positional-key`; for the others write what the lint's message says, or `// kay-allow <lint> -- why` where the form is meant. `lints: { 'constant-signal': 'warn' }` in kay.config.ts brings one back to a warning.
|
|
58
47
|
|
|
59
|
-
|
|
60
|
-
### cms access is one option
|
|
48
|
+
### An `await` with no `catch` shows an alert
|
|
61
49
|
|
|
62
|
-
|
|
50
|
+
A rejected `await` block with no `catch` and no `try` around it used to remove its pending block and show nothing; it renders `<span class="kay-await-failed" role="alert" data-kay-await-failed>` now (the `kay.await.failed` message), so the `uncaught-await` lint is gone, and in 1.109 a `// kay-allow uncaught-await` comment or a `lints` entry naming it is an unknown lint. `AwaitProps` of `kay` no longer has `fallback`, the compiler's own channel for a `try`'s `catch`.
|
|
63
51
|
|
|
64
|
-
|
|
65
|
-
- With `roles` listed and no `access`, `guard` or `role`, kayjs-auth admits their holders and refuses everyone else, edit links included, where the screens stayed closed before.
|
|
66
|
-
- `cms({ roles })` no longer needs a guard, and `can` no longer needs `roles`; with kayjs-auth and no `access`, the holders of the roles listed are let in, where the screens stayed closed before.
|
|
67
|
-
- A production server reads the forge from `CMS_URL` (`forgejo://TOKEN@git.example.com/owner/repo`, `github://TOKEN@owner/repo`, `gitlab://TOKEN@group/project`); `CMS_BASE_URL`, `CMS_REPO`, `CMS_TOKEN`, `CMS_BRANCH` and `CMS_HOST` still work without it, and `kay env` lists `CMS_URL`.
|
|
68
|
-
- The no-guard error and warning name `cms({ access })`, as do the `cms.*` message defaults that named `role` or `guard`.
|
|
52
|
+
### A `for` over rows with no `id` needs a `key` in every component
|
|
69
53
|
|
|
70
|
-
|
|
54
|
+
`unkeyed-rows` reported a keyless `for` in islands only; it reports one in any component, a page or a layout excepted, as a component may render in the browser whichever page imports it. Name the rows with `key={row.slug}` or give them an `id`; `key={i}` (the fix `kay check` offers) matches them by position.
|
|
71
55
|
|
|
72
|
-
|
|
73
|
-
- `@kayjs/mail/subscribe-form.kay` is gone: import `SubscribeForm` from `@kayjs/ui/subscribe-form.kay`, which takes the same props and reads the list's `privacy` from the action. Its `kmail-subscribe*` classes are replaced by the themed form's own, and `kay upgrade` rewrites the import (`deprecated-mail-form`).
|
|
74
|
-
- `contactForm(options)` takes no mailer and sends through `ctx.locals.mail`; `contactForm(mail, options)` still works.
|
|
75
|
-
- `mailer()` and `mail()` take every `MAIL_*` setting as an option that wins over the variable: `url`, `smtp.insecure`, `smtp.rateLimit` and `smtp.dkim` join `from`, `to` and `events`. Nothing to change.
|
|
76
|
-
### kayjs-ai calls share one options type, and a chat takes `labels`
|
|
56
|
+
### `slot` types the children and blocks of a component
|
|
77
57
|
|
|
78
|
-
|
|
58
|
+
A component no longer declares `children?: Snippet`, nor an optional block it renders with `slot name`: its template types them, so a call passing a block the component has no `slot` for is a `kay check` error. Its lint went in 1.109; declare `children: Snippet` to require the children.
|
|
79
59
|
|
|
80
|
-
|
|
81
|
-
- `Chat` takes `newTab` (`true`, `false` or `'auto'`, as kayjs-ui's links do) in place of `links`: `links="apart"` is `newTab={true}`, `links="here"` is `newTab="auto"`; `Sources` takes `newTab` in place of `here`. `ChatLauncher` takes `newTab` too, `'auto'` by default.
|
|
82
|
-
- The launcher's panel and button are kayjs-ui's `SidePanel` now, so a restyle of `@kayjs/ai/chat-panel.kay` changes: its parts `panel`, `button` and `glyph` are `root` and `launcher` of `'@kayjs/ui/side-panel.kay'` (the glyph is the button's icon), `head` and `title` are the same parts of `'@kayjs/ui/side-panel.kay'`, `body` is its `body`, and `actions` and `action` are gone: the header's buttons are the `new`, `expand` and `close` parts of `chat-panel.kay`. `kay check` already reports a part a component no longer has, listing the ones it has, which is why there is no lint for them. The `.kai-launcher` wrapper is no longer a fixed container and `.kai-launcher-panel` is a `dialog` that is `display: none` unless `[open]` (no `[hidden]`): a rule of an app's own on `.kai-launcher-head`, `-title`, `-actions`, `-glyph` or `.kai-launcher-panel[hidden]` moves to those parts and to `[open]`.
|
|
83
|
-
- `transcribe()` and `describeImage()` take `locale`, a BCP 47 tag, in place of `language`.
|
|
84
|
-
- `ask`, `describeImage`, `transcribe`, `speak` and `embed` take one `CallOptions`, so `retry`, `fallback`, `timeout`, `signal` and the `ai()` hooks reach each of them. `timeout` also takes a single duration for the whole call.
|
|
60
|
+
### A link's flags are named as `navigate()`'s options
|
|
85
61
|
|
|
86
|
-
|
|
62
|
+
`data-keep-scroll` is `data-scroll="keep"` (`data-keep-scroll="false"` is `data-scroll="top"`), `data-no-transition` is `data-transition="false"` and `data-no-prefetch` is `data-prefetch="false"`, typed on every element, so a wrong value is a `kay check` error; a wrapper another library marks `data-scroll` now keeps its links' scroll. The old names went in 1.109. A `data-` name one letter from a flag, as `data-prefech`, is the `unknown-link-flag` error.
|
|
87
63
|
|
|
88
|
-
|
|
64
|
+
### A component's parts are the `parts` attribute
|
|
89
65
|
|
|
90
|
-
|
|
66
|
+
`Card(class={{ head: 'p-6' }})` is `Card(parts={{ head: 'p-6' }})`: `class` keeps strings, arrays and objects of conditions, and `parts` holds an entry per part, `root` included, so a shorthand or a spread can sit beside it, and a component declaring its own `parts` prop is refused as one declaring `class` is (`Card.mt-4(parts={{ head: 'p-6' }})`). A component with parts takes both props, and `parts` leaves `...rest` as `class` does. A component with parts takes `class` as a string, an array or an object of conditions.
|
|
91
67
|
|
|
92
|
-
|
|
68
|
+
### Websocket frames are always JSON
|
|
93
69
|
|
|
94
|
-
|
|
70
|
+
On an `api()` module, `ws.send(value)` now sends `JSON.stringify(value)` for a string too, and a frame a client sends must be JSON text, so a binary frame from a client is refused too, and one that is not is answered `{ error: { key: 'kay.socket.notJson', fields } }`, and a message failing `body` `{ error: { key: 'kay.socket.invalid', fields } }` where it was dropped before. `deprecated-socket-frames` (`kay check --fix`) rewrites `ws.send(JSON.stringify(x))` to `ws.send(x)`, which sends what it did; a raw `WebSocket` client of your own parses each frame with `JSON.parse` and sends `JSON.stringify(message)`, and `socket()` does both. `rooms().publish` goes out as JSON the same way, a string included.
|
|
95
71
|
|
|
96
|
-
|
|
72
|
+
### An endpoint's declared context is checked
|
|
97
73
|
|
|
98
|
-
|
|
74
|
+
An endpoint's `ctx: EndpointContext` and an `api()` module's `ctx.guard` are now typed from the file tree without a generic, so `ctx.params.x` for a param the file's name lacks, a `ctx.guard` field no guard above returns and a `ctx.query` field outside `page.query` are type errors in `kay check`.
|
|
99
75
|
|
|
100
|
-
|
|
76
|
+
`kay check` holds the `EndpointContext<Params, Guard>` a handler declares to its file's params and the `_guard.ts` files above it: a param the file has not, or a guard field no guard returns, is a type error. Declare what the guards return, or `any` as the guard type, where a guard fills `locals` instead; a file listing `guards` of its own is not checked.
|
|
101
77
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
### Island sources read and report the same way
|
|
105
|
-
|
|
106
|
-
every source (`resource`, `stream`, `socket`, `local`, a `track()` handle) has `data()`, `status()`, `pending()`, `error()` and `retry()`, and `onData({ value })` and `onError`. `value()`, `last()`, `rows()`, `unsynced()`, `syncStatus()`, `onSuccess`, `onSync` and an action's `succeeded()` work through 1.107, and `kay check` warns with `deprecated-source-readers` and `kay upgrade` rewrites them.
|
|
107
|
-
|
|
108
|
-
An action has `data()` and `status()` too, and `succeeded()` is `data()` (what the last call returned, `status() === 'ready'` for whether there was one); an action has no `retry()`, `onData` or `onError` of its own, its `track()` handle does.
|
|
109
|
-
|
|
110
|
-
Not rewritten, so by hand: `pending()` and `status()` of a `local()` collection keep their names and change meaning, so no check can tell an old read from a new one: they read a boolean and `idle|loading|ready|failed`, not the count and the sync states, and `{todos.pending()}` renders `true` or `false` now. Write `sync.queued()` and `sync.status()` for the old reads, and `ReturnType<LocalSync['status']>` where the type `LocalStatus` was used (it is gone). `rows()` of an `infiniteList()` and `last()` of the stream an action's island call returns are `data()`, with no lint, as `kay check` does not follow an import of kayjs-ui nor the receiver of an awaited call. A custom list given to `LoadMore` or `Table` takes `data()` beside `rows()` (a list with only `rows()` still works through 1.107), and a fake stream in a test needs `data`. `succeeded()` read as a whole (passed on, or `succeeded()?.data?.id`) becomes `data()` with `status() === 'ready'` where it tested for a result. An event's `data` and `rows` in a handler passed by name are `value` now.
|
|
111
|
-
### Live values and presence write alike
|
|
78
|
+
### Test helpers share one shape
|
|
112
79
|
|
|
113
|
-
`
|
|
80
|
+
`aiTest`, `mailTest`, `cmsTest` and `authTest` of the libraries' `/test` entries are `test(site)` in each, taking the `TestSite` and with a `reset()`; `aiTest()` needed no site, `test(site)` takes it and works without. `site.refusal(action, ...)` is `site.expectRefused(action, ...)` and `site.socketRefusal(...)` is `site.socket.refused(...)`. The old names went in 1.109; import `test as mailTest` to keep the local name, so `bun:test`'s own `test` is not shadowed.
|
|
114
81
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
`Action` with no parameters takes any action as a prop, in place of `Action<never, unknown>`: the old spelling works until 1.108 and `deprecated-action-type` rewrites it. A `.with()` action now crosses into an island, its fields sent over the input of each call, where it failed the render; `NoInputAction` stays.
|
|
118
|
-
|
|
119
|
-
### Component callbacks take one event object
|
|
120
|
-
|
|
121
|
-
Every transition callback of a kayjs-ui, kayjs-ai or kayjs-cms component takes one object holding what it reports, never positional arguments or a bare value: `onOpenChange(true)` is `onOpenChange({ open })`, `onChange(value, option)` is `onChange({ value, option })`. A handler written by hand destructures the event, `onChange={({ value }) => kind = value}` in place of `onChange={kind.set}`; `kay check` types it, so a handler reading the old arguments fails the check. The fields are in [the conventions](component-library-conventions.md) and each component's page: `open`, `value`, `checked` (Checkbox, Toggle, Menu), `rows`, `files`, `item` (`onSelect`), `page`, `size`, `sort`, `row`, `index`, `text`, `data` (`onSave`, `onSend`), `audio`, `crop`, `from` and `to`. A source reports `onLoad({ options, query })`, `{ rows }` on Table and `{ items }` on VirtualList. `onSelectedChange` is `{ keys, rows }` on Table, `{ id, node }` on TreeView and `{ key, entry }` on Timeline, so `bind:selected` no longer applies to them. `onError`, the callbacks with no argument and Chat's `onSend({ messages })` are unchanged.
|
|
122
|
-
|
|
123
|
-
Four callbacks are renamed to say what they report, and the old names keep working with their positional arguments until 1.108: `onChange` of Accordion, Tabs and ThemeToggle is `onValueChange`, ZoomPane's is `onPlateChange({ plate })`, Table's `onSort` is `onSortChange({ sort })` and a chart's `onActive` is `onActiveChange({ index })`. `kay check` reports them as `deprecated-ui-callbacks` and `kay upgrade` rewrites an inline arrow function, any other value getting the new name only.
|
|
82
|
+
A call to another host with `fetch` that no `site.fetchStub` answers now fails a test once `testSite()` made a site: stub it, or give `testSite({ outgoing: 'allow' })`. Calls to loopback (a `fakeService`) are unaffected. The clock `site.advance` moved goes back to real time after each test, not only after the file.
|
|
124
83
|
|
|
84
|
+
Releases before 1.105 are in the notes of their releases, at https://git.kaynooo.fr/kaynooo/kayjs/releases.
|