diff --git a/demo/demos/ContextDemo.tsx b/demo/demos/ContextDemo.tsx index 880dc17..4fa30d5 100644 --- a/demo/demos/ContextDemo.tsx +++ b/demo/demos/ContextDemo.tsx @@ -1,14 +1,12 @@ import * as React from 'react'; -import { fromRenderProp } from '../../src/ChainableComponent'; -// how to create a context hoc? import Step from '../Step'; +import { withContext } from '../../src/lib/withContext'; +import { withProvider } from '../../src/lib/withProvider'; const { Consumer, Provider } = React.createContext("Default Value"); -const withContext = fromRenderProp(Consumer); - const DisplayContext = - withContext.render( + withContext(Consumer).render( context => { return ( @@ -19,40 +17,43 @@ const DisplayContext = } ); +const withText = withProvider(Provider) + const ContextDemo = () => (
{DisplayContext} {DisplayContext} + {withText("From withProvider").render(() => DisplayContext)}
); export default () => (
-      {`import { fromRenderProp } from 'chainable-components';
-const { Consumer, Provider } = React.createContext("Default Value");
-const withStringContext = fromRenderProp(Consumer);
+      {`const DisplayContext =
+  withContext(Consumer).render(
+    context => {
+      return (
+        
+          Current context is:
+          
{JSON.stringify(context, null, 2)}
+
+ ); + } + ); -const DisplayContext = -withStringContext({ children: a => '' }).render( - context => { - return ( - - Current context is: -
{JSON.stringify(context, null, 2)}
-
- ); - } +const withText = withProvider(Provider) const ContextDemo = () => ( -
- {DisplayContext} - +
{DisplayContext} - -
+ + {DisplayContext} + + {withText("From withProvider").render(() => DisplayContext)} +
);`}
diff --git a/demo/demos/WithHandlersDemo.tsx b/demo/demos/WithHandlersDemo.tsx new file mode 100644 index 0000000..24f972b --- /dev/null +++ b/demo/demos/WithHandlersDemo.tsx @@ -0,0 +1,32 @@ +import * as React from 'react'; +import { withState } from '../../src/lib/withState'; +import { ChainableComponent } from '../../src/ChainableComponent'; +import Step from '../Step'; +import { DoBuilder } from '../../src'; +import { withHandler } from '../../src/lib/withHandler'; + +export const WithHandlersDemo = + DoBuilder + .bind('b', withState(0)) + .bind('a', withState(0)) + .bindL('handler', ({a, b}) => { + console.log('handler', a.value, b.value) + return withHandler(() => alert(`A's count is : ${a.value}`), [b.value]) + }) + .done() + .render(({a, b, handler}) => ( +
+
a: {a.value}
+
b: {b.value}
+ +
+ )) + +export default () => ( + +
+      {``}
+    
+ {WithHandlersDemo} +
+); diff --git a/demo/demos/WithReducerDemo.tsx b/demo/demos/WithReducerDemo.tsx new file mode 100644 index 0000000..18e4c37 --- /dev/null +++ b/demo/demos/WithReducerDemo.tsx @@ -0,0 +1,39 @@ +import * as React from 'react'; +import { + ChainableComponent, + fork +} from '../../src/ChainableComponent'; +import Step from '../Step'; +import { withState } from '../../src'; +import { WithStateContext } from '../../src/lib/withState'; +import { withReducer } from '../../src/lib/withReducer'; + +type Action = 'increment' | 'decrement'; + +export const WithReducerDemo = + withReducer((s: number, a: Action) => { + return a === 'increment' ? s + 1 : s -1; + }, 0).render(({state, dispatch}) => ( +
+ + {state} + +
+ )) + +export default () => ( + +
+      {`withReducer((s: number, a: Action) => {
+    return a === 'increment' ? s + 1 : s -1;
+  }, 0).render(({state, dispatch}) => (
+      
+ + {state} + +
+ ))`} +
+ {WithReducerDemo} +
+); diff --git a/package.json b/package.json index facde04..f3b6ce9 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "ramda": "^0.25.0", "react": "^16.0.0", "react-dom": "^16.0.0", - "react-hot-loader": "3.0.0", + "react-hot-loader": "^4.8.4", "react-router": "^4.2.0", "recompose": "^0.28.2", "source-map-loader": "^0.2.2", diff --git a/src/Dependencies.ts b/src/Dependencies.ts new file mode 100644 index 0000000..7db7065 --- /dev/null +++ b/src/Dependencies.ts @@ -0,0 +1,37 @@ + +type Dependency = { + _type: '@@ChainableComponentsDependency', + value: A, + equals: (l: A, r: A) => boolean +} + +function isDep(a: any): a is Dependency { + return a.type === '@@ChainableComponentsDependency' +} + +type Dependencies = (any | Dependency)[] + +export function equals(l: Dependencies, r: Dependencies): boolean { + return l.every((dep, i) => { + const rightDep = r[i] + if(isDep(dep)) { + if(isDep(rightDep)) { + return dep.equals(dep.value, rightDep.value) + } else { + return false; + } + } else { + return dep === rightDep; + } + }) +} + +export function itemEquals(l: any, r: any): boolean { + if(l && isDep(l) ) { + } + return l.equals(l.value, r.value) +} + +export function depEquals(l: Dependency, r: Dependency): boolean { + return l.equals(l.value, r.value) +} diff --git a/src/lib/withContext.ts b/src/lib/withContext.ts new file mode 100644 index 0000000..61e2cc4 --- /dev/null +++ b/src/lib/withContext.ts @@ -0,0 +1,6 @@ +import { Consumer } from 'react'; +import { ChainableComponent, fromRenderProp, RenderPropsProps } from '../ChainableComponent'; + +export function withContext(consumer: Consumer): ChainableComponent { + return fromRenderProp(consumer) +} diff --git a/src/lib/withHandler.ts b/src/lib/withHandler.ts new file mode 100644 index 0000000..d8c4d5b --- /dev/null +++ b/src/lib/withHandler.ts @@ -0,0 +1,14 @@ +import { ChainableComponent } from '../ChainableComponent'; +import { withLifecycle } from './withLifecycle'; +import { equals } from '../Dependencies'; + +export function withHandler( + cb: F, + dependencies: any[] +): ChainableComponent { + return withLifecycle<[F, any[]]>({ + init: () => [cb, dependencies], + deriveContext: ([f, deps]) => + equals(deps, dependencies) ? [f, deps] : [cb, dependencies] + }).map(a => a[0]); +} diff --git a/src/lib/withLifecycle.ts b/src/lib/withLifecycle.ts index 435b082..948e2b3 100644 --- a/src/lib/withLifecycle.ts +++ b/src/lib/withLifecycle.ts @@ -10,39 +10,69 @@ import { * Configuration for the withLifecycle chainable component */ export type WithLifecycleOptions = { - componentDidMount: () => C; - componentWillUnmount?: (c: C) => void; + init: () => C; + componentDidMount?: (c: C) => C; + componentWillUnmount?: (c: C) => C; + deriveContext?: (c:C) => C; + componentWillUpdate?: (c: C) => C; shouldComponentUpdate?: (c: C) => boolean; }; -type WithLifecycleProps = RenderPropsProps, {}>; +type WithLifecycleProps = RenderPropsProps, C>; + +const iff = (a: A | undefined, f: (a:A) => void): void => a && f(a) + +const fold = (z: Z, a: A | undefined, f: (a:A) => Z): Z => a ? f(a) : z /** * A Render Prop component that mimics the react Component API */ export class WithLifecycle extends React.Component< WithLifecycleProps, - {} + { context: C } > { constructor(props: WithLifecycleProps) { super(props); + this.state = { + context: this.props.init() + } + } + + static getDerivedStateFromProps(nextProps: WithLifecycleProps, state: { context: C }) { + return nextProps.deriveContext ? { context: nextProps.deriveContext(state.context) } : state } componentDidMount() { - this.context = this.props.componentDidMount(); + iff(this.props.componentDidMount, dm => { + this.setState(s => { + context: dm(s.context) + }) + }) } + componentWillUnmount() { - this.props.componentWillUnmount && - this.props.componentWillUnmount(this.context); + iff(this.props.componentWillUnmount, wu => { + this.setState(s => { + context: wu(s.context) + }) + }) } shouldComponentUpdate() { - return this.props.shouldComponentUpdate - ? this.props.shouldComponentUpdate(this.context) - : true; + return fold(true, this.props.shouldComponentUpdate, scu => { + return scu(this.state.context) + }) + } + + UNSAFE_componentWillUpdate(nextProps: WithLifecycleProps) { + iff(nextProps.componentWillUpdate, wu => { + this.setState(s => { + context: wu(s.context) + }) + }) } render() { - return this.props.children({}); + return this.props.children(this.state.context); } } @@ -52,6 +82,6 @@ export class WithLifecycle extends React.Component< */ export function withLifecycle( options: WithLifecycleOptions -): ChainableComponent<{}> { +): ChainableComponent { return fromRenderProp>(WithLifecycle, options); } diff --git a/src/lib/withProvider.ts b/src/lib/withProvider.ts new file mode 100644 index 0000000..477190f --- /dev/null +++ b/src/lib/withProvider.ts @@ -0,0 +1,6 @@ +import { Provider, createElement } from 'react'; +import { ChainableComponent, fromRender } from '../ChainableComponent'; + +export function withProvider(provider: Provider): (value: A) => ChainableComponent { + return a => fromRender(f => createElement(provider, {value: a}, f(a))) +} diff --git a/src/lib/withReducer.ts b/src/lib/withReducer.ts new file mode 100644 index 0000000..f73c278 --- /dev/null +++ b/src/lib/withReducer.ts @@ -0,0 +1,55 @@ +import * as React from 'react'; +import { ChainableComponent, fromRenderProp, RenderPropsProps } from '../ChainableComponent'; + +/** + * The state used by the WithState render prop. + */ +export type WithReducerState = { + value: S, +}; + +/** + * Stores the state value and provides a function that updates the state. + */ +export type WithReducerContext = { + state: S, + dispatch: (a: A) => void, +}; + +/** + * The options to pass + */ +export type WithReducerOptions = { + initialState: S, + reducer: (state: S, action: A) => S +}; + +export type WithReducerProps = RenderPropsProps, WithReducerContext>; + +export class WithReducer extends React.Component, WithReducerState> { + state: WithReducerState = { + value: this.props.initialState, + }; + + constructor(props: WithReducerProps) { + super(props); + this.dispatch = this.dispatch.bind(this); + } + + dispatch(a: A) { + this.setState(state => ({ + value: this.props.reducer(state.value, a) + })) + } + + render() { + return this.props.children({ + state: this.state.value, + dispatch: this.dispatch, + }); + } +} + +export function withReducer(reducer: (state: S, action: A) => S, initialState: S): ChainableComponent> { + return fromRenderProp>(WithReducer, {reducer, initialState}); +} diff --git a/yarn.lock b/yarn.lock index 78f39b1..93fe72a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -573,56 +573,6 @@ babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: esutils "^2.0.2" js-tokens "^3.0.2" -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - dependencies: - babel-runtime "^6.22.0" - -babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.7.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" - -babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - balanced-match@^0.4.2: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" @@ -1217,10 +1167,6 @@ core-js@^1.0.0: version "1.2.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" -core-js@^2.4.0: - version "2.5.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" - core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -1715,12 +1661,6 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -error-stack-parser@^1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-1.3.6.tgz#e0e73b93e417138d1cd7c0b746b1a4a14854c292" - dependencies: - stackframe "^0.3.1" - es-abstract@^1.4.3, es-abstract@^1.5.1, es-abstract@^1.7.0: version "1.12.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" @@ -1975,7 +1915,7 @@ fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" -fast-levenshtein@~2.0.4: +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" @@ -2250,10 +2190,6 @@ global@^4.3.0: min-document "^2.19.0" process "~0.5.1" -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - globby@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" @@ -2400,6 +2336,13 @@ hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.0: version "2.5.5" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" +hoist-non-react-statics@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz#b09178f0122184fb95acf525daaecb4d8f45958b" + integrity sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA== + dependencies: + react-is "^16.7.0" + homedir-polyfill@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" @@ -2641,7 +2584,7 @@ interpret@^1.0.0, interpret@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" -invariant@^2.2.1, invariant@^2.2.2, invariant@^2.2.4: +invariant@^2.2.1, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" dependencies: @@ -3149,10 +3092,15 @@ lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" -lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.6.1: +lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.3, lodash@^4.17.5, lodash@^4.3.0: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" +lodash@^4.17.11: + version "4.17.11" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" + integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== + log-symbols@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" @@ -4306,7 +4254,7 @@ promise@^7.1.1: dependencies: asap "~2.0.3" -prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.6.0, prop-types@^15.6.1: +prop-types@^15.5.10, prop-types@^15.6.0, prop-types@^15.6.1: version "15.6.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102" dependencies: @@ -4445,10 +4393,6 @@ rc@^1.1.7: minimist "^1.2.0" strip-json-comments "~2.0.1" -react-deep-force-update@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-2.1.1.tgz#8ea4263cd6455a050b37445b3f08fd839d86e909" - react-dom@^16.0.0: version "16.4.1" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.4.1.tgz#7f8b0223b3a5fbe205116c56deb85de32685dad6" @@ -4458,27 +4402,30 @@ react-dom@^16.0.0: object-assign "^4.1.1" prop-types "^15.6.0" -react-hot-loader@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-3.0.0.tgz#6e28da9d459da8085f5ee8bdd775046ba4b5cd0b" +react-hot-loader@^4.8.4: + version "4.8.4" + resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.8.4.tgz#357ba342e367fd42d6a870a9c0601c23fa0730c6" + integrity sha512-O98btZXcm24ZgP+aPBD0W9N+GEnkOg6vlLEy/IMZ53u3K/dGqO0I/RU4qrmQzE+wMDLpwNo5TwxaAjVw9Y+IBA== dependencies: - babel-template "^6.7.0" + fast-levenshtein "^2.0.6" global "^4.3.0" - react-deep-force-update "^2.1.1" - react-proxy "^3.0.0-alpha.0" - redbox-react "^1.3.6" - source-map "^0.6.1" + hoist-non-react-statics "^3.3.0" + loader-utils "^1.1.0" + lodash "^4.17.11" + prop-types "^15.6.1" + react-lifecycles-compat "^3.0.4" + shallowequal "^1.0.2" + source-map "^0.7.3" + +react-is@^16.7.0: + version "16.8.6" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16" + integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA== -react-lifecycles-compat@^3.0.2: +react-lifecycles-compat@^3.0.2, react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" -react-proxy@^3.0.0-alpha.0: - version "3.0.0-alpha.1" - resolved "https://registry.yarnpkg.com/react-proxy/-/react-proxy-3.0.0-alpha.1.tgz#4400426bcfa80caa6724c7755695315209fa4b07" - dependencies: - lodash "^4.6.1" - react-router@^4.2.0: version "4.3.1" resolved "https://registry.yarnpkg.com/react-router/-/react-router-4.3.1.tgz#aada4aef14c809cb2e686b05cee4742234506c4e" @@ -4579,15 +4526,6 @@ recompose@^0.28.2: react-lifecycles-compat "^3.0.2" symbol-observable "^1.0.4" -redbox-react@^1.3.6: - version "1.6.0" - resolved "https://registry.yarnpkg.com/redbox-react/-/redbox-react-1.6.0.tgz#e753ac02595bc1bf695b3935889a4f5b1b5a21a1" - dependencies: - error-stack-parser "^1.3.6" - object-assign "^4.0.1" - prop-types "^15.5.4" - sourcemapped-stacktrace "^1.1.6" - redent@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" @@ -4613,10 +4551,6 @@ regenerate@^1.2.1: version "1.4.0" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - regenerator-runtime@^0.12.0: version "0.12.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" @@ -4938,6 +4872,11 @@ sha.js@^2.4.0, sha.js@^2.4.8: inherits "^2.0.1" safe-buffer "^5.0.1" +shallowequal@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" + integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -5052,10 +4991,6 @@ source-map-url@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" -source-map@0.5.6: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" - source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.0, source-map@~0.5.1: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -5070,11 +5005,10 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" -sourcemapped-stacktrace@^1.1.6: - version "1.1.8" - resolved "https://registry.yarnpkg.com/sourcemapped-stacktrace/-/sourcemapped-stacktrace-1.1.8.tgz#6b7a3f1a6fb15f6d40e701e23ce404553480d688" - dependencies: - source-map "0.5.6" +source-map@^0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" + integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== spdx-correct@^3.0.0: version "3.0.0" @@ -5158,10 +5092,6 @@ ssri@^5.2.4: dependencies: safe-buffer "^5.1.1" -stackframe@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-0.3.1.tgz#33aa84f1177a5548c8935533cbfeb3420975f5a4" - static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" @@ -5384,10 +5314,6 @@ to-arraybuffer@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"