Skip to content

Commit 5237d06

Browse files
committed
Merge branch 'dev'
2 parents 78e30c0 + 47a2f5d commit 5237d06

20 files changed

Lines changed: 1334 additions & 25 deletions

File tree

docs/changelog/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ One file per version: `vX.Y.Z.md`
3030

3131
| Version | Date | File |
3232
| ------------- | ---------- | ------------------------------------------------ |
33+
| 0.18.1 | 2026-05-17 | [v0.18.1.md](./v0.18.1.md) |
3334
| 0.18.0 | 2026-05-17 | [v0.18.0.md](./v0.18.0.md) |
3435
| 0.17.5 | 2026-05-17 | [v0.17.5.md](./v0.17.5.md) |
3536
| 0.17.4 | 2026-05-16 | [v0.17.4.md](./v0.17.4.md) |

docs/changelog/v0.18.1.md

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# Changelog: v0.18.1
2+
3+
> Release date: 2026-05-17
4+
> Release type: **minor patch (CLI + diagnostics)**
5+
6+
## Overview
7+
8+
v0.18.1 adds `less validate-manifest` — a deterministic validation command for
9+
CEM manifests. Users and CI pipelines can now verify a third-party Web Component
10+
package's compatibility before installing or rendering it.
11+
12+
## What's New
13+
14+
### Core Validation Module (`@lessjs/core/validate-manifest`)
15+
16+
New module `packages/core/src/validate-manifest.ts` with comprehensive validation:
17+
18+
| Check | Code | Severity | What it validates |
19+
| ------------------ | ------------------------------ | -------- | ------------------------------------------------------ |
20+
| Schema version | `MISSING_SCHEMA_VERSION` | error | `schemaVersion` field |
21+
| Modules array | `MISSING_MODULES` | error | `modules` array exists |
22+
| Empty modules | `EMPTY_MODULES` | warning | `modules` array is not empty |
23+
| Module path | `MISSING_MODULE_PATH` | warning | Each module has a `path` field |
24+
| Tag name | `EMPTY_TAG_NAME` | error | Tag name is not empty |
25+
| Tag name format | `INVALID_TAG_NAME` | error | Tag name contains a hyphen |
26+
| Duplicate tags | `DUPLICATE_TAG` | error | No duplicate tag across modules |
27+
| Absolute path | `INVALID_MODULE_PATH` | error | Module paths are relative, not absolute |
28+
| Path traversal | `INVALID_MODULE_PATH` | error | No `../` outside package root |
29+
| URL path | `INVALID_MODULE_PATH` | error | No HTTP/HTTPS paths |
30+
| Superclass path | `INVALID_SUPERCLASS_PATH` | error | Superclass module paths are valid |
31+
| `less.ssr` type | `INVALID_SSR_VALUE` | error | Must be boolean |
32+
| `less.dsd` type | `INVALID_DSD_VALUE` | error | Must be boolean |
33+
| Hydrate strategy | `INVALID_HYDRATE_STRATEGY` | error | Must be one of: eager/lazy/idle/visible |
34+
| Layer | `INVALID_LAYER` | error | Must be one of: dsd-static/dsd-interactive/pure-island |
35+
| No custom elements | `NO_CUSTOM_ELEMENTS` | warning | At least one `custom-element` declaration |
36+
| Exports no decls | `EXPORTS_WITHOUT_DECLARATIONS` | warning | Module has exports but no declarations |
37+
38+
### CLI (`less validate-manifest`)
39+
40+
Three modes:
41+
42+
```sh
43+
# Human-readable default
44+
deno run -A jsr:@lessjs/core/cli/validate-manifest ./custom-elements.json
45+
46+
# Machine-readable JSON
47+
deno run -A jsr:@lessjs/core/cli/validate-manifest ./custom-elements.json --json
48+
49+
# Strict mode (fails on warnings too)
50+
deno run -A jsr:@lessjs/core/cli/validate-manifest ./custom-elements.json --strict
51+
```
52+
53+
Exit codes:
54+
55+
- `0` — manifest is valid
56+
- `1` — manifest has errors (or warnings in strict mode)
57+
58+
### New Public API
59+
60+
Added to `@lessjs/core`:
61+
62+
**Types**:
63+
64+
- `ValidationDiagnostic` — structured error/warning with code, severity, message, fix
65+
- `ValidatedTag` — per-tag validation result with compatibility tier
66+
- `ManifestValidationReport` — full validation report
67+
68+
**Functions**:
69+
70+
- `validateManifest(manifest)` — validate a parsed `CustomElementsManifest`
71+
- `validateManifestFromJson(json)` — convenience wrapper for raw JSON
72+
73+
**Exports**:
74+
75+
- `@lessjs/core/validate-manifest` — validation module
76+
- `@lessjs/core/cli/validate-manifest` — CLI entry point
77+
78+
## Verification
79+
80+
- [x] valid Less manifest returns exit code 0
81+
- [x] CEM-only package is valid but `client-only`
82+
- [x] duplicate tag returns exit code 1
83+
- [x] path traversal returns exit code 1
84+
- [x] malformed Less extension returns actionable error
85+
- [x] JSON output is deterministic
86+
- [x] `deno task fmt && deno task lint && deno task typecheck`
87+
- [x] `deno task test` (659 tests, 29 new)
88+
- [x] `deno task build`
89+
90+
## Breaking Changes
91+
92+
None. v0.18.1 adds new API surface without modifying existing interfaces.
93+
94+
- New optional exports: `validateManifest`, `validateManifestFromJson`
95+
- New optional subpath exports: `@lessjs/core/validate-manifest`, `@lessjs/core/cli/validate-manifest`
96+
- No behavior changes to existing code
97+
98+
## Migration Guide
99+
100+
**For users**: No action needed. v0.18.1 is a drop-in replacement for v0.18.0.
101+
102+
**For CI/CD pipelines**: Add `less validate-manifest` to your pre-install gates:
103+
104+
```sh
105+
deno run -A jsr:@lessjs/core/cli/validate-manifest ./custom-elements.json --json
106+
```
107+
108+
**For package authors**: Run `validate-manifest` on your `custom-elements.json` to
109+
catch issues before publishing:
110+
111+
```sh
112+
deno run -A jsr:@lessjs/core/cli/validate-manifest ./custom-elements.json
113+
```
114+
115+
## Next Steps
116+
117+
With v0.18.1 complete, the project can now proceed to:
118+
119+
- **v0.18.2**: `less add` — one-click install + configuration flow
120+
- See `docs/sop/v0.18.2-less-add-install-flow.md`
121+
122+
## Diff Summary
123+
124+
```bash
125+
git diff --stat v0.18.0..v0.18.1
126+
127+
packages/core/__tests__/validate-manifest.test.ts (new, 513 lines)
128+
packages/core/deno.json (2 lines changed)
129+
packages/core/src/cli/validate-manifest.ts (new, 104 lines)
130+
packages/core/src/index.ts (9 lines changed)
131+
packages/core/src/types.ts (72 lines changed)
132+
packages/core/src/validate-manifest.ts (new, 466 lines)
133+
```
134+
135+
**Stats**:
136+
137+
- 3 new files
138+
- 3 modified files
139+
- 29 new tests (659 total)
140+
- +1,167 / -1 lines

docs/status/STATUS.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
> AI assistant: read this file first on every session start.
44
5-
## Current Version: 0.18.0
5+
## Current Version: 0.18.1
66

7-
## Next Planned Version: 0.18.1 (planned)
7+
## Next Planned Version: 0.18.2 (planned)
88

9-
v0.18.0 Universal WC Engine is complete. v0.18.1 validate-manifest CLI is next on the roadmap.
9+
v0.18.1 validate-manifest CLI is complete. v0.18.2 `less add` install flow is next on the roadmap.
1010

1111
## Branch Status
1212

13-
| Branch | HEAD | Status |
14-
| ------------- | --------- | ----------------------------------------------------------------------- |
15-
| `origin/dev` | `de78fdd` | v0.18.0 release (CEM parser + compatibility tiers + plugin integration) |
16-
| `origin/main` | `de78fdd` | v0.18.0 release |
13+
| Branch | HEAD | Status |
14+
| ------------- | -------- | ---------------------------------------------------------------- |
15+
| `origin/dev` | `latest` | v0.18.1 release (validate-manifest CLI + core validation module) |
16+
| `origin/main` | `latest` | v0.18.0 release |
1717

1818
## Tags
1919

@@ -29,11 +29,13 @@ v0.18.0 Universal WC Engine is complete. v0.18.1 validate-manifest CLI is next o
2929
| v0.16.0 | `a02feb6` | 2026-05-16 |
3030
| v0.15.3 | `5e06fc9` | 2026-05-16 |
3131

32-
## Last Completed Release: 0.18.0 (2026-05-17)
32+
## Last Completed Release: 0.18.1 (2026-05-17)
3333

34-
- **Universal WC Engine**: CEM parser + compatibility classifier + SSR admission planner + report schema + CEM plugin auto-detection
35-
- **Conservative defaults**: CEM without Less extension → client-only (safe default)
36-
- **630 tests passing**
34+
- **CEM Manifest Validator**: `validateManifest()` in core with per-tag diagnostics
35+
- **CLI**: `validate-manifest` CLI with human-readable and `--json` output
36+
- **Validation checks**: schema shape, tag names, duplicates, module paths, Less extensions
37+
- **Conservative defaults**: CEM-only → client-only; errors → rejected
38+
- **29 new tests, 659 total**
3739

3840
- **Lint fix**: removed `any` type from parent-with-client-child fixture
3941

@@ -61,7 +63,7 @@ Third-party package handling is conservative:
6163
| v0.17.3 | `docs/sop/v0.17.3-multi-framework-adapters.md` | Done | v0.17.2 SSR filtering exists | Vanilla/React adapters documented; no universal SSR claim |
6264
| v0.17.4 | `docs/sop/v0.17.4-compatibility-boundary-hardening.md` | Done | v0.17.3 docs closed | Client-only modules excluded before SSR entry generation |
6365
| v0.18.0 | `docs/sop/v0.18.0-universal-wc-engine.md` | **Done** | v0.17.4 admission planner complete + package SSR admission validated | CEM parser + compatibility tiers + report reasons |
64-
| v0.18.1 | `docs/sop/v0.18.1-validate-manifest-cli.md` | **Planned** | v0.18.0 classifier stable | `less validate-manifest` emits stable diagnostics |
66+
| v0.18.1 | `docs/sop/v0.18.1-validate-manifest-cli.md` | **Done** | v0.18.0 classifier stable | `less validate-manifest` emits stable diagnostics |
6567
| v0.18.2 | `docs/sop/v0.18.2-less-add-install-flow.md` | Planned | validation CLI stable | `less add` dry-run/install is validation-gated |
6668
| v0.18.3 | `docs/sop/v0.18.3-dom-simulation-experiment.md` | Experimental | client-only fallback stable | opt-in DOM simulation decision recorded |
6769
| v0.19.0 | `docs/sop/v0.19.0-platform-hub.md` | Planned | validation/build reports stable | Hub ingests artifacts and shows compatibility |

packages/adapter-lit/deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lessjs/adapter-lit",
3-
"version": "0.18.0",
3+
"version": "0.18.1",
44
"exports": {
55
".": "./src/index.ts",
66
"./ssr": "./src/ssr.ts",

packages/adapter-react/deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lessjs/adapter-react",
3-
"version": "0.18.0",
3+
"version": "0.18.1",
44
"exports": {
55
".": "./src/index.ts",
66
"./ssr": "./src/ssr.ts",

packages/adapter-vanilla/deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lessjs/adapter-vanilla",
3-
"version": "0.18.0",
3+
"version": "0.18.1",
44
"exports": {
55
".": "./src/index.ts",
66
"./ssr": "./src/ssr.ts",

packages/adapter-vite/deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lessjs/adapter-vite",
3-
"version": "0.18.0",
3+
"version": "0.18.1",
44
"exports": {
55
".": "./src/index.ts",
66
"./build-context": "./src/build-context.ts",

packages/app/deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lessjs/app",
3-
"version": "0.18.0",
3+
"version": "0.18.1",
44
"exports": {
55
".": "./src/index.ts"
66
},

packages/content/deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lessjs/content",
3-
"version": "0.18.0",
3+
"version": "0.18.1",
44
"exports": {
55
".": "./src/index.ts",
66
"./blog-data": "./src/blog/blog-data.ts",

0 commit comments

Comments
 (0)