@v-office/site-checks 0.3.0 → 0.3.1
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
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
# @v-office/site-checks
|
|
2
2
|
|
|
3
|
-
The checks over a v-office website,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
AI Studio's build worker runs
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
The checks over a v-office website, in two stages: `site-checks src` reads the project before
|
|
4
|
+
the build, `site-checks dist` reads the built `dist/` after it. Each stage prints what it found,
|
|
5
|
+
writes a report in the shape of the build worker's dist-check report, and exits non-zero when a
|
|
6
|
+
check with severity `error` found something.
|
|
7
|
+
|
|
8
|
+
AI Studio's build worker runs the `src` stage itself for every Astro site, from its own pinned
|
|
9
|
+
copy of this package and with the site's `site-checks.config.json`, before `astro check`: a site
|
|
10
|
+
installs nothing for it. After the build it runs the site's own `site-checks dist` when the site
|
|
11
|
+
installed this package, and otherwise the platform's dist checks alone. A refused stage never goes
|
|
12
|
+
live and the previous build stays up; the report lands in the studio and on the admin page.
|
|
13
|
+
Locally the two commands are how a developer looks before pushing.
|
|
11
14
|
|
|
12
15
|
## Use
|
|
13
16
|
|
|
17
|
+
Installing the package adds the `dist` stage's site checks to the site's builds, at the version
|
|
18
|
+
the site pins, and the two commands to its scripts:
|
|
19
|
+
|
|
14
20
|
```sh
|
|
15
21
|
pnpm add --save-exact --save-dev @v-office/site-checks
|
|
16
22
|
```
|
|
@@ -24,8 +30,8 @@ pnpm add --save-exact --save-dev @v-office/site-checks
|
|
|
24
30
|
}
|
|
25
31
|
```
|
|
26
32
|
|
|
27
|
-
The scripts are a convenience for developers; the build worker
|
|
28
|
-
goes into `astro.config`.
|
|
33
|
+
The scripts are a convenience for developers; the build worker runs the `src` stage itself and
|
|
34
|
+
calls the bin for the `dist` stage. Nothing goes into `astro.config`.
|
|
29
35
|
|
|
30
36
|
```
|
|
31
37
|
site-checks <src | dist> [--root <dir>] [--dist <dir>] [--site <url>] [--report <file>]
|
|
@@ -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.3.1/CHANGELOG.md`: release notes for 0.3.1
|
|
7
8
|
- `versions/0.3.0/CHANGELOG.md`: release notes for 0.3.0
|
|
8
9
|
- `versions/0.2.4/CHANGELOG.md`: release notes for 0.2.4
|
|
9
10
|
- `versions/0.2.3/CHANGELOG.md`: release notes for 0.2.3
|
|
@@ -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.3.1/MIGRATION.md`: Migration: 0.3.0 to 0.3.1
|
|
7
8
|
- `versions/0.3.0/MIGRATION.md`: Migration: 0.2.x to 0.3.0
|
|
8
9
|
- `versions/0.2.4/MIGRATION.md`: Migration: 0.2.3 to 0.2.4
|
|
9
10
|
- `versions/0.2.3/MIGRATION.md`: Migration: 0.2.2 to 0.2.3
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog: 0.3.1
|
|
2
|
+
|
|
3
|
+
The notes only: the code is the same as 0.3.0. They now say how AI Studio runs the checks. Its
|
|
4
|
+
build worker runs the `src` stage itself for every Astro site, from its own copy of this package,
|
|
5
|
+
so a site installs nothing for the source checks; installing the package adds the `dist` stage's
|
|
6
|
+
site checks and the two commands.
|
|
7
|
+
|
|
8
|
+
## Changed
|
|
9
|
+
|
|
10
|
+
- The README, the package description and the migration notes describe how the build worker runs
|
|
11
|
+
the stages. `src` (`html-comments`, `image-formats`, `sync-once`, `v9-hub-filters`) runs in the
|
|
12
|
+
worker for every Astro site, at the worker's version, with the site's `site-checks.config.json`
|
|
13
|
+
as its data, before `astro check`. `dist` runs as the site's own `site-checks dist` when the
|
|
14
|
+
site installed this package; without it, the worker runs the platform's dist checks only.
|
|
15
|
+
- The worker no longer stores the report of the 0.2.x `siteChecks()` integration: a site still on
|
|
16
|
+
0.2.x takes the integration out (Migration: 0.2.x to 0.3.0, step 2).
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Migration: 0.3.0 to 0.3.1
|
|
2
|
+
|
|
3
|
+
No changes required: 0.3.1 changes the notes only.
|
|
4
|
+
|
|
5
|
+
## 1. Upgrade
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pnpm add --save-exact --save-dev @v-office/site-checks@0.3.1
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What changes for the site
|
|
12
|
+
|
|
13
|
+
- Nothing in the build. AI Studio's build worker runs the source checks of every Astro site
|
|
14
|
+
itself, whether or not the site installs this package: a finding with severity `error` in the
|
|
15
|
+
project refuses the deploy before `astro check`, and the previous build stays live.
|
|
16
|
+
- `site-checks.config.json` stays at the project root: the worker's source checks read it. A key
|
|
17
|
+
of a removed check is noted and ignored; an unknown key stops the checks, and with them the
|
|
18
|
+
build.
|
|
19
|
+
- With this package installed, the build also runs `site-checks dist` at the site's version, the
|
|
20
|
+
site checks of the `dist` stage included. Without it, the build gets the platform's dist checks
|
|
21
|
+
only. "Order matters" in the 0.3.0 notes no longer applies: the worker runs the stages now.
|
|
22
|
+
- A site still on 0.2.x takes `siteChecks()` out of `astro.config` (Migration: 0.2.x to 0.3.0,
|
|
23
|
+
step 2), and either removes the package or upgrades to this version. The worker no longer
|
|
24
|
+
stores the integration's report.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-office/site-checks",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "The checks over a v-office website
|
|
3
|
+
"version": "0.3.1",
|
|
4
|
+
"description": "The checks over a v-office website in two stages: `site-checks src` before the build (AI Studio's build worker runs it for every Astro site) and `site-checks dist` after it, with the report in the shape of the build worker's dist-check report. A check with severity error refuses the deploy",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|