@v-office/site-checks 0.3.0 → 0.3.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/README.md +17 -10
- package/instructions/CHANGELOG.md +2 -0
- package/instructions/MIGRATION.md +2 -0
- package/instructions/versions/0.3.1/CHANGELOG.md +16 -0
- package/instructions/versions/0.3.1/MIGRATION.md +24 -0
- package/instructions/versions/0.3.2/CHANGELOG.md +16 -0
- package/instructions/versions/0.3.2/MIGRATION.md +20 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
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 checks itself on every build, from its own pinned copy of this
|
|
9
|
+
package and with the site's `site-checks.config.json`: for an Astro site the `src` stage before
|
|
10
|
+
`astro check` and the whole `dist` stage after the build, for any other website (the guest and
|
|
11
|
+
owner apps) the platform's dist checks alone. What a build checks does not depend on whether the
|
|
12
|
+
site installed this package. A refused stage never goes live and the previous build stays up; the
|
|
13
|
+
report lands in the studio and on the admin page. Locally the two commands are how a developer
|
|
14
|
+
looks before pushing.
|
|
11
15
|
|
|
12
16
|
## Use
|
|
13
17
|
|
|
18
|
+
Installing the package gives the site the two commands, for a look before pushing or a pre-push
|
|
19
|
+
hook. Pin the version the build worker uses, so the commands and the build agree:
|
|
20
|
+
|
|
14
21
|
```sh
|
|
15
22
|
pnpm add --save-exact --save-dev @v-office/site-checks
|
|
16
23
|
```
|
|
@@ -24,8 +31,8 @@ pnpm add --save-exact --save-dev @v-office/site-checks
|
|
|
24
31
|
}
|
|
25
32
|
```
|
|
26
33
|
|
|
27
|
-
The scripts are
|
|
28
|
-
goes into `astro.config`.
|
|
34
|
+
The scripts are for developers; the build worker never runs the site's installed copy, it runs
|
|
35
|
+
both stages from its own. Nothing goes into `astro.config`.
|
|
29
36
|
|
|
30
37
|
```
|
|
31
38
|
site-checks <src | dist> [--root <dir>] [--dist <dir>] [--site <url>] [--report <file>]
|
|
@@ -4,6 +4,8 @@
|
|
|
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.2/CHANGELOG.md`: release notes for 0.3.2
|
|
8
|
+
- `versions/0.3.1/CHANGELOG.md`: release notes for 0.3.1
|
|
7
9
|
- `versions/0.3.0/CHANGELOG.md`: release notes for 0.3.0
|
|
8
10
|
- `versions/0.2.4/CHANGELOG.md`: release notes for 0.2.4
|
|
9
11
|
- `versions/0.2.3/CHANGELOG.md`: release notes for 0.2.3
|
|
@@ -4,6 +4,8 @@
|
|
|
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.2/MIGRATION.md`: Migration: 0.3.1 to 0.3.2
|
|
8
|
+
- `versions/0.3.1/MIGRATION.md`: Migration: 0.3.0 to 0.3.1
|
|
7
9
|
- `versions/0.3.0/MIGRATION.md`: Migration: 0.2.x to 0.3.0
|
|
8
10
|
- `versions/0.2.4/MIGRATION.md`: Migration: 0.2.3 to 0.2.4
|
|
9
11
|
- `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.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog: 0.3.2
|
|
2
|
+
|
|
3
|
+
The notes only: the code is the same as 0.3.0 and 0.3.1. AI Studio's build worker now runs both
|
|
4
|
+
stages from its own pinned copy for every website, so what a build checks no longer depends on
|
|
5
|
+
whether a site installed this package. Installing it is for running the same checks locally.
|
|
6
|
+
|
|
7
|
+
## Changed
|
|
8
|
+
|
|
9
|
+
- The README, the package description and the migration notes describe the build worker's
|
|
10
|
+
checks: for an Astro site the `src` stage before `astro check` and every check of the `dist`
|
|
11
|
+
stage after the build, the site checks and the platform's dist checks; for any other website
|
|
12
|
+
(the guest and owner apps) the platform's dist checks alone. All from the worker's copy, with the
|
|
13
|
+
site's `site-checks.config.json` as their data. The worker no longer runs a site's own
|
|
14
|
+
`site-checks dist`.
|
|
15
|
+
- Installing the package gives a site the two commands, for a look before pushing or a pre-push
|
|
16
|
+
hook. Pin the version the build worker uses, so the commands and the build agree.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Migration: 0.3.1 to 0.3.2
|
|
2
|
+
|
|
3
|
+
No changes required: 0.3.2 changes the notes only.
|
|
4
|
+
|
|
5
|
+
## 1. Upgrade
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pnpm add --save-exact --save-dev @v-office/site-checks@0.3.2
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What changes for the site
|
|
12
|
+
|
|
13
|
+
- Nothing in the build. AI Studio's build worker runs every check from its own pinned copy,
|
|
14
|
+
whether or not the site installs this package: an Astro site gets the `src` stage before
|
|
15
|
+
`astro check` and the whole `dist` stage after the build. A finding with severity `error`
|
|
16
|
+
refuses the deploy, and the previous build stays live.
|
|
17
|
+
- With the package installed, `pnpm check:src` and `pnpm check:dist` (after `pnpm build`) run the
|
|
18
|
+
same checks locally, on their own or in a pre-push hook. Keep the pinned version equal to the
|
|
19
|
+
build worker's, so the commands and the build agree; AI Studio's rollouts move the pin.
|
|
20
|
+
- `site-checks.config.json` stays at the project root: the build's checks read it.
|
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.2",
|
|
4
|
+
"description": "The checks over a v-office website in two stages, `site-checks src` before the build and `site-checks dist` after it, which AI Studio's build worker runs on every build from its own pinned copy; the report has 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",
|