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

@bikeshaving/crank

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bikeshaving/crank - npm Package Compare versions

Comparing version 0.3.2 to 0.3.3

3

CHANGELOG.md
# Changelog
## [0.3.3] - 2020-08-25
### Fixed
- Use ducktyping rather than instanceof checks for cross realm use-cases like nw.js (#147).
## [0.3.2] - 2020-08-06

@@ -3,0 +6,0 @@ ### Changed

11

cjs/dom.js

@@ -10,4 +10,4 @@ 'use strict';

render(children, root, ctx) {
if (!(root instanceof Node)) {
throw new TypeError(`root (${root && root.toString()}) is not a node`);
if (root == null || typeof root.nodeType !== "number") {
throw new TypeError(`Render root is not a node. Received: ${JSON.stringify(root && root.toString())}`);
}

@@ -53,3 +53,3 @@ return super.render(children, root, ctx);

patch(el, node) {
const isSvg = node instanceof SVGElement;
const isSvg = node.namespaceURI === SVG_NAMESPACE;
for (let name in el.props) {

@@ -132,4 +132,5 @@ let forceAttribute = false;

arrange(el, parent, children) {
if (el.tag === crank.Portal && !(parent instanceof Node)) {
throw new TypeError("Portal root is not a node");
if (el.tag === crank.Portal &&
(parent == null || typeof parent.nodeType !== "number")) {
throw new TypeError(`Portal root is not a node. Received: ${JSON.stringify(parent && parent.toString())}`);
}

@@ -136,0 +137,0 @@ if (!("innerHTML" in el.props) &&

@@ -7,4 +7,4 @@ /// <reference types="./dom.d.ts" />

render(children, root, ctx) {
if (!(root instanceof Node)) {
throw new TypeError(`root (${root && root.toString()}) is not a node`);
if (root == null || typeof root.nodeType !== "number") {
throw new TypeError(`Render root is not a node. Received: ${JSON.stringify(root && root.toString())}`);
}

@@ -50,3 +50,3 @@ return super.render(children, root, ctx);

patch(el, node) {
const isSvg = node instanceof SVGElement;
const isSvg = node.namespaceURI === SVG_NAMESPACE;
for (let name in el.props) {

@@ -129,4 +129,5 @@ let forceAttribute = false;

arrange(el, parent, children) {
if (el.tag === Portal && !(parent instanceof Node)) {
throw new TypeError("Portal root is not a node");
if (el.tag === Portal &&
(parent == null || typeof parent.nodeType !== "number")) {
throw new TypeError(`Portal root is not a node. Received: ${JSON.stringify(parent && parent.toString())}`);
}

@@ -133,0 +134,0 @@ if (!("innerHTML" in el.props) &&

{
"name": "@bikeshaving/crank",
"version": "0.3.2",
"version": "0.3.3",
"description": "Write JSX-driven components with functions, promises and generators.",

@@ -5,0 +5,0 @@ "homepage": "https://crank.js.org",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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