Skip to content

Commit

Permalink
fix: Upgrade to recoil to version 0.0.13 (#4270)
Browse files Browse the repository at this point in the history
* update the recoil to 0.0.13

* fix lint

* remove @type/recoil

* fix typecheck

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
  • Loading branch information
lei9444 and cwhitten committed Sep 29, 2020
1 parent 1b2b274 commit 3aeac2d
Show file tree
Hide file tree
Showing 22 changed files with 86 additions and 89 deletions.
6 changes: 3 additions & 3 deletions Composer/packages/adaptive-flow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@
},
"peerDependencies": {
"format-message": "^6.2.3",
"react": "16.13.0"
"react": "16.13.1"
},
"devDependencies": {
"@bfc/test-utils": "*",
"@types/lodash": "^4.14.146",
"@types/react": "16.9.23",
"format-message": "^6.2.3",
"json-loader": "^0.5.7",
"react": "16.13.0",
"react-dom": "16.13.0",
"react": "16.13.1",
"react-dom": "16.13.1",
"ts-loader": "7.0.4",
"tsconfig-paths-webpack-plugin": "^3.2.0"
},
Expand Down
8 changes: 4 additions & 4 deletions Composer/packages/adaptive-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"@uifabric/styling": "^7.7.4",
"format-message": "^6.2.3",
"office-ui-fabric-react": "^7.71.0",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"devDependencies": {
"@bfc/code-editor": "*",
Expand All @@ -37,8 +37,8 @@
"@types/lodash": "^4.14.149",
"@types/react": "16.9.23",
"format-message": "^6.2.3",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"dependencies": {
"@emotion/core": "^10.0.27",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('<DefineConversation/>', () => {
onSubmit={onSubmitMock}
/>,
({ set }) => {
set(focusedStorageFolderState, '');
set(focusedStorageFolderState, {} as StorageFolder);
set(storagesState, [{ id: 'default' }]);
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ describe('<AppSettings /> & <ElectronSettings />', () => {
it('should render the user settings page', () => {
const { getByText, getAllByText } = renderWithRecoil(<AppSettings />, ({ set }) => {
set(onboardingState, {
coachMarkRefs: {},
complete: false,
});
});
Expand All @@ -43,6 +44,7 @@ describe('<AppSettings /> & <ElectronSettings />', () => {
},
propertyEditorWidth: 400,
dialogNavWidth: 180,
appLocale: 'en-US',
});
});
getByText('Application Updates');
Expand Down
7 changes: 3 additions & 4 deletions Composer/packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@
"query-string": "^6.8.2",
"react-measure": "^2.3.0",
"re-resizable": "^6.3.2",
"react": "16.13.0",
"react": "16.13.1",
"react-app-polyfill": "^0.2.1",
"react-dev-utils": "^7.0.3",
"react-dom": "16.13.0",
"react-dom": "16.13.1",
"react-frame-component": "^4.0.2",
"react-timeago": "^4.4.0",
"recoil": "^0.0.10",
"recoil": "^0.0.13",
"styled-components": "^4.1.3",
"uuid": "^8.3.0",
"webpack-bundle-analyzer": "^3.8.0"
Expand All @@ -80,7 +80,6 @@
"@types/reach__router": "^1.2.4",
"@types/react": "16.9.23",
"@types/react-dom": "16.9.5",
"@types/recoil": "^0.0.1",
"@types/webpack-env": "^1.15.2",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.1.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { useRef, useEffect, useState, Fragment } from 'react';
import { useRef, useState, Fragment, useLayoutEffect } from 'react';
// eslint-disable-next-line @typescript-eslint/camelcase
import { atom, useRecoilTransactionObserver_UNSTABLE, Snapshot, useRecoilState } from 'recoil';
import once from 'lodash/once';
Expand Down Expand Up @@ -72,7 +72,9 @@ const InitDispatcher = ({ onLoad }) => {

const [currentDispatcherState, setDispatcher] = useRecoilState(dispatcherState);

useEffect(() => {
//The render order is different with 0.0.10, the local state will trigger a render before atom value
//so use the useLayoutEffect here
useLayoutEffect(() => {
setDispatcher(dispatcherRef.current);
prepareAxiosWithRecoil(currentDispatcherState);
onLoad(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const mockCallback: CallbackInterface = {
reset: jest.fn(),
gotoSnapshot: jest.fn(),
snapshot: {
getID: jest.fn(),
getLoadable: jest.fn(),
getPromise: jest.fn(),
map: jest.fn(),
Expand Down
8 changes: 4 additions & 4 deletions Composer/packages/extension-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
"clean": "rimraf lib"
},
"peerDependencies": {
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"devDependencies": {
"@bfc/test-utils": "*",
"@types/react": "16.9.23",
"react": "16.13.0",
"react-dom": "16.13.0",
"react": "16.13.1",
"react-dom": "16.13.1",
"rimraf": "^3.0.2",
"typescript": "3.9.2"
},
Expand Down
4 changes: 2 additions & 2 deletions Composer/packages/intellisense/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
},
"peerDependencies": {
"office-ui-fabric-react": "^7.71.0",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"dependencies": {
"websocket": "^1.0.31",
Expand Down
8 changes: 4 additions & 4 deletions Composer/packages/lib/code-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"watch": "yarn build:ts --watch"
},
"peerDependencies": {
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"devDependencies": {
"@bfc/test-utils": "*",
Expand All @@ -42,8 +42,8 @@
"html-webpack-plugin": "^3.2.0",
"mini-css-extract-plugin": "^0.6.0",
"postcss-loader": "^3.0.0",
"react-dom": "16.13.0",
"react": "16.13.0",
"react-dom": "16.13.1",
"react": "16.13.1",
"rimraf": "^2.6.3",
"style-loader": "^0.23.1",
"ts-loader": "7.0.4",
Expand Down
8 changes: 4 additions & 4 deletions Composer/packages/lib/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"watch": "yarn build:ts --watch"
},
"peerDependencies": {
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"devDependencies": {
"@bfc/test-utils": "*",
Expand All @@ -32,8 +32,8 @@
"autoprefixer": "^9.5.1",
"copyfiles": "^2.1.0",
"office-ui-fabric-react": "^7.88.1",
"react": "16.13.0",
"react-dom": "16.13.0",
"react": "16.13.1",
"react-dom": "16.13.1",
"rimraf": "^2.6.3"
},
"dependencies": {
Expand Down
8 changes: 4 additions & 4 deletions Composer/packages/lib/ui-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
"@emotion/core": "^10.0.27",
"@emotion/styled": "^10.0.27",
"@bfc/extension-client": "*",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"devDependencies": {
"@bfc/adaptive-form": "*",
"@bfc/extension-client": "*",
"@bfc/test-utils": "*",
"@types/react": "16.9.23",
"@types/react-dom": "16.9.5",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"dependencies": {
"@bfc/shared": "*",
Expand Down
8 changes: 4 additions & 4 deletions Composer/packages/ui-plugins/composer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"@uifabric/icons": "^7.3.0",
"@uifabric/styling": "^7.7.4",
"office-ui-fabric-react": "^7.71.0",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"devDependencies": {
"@bfc/adaptive-form": "*",
Expand All @@ -36,8 +36,8 @@
"@types/react": "16.9.23",
"@types/react-dom": "16.9.5",
"format-message-cli": "^6.2.3",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"dependencies": {
"lodash": "^4.17.19"
Expand Down
8 changes: 4 additions & 4 deletions Composer/packages/ui-plugins/cross-trained/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@
"peerDependencies": {
"@bfc/adaptive-form": "*",
"@bfc/extension-client": "*",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"devDependencies": {
"@bfc/adaptive-form": "*",
"@bfc/extension-client": "*",
"@types/react": "16.9.23",
"@types/react-dom": "16.9.5",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"dependencies": {
"@bfc/shared": "*",
Expand Down
8 changes: 4 additions & 4 deletions Composer/packages/ui-plugins/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"@uifabric/icons": "^7.3.0",
"@uifabric/styling": "^7.7.4",
"office-ui-fabric-react": "^7.71.0",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"devDependencies": {
"@bfc/adaptive-form": "*",
Expand All @@ -33,8 +33,8 @@
"@emotion/core": "^10.0.27",
"@types/react": "16.9.23",
"@types/react-dom": "16.9.5",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"dependencies": {
}
Expand Down
8 changes: 4 additions & 4 deletions Composer/packages/ui-plugins/lg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
"peerDependencies": {
"@bfc/adaptive-form": "*",
"@bfc/extension-client": "*",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"devDependencies": {
"@bfc/adaptive-form": "*",
"@bfc/extension-client": "*",
"@bfc/test-utils": "*",
"@types/react": "16.9.23",
"@types/react-dom": "16.9.5",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"dependencies": {
"@bfc/shared": "*",
Expand Down
8 changes: 4 additions & 4 deletions Composer/packages/ui-plugins/luis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
"@bfc/adaptive-form": "*",
"@bfc/extension-client": "*",
"@bfc/shared": "*",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"devDependencies": {
"@bfc/adaptive-form": "*",
"@bfc/extension-client": "*",
"@bfc/test-utils": "*",
"@types/react": "16.9.23",
"@types/react-dom": "16.9.5",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"dependencies": {
"@bfc/shared": "*",
Expand Down
8 changes: 4 additions & 4 deletions Composer/packages/ui-plugins/prompts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"@uifabric/styling": "^7.7.4",
"format-message": "^6.2.3",
"office-ui-fabric-react": "^7.71.0",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"devDependencies": {
"@bfc/extension-client": "*",
Expand All @@ -39,8 +39,8 @@
"@types/react-dom": "16.9.5",
"format-message": "^6.2.3",
"format-message-cli": "^6.2.3",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"dependencies": {
"@bfc/shared": "*",
Expand Down
8 changes: 4 additions & 4 deletions Composer/packages/ui-plugins/schema-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"@bfc/adaptive-form": "*",
"@bfc/code-editor": "*",
"format-message": "^6.2.3",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"devDependencies": {
"@bfc/extension-client": "*",
Expand All @@ -34,8 +34,8 @@
"@types/react": "16.9.23",
"@types/react-dom": "16.9.5",
"format-message": "^6.2.3",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"dependencies": {
"@emotion/core": "^10.0.27"
Expand Down
8 changes: 4 additions & 4 deletions Composer/packages/ui-plugins/select-dialog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"@uifabric/styling": "^7.7.4",
"format-message": "^6.2.3",
"office-ui-fabric-react": "^7.71.0",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"devDependencies": {
"@bfc/extension-client": "*",
Expand All @@ -39,8 +39,8 @@
"@types/react-dom": "16.9.5",
"format-message": "^6.2.3",
"format-message-cli": "6.2.3",
"react": "16.13.0",
"react-dom": "16.13.0"
"react": "16.13.1",
"react-dom": "16.13.1"
},
"dependencies": {
"@emotion/core": "^10.0.27"
Expand Down
Loading

0 comments on commit 3aeac2d

Please sign in to comment.