v0.15.0
Breaking
-
sdo_jsd.getMetaSchemata()
has been replaced withsdo_jsd.META_SCHEMATA
, an already-resolved Promise -
sdo_jsd.getSchemata()
has been replaced withsdo_jsd.SCHEMATA
, an already-resolved Promise -
sdoValidate
first param type is narrowed toJSONLDObject
(previouslyJSONLDDocument
) — you can still send in a JSON-LD document, but it will silently pass without throwing an error, even if invalid - if using
ajv
to validate your own schema, must call.addSchema(await sdo_jsd.JSONLD_SCHEMA)
before calling.addSchema(await sdo_jsd.SCHEMATA)
since that is now excluded from the codebase (see README for details) - remove file
/schema/json-ld.jsd
and link to https://cdn.jsdelivr.net/gh/json-ld/[email protected]/schemas/jsonld-schema.json instead (exported assdo_jsd.JSONLD_SCHEMA
)
Features
- export Schema.org vocabulary interfaces along with index file:
// import * as sdo from 'schemaorg-jsd/dist/schemaorg.d' // old way import * as sdo from 'schemaorg-jsd' // new way
- migrate some core functionality to
@chharvey/requirejson
, includingrequireJSON
and some TypeScript interfaces - add TypeScript interfaces for some JSON types (JSON meta-schema and JSON-LD for
rdfs:Class
es andrdf:Property
s)
Fixes
- the
.details
property of the error thrown bysdoValidate()
now contains all the validation errors, instead of just the first one - update docs
- simplify gulp build tasks
- TypeScript v3.3
- Gulp v4