Skip to content

27 transform cascara to json ld#100

Merged
csaenz-psg merged 17 commits into
devfrom
27-transform-cascara-to-json-ld
Jun 8, 2026
Merged

27 transform cascara to json ld#100
csaenz-psg merged 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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

@csaenz-psg csaenz-psg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The code looks good although there are a lot of changes in this one merge request. These branches should remain small. If the Id --> id change could have been its own branch, that should be done separately. Otherwise, make sure the copilot doesn't delete old files and generating new files like with packageChache.ts.

Comment thread src/stores/packageCache.ts
@odungern

odungern commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

The code looks good although there are a lot of changes in this one merge request. These branches should remain small. If the Id --> id change could have been its own branch, that should be done separately. Otherwise, make sure the copilot doesn't delete old files and generating new files like with packageChache.ts.

@csaenz-psg: I agree that fewer changes in a branch are preferrable to minimize merging problems. However, what to do in this situation where all the changes have already been applied? Can't separate commits a-posteriori, or can we?

@csaenz-psg csaenz-psg merged commit 2286d96 into dev Jun 8, 2026
2 checks passed
@odungern odungern deleted the 27-transform-cascara-to-json-ld branch June 10, 2026 17:02
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.

4 participants