Skip to content

27 transform cascara to json ld#100

Open
odungern wants to merge 17 commits into
devfrom
27-transform-cascara-to-json-ld
Open

27 transform cascara to json ld#100
odungern wants to merge 17 commits into
devfrom
27-transform-cascara-to-json-ld

Conversation

@odungern
Copy link
Copy Markdown
Contributor

The latest commits finalize the write-to-file-as-jsonld.

  • The json-ld properties are sorted in a canonical sequence.
  • The package-cache has been reworked to exhibit set/get/save/load/clear methods.

Copilot AI review requested due to automatic review settings May 23, 2026 16:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds JSON-LD export support, canonicalizes JSON-LD output, and refactors package caching so imported packages can persist across sessions.

Changes:

  • Adds a central JSON-LD export dispatcher, key sorting, package graph/context JSON-LD transforms, and file-writing support.
  • Reworks package cache usage from usePackageCache to PackageCache with localStorage persistence.
  • Updates metamodel fixtures/tests for cas:Iconcas:icon and expands JSON-LD roundtrip coverage.

Reviewed changes

Copilot reviewed 34 out of 38 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
src/common/export/jsonld/getJSONLD.ts Adds central JSON-LD export dispatcher and package graph filtering.
src/common/lib/helpers.ts Adds canonical JSON-LD key sorting helper.
src/common/lib/platform-independence.ts Adds cross-platform PLI.writeFile() support.
src/common/lib/messages.ts Adds/renumbers package validation and file-write messages.
src/common/lib/mvf.ts Updates JSON-LD/XML vocabulary mappings for graph, icon, and unit.
src/common/import/jsonld/import-jsonld.ts Uses new validation message code.
src/common/schema/pig/ts/pig-metaclasses.ts Adds JSON-LD export transforms and adjusts datatype/default handling.
src/common/schema/pig/ts/pig-package-constraints.ts Updates constraint documentation comments.
src/common/schema/pig/ts/platform-independence.ts Adds an empty placeholder file.
src/common/schema/README.md Adds brief schema folder documentation.
src/stores/packageCache.ts Removes old package cache store.
src/stores/package-cache.ts Adds persistent package cache store API.
src/plugins/export/jsonld/export-jsonld.vue Replaces placeholder export dialog with JSON-LD export workflow.
src/plugins/export/jsonld/README.md Adds JSON-LD export plugin documentation.
src/plugins/import/xml/import-xml.vue Updates imports to use the new package cache API.
src/plugins/import/reqif/import-reqif.vue Updates imports to use the new package cache API.
src/plugins/import/jsonld/import-jsonld.vue Updates imports to use the new package cache API.
src/components/PageDocument.vue Reads packages through the persistent cache.
src/examples/writeFile-example.ts Adds examples for PLI.writeFile().
tests/unit/pig-metaclasses.spec.ts Updates JSON-LD @type expectations.
tests/unit/pig-metaclasses-xml.spec.ts Updates XML tests for lowercase cas:icon.
tests/unit/pig-metaclasses-jsonld.spec.ts Adds JSON-LD export roundtrip assertions.
tests/data/XML/21/Project 'Very Simple Model (FMC) with Requirements'.cas.xml Removes cas:Icon property definition/references.
tests/data/XML/11/Alice.cas.xml Removes cas:Icon property definition/references.
tests/data/XML/05/Project 'Requirement with Enumerated Property'.cas.xml Removes cas:Icon property definition/references.
tests/data/TTL/11/Alice.cas.ttl Updates TTL metamodel links and removes icon shape.
tests/data/TTL/05/Project 'Requirement with Enumerated Property'.cas.ttl Renames cas:Icon to cas:icon.
tests/data/JSON-LD/27/Dimmer - Semantically Integrated Specification (2021-01-28).cas.jsonld Renames JSON-LD icon fields.
tests/data/JSON-LD/21/Project 'Very Simple Model (FMC) with Requirements'.cas.jsonld Renames JSON-LD icon fields.
tests/data/JSON-LD/05/Project 'Requirement with Enumerated Property'.cas.jsonld Renames JSON-LD icon fields.
public/assets/jsonld/Entity.json Updates schema property from cas:Icon to cas:icon.
public/assets/jsonld/Relationship.json Updates schema property from cas:Icon to cas:icon.
public/assets/index.html Adds heading IDs and updates wording.
public/.htaccess Expands rewrite and cache-control configuration.
public/assets/.htaccess Adds asset cache-control configuration.
public/assets/xslt/ReqIF-to-CAS.sef.json Regenerates compiled ReqIF XSLT artifact.
src/build-info.ts Regenerates build metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/common/export/jsonld/getJSONLD.ts Outdated
Comment thread src/plugins/export/jsonld/README.md
Comment thread src/plugins/export/jsonld/README.md
Comment thread src/plugins/export/jsonld/README.md
Comment thread src/plugins/export/jsonld/export-jsonld.vue
Comment thread public/.htaccess Outdated
Comment thread public/assets/.htaccess Outdated
Comment thread public/assets/.htaccess Outdated
Comment thread src/common/schema/pig/ts/pig-package-constraints.ts Outdated
Comment thread src/common/export/jsonld/getJSONLD.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants