@zappie/verify 0.1.3 → 0.2.2
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 +45 -0
- package/README.md +18 -1
- package/dist/{category-page-UBHOB5IN.js → category-page-I3HDIAJA.js} +7 -3
- package/dist/category-page-I3HDIAJA.js.map +1 -0
- package/dist/chunk-47RIF6JW.js +2807 -0
- package/dist/chunk-47RIF6JW.js.map +1 -0
- package/dist/{debug-C3UDGUED.js → debug-LOXPIQRS.js} +1 -1
- package/dist/debug-LOXPIQRS.js.map +1 -0
- package/dist/index.d.ts +55 -5
- package/dist/index.js +1133 -2386
- package/dist/index.js.map +1 -1
- package/dist/presentation-TKOXOILG.js +68 -0
- package/dist/presentation-TKOXOILG.js.map +1 -0
- package/dist/quote-body-S5LELT7L.js +24 -0
- package/dist/quote-body-S5LELT7L.js.map +1 -0
- package/dist/{quote-client-6XJJHITL.js → quote-client-4RUY3TKQ.js} +84 -6
- package/dist/quote-client-4RUY3TKQ.js.map +1 -0
- package/dist/{search-YIHT6CXN.js → search-OF62VKI3.js} +7 -2
- package/dist/search-OF62VKI3.js.map +1 -0
- package/dist/{selected-menu-3GCAICBQ.js → selected-menu-AQHWDELR.js} +9 -4
- package/dist/selected-menu-AQHWDELR.js.map +1 -0
- package/dist/{store-KIO5RCZO.js → store-OPM3OFLC.js} +20 -9
- package/dist/store-OPM3OFLC.js.map +1 -0
- package/package.json +2 -2
- package/schema/verify-report.v1.json +19 -1
- package/dist/category-page-UBHOB5IN.js.map +0 -1
- package/dist/chunk-WUWUDCYO.js +0 -485
- package/dist/chunk-WUWUDCYO.js.map +0 -1
- package/dist/debug-C3UDGUED.js.map +0 -1
- package/dist/quote-client-6XJJHITL.js.map +0 -1
- package/dist/search-YIHT6CXN.js.map +0 -1
- package/dist/selected-menu-3GCAICBQ.js.map +0 -1
- package/dist/store-KIO5RCZO.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# @zappie/verify
|
|
2
2
|
|
|
3
|
+
## 0.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d73fe38: V16 and V17 now wait for the menu to hydrate, then for the work it leaves for idle time, such as overlay preloads, and for the downloads that work starts, before they tap a trigger. That is what a shopper who has read the menu sees. A tap still times everything it starts, so an overlay whose code loads only on tap still fails V16.
|
|
8
|
+
- 959024d: V16 opens each overlay three times, each on a freshly loaded and settled menu, and judges the median against the 100 ms budget, so one slow sample on a busy machine doesn't fail it. `overlayOpenMs` holds the medians and the new `overlayOpenSamplesMs` holds every sample.
|
|
9
|
+
|
|
10
|
+
The phone profile's CPU slowdown is now calibrated to the machine. Before the checks run, verify scores the browser's CPU with a short fixed benchmark and sets the throttling rate so that V14, V15 and V16 see the same phone on a fast laptop and on a slow CI runner. A developer laptop still gets about four times. The rate stays between one and eight times, and the report's `environment` records `cpuBenchmark` and `cpuThrottlingRate`. The budgets are unchanged.
|
|
11
|
+
|
|
12
|
+
## 0.2.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 82fa181: Local mode now answers `/_zappie/session` as the test site host does, signed out until a check sets its test session cookie, so a template that checks the session as soon as a page loads no longer fails the routes check in a local preview.
|
|
17
|
+
|
|
18
|
+
## 0.2.0
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- 79deec3: Hold every template to the same accessibility, semantics, performance and CSS bar.
|
|
23
|
+
|
|
24
|
+
- `eslint-plugin-zappie`: `zappie/no-lazy-overlay` reports `React.lazy` and `Suspense` and points at `deferred()` from `@zappie/foundations`. It is an error in `recommended`.
|
|
25
|
+
- `@zappie/check`: `lint` fails when a project turns down a `jsx-a11y` rule from `recommended`. A new `css` step reports `css/important` and `css/class-patch` as errors, and `css/duplicate-keyframes`, `css/duplicate-selector`, `css/arbitrary-token`, `css/literal-token`, `css/unused-custom-property`, `css/reduced-motion` and `css/unreadable` as warnings.
|
|
26
|
+
- `@zappie/verify`: V13 fails on a missing main landmark, a page without exactly one h1, a dialog without a name, a positive tabindex, a phone control under 44×44 px and focus that doesn't return after the item or cart closes. V16 times each marked overlay from tap to first paint on a phone profile. V17 checks each marked overlay's focus, Escape and scroll lock. Both are skipped while a menu has no overlay markers. V14 records `menuCssKbGz`. `findRegressions` compares two reports' metrics.
|
|
27
|
+
- `@zappie/starter`: menu controls are at least 44×44 px on a phone.
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [4f3cdc3]
|
|
32
|
+
- @zappie/sdk@0.1.8
|
|
33
|
+
|
|
34
|
+
## 0.1.5
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- 2aa7669: V15 accepts an item route prefetched as code alone, so a storefront whose item page has no loader no longer needs an empty one to pass.
|
|
39
|
+
|
|
40
|
+
## 0.1.4
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- 45295a2: Make product cards ready to tap with route discovery, prefetch lint rules and measured storefront checks.
|
|
45
|
+
- Updated dependencies [45295a2]
|
|
46
|
+
- @zappie/sdk@0.1.6
|
|
47
|
+
|
|
3
48
|
## 0.1.3
|
|
4
49
|
|
|
5
50
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ ZAPPIE_KEY=pk_test_... npx zappie verify
|
|
|
18
18
|
ZAPPIE_KEY=pk_test_... npx zappie verify https://your-store.example
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
With no URL, it builds your project, starts a local preview, runs the checks and stops the preview. It only accepts test keys, so it never touches live orders.
|
|
21
|
+
With no URL, it builds your project, starts a local preview, runs the checks and stops the preview. It only accepts test keys, so it never touches live orders. A local preview has no site host, so verify answers `/_zappie/session` itself: signed out until a check signs in. Don't build or typecheck the project while it runs, because a rebuild under the preview stops the page from hydrating and fails checks that would pass.
|
|
22
22
|
|
|
23
23
|
| Option | What it does |
|
|
24
24
|
| -------------------------------- | ---------------------------------------------------- |
|
|
@@ -42,6 +42,23 @@ console.log(printSummary(report));
|
|
|
42
42
|
|
|
43
43
|
The report's shape is the JSON Schema at `@zappie/verify/schema/verify-report.v1.json`.
|
|
44
44
|
|
|
45
|
+
## Overlays
|
|
46
|
+
|
|
47
|
+
Mark each control that opens an overlay with `data-zappie-overlay-trigger="bag"`, `"branch"`, `"search"` or `"item"`, and the overlay's `role="dialog"` element with `data-zappie-overlay` and the same name. V16 waits until the menu has hydrated and its idle work, such as overlay preloads, and the downloads that work starts are done, as they would be for a shopper who has read the menu. Then it taps each marked trigger on a phone profile with the CPU slowed four times, and fails when the overlay takes more than 100 ms to paint. Anything the tap itself loads counts toward that time. It opens each overlay three times, each on a freshly loaded and settled menu, and judges the median, so one slow sample on a busy machine doesn't fail it. The CPU slowdown is calibrated to the machine: before the checks run, verify scores the browser's CPU with a short fixed benchmark and sets the throttling rate so that V14, V15 and V16 see the same phone everywhere. A developer laptop gets about four times, a slower CI runner less, between one and eight times. The report's `environment` records `cpuBenchmark` and the `cpuThrottlingRate` the checks used. The report's `overlayOpenMs` holds the medians and `overlayOpenSamplesMs` holds every sample, in the order they ran. V17 opens each one from the keyboard and checks that focus moves in, Tab stays in, the page behind doesn't scroll, Escape closes it and focus returns to the trigger. Both are skipped while the menu has no markers.
|
|
48
|
+
|
|
49
|
+
## Compare with a baseline
|
|
50
|
+
|
|
51
|
+
`findRegressions(baseline, head)` compares the metrics of two reports and returns each one that grew past its threshold, even when it is still inside the budget:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
import { findRegressions } from "@zappie/verify";
|
|
55
|
+
|
|
56
|
+
const regressions = findRegressions(baselineReport, report);
|
|
57
|
+
// [{ metric: "overlayOpenMs.bag", base: 60, head: 81, allowed: 80 }]
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
A metric regresses when it grows by more than its relative threshold or its absolute floor, whichever is larger. The defaults are in `DEFAULT_REGRESSION_THRESHOLDS`. A metric the baseline records and the new report doesn't also counts as a regression.
|
|
61
|
+
|
|
45
62
|
## Docs
|
|
46
63
|
|
|
47
64
|
- [CLI: zappie verify](https://docs.zappie.ai/cli/verify)
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
// ../sdk/src/transport/category-page.ts
|
|
2
|
-
function categoryPage(raw, ctx, mapMenu, invalid) {
|
|
3
|
-
const menu =
|
|
2
|
+
async function categoryPage(raw, ctx, mapMenu, invalid) {
|
|
3
|
+
const menu = (await import("./presentation-TKOXOILG.js")).presentMenu(
|
|
4
|
+
mapMenu(raw, ctx.branchId),
|
|
5
|
+
raw,
|
|
6
|
+
invalid
|
|
7
|
+
);
|
|
4
8
|
if (raw.next_cursor != null && (typeof raw.next_cursor !== "string" || !raw.next_cursor || raw.next_cursor === ctx.cursor) || menu.categories.some((c) => c.id !== ctx.categoryId) || Object.keys(menu.items).some(
|
|
5
9
|
(id) => !menu.categories.some((c) => c.itemIds.includes(id))
|
|
6
10
|
) || !menu.menus?.some(
|
|
@@ -18,4 +22,4 @@ function categoryPage(raw, ctx, mapMenu, invalid) {
|
|
|
18
22
|
export {
|
|
19
23
|
categoryPage
|
|
20
24
|
};
|
|
21
|
-
//# sourceMappingURL=category-page-
|
|
25
|
+
//# sourceMappingURL=category-page-I3HDIAJA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../sdk/src/transport/category-page.ts"],"mappings":";AASA,eAAsB,aACpB,KACA,KAMA,SACA,SACuB;AACvB,QAAM,QAAQ,MAAM,OAAO,4BAAgB,GAAG;AAAA,IAC5C,QAAQ,KAAK,IAAI,QAAQ;AAAA,IACzB;AAAA,IACA;AAAA,EACF;AACA,MACG,IAAI,eAAe,SACjB,OAAO,IAAI,gBAAgB,YAC1B,CAAC,IAAI,eACL,IAAI,gBAAgB,IAAI,WAC5B,KAAK,WAAW,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,UAAU,KACnD,OAAO,KAAK,KAAK,KAAK,EAAE;AAAA,IACtB,CAAC,OAAO,CAAC,KAAK,WAAW,KAAK,CAAC,MAAM,EAAE,QAAQ,SAAS,EAAE,CAAC;AAAA,EAC7D,KACA,CAAC,KAAK,OAAO;AAAA,IACX,CAAC,MAAM,EAAE,OAAO,IAAI,UAAU,EAAE,YAAY,SAAS,IAAI,UAAU;AAAA,EACrE,GACA;AACA,UAAM,QAAQ;AAAA,EAChB;AACA,SAAO;AAAA,IACL,MAAM,EAAE,GAAG,MAAM,cAAc,UAAU;AAAA,IACzC,QAAQ,IAAI;AAAA,IACZ,YAAY,IAAI;AAAA,IAChB,GAAI,OAAO,IAAI,gBAAgB,YAAY,IAAI,cAC3C,EAAE,YAAY,IAAI,YAAY,IAC9B,CAAC;AAAA,EACP;AACF;","names":[]}
|