@v-office/site-checks 0.2.3 → 0.2.4
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/README.md +1 -1
- package/dist/astro.mjs +1 -1
- package/dist/dist-checks.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{report-DMjG_lMz.mjs → report-D8jkvHtK.mjs} +2 -2
- package/instructions/CHANGELOG.md +1 -0
- package/instructions/MIGRATION.md +1 -0
- package/instructions/versions/0.2.4/CHANGELOG.md +11 -0
- package/instructions/versions/0.2.4/MIGRATION.md +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -82,7 +82,7 @@ Severities are fixed by the package: a site configures data, never whether a che
|
|
|
82
82
|
| `canonical-link` | error | On the launched site (a production `site`, some indexable page): an indexable page without an absolute `<link rel="canonical">`. | Build it from the Astro `site` and the page path. |
|
|
83
83
|
| `open-graph` | warning | On the launched site: an indexable page without an absolute `og:url` and `og:image`. | Add them, absolute. |
|
|
84
84
|
| `trailing-slash` | warning | On the launched site: `trailingSlash` is not `"never"`. | Set `trailingSlash: "never"`; write internal links without a trailing slash. |
|
|
85
|
-
| `v9-production-hub` |
|
|
85
|
+
| `v9-production-hub` | warning | v9 only, on the launched site: the build's env does not call the production Hub (`CMS_STAGE=production` or the production Hub URLs); a committed `.env.local`; a committed `HUB_API_KEY` equal to `.env.local`'s. Waits for a production `site` and an indexable page. | Set the production stage or URLs and the customer's production key; untrack `.env.local`. |
|
|
86
86
|
| `page-structure` | warning | One `<h1>`, no skipped heading level, no flood of `<h3>` under few `<h2>`, a `<main>`, `alt` on every image, a label on every control, a caption and scoped `<th>` on every table. | Fix the component where a fault repeats; decline a rule in `structureIgnore`. |
|
|
87
87
|
| `load-order` | warning | At start: an on-demand library (map, chart, 3D) in the start-up code, a start-up chunk over 150 KB compressed, photos after the first in card swipe strips with a URL, a first-paint photo from 100 KB up in one size only, a preloaded swap face without a `size-adjust` stand-in. | `import()` on demand; first slide only; width `srcset`; a `local()` stand-in. |
|
|
88
88
|
| `banned-copy` | warning | A `bannedCopy` wording in a page's visible text. Skipped without configured wordings. | Reword. |
|
package/dist/astro.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as writeSiteChecksReport, d as runSiteChecks, i as summaryLines, l as blockingResults, m as checks, n as refusalMessage, p as loadOptions } from "./report-
|
|
1
|
+
import { a as writeSiteChecksReport, d as runSiteChecks, i as summaryLines, l as blockingResults, m as checks, n as refusalMessage, p as loadOptions } from "./report-D8jkvHtK.mjs";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
3
|
//#region src/astro.ts
|
|
4
4
|
/**
|
package/dist/dist-checks.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as referencedUrls, c as MAX_PATH_CHARS, g as loadDistContext, h as isSameSiteReference, l as blockingResults, o as MAX_FINDINGS_PER_CHECK, r as summarizeBlocking, s as MAX_MESSAGE_CHARS, t as SITE_CHECKS_FILE, u as runChecks, v as resolveReference, y as xmlText } from "./report-
|
|
1
|
+
import { _ as referencedUrls, c as MAX_PATH_CHARS, g as loadDistContext, h as isSameSiteReference, l as blockingResults, o as MAX_FINDINGS_PER_CHECK, r as summarizeBlocking, s as MAX_MESSAGE_CHARS, t as SITE_CHECKS_FILE, u as runChecks, v as resolveReference, y as xmlText } from "./report-D8jkvHtK.mjs";
|
|
2
2
|
//#region src/distChecks/insecureResources.ts
|
|
3
3
|
/** `<link>` relations the browser fetches as a subresource; canonical,
|
|
4
4
|
* alternate, preconnect and friends are hints or metadata, not loads. */
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as writeSiteChecksReport, c as MAX_PATH_CHARS, d as runSiteChecks, f as CONFIG_FILE, i as summaryLines, l as blockingResults, m as checks, n as refusalMessage, o as MAX_FINDINGS_PER_CHECK, p as loadOptions, r as summarizeBlocking, s as MAX_MESSAGE_CHARS, t as SITE_CHECKS_FILE } from "./report-
|
|
1
|
+
import { a as writeSiteChecksReport, c as MAX_PATH_CHARS, d as runSiteChecks, f as CONFIG_FILE, i as summaryLines, l as blockingResults, m as checks, n as refusalMessage, o as MAX_FINDINGS_PER_CHECK, p as loadOptions, r as summarizeBlocking, s as MAX_MESSAGE_CHARS, t as SITE_CHECKS_FILE } from "./report-D8jkvHtK.mjs";
|
|
2
2
|
export { CONFIG_FILE, MAX_FINDINGS_PER_CHECK, MAX_MESSAGE_CHARS, MAX_PATH_CHARS, SITE_CHECKS_FILE, blockingResults, checks, loadOptions, refusalMessage, runSiteChecks, summarizeBlocking, summaryLines, writeSiteChecksReport };
|
|
@@ -1730,14 +1730,14 @@ const committedLocalFiles = (root) => LOCAL_ENV_FILES.filter((file) => {
|
|
|
1730
1730
|
/** A launched v9 site builds against the production be-on! Hub: the build's env says
|
|
1731
1731
|
* `CMS_STAGE=production`, or names the production Hub URLs. The Hub URLs are baked in at build
|
|
1732
1732
|
* time, so a site built against the demo Hub renders fine, only with the demo catalogue. Also
|
|
1733
|
-
*
|
|
1733
|
+
* reported: a committed `.env.local` (Vite loads it after `.env` in every mode, so CI builds from
|
|
1734
1734
|
* it) and a committed `HUB_API_KEY` that is the developer's local key. Waits while every page is
|
|
1735
1735
|
* noindex, and while the Astro `site` is a preview host or unset: before launch a site builds
|
|
1736
1736
|
* against the test Hub on purpose. v9 only. */
|
|
1737
1737
|
const v9ProductionHub = {
|
|
1738
1738
|
id: "v9-production-hub",
|
|
1739
1739
|
title: "A launched v9 site calls the production Hub",
|
|
1740
|
-
severity: "
|
|
1740
|
+
severity: "warning",
|
|
1741
1741
|
begin: (ctx) => {
|
|
1742
1742
|
const env = v9Env(ctx);
|
|
1743
1743
|
if (!env || !ctx.hasDist || !productionSite(ctx)) return null;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Release notes of `@v-office/site-checks`, newest first. Each version has its own directory.
|
|
6
6
|
|
|
7
|
+
- `versions/0.2.4/CHANGELOG.md`: release notes for 0.2.4
|
|
7
8
|
- `versions/0.2.3/CHANGELOG.md`: release notes for 0.2.3
|
|
8
9
|
- `versions/0.2.2/CHANGELOG.md`: release notes for 0.2.2
|
|
9
10
|
- `versions/0.2.1/CHANGELOG.md`: release notes for 0.2.1
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Migration guides of `@v-office/site-checks`, newest first. Apply them in order when skipping versions.
|
|
6
6
|
|
|
7
|
+
- `versions/0.2.4/MIGRATION.md`: Migration: 0.2.3 to 0.2.4
|
|
7
8
|
- `versions/0.2.3/MIGRATION.md`: Migration: 0.2.2 to 0.2.3
|
|
8
9
|
- `versions/0.2.2/MIGRATION.md`: Migration: 0.2.1 to 0.2.2
|
|
9
10
|
- `versions/0.2.1/MIGRATION.md`: Migration: 0.2.0 to 0.2.1
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Changelog: 0.2.4
|
|
2
|
+
|
|
3
|
+
`v9-production-hub` reports instead of refusing: which Hub a launched v9 site calls is a go-live
|
|
4
|
+
decision, and a refused build stops a live site from updating prices and availability.
|
|
5
|
+
|
|
6
|
+
## Changed
|
|
7
|
+
|
|
8
|
+
- `v9-production-hub` is a warning, no longer an error. A launched v9 site whose build calls the
|
|
9
|
+
demo Hub, a committed `.env.local`, or a committed `HUB_API_KEY` equal to `.env.local`'s still
|
|
10
|
+
shows up in `dist/site-checks.json` and the build log, and the build goes through. What it checks
|
|
11
|
+
and when it waits (before launch, on a preview host) are unchanged.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Migration: 0.2.3 to 0.2.4
|
|
2
|
+
|
|
3
|
+
No changes required.
|
|
4
|
+
|
|
5
|
+
## 1. Upgrade
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pnpm add --save-exact --save-dev @v-office/site-checks@0.2.4
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What changes for the site
|
|
12
|
+
|
|
13
|
+
- A launched v9 site on the demo Hub builds again; `v9-production-hub` lists it as a warning.
|
|
14
|
+
Read the warning before go-live: set `CMS_STAGE=production` or the production Hub URLs and the
|
|
15
|
+
customer's production `HUB_API_KEY`, and untrack a committed `.env.local`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-office/site-checks",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Build-time checks for the sites: runs inside `astro build`, writes dist/site-checks.json in the shape of the build worker's dist-check report, and refuses the build when a check with severity error finds something. The site-shipping guards of the commit gate, pinned and run where the site is built",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|