Socket
Socket
Sign inDemoInstall

@podium/schemas

Package Overview
Dependencies
Maintainers
6
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@podium/schemas - npm Package Compare versions

Comparing version 5.0.0-next.1 to 5.0.0-next.2

dist/cjs/schema.js

243

CHANGELOG.md

@@ -0,1 +1,102 @@

# [5.0.0-next.2](https://github.com/podium-lib/schemas/compare/v5.0.0-next.1...v5.0.0-next.2) (2021-04-25)
### Bug Fixes
* **deps:** update dependency ajv to v6.12.4 ([9d32b74](https://github.com/podium-lib/schemas/commit/9d32b74a0cc3a35e336fe2a01b90ab6add2779b2))
* **deps:** update dependency ajv to v6.12.5 ([087631b](https://github.com/podium-lib/schemas/commit/087631bfb8d759ab44164e99d0df9880ec1f2881))
* **deps:** update dependency ajv to v6.12.6 ([3ae65d3](https://github.com/podium-lib/schemas/commit/3ae65d34432ca7c14c1e142c28604566521b2b5b))
* **deps:** update dependency ajv to v7 ([#83](https://github.com/podium-lib/schemas/issues/83)) ([586f481](https://github.com/podium-lib/schemas/commit/586f4814fabef2ea5bfb86a288688d862c046e9e))
* **deps:** update dependency ajv to v7.0.3 ([38e48cd](https://github.com/podium-lib/schemas/commit/38e48cde49c4c746f408b605afc55ef76b8bdadb))
* **deps:** update dependency ajv to v7.0.4 ([6f8b024](https://github.com/podium-lib/schemas/commit/6f8b0245ad98f221332bb4a2db660c677d2130ab))
* **deps:** update dependency ajv to v7.1.0 ([a53d312](https://github.com/podium-lib/schemas/commit/a53d312464f6e378c71ef7a4b3da33b40ee9bf67))
* **deps:** update dependency ajv to v7.1.1 ([38be8ca](https://github.com/podium-lib/schemas/commit/38be8cad63716f2a78538aea9935c39511a4d2ee))
* **deps:** update dependency ajv to v7.2.0 ([1565373](https://github.com/podium-lib/schemas/commit/1565373eee48eacb24c44c813bd2703ab30d33e2))
* **deps:** update dependency ajv to v7.2.1 ([8ec39f8](https://github.com/podium-lib/schemas/commit/8ec39f8a7b015680107d6bf4f64c641b35ef4321))
* **deps:** update dependency ajv to v7.2.3 ([3c1196a](https://github.com/podium-lib/schemas/commit/3c1196afddf67100d6bf64c9a70ca199093086a3))
* **deps:** update dependency ajv to v7.2.4 ([cdcc6cc](https://github.com/podium-lib/schemas/commit/cdcc6cc52bfee91cabe47e8c3b3ab66c14e7e952))
* **deps:** update dependency ajv to v8.0.2 ([92fd51f](https://github.com/podium-lib/schemas/commit/92fd51f92d9a2d077ddfadec8f99e08f49291223))
* **deps:** update dependency ajv to v8.0.3 ([451974a](https://github.com/podium-lib/schemas/commit/451974ab7d88cb488f5683d636bbb22637013e6f))
* **deps:** update dependency ajv to v8.0.4 ([1b26d73](https://github.com/podium-lib/schemas/commit/1b26d739e43a7162ef5f22875758c75ffa936de0))
* **deps:** update dependency ajv to v8.0.5 ([f4375d0](https://github.com/podium-lib/schemas/commit/f4375d070bc8875afc238cc0916b322ed923c698))
* **deps:** update dependency ajv to v8.1.0 ([#107](https://github.com/podium-lib/schemas/issues/107)) ([1d76bb6](https://github.com/podium-lib/schemas/commit/1d76bb617e90a31adbd36b16829c97be1c797bb0))
* **deps:** update dependency ajv-formats to v1.6.0 ([69bb585](https://github.com/podium-lib/schemas/commit/69bb5850ff7c1f9166b2bfed2a3c16ca15d0f473))
* **deps:** update dependency ajv-formats to v2.0.2 ([5c4cbfb](https://github.com/podium-lib/schemas/commit/5c4cbfb6e0f372b518dc08773949a5bc8bf9837b))
* Updated ajv dependencies ([#102](https://github.com/podium-lib/schemas/issues/102)) ([a3dae05](https://github.com/podium-lib/schemas/commit/a3dae054df783746274a468b66a39e31d1358056))
### Features
* Add css and js html attributes to schema ([#88](https://github.com/podium-lib/schemas/issues/88)) ([1db6f63](https://github.com/podium-lib/schemas/commit/1db6f632d63337e25f68f7c0ff80cd15a61a33a3))
* Convert to ESM ([#64](https://github.com/podium-lib/schemas/issues/64)) ([197fe2b](https://github.com/podium-lib/schemas/commit/197fe2bf269b625748fb1797eb455a0db46fa0e1)), closes [#83](https://github.com/podium-lib/schemas/issues/83) [#81](https://github.com/podium-lib/schemas/issues/81) [#83](https://github.com/podium-lib/schemas/issues/83) [#88](https://github.com/podium-lib/schemas/issues/88) [#88](https://github.com/podium-lib/schemas/issues/88) [#96](https://github.com/podium-lib/schemas/issues/96) [#102](https://github.com/podium-lib/schemas/issues/102) [#102](https://github.com/podium-lib/schemas/issues/102) [#106](https://github.com/podium-lib/schemas/issues/106)
### BREAKING CHANGES
* Convert from CommonJS module to ESM
* dev dependency tap updated to version 14.10.8
* fix(deps): update dependency ajv to v6.12.4
* chore(release): 4.0.3 [skip ci]
## [4.0.3](https://github.com/podium-lib/schemas/compare/v4.0.2...v4.0.3) (2020-08-15)
### Bug Fixes
* **deps:** update dependency ajv to v6.12.4 ([9d32b74](https://github.com/podium-lib/schemas/commit/9d32b74a0cc3a35e336fe2a01b90ab6add2779b2))
* dev dependency @semantic-release/npm updated to version 7.0.6
* fix(deps): update dependency ajv to v6.12.5
* chore(release): 4.0.4 [skip ci]
## [4.0.4](https://github.com/podium-lib/schemas/compare/v4.0.3...v4.0.4) (2020-09-13)
### Bug Fixes
* **deps:** update dependency ajv to v6.12.5 ([087631b](https://github.com/podium-lib/schemas/commit/087631bfb8d759ab44164e99d0df9880ec1f2881))
* dev dependency @semantic-release/github updated to version 7.1.1
* dev dependency semantic-release updated to version 17.1.2
* dev dependency eslint updated to version 7.10.0
* fix(deps): update dependency ajv to v6.12.6
* chore(release): 4.0.5 [skip ci]
## [4.0.5](https://github.com/podium-lib/schemas/compare/v4.0.4...v4.0.5) (2020-10-10)
### Bug Fixes
* **deps:** update dependency ajv to v6.12.6 ([3ae65d3](https://github.com/podium-lib/schemas/commit/3ae65d34432ca7c14c1e142c28604566521b2b5b))
* dev dependency eslint updated to version 7.11.0
* dev dependency eslint updated to version 7.12.0
* dev dependency eslint updated to version 7.12.1
* dev dependency eslint updated to version 7.13.0
* dev dependency @semantic-release/github updated to version 7.1.2
* dev dependency semantic-release updated to version 17.2.3
* dev dependency @semantic-release/github updated to version 7.2.0
* dev dependency eslint updated to version 7.15.0
* dev dependency eslint-plugin-prettier updated to version 3.3.0
* dev dependency @semantic-release/npm updated to version 7.0.9
* Dev dependency tap updated to version 14.11.0
* Dev dependency eslint updated to version 7.17.0
# [5.0.0-next.1](https://github.com/podium-lib/schemas/compare/v4.0.3-next.1...v5.0.0-next.1) (2020-07-11)

@@ -18,2 +119,3 @@

## [4.0.3-next.1](https://github.com/podium-lib/schemas/compare/v4.0.2...v4.0.3-next.1) (2020-07-11)
## [4.1.15](https://github.com/podium-lib/schemas/compare/v4.1.14...v4.1.15) (2021-04-11)

@@ -23,3 +125,144 @@

* **deps:** update dependency ajv to v8.1.0 ([#107](https://github.com/podium-lib/schemas/issues/107)) ([1d76bb6](https://github.com/podium-lib/schemas/commit/1d76bb617e90a31adbd36b16829c97be1c797bb0))
## [4.1.14](https://github.com/podium-lib/schemas/compare/v4.1.13...v4.1.14) (2021-04-02)
### Bug Fixes
* **deps:** update dependency ajv to v8.0.5 ([f4375d0](https://github.com/podium-lib/schemas/commit/f4375d070bc8875afc238cc0916b322ed923c698))
## [4.1.13](https://github.com/podium-lib/schemas/compare/v4.1.12...v4.1.13) (2021-04-02)
### Bug Fixes
* **deps:** update dependency ajv to v8.0.4 ([1b26d73](https://github.com/podium-lib/schemas/commit/1b26d739e43a7162ef5f22875758c75ffa936de0))
## [4.1.12](https://github.com/podium-lib/schemas/compare/v4.1.11...v4.1.12) (2021-04-02)
### Bug Fixes
* **deps:** update dependency ajv-formats to v2.0.2 ([5c4cbfb](https://github.com/podium-lib/schemas/commit/5c4cbfb6e0f372b518dc08773949a5bc8bf9837b))
## [4.1.11](https://github.com/podium-lib/schemas/compare/v4.1.10...v4.1.11) (2021-04-01)
### Bug Fixes
* **deps:** update dependency ajv to v8.0.3 ([451974a](https://github.com/podium-lib/schemas/commit/451974ab7d88cb488f5683d636bbb22637013e6f))
## [4.1.10](https://github.com/podium-lib/schemas/compare/v4.1.9...v4.1.10) (2021-03-31)
### Bug Fixes
* **deps:** update dependency ajv to v8.0.2 ([92fd51f](https://github.com/podium-lib/schemas/commit/92fd51f92d9a2d077ddfadec8f99e08f49291223))
## [4.1.9](https://github.com/podium-lib/schemas/compare/v4.1.8...v4.1.9) (2021-03-30)
### Bug Fixes
* Updated ajv dependencies ([#102](https://github.com/podium-lib/schemas/issues/102)) ([a3dae05](https://github.com/podium-lib/schemas/commit/a3dae054df783746274a468b66a39e31d1358056))
## [4.1.8](https://github.com/podium-lib/schemas/compare/v4.1.7...v4.1.8) (2021-03-27)
### Bug Fixes
* **deps:** update dependency ajv-formats to v1.6.0 ([69bb585](https://github.com/podium-lib/schemas/commit/69bb5850ff7c1f9166b2bfed2a3c16ca15d0f473))
## [4.1.7](https://github.com/podium-lib/schemas/compare/v4.1.6...v4.1.7) (2021-03-26)
### Bug Fixes
* **deps:** update dependency ajv to v7.2.4 ([cdcc6cc](https://github.com/podium-lib/schemas/commit/cdcc6cc52bfee91cabe47e8c3b3ab66c14e7e952))
## [4.1.6](https://github.com/podium-lib/schemas/compare/v4.1.5...v4.1.6) (2021-03-20)
### Bug Fixes
* **deps:** update dependency ajv to v7.2.3 ([3c1196a](https://github.com/podium-lib/schemas/commit/3c1196afddf67100d6bf64c9a70ca199093086a3))
## [4.1.5](https://github.com/podium-lib/schemas/compare/v4.1.4...v4.1.5) (2021-03-07)
### Bug Fixes
* **deps:** update dependency ajv to v7.2.1 ([8ec39f8](https://github.com/podium-lib/schemas/commit/8ec39f8a7b015680107d6bf4f64c641b35ef4321))
## [4.1.4](https://github.com/podium-lib/schemas/compare/v4.1.3...v4.1.4) (2021-03-07)
### Bug Fixes
* **deps:** update dependency ajv to v7.2.0 ([1565373](https://github.com/podium-lib/schemas/commit/1565373eee48eacb24c44c813bd2703ab30d33e2))
## [4.1.3](https://github.com/podium-lib/schemas/compare/v4.1.2...v4.1.3) (2021-02-17)
### Bug Fixes
* **deps:** update dependency ajv to v7.1.1 ([38be8ca](https://github.com/podium-lib/schemas/commit/38be8cad63716f2a78538aea9935c39511a4d2ee))
## [4.1.2](https://github.com/podium-lib/schemas/compare/v4.1.1...v4.1.2) (2021-02-11)
### Bug Fixes
* **deps:** update dependency ajv to v7.1.0 ([a53d312](https://github.com/podium-lib/schemas/commit/a53d312464f6e378c71ef7a4b3da33b40ee9bf67))
## [4.1.1](https://github.com/podium-lib/schemas/compare/v4.1.0...v4.1.1) (2021-02-01)
### Bug Fixes
* **deps:** update dependency ajv to v7.0.4 ([6f8b024](https://github.com/podium-lib/schemas/commit/6f8b0245ad98f221332bb4a2db660c677d2130ab))
# [4.1.0](https://github.com/podium-lib/schemas/compare/v4.0.7...v4.1.0) (2021-01-22)
### Features
* Add css and js html attributes to schema ([#88](https://github.com/podium-lib/schemas/issues/88)) ([1db6f63](https://github.com/podium-lib/schemas/commit/1db6f632d63337e25f68f7c0ff80cd15a61a33a3))
## [4.0.7](https://github.com/podium-lib/schemas/compare/v4.0.6...v4.0.7) (2021-01-21)
### Bug Fixes
* **deps:** update dependency ajv to v7.0.3 ([38e48cd](https://github.com/podium-lib/schemas/commit/38e48cde49c4c746f408b605afc55ef76b8bdadb))
## [4.0.6](https://github.com/podium-lib/schemas/compare/v4.0.5...v4.0.6) (2021-01-21)
### Bug Fixes
* **deps:** update dependency ajv to v7 ([#83](https://github.com/podium-lib/schemas/issues/83)) ([586f481](https://github.com/podium-lib/schemas/commit/586f4814fabef2ea5bfb86a288688d862c046e9e))
## [4.0.5](https://github.com/podium-lib/schemas/compare/v4.0.4...v4.0.5) (2020-10-10)
### Bug Fixes
* **deps:** update dependency ajv to v6.12.6 ([3ae65d3](https://github.com/podium-lib/schemas/commit/3ae65d34432ca7c14c1e142c28604566521b2b5b))
## [4.0.4](https://github.com/podium-lib/schemas/compare/v4.0.3...v4.0.4) (2020-09-13)
### Bug Fixes
* **deps:** update dependency ajv to v6.12.5 ([087631b](https://github.com/podium-lib/schemas/commit/087631bfb8d759ab44164e99d0df9880ec1f2881))
## [4.0.3](https://github.com/podium-lib/schemas/compare/v4.0.2...v4.0.3) (2020-08-15)
### Bug Fixes
* Initial setup of next branch ([5314940](https://github.com/podium-lib/schemas/commit/53149406b1287c6a7d85dd9cbc7f623eeaaac307))
* **deps:** update dependency ajv to v6.12.4 ([9d32b74](https://github.com/podium-lib/schemas/commit/9d32b74a0cc3a35e336fe2a01b90ab6add2779b2))

@@ -26,0 +269,0 @@ # Changelog

46

lib/validate.js

@@ -1,11 +0,11 @@

'use strict';
import Ajv from 'ajv';
import formats from 'ajv-formats';
import schema from './schema.js';
const Ajv = require('ajv');
const manifestSchema = require('./manifest.schema.json');
const createValidator = (schema, ajvOptions) => {
const createValidator = (jsonSchema, ajvOptions) => {
const ajv = new Ajv(ajvOptions);
formats(ajv); // Needed to support "uri"
const validate = ajv.compile({
$schema: 'http://json-schema.org/draft-07/schema#',
...schema,
...jsonSchema,
});

@@ -18,2 +18,3 @@

};
const withTrimmer = validator => data =>

@@ -26,27 +27,16 @@ validator(

const manifest = createValidator(manifestSchema, {
export const manifest = createValidator(schema, {
removeAdditional: true,
useDefaults: true,
});
const uriStrict = createValidator({type: 'string', format: 'uri'})
const uri = createValidator({type: 'string', format: 'uri-reference', 'minLength': 1})
const name = withTrimmer(createValidator(manifestSchema.properties.name));
const version = withTrimmer(createValidator(manifestSchema.properties.version));
const content = createValidator(manifestSchema.properties.content);
const fallback = createValidator(manifestSchema.properties.fallback);
const js = createValidator(manifestSchema.properties.js);
const css = createValidator(manifestSchema.properties.css);
const proxy = createValidator(manifestSchema.properties.proxy);
const team = createValidator(manifestSchema.properties.team);
module.exports.manifest = manifest;
module.exports.uriStrict = uriStrict;
module.exports.uri = uri;
module.exports.name = name;
module.exports.version = version;
module.exports.content = content;
module.exports.fallback = fallback;
module.exports.js = js;
module.exports.css = css;
module.exports.proxy = proxy;
module.exports.team = team;
export const uriStrict = createValidator({type: 'string', format: 'uri'});
export const fallback = createValidator(schema.properties.fallback);
export const version = withTrimmer(createValidator(schema.properties.version));
export const content = createValidator(schema.properties.content);
export const proxy = createValidator(schema.properties.proxy);
export const team = createValidator(schema.properties.team);
export const name = withTrimmer(createValidator(schema.properties.name));
export const uri = createValidator({type: 'string', format: 'uri-reference', 'minLength': 1});
export const css = createValidator(schema.properties.css);
export const js = createValidator(schema.properties.js);
{
"name": "@podium/schemas",
"version": "5.0.0-next.1",
"version": "5.0.0-next.2",
"type": "module",
"description": "Schemas for validating the @podium contract.",

@@ -25,12 +26,21 @@ "license": "MIT",

"LICENSE",
"dist",
"lib"
],
"main": "./lib/index.js",
"main": "./dist/cjs/validate.js",
"exports": {
"import": "./dist/esm/validate.js",
"require": "./dist/cjs/validate.js"
},
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"test": "tap tests/*.js"
"test": "tap --no-check-coverage",
"prepare": "npm run -s build",
"build": "rollup -c"
},
"dependencies": {
"ajv": "6.12.3"
"ajv": "8.1.0",
"ajv-formats": "2.0.2",
"find-up": "5.0.0"
},

@@ -41,14 +51,15 @@ "devDependencies": {

"@semantic-release/git": "9.0.0",
"@semantic-release/github": "7.0.7",
"@semantic-release/npm": "7.0.5",
"@semantic-release/release-notes-generator": "9.0.1",
"eslint": "7.3.1",
"eslint-config-airbnb-base": "14.2.0",
"eslint-config-prettier": "6.11.0",
"eslint-plugin-import": "2.22.0",
"eslint-plugin-prettier": "3.1.4",
"prettier": "2.0.2",
"semantic-release": "17.1.1",
"tap": "14.10.7"
"@semantic-release/github": "7.2.1",
"@semantic-release/npm": "7.1.1",
"@semantic-release/release-notes-generator": "9.0.2",
"eslint": "7.24.0",
"eslint-config-airbnb-base": "14.2.1",
"eslint-config-prettier": "8.2.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-prettier": "3.4.0",
"prettier": "2.2.1",
"rollup": "2.45.2",
"semantic-release": "17.4.2",
"tap": "15.0.4"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc