@ztd-me/frontend-checks 0.1.0 → 0.1.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/LICENSE +21 -0
- package/README.md +12 -5
- package/docs/publishing.md +7 -5
- package/docs/tailwind-variants.md +21 -0
- package/package.json +10 -8
- package/src/css-config.mjs +4 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Zeithrold
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# @ztd-me/frontend-checks
|
|
2
2
|
|
|
3
|
-
Native CSS and Playwright accessibility checks. Requires Node >=22.14 and Playwright Test ^1.62.0. Version `0.1.
|
|
3
|
+
Native CSS and Playwright accessibility checks. Requires Node >=22.14 and Playwright Test ^1.62.0. Version `0.1.2` prepares the MIT metadata and full license notice for a new npm release, retaining the Tailwind block custom variant fix from `0.1.1`. It requires automatic staging, owner 2FA promotion and fresh registry verification before consumers install it. See [publishing](docs/publishing.md) and [CLI integration](https://github.com/zeithrold/tools/blob/main/docs/frontend-tooling.md). Consumers retain `@ztd-me/eslint@0.1.1` and its strict standards.
|
|
4
4
|
|
|
5
5
|
After promotion and verified public installation:
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
pnpm add -D --save-exact @ztd-me/frontend-checks@0.1.
|
|
8
|
+
pnpm add -D --save-exact @ztd-me/frontend-checks@0.1.2 @playwright/test@1.62.0
|
|
9
9
|
pnpm exec playwright install chromium
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Tools verification and the three consumer projects have user approval for `minimumReleaseAgeExclude: ['@ztd-me/*']`. Preserve other packages' age gates, integrity checks, no-downgrade and build policy. No scope trust exemption is granted. The `0.0.0-stage` placeholder for a new package is not a usable helper release.
|
|
13
13
|
|
|
14
14
|
## CSS
|
|
15
15
|
|
|
@@ -28,7 +28,7 @@ pnpm exec ztd-css ./css-check.config.mjs
|
|
|
28
28
|
|
|
29
29
|
The config module is reviewed project code and executes during import. `checkCss(options)` is also exported from `@ztd-me/frontend-checks/css`. Every supplied glob must match; missing files and syntax/configuration errors fail. JSON findings print to stdout; a nonzero exit fails the gate. Under `zt check`, the CLI also writes `css.json` to `ZT_ARTIFACTS_DIR`.
|
|
30
30
|
|
|
31
|
-
Stylelint 17.15 / standard 40 provide native CSS validation; only documented Tailwind directives and `--alpha`/`--spacing` functions receive syntax allowances. Undefined `var()` references fail across the supplied files/declaration sources, even with fallbacks. Exact runtime-generated variables can be declared in `externalCustomProperties`; document their owner in the project contract. Imports are not resolved automatically. Neither Sass/Less nor embedded Vue styles are parsed by this CSS-only entrypoint.
|
|
31
|
+
Stylelint 17.15 / standard 40 provide native CSS validation; only documented Tailwind directives and `--alpha`/`--spacing` functions receive syntax allowances. The nesting-scoping rule remains enabled, with an exact `custom-variant` at-rule allowance for Tailwind-provided utility roots. Root/media nesting outside that directive still fails. See [variant compatibility](docs/tailwind-variants.md). Undefined `var()` references fail across the supplied files/declaration sources, even with fallbacks. Exact runtime-generated variables can be declared in `externalCustomProperties`; document their owner in the project contract. Imports are not resolved automatically. Neither Sass/Less nor embedded Vue styles are parsed by this CSS-only entrypoint.
|
|
32
32
|
|
|
33
33
|
Hex, named and CSS color-function paint literals outside custom-property definitions fail. Token definitions retain each project's values. `transparent`, `currentColor`, inheritance and URLs are allowed. This check covers declarations, not Tailwind arbitrary-value classes, inline JS styles or every possible CSS color expression. An inventory definition is not proof of cascade/theme availability; render the relevant states. No autofix rewrites token values.
|
|
34
34
|
|
|
@@ -71,4 +71,11 @@ pnpm exec playwright install chromium
|
|
|
71
71
|
pnpm run check
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
Tests execute native CSS parsing/lint, real Chromium Axe/keyboard/dialog behavior, a deliberate accessibility failure, typed imports, fresh tarball installation/CLI use, and stage authorization/duplicate guards. The workspace
|
|
74
|
+
Tests execute native CSS parsing/lint, real Chromium Axe/keyboard/dialog behavior, a deliberate accessibility failure, typed imports, fresh tarball installation/CLI use, and stage authorization/duplicate guards. The workspace uses the authorized `@ztd-me/*` age exclusion and retains the existing exact `semver@6.3.1` trust exception. Fresh consumers retain strict 24-hour release age for other packages and no-downgrade for all packages. `test:registry` verifies registry integrity against the original reviewed release tarball and repeats consumer import/type/CLI/browser pass/failure checks; metadata alone is insufficient. Source documentation updates do not overwrite an already published version.
|
|
75
|
+
|
|
76
|
+
## License
|
|
77
|
+
|
|
78
|
+
First-party code and documentation are [MIT licensed](LICENSE). Installed dependencies, including
|
|
79
|
+
Axe, Stylelint and Playwright, retain their upstream licenses and notices. This package does not
|
|
80
|
+
relicense dependencies or their transitive code. Existing published versions keep their original
|
|
81
|
+
artifacts and metadata.
|
package/docs/publishing.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Public stage-only release
|
|
2
2
|
|
|
3
|
-
`@ztd-me/frontend-checks@0.1.0` is
|
|
3
|
+
`@ztd-me/frontend-checks@0.1.0` is published from source `3f9a3a7d33befc5a954ba1e86d3aa6d72e2c762f`. Its [automatic staging run](https://github.com/zeithrold/tools/actions/runs/36995178595) created stage `bc4c19ac-2c8b-4525-88f0-e0ec1e333903`; owner promotion made the exact verified tarball public. SHA-256 is `a3b7209f90746bf71c1b5b4ef69910a70ff747acc394696a778996f69efcb87c`.
|
|
4
|
+
|
|
5
|
+
`.github/workflows/publish-frontend.yml` runs automatically on relevant pushes to `main`. It uses pnpm 11.22.0, frozen installation, strict lint, declarations, CSS fixtures, Chromium tests and fresh packed-consumer checks on Node 22 and 24. The Node 24 job packs the tested bytes and records the immutable source SHA and checksums. A separate job verifies those checksums and source identity before staging that exact tarball. It never directly publishes or promotes a version. Documentation/policy changes without a version bump verify and skip the public version rather than republishing it.
|
|
4
6
|
|
|
5
7
|
The existing repository `NPM_TOKEN` secret is the authorized route. It must permit Read and write (stage only) for this package under `@ztd-me`, with Bypass 2FA disabled. Its actual scope for this new package cannot be inferred from its success publishing ESLint. If permission is missing, the package owner must supply the narrowly authorized access; the workflow fails without creating credentials or expanding rights. Organization administration rights alone do not grant package publication rights. The token is bound to the registry in memory in the stage step only; installation, checks and packing receive no token.
|
|
6
8
|
|
|
@@ -17,19 +19,19 @@ First-package staging creates a public `0.0.0-stage` placeholder so package sett
|
|
|
17
19
|
|
|
18
20
|
## Exact registry verification
|
|
19
21
|
|
|
20
|
-
From the reviewed source checkout, download the automatic release run's exact `frontend-package-<SHA>` artifact and verify `SHA256SUMS` and `source-commit.txt`. Once the owner has promoted `0.1.
|
|
22
|
+
From the reviewed source checkout, download the automatic release run's exact `frontend-package-<SHA>` artifact and verify `SHA256SUMS` and `source-commit.txt`. Once the owner has promoted `0.1.2`, run:
|
|
21
23
|
|
|
22
24
|
```sh
|
|
23
25
|
pnpm exec playwright install chromium
|
|
24
|
-
pnpm run test:registry 0.1.
|
|
26
|
+
pnpm run test:registry 0.1.2 /path/to/verified/package.tgz
|
|
25
27
|
```
|
|
26
28
|
|
|
27
29
|
The script checks the exact public package/version and registry SHA-512 integrity against the reviewed tarball, then creates a fresh pnpm consumer. It installs the exact registry version, reruns frozen installation, imports both `/css` and `/playwright`, invokes `ztd-css`, checks TypeScript declarations with strict settings and executes a deliberately failing browser Axe scan that must retain the violation evidence. Browser infrastructure errors cannot satisfy that assertion.
|
|
28
30
|
|
|
29
|
-
The consumer
|
|
31
|
+
The user authorizes `minimumReleaseAgeExclude: ['@ztd-me/*']` in tools verification and the three consumer projects. The consumer retains `minimumReleaseAge: 1440`, `minimumReleaseAgeStrict: true`, pruning and `trustPolicy: no-downgrade`. Other packages still wait 24 hours. Scope packages keep integrity/trust checks; no scope-wide trust exclusion is authorized. Preserve the existing exact `semver@6.3.1` trust exception wherever the ESLint graph needs it. Pin the verified registry version:
|
|
30
32
|
|
|
31
33
|
```sh
|
|
32
|
-
pnpm add -D --save-exact @ztd-me/frontend-checks@0.1.
|
|
34
|
+
pnpm add -D --save-exact @ztd-me/frontend-checks@0.1.2 @playwright/test@1.62.0
|
|
33
35
|
pnpm install --frozen-lockfile
|
|
34
36
|
```
|
|
35
37
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Tailwind block variant compatibility
|
|
2
|
+
|
|
3
|
+
The 0.1.1 patch candidate fixes the valid Tailwind 4.3.3 system-dark variant rejected by frontend-checks 0.1.0:
|
|
4
|
+
|
|
5
|
+
```css
|
|
6
|
+
@custom-variant dark {
|
|
7
|
+
:root[data-frontend-mode="dark"] & { @slot; }
|
|
8
|
+
|
|
9
|
+
@media (prefers-color-scheme: dark) {
|
|
10
|
+
:root[data-frontend-mode="system"] & { @slot; }
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Tailwind substitutes each utility selector for `&`. The native compiler produces the expected explicit-dark selector and system-mode media branch. Stylelint 17.15.0/standard 40.0.0 instead reports two missing-scoping-root findings because this precompiled directive is not native CSS nesting.
|
|
16
|
+
|
|
17
|
+
The fix keeps `nesting-selector-no-missing-scoping-root` enabled and uses its supported secondary option `ignoreAtRules: ['custom-variant']`. It does not ignore files, media blocks, arbitrary at-rules or other findings. Tests require root/media `&` outside custom variants to fail and preserve native invalid-property findings plus semantic literal-color and undefined-token checks. Both direct and nested-media variant roots pass. The packed CLI consumer includes the exact source variant, and native Tailwind 4.3.3 compilation is an independent regression check. This is not a claim that the source CSS checker accepts every generated utility naming convention or validates the complete Tailwind language.
|
|
18
|
+
|
|
19
|
+
The CSS API/config shape and Playwright exports are unchanged. Keep release-age, integrity, no-downgrade and existing build restrictions. This fix requires a new 0.1.1 release; changing tools source cannot repair consumers locked to published 0.1.0. The owner merges, the existing automatic workflow stages the candidate, and the owner approves it with npm 2FA. Verify the promoted exact version against its reviewed tarball using `scripts/registry-smoke.mjs` before updating final consumer locks. Staging alone is insufficient.
|
|
20
|
+
|
|
21
|
+
Reference: [Stylelint's native ignoreAtRules option](https://stylelint.io/user-guide/rules/nesting-selector-no-missing-scoping-root/#ignoreatrules).
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ztd-me/frontend-checks",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "MIT",
|
|
6
6
|
"description": "Native CSS and Playwright accessibility checks for zt frontend profiles",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=22.14.0"
|
|
@@ -23,26 +23,28 @@
|
|
|
23
23
|
"files": [
|
|
24
24
|
"src",
|
|
25
25
|
"README.md",
|
|
26
|
-
"docs"
|
|
26
|
+
"docs",
|
|
27
|
+
"LICENSE"
|
|
27
28
|
],
|
|
28
29
|
"dependencies": {
|
|
29
30
|
"@axe-core/playwright": "4.13.0",
|
|
31
|
+
"color-name": "2.0.0",
|
|
30
32
|
"fast-glob": "3.3.3",
|
|
31
33
|
"postcss": "8.5.27",
|
|
32
34
|
"postcss-value-parser": "4.2.0",
|
|
33
35
|
"stylelint": "17.15.0",
|
|
34
|
-
"stylelint-config-standard": "40.0.0"
|
|
35
|
-
"color-name": "2.0.0"
|
|
36
|
+
"stylelint-config-standard": "40.0.0"
|
|
36
37
|
},
|
|
37
38
|
"peerDependencies": {
|
|
38
39
|
"@playwright/test": "^1.62.0"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
|
-
"@types/node": "24.12.0",
|
|
42
42
|
"@playwright/test": "1.62.0",
|
|
43
|
+
"@types/node": "24.12.0",
|
|
44
|
+
"@ztd-me/eslint": "0.1.1",
|
|
43
45
|
"eslint": "10.11.0",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
+
"tailwindcss": "4.3.3",
|
|
47
|
+
"typescript": "6.0.3"
|
|
46
48
|
},
|
|
47
49
|
"repository": {
|
|
48
50
|
"type": "git",
|
package/src/css-config.mjs
CHANGED