Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lrnwebcomponents/schema-behaviors

Package Overview
Dependencies
Maintainers
4
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lrnwebcomponents/schema-behaviors - npm Package Compare versions

Comparing version 4.0.4 to 4.0.5

analysis.json

25

package.json

@@ -5,3 +5,3 @@ {

"className": "SchemaBehaviors",
"customElementClass": "PolymerElement",
"customElementClass": "HTMLElement",
"elementName": "schema-behaviors",

@@ -16,3 +16,3 @@ "generator-wcfactory-version": "0.3.2",

},
"version": "4.0.4",
"version": "4.0.5",
"description": "Apply schema helper behaviors to existing Polymer (Legacy) based elements",

@@ -32,7 +32,6 @@ "repository": {

"watch": "gulp dev --gulpfile=gulpfile.cjs",
"serve": "es-dev-server -c ../../es-dev-server.config.js",
"serve": "web-dev-server -c ../../web-dev-server.config.js",
"lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs",
"test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs",
"test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --watch",
"test:browsers": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium firefox webkit"
"test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium firefox --watch",
"test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium firefox"
},

@@ -44,14 +43,11 @@ "author": {

"dependencies": {
"@lrnwebcomponents/utils": "^4.0.4"
"@lrnwebcomponents/utils": "^4.0.5"
},
"devDependencies": {
"@lrnwebcomponents/deduping-fix": "^4.0.0",
"@lrnwebcomponents/storybook-utilities": "^4.0.4",
"@open-wc/testing": "2.5.33",
"@lrnwebcomponents/storybook-utilities": "^4.0.5",
"@open-wc/testing": "3.0.3",
"@polymer/iron-component-page": "github:PolymerElements/iron-component-page",
"@polymer/iron-demo-helpers": "3.1.0",
"@web/test-runner": "0.13.5",
"@web/test-runner-commands": "0.4.5",
"@web/test-runner-playwright": "0.8.6",
"@web/test-runner-puppeteer": "0.10.0",
"@web/dev-server": "0.1.28",
"@webcomponents/webcomponentsjs": "2.6.0",

@@ -61,3 +57,2 @@ "concurrently": "5.3.0",

"lodash": "^4.17.21",
"polymer-cli": "1.9.11",
"wct-browser-legacy": "1.0.2"

@@ -73,3 +68,3 @@ },

],
"gitHead": "d4cd14c5c57b408201bf4fa8f41d714de8b88f11"
"gitHead": "ca4a1abb2fc0e1822268b994850d371d92e0df54"
}

@@ -32,9 +32,2 @@ /**

/**
* Unique Resource ID, generated when schemaMap processes.
*/
schemaResourceID: {
type: String,
attribute: "schema-resource-id",
},
/**
* Schema Map for the element, used to generate a valid prefix on the fly

@@ -41,0 +34,0 @@ * Props set for Polymer compatibility

2

schema-behaviors.umd.js

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@lrnwebcomponents/utils/utils.js")):"function"==typeof define&&define.amd?define(["exports","@lrnwebcomponents/utils/utils.js"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).SchemaBehaviors={},e.utils_js)}(this,(function(e,t){"use strict";function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=u(e);if(t){var o=u(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return f(this,r)}}function p(e,t,r){return(p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}e.SchemaBehaviors=function(e){return function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(h,e);var r,i,f,l=a(h);function h(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),(e=l.call(this)).schemaResourceID="",e.schemaMap={prefix:{oer:"http://oerschema.org/",schema:"http://schema.org/",dc:"http://purl.org/dc/terms/",foaf:"http://xmlns.com/foaf/0.1/",cc:"http://creativecommons.org/ns#",bib:"http://bib.schema.org"}},e}return r=h,f=[{key:"properties",get:function(){return n(n({},p(u(h),"properties",this)),{},{schemaResourceID:{type:String,attribute:"schema-resource-id"},schemaMap:{type:Object,readOnly:!0,observer:"_schemaMapChanged"}})}}],(i=[{key:"updated",value:function(e){var t=this;p(u(h.prototype),"updated",this)&&p(u(h.prototype),"updated",this).call(this,e),e.forEach((function(e,r){"schemaMap"==r&&t._schemaMapChanged(t[r],e)}))}},{key:"_schemaMapChanged",value:function(e,r){if("undefined"!==o(e)){this.schemaResourceID=this.getAttribute("resource"),""!=this.schemaResourceID&&null!=this.schemaResourceID&&"null"!=this.schemaResourceID||(this.schemaResourceID=t.generateResourceID(),this.setAttribute("resource",this.schemaResourceID));var n=e.prefix,c="";for(var i in n)n.hasOwnProperty(i)&&(c+=i+":"+n[i]+" ");""!=c&&this.setAttribute("prefix",c)}}}])&&c(r.prototype,i),f&&c(r,f),h}(e)},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@lrnwebcomponents/utils/utils.js")):"function"==typeof define&&define.amd?define(["exports","@lrnwebcomponents/utils/utils.js"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).SchemaBehaviors={},e.utils_js)}(this,(function(e,t){"use strict";function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function f(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=u(e);if(t){var o=u(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return f(this,r)}}function p(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=p(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},l.apply(this,arguments)}e.SchemaBehaviors=function(e){return function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(h,e);var r,i,f,p=a(h);function h(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),(e=p.call(this)).schemaResourceID="",e.schemaMap={prefix:{oer:"http://oerschema.org/",schema:"http://schema.org/",dc:"http://purl.org/dc/terms/",foaf:"http://xmlns.com/foaf/0.1/",cc:"http://creativecommons.org/ns#",bib:"http://bib.schema.org"}},e}return r=h,f=[{key:"properties",get:function(){return n(n({},l(u(h),"properties",this)),{},{schemaMap:{type:Object,readOnly:!0,observer:"_schemaMapChanged"}})}}],(i=[{key:"updated",value:function(e){var t=this;l(u(h.prototype),"updated",this)&&l(u(h.prototype),"updated",this).call(this,e),e.forEach((function(e,r){"schemaMap"==r&&t._schemaMapChanged(t[r],e)}))}},{key:"_schemaMapChanged",value:function(e,r){if("undefined"!==o(e)){this.schemaResourceID=this.getAttribute("resource"),""!=this.schemaResourceID&&null!=this.schemaResourceID&&"null"!=this.schemaResourceID||(this.schemaResourceID=t.generateResourceID(),this.setAttribute("resource",this.schemaResourceID));var n=e.prefix,c="";for(var i in n)n.hasOwnProperty(i)&&(c+=i+":"+n[i]+" ");""!=c&&this.setAttribute("prefix",c)}}}])&&c(r.prototype,i),f&&c(r,f),h}(e)},Object.defineProperty(e,"__esModule",{value:!0})}));

@@ -32,9 +32,2 @@ /**

/**
* Unique Resource ID, generated when schemaMap processes.
*/
schemaResourceID: {
type: String,
attribute: "schema-resource-id",
},
/**
* Schema Map for the element, used to generate a valid prefix on the fly

@@ -41,0 +34,0 @@ * Props set for Polymer compatibility

@@ -1,28 +0,19 @@

import {
expect,
fixture,
html,
assert,
elementUpdated,
fixtureCleanup,
} from "@open-wc/testing";
import { setViewport } from "@web/test-runner-commands";
import { fixture, expect, html } from "@open-wc/testing";
import "../schema-behaviors.js";
/*
* Instantiation test
* create element and see if an attribute binds to the element
*/
describe("Instantiation Test", () => {
it("schema-behaviors instantiates", async () => {
const el = await fixture(
describe("schema-behaviors test", () => {
let element;
beforeEach(async () => {
element = await fixture(
html` <schema-behaviors title="test-title"></schema-behaviors> `
);
await expect(el.getAttribute("title")).to.equal("test-title");
});
it("passes the a11y audit", async () => {
await expect(element).shadowDom.to.be.accessible();
});
});
/*
* A11y Accessibility tests
*/
describe("A11y/chai axe tests", () => {

@@ -83,6 +74,1 @@ it("schema-behaviors passes accessibility test", async () => {

}) */
// clean up fixtures after all tests are complete
afterEach(() => {
fixtureCleanup();
});
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