Skip to content

Commit 0545a60

Browse files
committed
Standard → Version model, Changesets releasing, and standards-checker 1.2.0-beta.2
Each OGC standard — JSON-FG and OGC API Features / Processes / Records — is now a first-class Standard owning an explicit version, driven by a single Standard[] config for both the web app and the CLI (--standard/--version; --ruleset stays as a deprecated alias, legacy URLs redirect). Releases move to Changesets, CI gains the pnpm dedupe --check guard, and the @geonovum/standards-checker dependency is pinned to 1.2.0-beta.2 from the registry.
1 parent a661959 commit 0545a60

63 files changed

Lines changed: 1051 additions & 368 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets).
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md).

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.4/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
"@geonovum/ogc-checker": minor
3+
---
4+
5+
Adopt the **Standard → Version** model from `@geonovum/standards-checker`.
6+
7+
Each OGC standard — JSON-FG and OGC API Features / Processes / Records — is now a first-class
8+
`Standard` that owns an explicit version, rather than a bare ruleset slug. A single `Standard[]`
9+
config drives both the web app and the CLI.
10+
11+
- **CLI:** validate with `--standard <slug>` and optional `--version <id>` (default = the latest
12+
`final` version). The old `--ruleset <slug>` flag keeps working as a **deprecated** alias that
13+
warns on stderr and resolves to the equivalent standard/version.
14+
- **UI:** the header gains a standard selector and an always-visible version selector; the URL anchor
15+
is `/#/{standard}/{version}` and legacy single-slug URLs redirect to it.

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
node-version: ${{ matrix.node-version }}
2424
cache: 'pnpm'
2525
- run: pnpm install --frozen-lockfile
26+
- run: pnpm dedupe --check
2627
- run: pnpm build
2728
- run: pnpm lint
2829
- run: pnpm test run

.github/workflows/publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
exit 1
3838
fi
3939
- run: pnpm install --frozen-lockfile
40+
- run: pnpm dedupe --check
4041
- run: pnpm build
4142
- run: |
4243
VERSION=$(node -p "require('./package.json').version")

README.md

Lines changed: 45 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Validates JSON-FG documents and OGC API endpoints against OGC specifications.
66

77
Built on [`@geonovum/standards-checker`](https://github.com/Geonovum/standards-checker); see its documentation for the validation engine, CLI toolkit, and web UI framework.
88

9+
Release notes are in [`CHANGELOG.md`](CHANGELOG.md); see [Versioning & releasing](#versioning--releasing) for how it is produced.
10+
911
**Demo:** https://geonovum.github.io/ogc-checker/
1012

1113
## CLI
@@ -14,45 +16,62 @@ Built on [`@geonovum/standards-checker`](https://github.com/Geonovum/standards-c
1416

1517
```bash
1618
# From a local file
17-
npx @geonovum/ogc-checker@latest validate --ruleset json-fg --input ./data/spec.json
19+
npx @geonovum/ogc-checker@latest validate --standard json-fg --input ./data/spec.json
1820

1921
# From a URL
20-
npx @geonovum/ogc-checker@latest validate --ruleset json-fg --input https://example.com/spec.json
22+
npx @geonovum/ogc-checker@latest validate --standard json-fg --input https://example.com/spec.json
2123

2224
# From stdin
23-
cat spec.json | npx @geonovum/ogc-checker@latest validate --ruleset json-fg
25+
cat spec.json | npx @geonovum/ogc-checker@latest validate --standard json-fg
2426
```
2527

2628
### Install globally
2729

2830
```bash
2931
npm install -g @geonovum/ogc-checker@latest
30-
ogc-checker validate --ruleset json-fg --input ./data/spec.json
32+
ogc-checker validate --standard json-fg --input ./data/spec.json
3133
```
3234

3335
### From a local clone
3436

3537
```bash
3638
pnpm install
3739
pnpm build:cli
38-
node dist/cli.mjs validate --ruleset json-fg --input ./data/spec.json
40+
node dist/cli.mjs validate --standard json-fg --input ./data/spec.json
3941
```
4042

41-
Available rulesets: `json-fg`, `ogc-api-features`, `ogc-api-processes`, `ogc-api-records`.
43+
Available standards: `json-fg`, `ogc-api-features`, `ogc-api-processes`, `ogc-api-records`. Each currently
44+
ships a single version, so `--version` is optional and defaults to it (`ogc-api-processes` is `2.0`, a draft).
45+
46+
The old `--ruleset <slug>` flag still works as a **deprecated** alias (it prints a warning on stderr and
47+
resolves the old slug to the same standard/version): `--ruleset json-fg` == `--standard json-fg --version 1.0`.
4248

4349
### CLI flags
4450

45-
| Flag | Description | Default |
46-
| ------------------- | ----------------------------------------- | ------------ |
47-
| `--ruleset <name>` | Ruleset to run (listed in `--help`) | _(required)_ |
48-
| `--input <file\|->` | Input file, URL, or `-` for stdin | `-` |
49-
| `--format <fmt>` | Output: `table`, `json` | `table` |
50-
| `--fail-on <level>` | Exit code policy: `none`, `warn`, `error` | `error` |
51+
| Flag | Description | Default |
52+
| ------------------- | ------------------------------------------------- | ------------------ |
53+
| `--standard <slug>` | Standard to validate against | _(required)_ |
54+
| `--version <id>` | Version of the standard | latest final |
55+
| `--ruleset <slug>` | **Deprecated** alias for `--standard`/`--version` ||
56+
| `--input <file\|->` | Input file, URL, or `-` for stdin | `-` |
57+
| `--format <fmt>` | Output: `table`, `json` | `table` |
58+
| `--fail-on <level>` | Exit code policy: `none`, `warn`, `error` | `error` |
5159

5260
Exit codes: `0` = pass, `1` = failed per `--fail-on` policy, `>1` = unexpected error.
5361

5462
## Specifications
5563

64+
Each specification below maps to a **standard** in the checker; its requirement table lists the
65+
conformance classes of that standard's current version. Pick the standard in the header, then the
66+
version:
67+
68+
| Standard (`--standard`) | Version (`--version`) | Status | Covers |
69+
| ----------------------- | --------------------- | ------ | --------------------------------------------------------- |
70+
| `json-fg` | `1.0.0` | final | JSON-FG |
71+
| `ogc-api-features` | `1.0.1` | final | OGC API - Features Part 1 (Core) and Part 2 (CRS by ref.) |
72+
| `ogc-api-processes` | `2.0.0` | draft | OGC API - Processes Part 1 (Core) |
73+
| `ogc-api-records` | `1.0.0` | final | OGC API - Records Part 1 (Core) |
74+
5675
### JSON-FG
5776

5877
Version: 1.0.0 — [Specification](https://docs.ogc.org/is/21-045r1/21-045r1.html)
@@ -277,19 +296,25 @@ pnpm install
277296
Run a single test file:
278297

279298
```bash
280-
npx vitest run src/specs/json-fg/rulesets/core.test.ts
299+
npx vitest run src/standards/json-fg/rulesets/core.test.ts
281300
```
282301

283-
### Publishing
302+
### Versioning & releasing
284303

285-
Published to npm automatically when a version tag is pushed:
304+
Versioning, the changelog, and publishing are driven by [Changesets](https://changesets.dev/). Describing a change is decoupled from cutting a release:
286305

287-
```bash
288-
git tag v1.0.0
289-
git push --tags
290-
```
306+
1. **Add a changeset with your change.** Run `pnpm changeset`, pick the bump (`major` / `minor` / `patch`), and write a one-line summary. This creates a `.changeset/<name>.md` file — commit it with your PR. Omit only for changes that don't affect the published package (CI, internal docs, tests).
307+
308+
2. **Cut the release.** Run `pnpm version-packages` (alias for `changeset version`). It consumes the pending `.changeset/*.md` files, bumps `package.json`, and prepends the summaries to `CHANGELOG.md`. Review and commit the result. Don't hand-edit the `version` field — Changesets owns it.
309+
310+
3. **Publish.** Tag the released version and push; the CI workflow verifies `package.json` matches the tag, builds, tests, publishes to npm, and deploys to GitHub Pages:
311+
312+
```bash
313+
git tag v1.1.0
314+
git push --tags
315+
```
291316

292-
This triggers the CI workflow that builds, tests, publishes to npm, and deploys to GitHub Pages.
317+
`pnpm release` (`pnpm build && changeset publish`) publishes to npm locally if you need to bypass the workflow (it does not deploy Pages).
293318

294319
## License
295320

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,22 @@
2727
"lint": "eslint .",
2828
"lint:fix": "eslint . --fix",
2929
"preview": "vite preview",
30-
"test": "vitest"
30+
"test": "vitest",
31+
"changeset": "changeset",
32+
"version-packages": "changeset version",
33+
"release": "pnpm build && changeset publish"
3134
},
3235
"prettier": "@geonovum/standards-checker/prettier",
3336
"dependencies": {
34-
"@geonovum/standards-checker": "^1.1.4",
37+
"@geonovum/standards-checker": "1.2.0-beta.2",
3538
"luxon": "^3.7.2",
3639
"ramda": "^0.32.0",
3740
"react": "^19.2.7",
3841
"react-dom": "^19.2.7",
3942
"react-router-dom": "^7.18.1"
4043
},
4144
"devDependencies": {
45+
"@changesets/cli": "^2.31.0",
4246
"@types/luxon": "^3.7.2",
4347
"@types/ramda": "^0.32.0",
4448
"esbuild": "^0.28.1",

0 commit comments

Comments
 (0)