diff --git a/packages/asc-web-common/package.json b/packages/asc-web-common/package.json index d4c8caa910..a11866a052 100644 --- a/packages/asc-web-common/package.json +++ b/packages/asc-web-common/package.json @@ -16,6 +16,9 @@ "proxy": { "url": "" }, + "devDependencies": { + "@welldone-software/why-did-you-render": "^6.2.1" + }, "dependencies": { "fast-deep-equal": "^3.1.3", "global": "^4.4.0", diff --git a/products/ASC.CRM/Client/src/wdyr.js b/packages/asc-web-common/utils/wdyr.js similarity index 77% rename from products/ASC.CRM/Client/src/wdyr.js rename to packages/asc-web-common/utils/wdyr.js index 19a8d822a5..acd2f98429 100644 --- a/products/ASC.CRM/Client/src/wdyr.js +++ b/packages/asc-web-common/utils/wdyr.js @@ -5,8 +5,5 @@ if (process.env.NODE_ENV === "development") { whyDidYouRender(React, { trackAllPureComponents: true, collapseGroups: true, - //trackExtraHooks: [ - // [ReactRedux, 'useSelector'] - //] }); } diff --git a/products/ASC.CRM/Client/src/App.js b/products/ASC.CRM/Client/src/App.js index c3a3323af5..8b90cd0b64 100644 --- a/products/ASC.CRM/Client/src/App.js +++ b/products/ASC.CRM/Client/src/App.js @@ -1,4 +1,4 @@ -//import "./wdyr"; +import "@appserver/common/utils/wdyr"; import React from "react"; import Shell from "studio/shell"; import ErrorBoundary from "@appserver/common/components/ErrorBoundary"; diff --git a/products/ASC.Calendar/Client/src/App.js b/products/ASC.Calendar/Client/src/App.js index c3a3323af5..8b90cd0b64 100644 --- a/products/ASC.Calendar/Client/src/App.js +++ b/products/ASC.Calendar/Client/src/App.js @@ -1,4 +1,4 @@ -//import "./wdyr"; +import "@appserver/common/utils/wdyr"; import React from "react"; import Shell from "studio/shell"; import ErrorBoundary from "@appserver/common/components/ErrorBoundary"; diff --git a/products/ASC.Calendar/Client/src/wdyr.js b/products/ASC.Calendar/Client/src/wdyr.js deleted file mode 100644 index 19a8d822a5..0000000000 --- a/products/ASC.Calendar/Client/src/wdyr.js +++ /dev/null @@ -1,12 +0,0 @@ -import React from "react"; - -if (process.env.NODE_ENV === "development") { - const whyDidYouRender = require("@welldone-software/why-did-you-render"); - whyDidYouRender(React, { - trackAllPureComponents: true, - collapseGroups: true, - //trackExtraHooks: [ - // [ReactRedux, 'useSelector'] - //] - }); -} diff --git a/products/ASC.Files/Client/package.json b/products/ASC.Files/Client/package.json index 75165a8ab5..cadd8f8a7d 100644 --- a/products/ASC.Files/Client/package.json +++ b/products/ASC.Files/Client/package.json @@ -44,7 +44,6 @@ }, "dependencies": { "@babel/runtime": "^7.15.4", - "@welldone-software/why-did-you-render": "^4.2.5", "attr-accept": "^2.2.2", "axios": "^0.21.0", "copy-to-clipboard": "^3.2.0", diff --git a/products/ASC.Files/Client/src/App.js b/products/ASC.Files/Client/src/App.js index c3a3323af5..8b90cd0b64 100644 --- a/products/ASC.Files/Client/src/App.js +++ b/products/ASC.Files/Client/src/App.js @@ -1,4 +1,4 @@ -//import "./wdyr"; +import "@appserver/common/utils/wdyr"; import React from "react"; import Shell from "studio/shell"; import ErrorBoundary from "@appserver/common/components/ErrorBoundary"; diff --git a/products/ASC.Files/Client/src/wdyr.js b/products/ASC.Files/Client/src/wdyr.js deleted file mode 100644 index 19a8d822a5..0000000000 --- a/products/ASC.Files/Client/src/wdyr.js +++ /dev/null @@ -1,12 +0,0 @@ -import React from "react"; - -if (process.env.NODE_ENV === "development") { - const whyDidYouRender = require("@welldone-software/why-did-you-render"); - whyDidYouRender(React, { - trackAllPureComponents: true, - collapseGroups: true, - //trackExtraHooks: [ - // [ReactRedux, 'useSelector'] - //] - }); -} diff --git a/products/ASC.Mail/Client/src/App.js b/products/ASC.Mail/Client/src/App.js index c3a3323af5..8b90cd0b64 100644 --- a/products/ASC.Mail/Client/src/App.js +++ b/products/ASC.Mail/Client/src/App.js @@ -1,4 +1,4 @@ -//import "./wdyr"; +import "@appserver/common/utils/wdyr"; import React from "react"; import Shell from "studio/shell"; import ErrorBoundary from "@appserver/common/components/ErrorBoundary"; diff --git a/products/ASC.Mail/Client/src/wdyr.js b/products/ASC.Mail/Client/src/wdyr.js deleted file mode 100644 index 19a8d822a5..0000000000 --- a/products/ASC.Mail/Client/src/wdyr.js +++ /dev/null @@ -1,12 +0,0 @@ -import React from "react"; - -if (process.env.NODE_ENV === "development") { - const whyDidYouRender = require("@welldone-software/why-did-you-render"); - whyDidYouRender(React, { - trackAllPureComponents: true, - collapseGroups: true, - //trackExtraHooks: [ - // [ReactRedux, 'useSelector'] - //] - }); -} diff --git a/products/ASC.People/Client/src/App.js b/products/ASC.People/Client/src/App.js index c3a3323af5..8b90cd0b64 100644 --- a/products/ASC.People/Client/src/App.js +++ b/products/ASC.People/Client/src/App.js @@ -1,4 +1,4 @@ -//import "./wdyr"; +import "@appserver/common/utils/wdyr"; import React from "react"; import Shell from "studio/shell"; import ErrorBoundary from "@appserver/common/components/ErrorBoundary"; diff --git a/products/ASC.People/Client/src/wdyr.js b/products/ASC.People/Client/src/wdyr.js deleted file mode 100644 index 19a8d822a5..0000000000 --- a/products/ASC.People/Client/src/wdyr.js +++ /dev/null @@ -1,12 +0,0 @@ -import React from "react"; - -if (process.env.NODE_ENV === "development") { - const whyDidYouRender = require("@welldone-software/why-did-you-render"); - whyDidYouRender(React, { - trackAllPureComponents: true, - collapseGroups: true, - //trackExtraHooks: [ - // [ReactRedux, 'useSelector'] - //] - }); -} diff --git a/products/ASC.Projects/Client/src/App.js b/products/ASC.Projects/Client/src/App.js index c3a3323af5..8b90cd0b64 100644 --- a/products/ASC.Projects/Client/src/App.js +++ b/products/ASC.Projects/Client/src/App.js @@ -1,4 +1,4 @@ -//import "./wdyr"; +import "@appserver/common/utils/wdyr"; import React from "react"; import Shell from "studio/shell"; import ErrorBoundary from "@appserver/common/components/ErrorBoundary"; diff --git a/products/ASC.Projects/Client/src/wdyr.js b/products/ASC.Projects/Client/src/wdyr.js deleted file mode 100644 index 19a8d822a5..0000000000 --- a/products/ASC.Projects/Client/src/wdyr.js +++ /dev/null @@ -1,12 +0,0 @@ -import React from "react"; - -if (process.env.NODE_ENV === "development") { - const whyDidYouRender = require("@welldone-software/why-did-you-render"); - whyDidYouRender(React, { - trackAllPureComponents: true, - collapseGroups: true, - //trackExtraHooks: [ - // [ReactRedux, 'useSelector'] - //] - }); -} diff --git a/yarn.lock b/yarn.lock index d72434fd7d..2e4ac838ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5002,10 +5002,10 @@ resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.5.2.tgz#ea584b637ff63c5a477f6f21604b5a205b72c9ec" integrity sha512-vgJ5OLWadI8aKjDlOH3rb+dYyPd2GTZuQC/Tihjct6F9GpXGZINo3Y/IVuZVTM1eDQB+/AOsjPUWH/WySDaXvw== -"@welldone-software/why-did-you-render@^4.2.5": - version "4.3.2" - resolved "https://registry.yarnpkg.com/@welldone-software/why-did-you-render/-/why-did-you-render-4.3.2.tgz#db1c700df1729402f2ceacf05cebd72dca30f1af" - integrity sha512-pzaFmUUH+FjbsDgcMB1xNPncIaxibvo0FLbGySLIh+v+7Bp5pqSJFO6zlqo4orPLm3nAdYEgL2vrlj8befoypg== +"@welldone-software/why-did-you-render@^6.2.1": + version "6.2.1" + resolved "https://registry.yarnpkg.com/@welldone-software/why-did-you-render/-/why-did-you-render-6.2.1.tgz#6a87926cc8386b748dc07341cf495caa5be1db28" + integrity sha512-eIVKeK6ueS3tuzCqMVTaaNrPYvb9cA8NHiNgLA7Op8SD4TiT31zqNjxmhzLEK+y3sBxcwr6YhsiQGX9EThrvaw== dependencies: lodash "^4"