Skip to content
Open
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
2 changes: 1 addition & 1 deletion apps/electron/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gts-viewer/electron",
"version": "0.3.0",
"version": "0.3.1",
"description": "GTS Viewer Electron Application",
"main": "dist/main/main.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion apps/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gts/server",
"version": "0.3.0",
"version": "0.3.1",
"private": true,
"type": "module",
"main": "./dist/index.js",
Expand Down
21 changes: 20 additions & 1 deletion apps/vscode-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,26 @@

All notable changes to the GTS Viewer extension will be documented in this file.

## [Unreleased]
## [0.3.1] - 2026-10-26

### Added
- Explorer actions and context menus in the GTS file tree and viewer tree
- Per-folder Rescan button in the GTS file tree (progress shown on the folder row), plus scan and validation progress at the top of the tree
- Transitive `any-valid` validation: an instance referencing an invalid entity is reported as invalid

### Changed
- Validation rebased on `gts-ts` v0.11.0 (GTS spec 0.17): `x-gts-ref` is replaced by `x-gts-type-ref`, `x-gts-instance-ref` and `x-gts-pattern-ref`; schema regexes must follow the GTS safe regex profile; `re2.wasm` is no longer shipped
- Much faster, non-blocking scans and validation of large workspaces (100K+ files)
- One problem severity and standard problem decorations for all GTS problems

### Fixed
- Diagnostics anchored to the offending node instead of `$id`; fewer false positives (`gts://` in URL fields, GTS-id-shaped scalar values, `x-gts-pattern-ref` operands and `x-gts-traits` values)
- Instances of invalid types, duplicate and malformed GTS ids are reported everywhere
- Rescan starts immediately and fully rebuilds the GTS store; files open from the tree without delay during scans
- Deleted files are dropped from discovery; not-yet-validated files show "validation pending" instead of green
- Stack overflow on workspaces with 100K+ files
- Workspace validation stalling on large workspaces when other extensions react to diagnostics changes


## [0.3.0] - 2026-09-18

Expand Down
11 changes: 4 additions & 7 deletions apps/vscode-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ GTS supports **type derivation** through chaining: a derived type extends a base

**1. Base type** -- defines the common fields every user has:

```jsonc
// file: gts.x.core.idp.user.v1~.schema.json
```json
{
"$id": "gts://gts.x.core.idp.user.v1~",
"$schema": "http://json-schema.org/draft-07/schema#",
Expand All @@ -29,7 +28,7 @@ GTS supports **type derivation** through chaining: a derived type extends a base
"required": ["id", "type", "email", "display_name", "status"],
"properties": {
"id": { "type": "string", "format": "uuid" },
"type": { "type": "string", "x-gts-ref": "/$id" },
"type": { "type": "string", "x-gts-type-ref": "/$id" },
"email": { "type": "string", "format": "email" },
"display_name": { "type": "string" },
"properties": { "type": "object" }
Expand All @@ -39,8 +38,7 @@ GTS supports **type derivation** through chaining: a derived type extends a base

**2. Derived type** -- extends the base with admin-specific fields. The chained `$id` shows that `platform_admin` inherits from `user`:

```jsonc
// file: gts.x.core.idp.user.v1~x.core.idp.platform_admin.v1~.schema.json
```json
{
"$id": "gts://gts.x.core.idp.user.v1~x.core.idp.platform_admin.v1~",
"$schema": "http://json-schema.org/draft-07/schema#",
Expand All @@ -67,8 +65,7 @@ GTS supports **type derivation** through chaining: a derived type extends a base

**3. Instance** -- a concrete platform administrator that conforms to the derived type:

```jsonc
// file: gts.x.core.idp.user.v1~x.core.idp.platform_admin.v1~.examples.jsonc
```json
{
"id": "f0e1d2c3-b4a5-6789-0123-456789abcdef",
"type": "gts.x.core.idp.user.v1~x.core.idp.platform_admin.v1~",
Expand Down
25 changes: 0 additions & 25 deletions apps/vscode-extension/build.mjs
Original file line number Diff line number Diff line change
@@ -1,29 +1,5 @@
import * as esbuild from 'esbuild'
import { promises as fs } from 'fs'
import path from 'path'
import { createRequire } from 'module'

const require = createRequire(import.meta.url)

/**
* gts-ts compiles schema patterns with re2-wasm, which loads its `re2.wasm`
* binary from the directory of the running script. Bundled, that is `dist/`,
* so the binary must sit next to `dist/extension.js` or the extension throws
* on load. Resolved through gts-ts so it's the exact copy gts-ts depends on.
*
* @type {esbuild.Plugin}
*/
const copyRe2WasmPlugin = {
name: 'copy-re2-wasm',
setup(build) {
build.onEnd(async result => {
if (result.errors.length > 0) return
const gtsTsDir = path.dirname(require.resolve('@globaltypesystem/gts-ts/package.json', { paths: ['../../packages/shared'] }))
const re2Dir = path.dirname(require.resolve('re2-wasm/package.json', { paths: [gtsTsDir] }))
await fs.copyFile(path.join(re2Dir, 'build', 'wasm', 're2.wasm'), path.join('dist', 're2.wasm'))
})
},
}

const production = process.argv.includes('--production')
const watch = process.argv.includes('--watch')
Expand Down Expand Up @@ -64,7 +40,6 @@ async function main() {
mainFields: ['module', 'main'],
plugins: [
esbuildProblemMatcherPlugin,
copyRe2WasmPlugin,
],
})

Expand Down
24 changes: 23 additions & 1 deletion apps/vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "gts-kit",
"displayName": "Global Type System (GTS) Kit",
"description": "Global Type System (GTS) support for VS Code — browse, validate,visualize, and manage GTS schemas and instances",
"version": "0.3.0",
"version": "0.3.1",
"private": true,
"publisher": "GlobalTypeSystem",
"license": "Apache-2.0",
Expand Down Expand Up @@ -59,6 +59,12 @@
"category": "GTS",
"icon": "$(refresh)"
},
{
"command": "gts-kit.rescanFolder",
"title": "Rescan Folder",
"category": "GTS",
"icon": "$(refresh)"
},
{
"command": "gts-kit.openToSide",
"title": "Open to the Side"
Expand Down Expand Up @@ -137,7 +143,23 @@
"when": "resourceExtname =~ /\\.(json|jsonc|gts)$/"
}
],
"commandPalette": [
{
"command": "gts-kit.rescanFolder",
"when": "false"
}
],
"view/item/context": [
{
"command": "gts-kit.rescanFolder",
"group": "inline",
"when": "view == gts-kit.fileExplorer && viewItem == gtsFolder"
},
{
"command": "gts-kit.rescanFolder",
"group": "navigation@10",
"when": "view == gts-kit.fileExplorer && viewItem == gtsFolder"
},
{
"command": "gts-kit.openToSide",
"group": "navigation@10",
Expand Down
Loading