@startupjs/sharedb-schema
Advanced tools
Comparing version 0.55.0-alpha.1 to 0.55.0-alpha.12
@@ -1,4 +0,4 @@ | ||
const Schema = require('./Schema') | ||
import Schema from './Schema.js' | ||
module.exports = function plugin (backend, options) { | ||
export default function schema (backend, options) { | ||
const schema = new Schema(backend, options) | ||
@@ -5,0 +5,0 @@ |
@@ -1,4 +0,4 @@ | ||
const ZSchema = require('z-schema') | ||
import ZSchema from 'z-schema' | ||
class Schema { | ||
export default class Schema { | ||
constructor (backend, options = {}) { | ||
@@ -17,3 +17,3 @@ if (!options.schemas) throw new Error('Schemas are required in options') | ||
// register formats | ||
for (let format in formats) { | ||
for (const format in formats) { | ||
ZSchema.registerFormat(format, options.formats[format]) | ||
@@ -163,3 +163,3 @@ } | ||
getContexts = (schema, value) => { | ||
let partialSchema = {} | ||
const partialSchema = {} | ||
@@ -199,3 +199,1 @@ if (!schema) { | ||
} | ||
module.exports = Schema |
{ | ||
"name": "@startupjs/sharedb-schema", | ||
"version": "0.55.0-alpha.1", | ||
"version": "0.55.0-alpha.12", | ||
"description": "Racer plugin for schema validation module for ShareDB", | ||
"type": "module", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"test": "yarn createTemp && mocha test/*.mocha.js", | ||
"createTemp": "rm -rf ./temp && ./node_modules/.bin/babel ../../node_modules/@startupjs/orm/lib/promisifyRacer.js --out-dir temp" | ||
"test": "mocha test/*.mocha.js" | ||
}, | ||
@@ -13,11 +13,2 @@ "publishConfig": { | ||
}, | ||
"dependencies": { | ||
"z-schema": "^4.2.3" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.11.6", | ||
"@babel/core": "^7.11.6", | ||
"@babel/preset-env": "^7.11.5", | ||
"mocha": "^8.1.1" | ||
}, | ||
"keywords": [ | ||
@@ -28,9 +19,11 @@ "sharedb", | ||
], | ||
"author": "Vladimir Makhaev", | ||
"license": "MIT", | ||
"readmeFilename": "README.md", | ||
"bugs": { | ||
"url": "https://github.com/startupjs/startupjs/issues" | ||
"dependencies": { | ||
"z-schema": "^4.2.3" | ||
}, | ||
"gitHead": "f9f14627172890e54490aa3717e21f19614a958b" | ||
"devDependencies": { | ||
"mocha": "^8.1.3", | ||
"racer": "1.0.1", | ||
"sharedb": "^2.0.0" | ||
}, | ||
"gitHead": "d9fdf45341ca733978cdc4fa2562055922e0c2ed" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
3
0
Yes
9485
4
1
169
2