
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@colophon/schema
Advanced tools
Schema & Validator for Colophon
# | status |
---|---|
2.0 | stable |
1.1 | deprecated |
1.0 | deprecated |
see an example of this repo's own
.colophon.yml
...
Available as an npm
package for validation purposes, exposes validation helper, and the schema itself (compatible with any JSON Schema validation tool)
npm install @colophon/schema
const parser = require('@colophon/schema')
const { schema, regex } = require('@colophon/schema/versions/latest')
const schemas = require('@colophon/schema/versions')
const { schema, regex } = schemas['1.0']
parser(colophon: String | Object): Promise<Object>
Resolves with
content
as a valid JavaScript Colophon Object Rejects withColophonError
on invalid schema test
const parser = require('@colophon/schema')
const valid = { ... } // supply an Object or YAML String
const colophon = await parser(valid)
// colophon is a JavaScript Object (parsed from YAML string, or returned as is)
const parser = require('@colophon/schema')
// invalid
const invalid = `
version: 2.0
id: my-app
`
parser(invalid)
.then(colophon)
.catch(err => console.error(err.message, err.errors))
// invalid colophon content
// "err.errors" object contains schema errors
// e.g. "err.errors": [ { message: "should have required property 'contacts'" } ]
// see https://github.com/epoberezkin/ajv#validation-errors for details
}
Author: Ahmad Nassri • Github: @project-colophon • Twitter: @ColophonID
FAQs
Schema & Validator for https://colophon.id
The npm package @colophon/schema receives a total of 3 weekly downloads. As such, @colophon/schema popularity was classified as not popular.
We found that @colophon/schema demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.