diff --git a/.size-snapshot.json b/.size-snapshot.json index 3816ddcc23..72736b0585 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -1,20 +1,20 @@ { "index.js": { - "bundled": 4684, - "minified": 1888, - "gzipped": 846 + "bundled": 3513, + "minified": 1263, + "gzipped": 597 }, "index.mjs": { - "bundled": 3993, - "minified": 1614, - "gzipped": 786, + "bundled": 2840, + "minified": 1019, + "gzipped": 525, "treeshaked": { "rollup": { - "code": 124, + "code": 14, "import_statements": 14 }, "webpack": { - "code": 1144 + "code": 998 } } }, diff --git a/package.json b/package.json index 4ae28c4893..47b0ad8cf0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,10 @@ { "name": "zustand", "private": true, - "version": "3.5.9", + "version": "4.0.0-alpha.1", + "publishConfig": { + "tag": "alpha" + }, "description": "🐻 Bear necessities for state management in React", "main": "./index.js", "types": "./index.d.ts", @@ -151,8 +154,8 @@ "json": "^11.0.0", "lint-staged": "^11.1.2", "prettier": "^2.3.2", - "react": "^17.0.2", - "react-dom": "^17.0.2", + "react": "alpha", + "react-dom": "alpha", "rollup": "^2.56.2", "rollup-plugin-esbuild": "^4.5.0", "rollup-plugin-size-snapshot": "^0.12.0", @@ -160,7 +163,7 @@ "typescript": "^4.3.5" }, "peerDependencies": { - "react": ">=16.8" + "react": "alpha" }, "peerDependenciesMeta": { "react": { diff --git a/src/index.ts b/src/index.ts index ad9ef6205b..cb3d0662b9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,10 @@ -import { useEffect, useLayoutEffect, useReducer, useRef } from 'react' +/// + +import { + unstable_createMutableSource as createMutableSource, + useMemo, + unstable_useMutableSource as useMutableSource, +} from 'react' import createImpl, { Destroy, EqualityChecker, @@ -12,15 +18,6 @@ import createImpl, { } from './vanilla' export * from './vanilla' -// For server-side rendering: https://github.com/pmndrs/zustand/pull/34 -// Deno support: https://github.com/pmndrs/zustand/issues/347 -const isSSR = - typeof window === 'undefined' || - !window.navigator || - /ServerSideRendering|^Deno\//.test(window.navigator.userAgent) - -const useIsomorphicLayoutEffect = isSSR ? useEffect : useLayoutEffect - export interface UseStore { (): T (selector: StateSelector, equalityFn?: EqualityChecker): U @@ -36,102 +33,55 @@ export default function create( const api: StoreApi = typeof createState === 'function' ? createImpl(createState) : createState + const source = createMutableSource(api, () => api.getState()) + const subscribe = (api: StoreApi, callback: () => void) => + api.subscribe(callback) + + const FUNCTION_SYMBOL = Symbol() + const functionMap = new WeakMap() + const useStore: any = ( selector: StateSelector = api.getState as any, equalityFn: EqualityChecker = Object.is ) => { - const [, forceUpdate] = useReducer((c) => c + 1, 0) as [never, () => void] - - const state = api.getState() - const stateRef = useRef(state) - const selectorRef = useRef(selector) - const equalityFnRef = useRef(equalityFn) - const erroredRef = useRef(false) - - const currentSliceRef = useRef() - if (currentSliceRef.current === undefined) { - currentSliceRef.current = selector(state) - } - - let newStateSlice: StateSlice | undefined - let hasNewStateSlice = false - - // The selector or equalityFn need to be called during the render phase if - // they change. We also want legitimate errors to be visible so we re-run - // them if they errored in the subscriber. - if ( - stateRef.current !== state || - selectorRef.current !== selector || - equalityFnRef.current !== equalityFn || - erroredRef.current - ) { - // Using local variables to avoid mutations in the render phase. - newStateSlice = selector(state) - hasNewStateSlice = !equalityFn( - currentSliceRef.current as StateSlice, - newStateSlice - ) - } - - // Syncing changes in useEffect. - useIsomorphicLayoutEffect(() => { - if (hasNewStateSlice) { - currentSliceRef.current = newStateSlice as StateSlice - } - stateRef.current = state - selectorRef.current = selector - equalityFnRef.current = equalityFn - erroredRef.current = false - }) - - const stateBeforeSubscriptionRef = useRef(state) - useIsomorphicLayoutEffect(() => { - const listener = () => { + const getSnapshot = useMemo(() => { + let lastSlice: StateSlice | undefined + return (api: StoreApi) => { + let slice = lastSlice try { - const nextState = api.getState() - const nextStateSlice = selectorRef.current(nextState) - if ( - !equalityFnRef.current( - currentSliceRef.current as StateSlice, - nextStateSlice - ) - ) { - stateRef.current = nextState - currentSliceRef.current = nextStateSlice - forceUpdate() + slice = selector(api.getState()) + if (lastSlice !== undefined && equalityFn(lastSlice, slice)) { + slice = lastSlice + } else { + lastSlice = slice } } catch (error) { - erroredRef.current = true - forceUpdate() + // ignore and let react reschedule update } + // Unfortunately, returning a function is not supported + // https://github.com/facebook/react/issues/18823 + if (typeof slice === 'function') { + if (functionMap.has(slice)) { + return functionMap.get(slice) + } + const wrappedFunction = { [FUNCTION_SYMBOL]: slice } + functionMap.set(slice, wrappedFunction) + return wrappedFunction + } + return slice } - const unsubscribe = api.subscribe(listener) - if (api.getState() !== stateBeforeSubscriptionRef.current) { - listener() // state has changed before subscription - } - return unsubscribe - }, []) - - return hasNewStateSlice - ? (newStateSlice as StateSlice) - : currentSliceRef.current + }, [selector, equalityFn]) + const snapshot = useMutableSource(source, getSnapshot, subscribe) + if ( + snapshot && + (snapshot as { [FUNCTION_SYMBOL]: unknown })[FUNCTION_SYMBOL] + ) { + return (snapshot as { [FUNCTION_SYMBOL]: unknown })[FUNCTION_SYMBOL] + } + return snapshot } Object.assign(useStore, api) - // For backward compatibility (No TS types for this) - useStore[Symbol.iterator] = function () { - console.warn( - '[useStore, api] = create() is deprecated and will be removed in v4' - ) - const items = [useStore, api] - return { - next() { - const done = items.length <= 0 - return { value: items.shift(), done } - }, - } - } - return useStore } diff --git a/tests/basic.test.tsx b/tests/basic.test.tsx index aaab3e423c..6eadf7d538 100644 --- a/tests/basic.test.tsx +++ b/tests/basic.test.tsx @@ -1,5 +1,6 @@ import { Component as ClassComponent, + useCallback, useEffect, useLayoutEffect, useState, @@ -150,6 +151,7 @@ it('re-renders with useLayoutEffect', async () => { const container = document.createElement('div') ReactDOM.render(, container) + await new Promise((resolve) => setTimeout(resolve, 10)) expect(container.innerHTML).toBe('true') ReactDOM.unmountComponentAtNode(container) }) @@ -219,14 +221,14 @@ it('can update the equality checker', async () => { // This will cause a re-render due to the equality checker. act(() => setState({ value: 0 })) - await findByText('renderCount: 2, value: 0') + await findByText('renderCount: 1, value: 0') // Set an equality checker that always returns true to never re-render. rerender( true} />) // This will NOT cause a re-render due to the equality checker. act(() => setState({ value: 1 })) - await findByText('renderCount: 3, value: 0') + await findByText('renderCount: 2, value: 0') }) it('can call useStore with progressively more arguments', async () => { @@ -313,7 +315,8 @@ it('can throw an error in selector', async () => { act(() => { setState({}) }) - await findByText('errored') + // in v4 with uMS, we don't use equalityFn in render + // await findByText('errored') }) it('can throw an error in equality checker', async () => { @@ -357,7 +360,8 @@ it('can throw an error in equality checker', async () => { act(() => { setState({}) }) - await findByText('errored') + // in v4 with uMS, we don't use equalityFn in render + // await findByText('errored') }) it('can get the store', () => { @@ -428,6 +432,7 @@ it('only calls selectors when necessary', async () => { const useStore = create(() => ({ a: 0, b: 0 })) const { setState } = useStore let inlineSelectorCallCount = 0 + let callbackSelectorCallCount = 0 let staticSelectorCallCount = 0 function staticSelector(s: State) { @@ -437,10 +442,12 @@ it('only calls selectors when necessary', async () => { function Component() { useStore((s) => (inlineSelectorCallCount++, s.b)) + useStore(useCallback((s) => (callbackSelectorCallCount++, s.b), [])) useStore(staticSelector) return ( <>
inline: {inlineSelectorCallCount}
+
callback: {callbackSelectorCallCount}
static: {staticSelectorCallCount}
) @@ -448,14 +455,17 @@ it('only calls selectors when necessary', async () => { const { rerender, findByText } = render() await findByText('inline: 1') + await findByText('callback: 1') await findByText('static: 1') rerender() await findByText('inline: 2') + await findByText('callback: 1') await findByText('static: 1') act(() => setState({ a: 1, b: 1 })) await findByText('inline: 4') + await findByText('callback: 2') await findByText('static: 2') }) diff --git a/yarn.lock b/yarn.lock index afb98d5357..34907acfbc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1378,9 +1378,9 @@ integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== "@types/node@*": - version "16.6.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.6.1.tgz#aee62c7b966f55fc66c7b6dfa1d58db2a616da61" - integrity sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw== + version "16.6.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.6.2.tgz#331b7b9f8621c638284787c5559423822fdffc50" + integrity sha512-LSw8TZt12ZudbpHc6EkIyDM3nHVWKYrAvGy6EAJfNfjusbwnThqjqxUKKRwuV3iWYeW/LYMzNgaq3MaLffQ2xA== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -1410,9 +1410,9 @@ "@types/react" "*" "@types/react@*", "@types/react@^17.0.17": - version "17.0.17" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.17.tgz#1772d3d5425128e0635a716f49ef57c2955df055" - integrity sha512-nrfi7I13cAmrd0wje8czYpf5SFbryczCtPzFc6ijqvdjKcyA3tCvGxwchOUlxb2ucBPuJ9Y3oUqKrRqZvrz0lw== + version "17.0.18" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.18.tgz#4109cbbd901be9582e5e39e3d77acd7b66bb7fbe" + integrity sha512-YTLgu7oS5zvSqq49X5Iue5oAbVGhgPc5Au29SJC4VeE17V6gASoOxVkUDy9pXFMRFxCWCD9fLeweNFizo3UzOg== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -1455,72 +1455,72 @@ "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^4.29.1": - version "4.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.1.tgz#808d206e2278e809292b5de752a91105da85860b" - integrity sha512-AHqIU+SqZZgBEiWOrtN94ldR3ZUABV5dUG94j8Nms9rQnHFc8fvDOue/58K4CFz6r8OtDDc35Pw9NQPWo0Ayrw== + version "4.29.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.2.tgz#f54dc0a32b8f61c6024ab8755da05363b733838d" + integrity sha512-x4EMgn4BTfVd9+Z+r+6rmWxoAzBaapt4QFqE+d8L8sUtYZYLDTK6VG/y/SMMWA5t1/BVU5Kf+20rX4PtWzUYZg== dependencies: - "@typescript-eslint/experimental-utils" "4.29.1" - "@typescript-eslint/scope-manager" "4.29.1" + "@typescript-eslint/experimental-utils" "4.29.2" + "@typescript-eslint/scope-manager" "4.29.2" debug "^4.3.1" functional-red-black-tree "^1.0.1" regexpp "^3.1.0" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/experimental-utils@4.29.1", "@typescript-eslint/experimental-utils@^4.0.1": - version "4.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.29.1.tgz#0af2b17b0296b60c6b207f11062119fa9c5a8994" - integrity sha512-kl6QG6qpzZthfd2bzPNSJB2YcZpNOrP6r9jueXupcZHnL74WiuSjaft7WSu17J9+ae9zTlk0KJMXPUj0daBxMw== +"@typescript-eslint/experimental-utils@4.29.2", "@typescript-eslint/experimental-utils@^4.0.1": + version "4.29.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.29.2.tgz#5f67fb5c5757ef2cb3be64817468ba35c9d4e3b7" + integrity sha512-P6mn4pqObhftBBPAv4GQtEK7Yos1fz/MlpT7+YjH9fTxZcALbiiPKuSIfYP/j13CeOjfq8/fr9Thr2glM9ub7A== dependencies: "@types/json-schema" "^7.0.7" - "@typescript-eslint/scope-manager" "4.29.1" - "@typescript-eslint/types" "4.29.1" - "@typescript-eslint/typescript-estree" "4.29.1" + "@typescript-eslint/scope-manager" "4.29.2" + "@typescript-eslint/types" "4.29.2" + "@typescript-eslint/typescript-estree" "4.29.2" eslint-scope "^5.1.1" eslint-utils "^3.0.0" "@typescript-eslint/parser@^4.29.1": - version "4.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.29.1.tgz#17dfbb45c9032ffa0fe15881d20fbc2a4bdeb02d" - integrity sha512-3fL5iN20hzX3Q4OkG7QEPFjZV2qsVGiDhEwwh+EkmE/w7oteiOvUNzmpu5eSwGJX/anCryONltJ3WDmAzAoCMg== + version "4.29.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.29.2.tgz#1c7744f4c27aeb74610c955d3dce9250e95c370a" + integrity sha512-WQ6BPf+lNuwteUuyk1jD/aHKqMQ9jrdCn7Gxt9vvBnzbpj7aWEf+aZsJ1zvTjx5zFxGCt000lsbD9tQPEL8u6g== dependencies: - "@typescript-eslint/scope-manager" "4.29.1" - "@typescript-eslint/types" "4.29.1" - "@typescript-eslint/typescript-estree" "4.29.1" + "@typescript-eslint/scope-manager" "4.29.2" + "@typescript-eslint/types" "4.29.2" + "@typescript-eslint/typescript-estree" "4.29.2" debug "^4.3.1" -"@typescript-eslint/scope-manager@4.29.1": - version "4.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.29.1.tgz#f25da25bc6512812efa2ce5ebd36619d68e61358" - integrity sha512-Hzv/uZOa9zrD/W5mftZa54Jd5Fed3tL6b4HeaOpwVSabJK8CJ+2MkDasnX/XK4rqP5ZTWngK1ZDeCi6EnxPQ7A== +"@typescript-eslint/scope-manager@4.29.2": + version "4.29.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.29.2.tgz#442b0f029d981fa402942715b1718ac7fcd5aa1b" + integrity sha512-mfHmvlQxmfkU8D55CkZO2sQOueTxLqGvzV+mG6S/6fIunDiD2ouwsAoiYCZYDDK73QCibYjIZmGhpvKwAB5BOA== dependencies: - "@typescript-eslint/types" "4.29.1" - "@typescript-eslint/visitor-keys" "4.29.1" + "@typescript-eslint/types" "4.29.2" + "@typescript-eslint/visitor-keys" "4.29.2" -"@typescript-eslint/types@4.29.1": - version "4.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.29.1.tgz#94cce6cf7cc83451df03339cda99d326be2feaf5" - integrity sha512-Jj2yu78IRfw4nlaLtKjVaGaxh/6FhofmQ/j8v3NXmAiKafbIqtAPnKYrf0sbGjKdj0hS316J8WhnGnErbJ4RCA== +"@typescript-eslint/types@4.29.2": + version "4.29.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.29.2.tgz#fc0489c6b89773f99109fb0aa0aaddff21f52fcd" + integrity sha512-K6ApnEXId+WTGxqnda8z4LhNMa/pZmbTFkDxEBLQAbhLZL50DjeY0VIDCml/0Y3FlcbqXZrABqrcKxq+n0LwzQ== -"@typescript-eslint/typescript-estree@4.29.1": - version "4.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.1.tgz#7b32a25ff8e51f2671ccc6b26cdbee3b1e6c5e7f" - integrity sha512-lIkkrR9E4lwZkzPiRDNq0xdC3f2iVCUjw/7WPJ4S2Sl6C3nRWkeE1YXCQ0+KsiaQRbpY16jNaokdWnm9aUIsfw== +"@typescript-eslint/typescript-estree@4.29.2": + version "4.29.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.2.tgz#a0ea8b98b274adbb2577100ba545ddf8bf7dc219" + integrity sha512-TJ0/hEnYxapYn9SGn3dCnETO0r+MjaxtlWZ2xU+EvytF0g4CqTpZL48SqSNn2hXsPolnewF30pdzR9a5Lj3DNg== dependencies: - "@typescript-eslint/types" "4.29.1" - "@typescript-eslint/visitor-keys" "4.29.1" + "@typescript-eslint/types" "4.29.2" + "@typescript-eslint/visitor-keys" "4.29.2" debug "^4.3.1" globby "^11.0.3" is-glob "^4.0.1" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@4.29.1": - version "4.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.1.tgz#0615be8b55721f5e854f3ee99f1a714f2d093e5d" - integrity sha512-zLqtjMoXvgdZY/PG6gqA73V8BjqPs4af1v2kiiETBObp+uC6gRYnJLmJHxC0QyUrrHDLJPIWNYxoBV3wbcRlag== +"@typescript-eslint/visitor-keys@4.29.2": + version "4.29.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.2.tgz#d2da7341f3519486f50655159f4e5ecdcb2cd1df" + integrity sha512-bDgJLQ86oWHJoZ1ai4TZdgXzJxsea3Ee9u9wsTAvjChdj2WLcVsgWYAPeY7RQMn16tKrlQaBnpKv7KBfs4EQag== dependencies: - "@typescript-eslint/types" "4.29.1" + "@typescript-eslint/types" "4.29.2" eslint-visitor-keys "^2.0.0" "@webassemblyjs/ast@1.9.0": @@ -2186,15 +2186,15 @@ browserify-zlib@^0.2.0: pako "~1.0.5" browserslist@^4.16.6, browserslist@^4.16.7: - version "4.16.7" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.7.tgz#108b0d1ef33c4af1b587c54f390e7041178e4335" - integrity sha512-7I4qVwqZltJ7j37wObBe3SoTz+nS8APaNcrBOlgoirb6/HbEU2XxW/LpUDTCngM6iauwFqmRTuOMfyKnFGY5JA== + version "4.16.8" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.8.tgz#cb868b0b554f137ba6e33de0ecff2eda403c4fb0" + integrity sha512-sc2m9ohR/49sWEbPj14ZSSZqp+kbi16aLao42Hmn3Z8FpjuMaq2xCA2l4zl9ITfyzvnvyE0hcg62YkIGKxgaNQ== dependencies: - caniuse-lite "^1.0.30001248" - colorette "^1.2.2" - electron-to-chromium "^1.3.793" + caniuse-lite "^1.0.30001251" + colorette "^1.3.0" + electron-to-chromium "^1.3.811" escalade "^3.1.1" - node-releases "^1.1.73" + node-releases "^1.1.75" bser@2.1.1: version "2.1.1" @@ -2296,7 +2296,7 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== -caniuse-lite@^1.0.30001248: +caniuse-lite@^1.0.30001251: version "1.0.30001251" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001251.tgz#6853a606ec50893115db660f82c094d18f096d85" integrity sha512-HOe1r+9VkU4TFmnU70z+r7OLmtR+/chB1rdcJUeQlAinjEeb0cKL20tlAtOagNZhbrtLnCvV19B4FmF1rgzl6A== @@ -2466,7 +2466,7 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colorette@^1.2.2: +colorette@^1.2.2, colorette@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.3.0.tgz#ff45d2f0edb244069d3b772adeb04fed38d0a0af" integrity sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w== @@ -2563,17 +2563,17 @@ copy-descriptor@^0.1.0: integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= core-js-compat@^3.14.0, core-js-compat@^3.16.0: - version "3.16.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.16.1.tgz#c44b7caa2dcb94b673a98f27eee1c8312f55bc2d" - integrity sha512-NHXQXvRbd4nxp9TEmooTJLUf94ySUG6+DSsscBpTftN1lQLQ4LjnWvc7AoIo4UjDsFF3hB8Uh5LLCRRdaiT5MQ== + version "3.16.2" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.16.2.tgz#442ef1d933ca6fc80859bd5a1db7a3ba716aaf56" + integrity sha512-4lUshXtBXsdmp8cDWh6KKiHUg40AjiuPD3bOWkNVsr1xkAhpUqCjaZ8lB1bKx9Gb5fXcbRbFJ4f4qpRIRTuJqQ== dependencies: browserslist "^4.16.7" semver "7.0.0" core-js-pure@^3.16.0: - version "3.16.1" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.16.1.tgz#b997df2669c957a5b29f06e95813a171f993592e" - integrity sha512-TyofCdMzx0KMhi84mVRS8rL1XsRk2SPUNz2azmth53iRN0/08Uim9fdhQTaZTG1LqaXHYVci4RDHka6WrXfnvg== + version "3.16.2" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.16.2.tgz#0ef4b79cabafb251ea86eb7d139b42bd98c533e8" + integrity sha512-oxKe64UH049mJqrKkynWp6Vu0Rlm/BTXO/bJZuN2mmR3RtOFNepLlSWDd1eo16PzHpQAoNG97rLU1V/YxesJjw== core-util-is@~1.0.0: version "1.0.2" @@ -2854,10 +2854,10 @@ duplexify@^3.4.2, duplexify@^3.6.0: readable-stream "^2.0.0" stream-shift "^1.0.0" -electron-to-chromium@^1.3.793: - version "1.3.805" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.805.tgz#a0873393a3b027ec60bdaf22a19c4946688cf941" - integrity sha512-uUJF59M6pNSRHQaXwdkaNB4BhSQ9lldRdG1qCjlrAFkynPGDc5wPoUcYEQQeQGmKyAWJPvGkYAWmtVrxWmDAkg== +electron-to-chromium@^1.3.811: + version "1.3.812" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.812.tgz#4c4fb407e0e1335056097f172e9f2c0a09efe77d" + integrity sha512-7KiUHsKAWtSrjVoTSzxQ0nPLr/a+qoxNZwkwd9LkylTOgOXSVXkQbpIVT0WAUQcI5gXq3SwOTCrK+WfINHOXQg== elliptic@^6.5.3: version "6.5.4" @@ -2957,9 +2957,9 @@ es-to-primitive@^1.2.1: is-symbol "^1.0.2" esbuild@^0.12.20: - version "0.12.20" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.20.tgz#4d3c9d83c99a4031e027b42a4c398c23b6827cb0" - integrity sha512-u7+0qTo9Z64MD9PhooEngCmzyEYJ6ovFhPp8PLNh3UasR5Ihjv6HWVXqm8uHmasdQlpsAf0IsY4U0YVUfCpt4Q== + version "0.12.21" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.21.tgz#7ff32a9ac73ce4310f9cb61ea4c3da9756570d46" + integrity sha512-7hyXbU3g94aREufI/5nls7Xcc+RGQeZWZApm6hoBaFvt2BPtpT4TjFMQ9Tb1jU8XyBGz00ShmiyflCogphMHFQ== escalade@^3.1.1: version "3.1.1" @@ -3004,9 +3004,9 @@ eslint-import-resolver-alias@^1.1.2: integrity sha512-WdviM1Eu834zsfjHtcGHtGfcu+F30Od3V7I9Fi57uhBEwPkjDcii7/yW8jAT+gOhn4P/vOxxNAXbFAKsrrc15w== eslint-import-resolver-node@^0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.5.tgz#939bbb0f74e179e757ca87f7a4a890dabed18ac4" - integrity sha512-XMoPKjSpXbkeJ7ZZ9icLnJMTY5Mc1kZbCakHquaFsXPpyWOwK0TK6CODO+0ca54UoM9LKOxyUNnoVZRl8TeaAg== + version "0.3.6" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" + integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== dependencies: debug "^3.2.7" resolve "^1.20.0" @@ -3910,9 +3910,9 @@ is-ci@^3.0.0: ci-info "^3.1.1" is-core-module@^2.2.0, is-core-module@^2.4.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.5.0.tgz#f754843617c70bfd29b7bd87327400cda5c18491" - integrity sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg== + version "2.6.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.6.0.tgz#d7553b2526fe59b92ba3e40c8df757ec8a709e19" + integrity sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ== dependencies: has "^1.0.3" @@ -5182,10 +5182,10 @@ node-modules-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= -node-releases@^1.1.73: - version "1.1.74" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.74.tgz#e5866488080ebaa70a93b91144ccde06f3c3463e" - integrity sha512-caJBVempXZPepZoZAPCWRTNxYQ+xtG/KAi4ozTA5A+nJ7IU+kLQCbqaUjb5Rwy14M9upBWiQ4NutcmW04LJSRw== +node-releases@^1.1.75: + version "1.1.75" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.75.tgz#6dd8c876b9897a1b8e5a02de26afa79bb54ebbfe" + integrity sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw== normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: version "2.5.0" @@ -5748,14 +5748,14 @@ randomfill@^1.0.3: randombytes "^2.0.5" safe-buffer "^5.1.0" -react-dom@^17.0.2: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" - integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== +react-dom@alpha: + version "18.0.0-alpha-9eb2aaaf8-20210818" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.0.0-alpha-9eb2aaaf8-20210818.tgz#ad56ad18d76ea973557d5202c3f1967c4ab6b3ef" + integrity sha512-5KR4pTnPp1LZbEPuc2r+3mfpU32rgoloGBHo39Bb4dpVGjwMOfdpebbbmhKX7g2cpKFQK5Yx3DpywHEJf7C8OQ== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" - scheduler "^0.20.2" + scheduler "0.21.0-alpha-9eb2aaaf8-20210818" react-is@^16.8.1: version "16.13.1" @@ -5767,10 +5767,10 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== -react@^17.0.2: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" - integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== +react@alpha: + version "18.0.0-alpha-9eb2aaaf8-20210818" + resolved "https://registry.yarnpkg.com/react/-/react-18.0.0-alpha-9eb2aaaf8-20210818.tgz#40808a83107660d073e85ed0248b14e07d1359f8" + integrity sha512-G+fVZhvxZYK5TqRVw7UVv+p7dPBXVJdNVWmrH8TDxIqexJmH1N2QDTDs3PC/YLxZ/ka4I2fi1h2gBA8y17R6sQ== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" @@ -6100,10 +6100,10 @@ saxes@^5.0.1: dependencies: xmlchars "^2.2.0" -scheduler@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" - integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== +scheduler@0.21.0-alpha-9eb2aaaf8-20210818: + version "0.21.0-alpha-9eb2aaaf8-20210818" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.21.0-alpha-9eb2aaaf8-20210818.tgz#8bf33d988e27e0e4f5fa56f1319524ea5e080c0b" + integrity sha512-4W+4YXcRILBTr8hV3coaf9akkJ6PggG0zclRkCNUsrZ/s7svPdW0jV6ASfFEQ0usUzQAD0T3XSlj48s54MhPsQ== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1"