@gondel/plugin-react
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -6,2 +6,10 @@ # Change Log | ||
## [1.2.4](https://github.com/namics/gondel/compare/v1.2.3...v1.2.4) (2020-09-21) | ||
**Note:** Version bump only for package @gondel/plugin-react | ||
## [1.2.3](https://github.com/namics/gondel/compare/v1.2.2...v1.2.3) (2020-03-09) | ||
@@ -8,0 +16,0 @@ |
@@ -29,3 +29,3 @@ var __extends = (this && this.__extends) || (function () { | ||
"componentWillUnmount", | ||
"componentDidCatch" | ||
"componentDidCatch", | ||
].forEach(function (reactHook) { | ||
@@ -32,0 +32,0 @@ if (!_this.props[reactHook]) { |
@@ -14,3 +14,3 @@ var __extends = (this && this.__extends) || (function () { | ||
})(); | ||
import { createElement } from "react"; | ||
import { createElement, } from "react"; | ||
import { GondelBaseComponent } from "@gondel/core"; | ||
@@ -105,3 +105,3 @@ import { createRenderableAppWrapper } from "./AppWrapper"; | ||
componentDidCatch: _this.componentDidCatch && _this.componentDidCatch.bind(_this), | ||
config: _this.state | ||
config: _this.state, | ||
}), _this._ctx); | ||
@@ -108,0 +108,0 @@ }); |
import { useState, useRef, useCallback, useEffect } from "react"; | ||
import { startComponents, hasMountedGondelComponent, getComponentByDomNode, stopComponents } from "@gondel/core"; | ||
import { startComponents, hasMountedGondelComponent, getComponentByDomNode, stopComponents, } from "@gondel/core"; | ||
/** | ||
@@ -4,0 +4,0 @@ * React hook to use a Gondel components inside React |
{ | ||
"name": "@gondel/plugin-react", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "Gondel Plugin to boot react widgets and apps", | ||
@@ -29,9 +29,9 @@ "bugs": "https://github.com/namics/gondel/issues", | ||
"devDependencies": { | ||
"@gondel/core": "^1.2.0", | ||
"jest": "24.9.0", | ||
"@gondel/core": "^1.2.4", | ||
"jest": "26.0.1", | ||
"npm-run-all": "4.1.5", | ||
"react": "16.11.0", | ||
"react-dom": "16.11.0", | ||
"rimraf": "3.0.0", | ||
"typescript": "3.7.4" | ||
"rimraf": "3.0.2", | ||
"typescript": "3.9.5" | ||
}, | ||
@@ -61,3 +61,3 @@ "jest": { | ||
}, | ||
"gitHead": "bef490988a05b052d6461d8ef2275f784df4245b" | ||
"gitHead": "4b10a14cfcb4c26c6a7c5f729512d0fcef81ac7e" | ||
} |
@@ -22,3 +22,3 @@ import { AppWrapper, Props as AppWrapperProps } from "./AppWrapper"; | ||
new AppWrapper<undefined>({ | ||
config: undefined | ||
config: undefined, | ||
}); | ||
@@ -30,3 +30,3 @@ }).not.toThrow(); | ||
const wrapper = new AppWrapper<{ test: number }>({ | ||
config: { test: 10 } | ||
config: { test: 10 }, | ||
}); | ||
@@ -46,3 +46,3 @@ | ||
"componentWillUnmount" as const, | ||
"componentDidCatch" as const | ||
"componentDidCatch" as const, | ||
]; | ||
@@ -53,3 +53,3 @@ | ||
...prev, | ||
[curr]: jest.fn() | ||
[curr]: jest.fn(), | ||
}), | ||
@@ -62,6 +62,6 @@ {} as Record<ArrayElement<typeof lifecycles>, () => any> | ||
config: { text: "World" }, | ||
children: props => createElement(HelloFixture, props, null) | ||
children: (props) => createElement(HelloFixture, props, null), | ||
}); | ||
lifecycles.forEach(lifecycle => { | ||
lifecycles.forEach((lifecycle) => { | ||
expect(Wrapper[lifecycle]).toBeDefined(); | ||
@@ -75,3 +75,3 @@ }); | ||
config: { text: "World" }, | ||
children: props => createElement(HelloFixture, props, null) | ||
children: (props) => createElement(HelloFixture, props, null), | ||
}); | ||
@@ -86,5 +86,5 @@ | ||
children: null, | ||
text: "World" | ||
text: "World", | ||
}, | ||
ref: null | ||
ref: null, | ||
}); | ||
@@ -99,4 +99,4 @@ | ||
config: { | ||
text: "World" | ||
} | ||
text: "World", | ||
}, | ||
}, | ||
@@ -119,3 +119,3 @@ null | ||
config: { text: "initial" }, | ||
children: (props: HelloProps) => createElement(HelloFixture, props, null) | ||
children: (props: HelloProps) => createElement(HelloFixture, props, null), | ||
}, | ||
@@ -136,3 +136,3 @@ null | ||
const onHasState = jest.fn<AppWrapperProps<HelloProps>["onHasState"], any>( | ||
stateFn => stateFn | ||
(stateFn) => stateFn | ||
); | ||
@@ -142,3 +142,3 @@ | ||
onHasState, | ||
config: { text: "config" } | ||
config: { text: "config" }, | ||
}); | ||
@@ -149,3 +149,3 @@ | ||
expect(() => { | ||
onHasState.mockReturnValue(setState => { | ||
onHasState.mockReturnValue((setState) => { | ||
setState({ text: "mock" }); | ||
@@ -152,0 +152,0 @@ }); |
@@ -70,3 +70,3 @@ import { Component, getComponentByDomNode, startComponents } from "@gondel/core"; | ||
a: 10, | ||
b: "test" | ||
b: "test", | ||
}); | ||
@@ -125,3 +125,3 @@ }); | ||
await new Promise(resolve => { | ||
await new Promise((resolve) => { | ||
function TestTitleSpan(props: { title: string }) { | ||
@@ -150,3 +150,3 @@ return createElement("span", null, props.title); | ||
await new Promise(resolve => { | ||
await new Promise((resolve) => { | ||
function TestTitleSpan(props: { title: string }) { | ||
@@ -174,3 +174,3 @@ return createElement("span", null, props.title); | ||
await new Promise(resolve => { | ||
await new Promise((resolve) => { | ||
function TestTitleSpan(props: { title: string }) { | ||
@@ -199,3 +199,3 @@ return createElement("span", null, props.title); | ||
await new Promise(resolve => { | ||
await new Promise((resolve) => { | ||
const loader = () => () => createElement("span", null, "Hello World"); | ||
@@ -226,3 +226,3 @@ const GondelReactLoaderComponent = createGondelReactLoader(loader); | ||
await new Promise(resolve => { | ||
await new Promise((resolve) => { | ||
function TestTitleSpan(props: { title: string }) { | ||
@@ -236,6 +236,6 @@ return createElement("span", null, props.title); | ||
start() { | ||
return new Promise(resolve => { | ||
return new Promise((resolve) => { | ||
setTimeout(() => { | ||
this.setState({ | ||
title: "Lazy loaded data" | ||
title: "Lazy loaded data", | ||
}); | ||
@@ -263,3 +263,3 @@ resolve(); | ||
await new Promise(resolve => { | ||
await new Promise((resolve) => { | ||
function TestTitleSpan(props: { title: string }) { | ||
@@ -275,3 +275,3 @@ return createElement("span", null, props.title); | ||
this.setState({ | ||
title: "Lazy loaded data" | ||
title: "Lazy loaded data", | ||
}); | ||
@@ -297,3 +297,3 @@ resolve(); | ||
root.innerHTML = `<div data-g-name="Greeter"></div>`; | ||
await new Promise(resolve => { | ||
await new Promise((resolve) => { | ||
function TestTitleSpan(props: { title: string }) { | ||
@@ -300,0 +300,0 @@ return createElement("span", null, props.title || ""); |
@@ -7,3 +7,3 @@ import { useState, useRef, useCallback, useEffect } from "react"; | ||
getComponentByDomNode, | ||
stopComponents | ||
stopComponents, | ||
} from "@gondel/core"; | ||
@@ -10,0 +10,0 @@ |
@@ -7,3 +7,3 @@ import { isPromise } from "./utils"; | ||
const asyncFunc = async () => true; | ||
const promiseFunc = () => new Promise(r => r()); | ||
const promiseFunc = () => new Promise((r) => r()); | ||
const resolveFunc = () => Promise.resolve(); | ||
@@ -10,0 +10,0 @@ |
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 not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
70817