create-warlock 5.19.1 → 5.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
# Changelog — create-warlock
|
|
1
|
+
# Changelog — create-warlock
|
|
2
2
|
|
|
3
3
|
All notable changes to `create-warlock` are documented in this file.
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
|
|
6
6
|
|
|
7
|
+
## 5.21.0 - 2026-09-25
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Lockstep release maintenance and dependency refresh.
|
|
12
|
+
## 5.20.0 - 2026-09-24
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Added a package-level skill index and clearer discovery descriptions for grouped agent guidance.
|
|
17
|
+
- Web starter loaders use named functions and public loader-context types while retaining inferred return types in paired setup modules.
|
|
18
|
+
|
|
7
19
|
## 5.19.1 - 2026-09-24
|
|
8
20
|
|
|
9
21
|
### Changed
|
package/package.json
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@clack/prompts": "^0.7.0",
|
|
14
14
|
"@mongez/copper": "^2.1.2",
|
|
15
|
-
"@warlock.js/fs": "5.
|
|
16
|
-
"@mongez/reinforcements": "^4.0.
|
|
15
|
+
"@warlock.js/fs": "5.21.0",
|
|
16
|
+
"@mongez/reinforcements": "^4.0.2",
|
|
17
17
|
"cross-spawn": "^7.0.3",
|
|
18
18
|
"rimraf": "^6.0.1",
|
|
19
19
|
"which-pm-runs": "^1.1.0"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"engines": {
|
|
22
22
|
"node": ">=22.13"
|
|
23
23
|
},
|
|
24
|
-
"version": "5.
|
|
24
|
+
"version": "5.21.0",
|
|
25
25
|
"type": "module",
|
|
26
26
|
"main": "./esm/index.mjs",
|
|
27
27
|
"module": "./esm/index.mjs",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"lf": "find . -type d ( -name 'node_modules' -o -name '.git' ) -prune -o -type f -exec dos2unix {} ;"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@mongez/reinforcements": "^4.0.
|
|
35
|
-
"@mongez/localization": "^3.5.
|
|
36
|
-
"@mongez/supportive-is": "^2.1.
|
|
34
|
+
"@mongez/reinforcements": "^4.0.2",
|
|
35
|
+
"@mongez/localization": "^3.5.1",
|
|
36
|
+
"@mongez/supportive-is": "^2.1.5",
|
|
37
37
|
"@warlock.js/auth": "0.0.0-set-by-scaffolder",
|
|
38
38
|
"@warlock.js/cache": "0.0.0-set-by-scaffolder",
|
|
39
39
|
"@warlock.js/cascade": "0.0.0-set-by-scaffolder",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"dayjs": "^1.11.19"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@mongez/agent-kit": "^1.
|
|
48
|
+
"@mongez/agent-kit": "^1.3.1",
|
|
49
49
|
"@types/node": "^25.0.3",
|
|
50
50
|
"@types/prettier": "^3.0.0",
|
|
51
51
|
"@typescript-eslint/eslint-plugin": "^8.50.0",
|
|
@@ -113,6 +113,12 @@ export const config = {
|
|
|
113
113
|
} satisfies RootConfig;
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
+
Every loader is an exported named `async function` with a public typed context;
|
|
117
|
+
let TypeScript infer its return. Use
|
|
118
|
+
`PageLoaderContext<typeof config.validation, typeof config.route>` for a page,
|
|
119
|
+
`LayoutLoaderContext` for a layout, and `AppLoaderContext` for the root. Do not
|
|
120
|
+
annotate the whole function as `PageLoader`, use `satisfies` on a loader,
|
|
121
|
+
duplicate its payload shape, or cast an unknown return.
|
|
116
122
|
A page file declares its route contract, coordinates a controller-like loader,
|
|
117
123
|
and composes presentational components. The loader validates input, calls
|
|
118
124
|
named services under `src/app/<domain>/services/`, converts results through
|
|
@@ -173,6 +179,15 @@ pure and has no React or browser lifecycle dependency. Keep feature CSS beside
|
|
|
173
179
|
the feature and import it from the owning presentation boundary; keep loading,
|
|
174
180
|
error, empty, focus, reduced-motion, and locale behavior with that boundary.
|
|
175
181
|
|
|
182
|
+
## Declaration spacing and local types
|
|
183
|
+
|
|
184
|
+
Put one blank line after the final import. Keep a short related declaration run
|
|
185
|
+
together, then put a blank line before a substantial multiline expression such
|
|
186
|
+
as a `useSubmitForm()` configuration. Declare a schema alias immediately after
|
|
187
|
+
its `const` schema instead of repeating `typeof schema` through the file. When
|
|
188
|
+
state starts unset, write `useState<ErrorText>()`; do not add a redundant
|
|
189
|
+
`| undefined` union or pass `undefined` explicitly.
|
|
190
|
+
|
|
176
191
|
## 2. Make the server-to-browser data contract explicit
|
|
177
192
|
|
|
178
193
|
- Validate URL parameters and query input at the page boundary. Use the
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { groupedTranslations } from "@mongez/localization";
|
|
2
|
-
import type { PageConfig,
|
|
2
|
+
import type { PageConfig, PageLoaderContext } from "@warlock.js/web";
|
|
3
3
|
import { getHomeService } from "app/home/services/home.service";
|
|
4
4
|
import { isLocaleCode } from "../../shared/locales";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export async function loader({ request, response }: HomeLoaderOptions) {
|
|
6
|
+
export async function loader({ request, response }: PageLoaderContext<undefined, undefined>) {
|
|
9
7
|
const locale = request.locale;
|
|
10
8
|
|
|
11
9
|
if (!isLocaleCode(locale)) {
|