Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 78 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
tags:
- "json-document-v*-rc.*"
- "json-document-extensions-v*-rc.*"

permissions:
contents: read
Expand All @@ -30,7 +31,8 @@ jobs:
node-version: "24"
registry-url: "https://registry.npmjs.org"
package-manager-cache: false
- name: Verify prerelease identity
- name: Verify core prerelease identity
if: startsWith(github.ref_name, 'json-document-v')
env:
RELEASE_TAG: ${{ github.ref_name }}
run: |
Expand All @@ -48,7 +50,81 @@ jobs:
throw new Error("publishConfig.tag must remain next for prereleases");
}
'
- name: Verify extension prerelease identity
if: startsWith(github.ref_name, 'json-document-extensions-v')
env:
RELEASE_TAG: ${{ github.ref_name }}
run: |
node --input-type=module --eval '
import { readFileSync } from "node:fs";
const packagePaths = [
"packages/grouping/package.json",
"packages/patch-preview/package.json",
"packages/search-replace/package.json",
];
const expectedNames = [
"@interactive-os/json-document-grouping",
"@interactive-os/json-document-patch-preview",
"@interactive-os/json-document-search-replace",
];
const packages = packagePaths.map((path) =>
JSON.parse(readFileSync(path, "utf8"))
);
const versions = new Set(packages.map((pkg) => pkg.version));
if (versions.size !== 1) {
throw new Error("extension prerelease versions must match");
}
const [version] = versions;
const expectedTag = `json-document-extensions-v${version}`;
if (process.env.RELEASE_TAG !== expectedTag) {
throw new Error(`release tag ${process.env.RELEASE_TAG} does not match ${expectedTag}`);
}
if (!/^\d+\.\d+\.\d+-rc\.\d+$/.test(version)) {
throw new Error(`extension version is not an rc prerelease: ${version}`);
}
for (const [index, pkg] of packages.entries()) {
if (pkg.name !== expectedNames[index]) {
throw new Error(`${packagePaths[index]} has unexpected name ${pkg.name}`);
}
if (pkg.publishConfig?.tag !== "next") {
throw new Error(`${pkg.name} publishConfig.tag must remain next`);
}
if (pkg.publishConfig?.access !== "public" || pkg.publishConfig?.provenance !== true) {
throw new Error(`${pkg.name} must publish publicly with provenance`);
}
if (pkg.peerDependencies?.["@interactive-os/json-document"] !== "^1.0.1 || ^1.1.0-rc.0") {
throw new Error(`${pkg.name} does not accept the core integration RC`);
}
}
'
- name: Install dependencies
run: npm ci --no-audit --no-fund
- name: Publish prerelease
- name: Verify extension prereleases
if: startsWith(github.ref_name, 'json-document-extensions-v')
run: |
version=$(node -p 'require("./packages/grouping/package.json").version')
for package in \
@interactive-os/json-document-grouping \
@interactive-os/json-document-patch-preview \
@interactive-os/json-document-search-replace
do
if npm view "$package@$version" version >/dev/null 2>&1; then
echo "::error::$package@$version is already published"
exit 1
fi
npm run verify -w "$package"
npm pack -w "$package" --dry-run --cache "${RUNNER_TEMP}/npm-cache"
done
- name: Publish core prerelease
if: startsWith(github.ref_name, 'json-document-v')
run: npm publish -w @interactive-os/json-document --tag next --provenance
- name: Publish extension prereleases
if: startsWith(github.ref_name, 'json-document-extensions-v')
run: |
for package in \
@interactive-os/json-document-grouping \
@interactive-os/json-document-patch-preview \
@interactive-os/json-document-search-replace
do
npm publish -w "$package" --tag next --provenance
done
12 changes: 6 additions & 6 deletions apps/site/src/generated/repo-catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ export const repoCatalog = {
"status": "official-extension",
"private": false,
"publishable": true,
"version": "0.1.0",
"version": "0.1.1-rc.0",
"description": "Official structural group and ungroup extension functions for json-document documents.",
"license": "MIT",
"summary": "Official extension for structural `group` and `ungroup`.",
Expand Down Expand Up @@ -628,7 +628,7 @@ export const repoCatalog = {
"status": "official-extension",
"private": false,
"publishable": true,
"version": "0.1.0",
"version": "0.1.1-rc.0",
"description": "Official patch preview extension functions for dry-running json-document document patches.",
"license": "MIT",
"summary": "Official headless patch preview extension for `@interactive-os/json-document` documents.",
Expand Down Expand Up @@ -835,7 +835,7 @@ export const repoCatalog = {
"status": "official-extension",
"private": false,
"publishable": true,
"version": "0.1.0",
"version": "0.1.1-rc.0",
"description": "Official search and replace extension functions for text fields in json-document documents.",
"license": "MIT",
"summary": "Official headless search and replace extension for text fields in `@interactive-os/json-document`\ndocuments.",
Expand Down Expand Up @@ -1219,7 +1219,7 @@ export const repoCatalog = {
"status": "official-extension",
"private": false,
"publishable": true,
"version": "0.1.0",
"version": "0.1.1-rc.0",
"description": "Official structural group and ungroup extension functions for json-document documents.",
"license": "MIT",
"summary": "Official extension for structural `group` and `ungroup`.",
Expand Down Expand Up @@ -1372,7 +1372,7 @@ export const repoCatalog = {
"status": "official-extension",
"private": false,
"publishable": true,
"version": "0.1.0",
"version": "0.1.1-rc.0",
"description": "Official patch preview extension functions for dry-running json-document document patches.",
"license": "MIT",
"summary": "Official headless patch preview extension for `@interactive-os/json-document` documents.",
Expand Down Expand Up @@ -1579,7 +1579,7 @@ export const repoCatalog = {
"status": "official-extension",
"private": false,
"publishable": true,
"version": "0.1.0",
"version": "0.1.1-rc.0",
"description": "Official search and replace extension functions for text fields in json-document documents.",
"license": "MIT",
"summary": "Official headless search and replace extension for text fields in `@interactive-os/json-document`\ndocuments.",
Expand Down
10 changes: 10 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ The unified mutation success result described below changes the runtime shape
published in `1.0.1`. Treat it as an integration experiment, not a stable 1.x
compatibility promise. Its final shape must be decided before a stable release.

Companion integration prereleases are published under the `next` dist-tag for
`@interactive-os/json-document-grouping`,
`@interactive-os/json-document-patch-preview`, and
`@interactive-os/json-document-search-replace` at `0.1.1-rc.0`. They keep their
stable `0.1.0` APIs and expand the core peer range to
`^1.0.1 || ^1.1.0-rc.0`, allowing `canvas` to exercise a registry-only RC graph.
The grouping RC also commits its documented `selectionAfter` atomically with
the structural patch, so undo and redo restore the matching selection state.
Each companion RC tarball now includes the repository MIT license text.

### Added

- Added `doc.query(jsonpath)` and `doc.canQuery(jsonpath)` as the canonical
Expand Down
12 changes: 6 additions & 6 deletions docs/generated/repo-catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
"status": "official-extension",
"private": false,
"publishable": true,
"version": "0.1.0",
"version": "0.1.1-rc.0",
"description": "Official structural group and ungroup extension functions for json-document documents.",
"license": "MIT",
"summary": "Official extension for structural `group` and `ungroup`.",
Expand Down Expand Up @@ -627,7 +627,7 @@
"status": "official-extension",
"private": false,
"publishable": true,
"version": "0.1.0",
"version": "0.1.1-rc.0",
"description": "Official patch preview extension functions for dry-running json-document document patches.",
"license": "MIT",
"summary": "Official headless patch preview extension for `@interactive-os/json-document` documents.",
Expand Down Expand Up @@ -834,7 +834,7 @@
"status": "official-extension",
"private": false,
"publishable": true,
"version": "0.1.0",
"version": "0.1.1-rc.0",
"description": "Official search and replace extension functions for text fields in json-document documents.",
"license": "MIT",
"summary": "Official headless search and replace extension for text fields in `@interactive-os/json-document`\ndocuments.",
Expand Down Expand Up @@ -1218,7 +1218,7 @@
"status": "official-extension",
"private": false,
"publishable": true,
"version": "0.1.0",
"version": "0.1.1-rc.0",
"description": "Official structural group and ungroup extension functions for json-document documents.",
"license": "MIT",
"summary": "Official extension for structural `group` and `ungroup`.",
Expand Down Expand Up @@ -1371,7 +1371,7 @@
"status": "official-extension",
"private": false,
"publishable": true,
"version": "0.1.0",
"version": "0.1.1-rc.0",
"description": "Official patch preview extension functions for dry-running json-document document patches.",
"license": "MIT",
"summary": "Official headless patch preview extension for `@interactive-os/json-document` documents.",
Expand Down Expand Up @@ -1578,7 +1578,7 @@
"status": "official-extension",
"private": false,
"publishable": true,
"version": "0.1.0",
"version": "0.1.1-rc.0",
"description": "Official search and replace extension functions for text fields in json-document documents.",
"license": "MIT",
"summary": "Official headless search and replace extension for text fields in `@interactive-os/json-document`\ndocuments.",
Expand Down
14 changes: 14 additions & 0 deletions docs/public/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ Extension은 core에 plugin으로 등록하지 않습니다. public `JSONDocumen
npm install @interactive-os/json-document @interactive-os/json-document-collection
```

`1.1.0-rc.0` integration testing uses exact versions and the `next` dist-tag.
The companion RC set for `canvas` is:

```sh
npm install --save-exact \
@interactive-os/json-document@1.1.0-rc.0 \
@interactive-os/json-document-grouping@0.1.1-rc.0 \
@interactive-os/json-document-patch-preview@0.1.1-rc.0 \
@interactive-os/json-document-search-replace@0.1.1-rc.0
```

This RC set is an opt-in integration graph. Stable consumers continue to use
the packages' `latest` dist-tags.

## 공식 extension

공식 extension 목록과 lab 후보 목록은 repo catalog에서 생성됩니다. `packages/*`에 있는 publishable `@interactive-os/json-document-*` package가 공식 extension이고, `labs/extensions/*`는 후보입니다. public 문서에서 lab package를 공식 extension이라고 부르지 않습니다.
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions packages/grouping/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 json-document contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 4 additions & 0 deletions packages/grouping/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Official extension for structural `group` and `ungroup`.

> `0.1.1-rc.0` is a companion prerelease for
> `@interactive-os/json-document@1.1.0-rc.0`. Pin both versions exactly while
> the core mutation result contract is under integration testing.

## Scope

- select contiguous sibling JSON array items
Expand Down
7 changes: 4 additions & 3 deletions packages/grouping/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@interactive-os/json-document-grouping",
"version": "0.1.0",
"version": "0.1.1-rc.0",
"description": "Official structural group and ungroup extension functions for json-document documents.",
"type": "module",
"license": "MIT",
Expand All @@ -15,7 +15,8 @@
"publishConfig": {
"access": "public",
"provenance": true,
"registry": "https://registry.npmjs.org/"
"registry": "https://registry.npmjs.org/",
"tag": "next"
},
"keywords": [
"@interactive-os/json-document",
Expand All @@ -42,7 +43,7 @@
"verify": "npm run typecheck && npm test && npm run build"
},
"peerDependencies": {
"@interactive-os/json-document": "^1.0.0"
"@interactive-os/json-document": "^1.0.1 || ^1.1.0-rc.0"
},
"devDependencies": {
"typescript": "^5.0.0",
Expand Down
Loading