
Product
Introducing Socket Scanning for VS Code Marketplace Extensions
Socket now scans VS Code extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.
@fedify/vocab-tools
Advanced tools
This package contains the utilities for working with Activity Vocabulary objects, which are auto-generated from the IDL.
deno add @fedify/vocab-tools
npm install @fedify/vocab-tools
pnpm add @fedify/vocab-tools
yarn add @fedify/vocab-tools
Run development tasks from the repository root with mise.
The code generator has separate output snapshots for Deno, Node.js, and Bun. When a change affects generated output, update all three from the repository root:
mise run test:update_snapshots
Review and commit every changed snapshot file. Updating only one runtime leaves the other test suites with stale expectations.
A property schema can set extraContext to a context URL. The generated
serializer adds it to its default context when the property's expanded IRI
appears after compaction, including inside nested objects. A caller-provided
context takes precedence. When populated, such a property uses the JSON-LD
processor so context container rules, including @set, are respected.
A type schema can set trustEmbeddedObjects: false when its identifier is
metadata rather than a resource that establishes an origin. Its own
entity-valued accessors then fetch embedded objects with identifiers instead
of trusting a matching origin. Locally constructed values, previously fetched
values, and the explicit crossOrigin: "trust" option retain their usual
behavior. This does not verify id-less embedded objects or establish publishing
authority.
Both functional and non-functional property schemas can declare synonyms in
redundantProperties. On reading, the canonical property takes precedence,
followed by synonyms in declaration order. The first non-empty raw value set
is decoded in full, preserving its order and multiplicity. Values from other
synonyms are never merged, even when the selected values fail range validation.
List and graph containers are decoded only after choosing the property.
redundantPropertiesWrite defaults to all, which writes the canonical
property and every synonym with the same complete container representation.
Set it to canonical to write only the canonical property while still accepting
synonyms on reading:
- singularName: license
pluralName: licenses
uri: "https://example.com/license"
description: The licenses of the object.
range:
- "http://www.w3.org/2001/XMLSchema#anyURI"
redundantProperties:
- uri: "https://schema.org/license"
- uri: "http://creativecommons.org/ns#license"
redundantPropertiesWrite: canonical
A synonym's compactName is optional. Without it, serialization uses the
JSON-LD processor to select a context term or retain the full URI. For IRI
values, context terms must declare "@type": "@id"; container terms must
carry the appropriate @container. Writable container synonyms also use the
processor to preserve their representation. Explicit caller contexts take
precedence over the default context.
As with other properties, an object parsed with fromJsonLd() retains its
original JSON-LD document for default serialization. Pass format: "compact"
or format: "expand" to serialize its decoded values under the write policy.
FAQs
Code generator for Activity Vocabulary APIs
The npm package @fedify/vocab-tools receives a total of 22,789 weekly downloads. As such, @fedify/vocab-tools popularity was classified as popular.
We found that @fedify/vocab-tools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.

Product
Socket now scans VS Code extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.

Research
/Security News
Socket uncovered two malicious VS Code themes in a GlassWorm-linked cluster with thousands of installs across VS Code Marketplace and Open VSX.

Security News
/Company News
Capital One is partnering with Socket to proactively secure its open source supply chain.