Page MenuHomePhabricator

[Cashtab] Move appropriate dependencies to devDependencies
AbandonedPublic

Authored by kieran709 on Nov 30 2022, 18:57.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Summary

Related to T2815. Following the webpack upgrade, almost all dependencies were moved into the dependencies obj in package.json. Many of these dependencies are devDependencies and should be moved accordingly. Dependencies have been moved based on the installation instructions found on each packages npm page.

Test Plan

cd web/cashtab
open the package.json file
observe that several dependencies have been moved to the devDependencies obj

note any dependencies that are not in the correct obj

npm i - the dependency objects should be the same after running this command

Diff Detail

Repository
rABC Bitcoin ABC
Branch
split-dev-dependencies
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 21410
Build 42470: Build Diffcashtab-tests
Build 42469: arc lint + arc unit

Event Timeline

bytesofman requested changes to this revision.Dec 4 2022, 23:07

Workflow for making this diff is

  1. In package.json, move items from dependencies to devDependencies if that is where they belong
  2. rm package-lock.json
  3. rm -rf node_modules
  4. npm i

So, when you are done, there should be changes to both package.json and package-lock.json.

This revision now requires changes to proceed.Dec 4 2022, 23:07

Responding to review feedback

Failed tests logs:

====== CashTab Unit Tests:  Wallet with BCH balances and tokens and state field ======
Error: expect(received).toMatchSnapshot()

Snapshot name: `Wallet with BCH balances and tokens and state field 1`

- Snapshot  - 2
+ Received  + 2

@@ -54,11 +54,11 @@
                          className="ant-input-wrapper ant-input-group"
                        >
                          <span
                            className="ant-input-affix-wrapper"
                            hidden={null}
-                           onMouseDown={[Function]}
+                           onClick={[Function]}
                            style={null}
                          >
                            <span
                              className="ant-input-prefix"
                            >
@@ -161,11 +161,11 @@
                          className="ant-input-wrapper ant-input-group"
                        >
                          <span
                            className="ant-input-affix-wrapper"
                            hidden={null}
-                           onMouseDown={[Function]}
+                           onClick={[Function]}
                            style={null}
                          >
                            <span
                              className="ant-input-prefix"
                            />
    at Object.<anonymous> (/work/web/cashtab/src/components/Send/__tests__/SendToken.test.js:66:18)
    at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10)
    at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3)
    at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9)
    at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21)
    at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19)
    at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16)
    at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34)
    at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12)Error: expect(received).toMatchSnapshot()

Snapshot name: `Wallet with BCH balances and tokens and state field 1`

- Snapshot  - 2
+ Received  + 2

@@ -162,11 +162,11 @@
                                  className="ant-input-wrapper ant-input-group"
                                >
                                  <span
                                    className="ant-input-affix-wrapper"
                                    hidden={null}
-                                   onMouseDown={[Function]}
+                                   onClick={[Function]}
                                    style={null}
                                  >
                                    <span
                                      className="ant-input-prefix"
                                    >
@@ -270,11 +270,11 @@
                              <span
                                className="ant-input-group ant-input-group-compact"
                              >
                                <span
                                  className="ant-input-affix-wrapper"
-                                 onMouseDown={[Function]}
+                                 onClick={[Function]}
                                  style={
                                    Object {
                                      "textAlign": "left",
                                      "width": "60%",
                                    }
    at Object.<anonymous> (/work/web/cashtab/src/components/Send/__tests__/Send.test.js:88:18)
    at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10)
    at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3)
    at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9)
    at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21)
    at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19)
    at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16)
    at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34)
    at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12)
====== CashTab Unit Tests:  Wallet without BCH balance ======
Error: expect(received).toMatchSnapshot()

Snapshot name: `Wallet without BCH balance 1`

- Snapshot  - 2
+ Received  + 2

@@ -157,11 +157,11 @@
                                  className="ant-input-wrapper ant-input-group"
                                >
                                  <span
                                    className="ant-input-affix-wrapper"
                                    hidden={null}
-                                   onMouseDown={[Function]}
+                                   onClick={[Function]}
                                    style={null}
                                  >
                                    <span
                                      className="ant-input-prefix"
                                    >
@@ -265,11 +265,11 @@
                              <span
                                className="ant-input-group ant-input-group-compact"
                              >
                                <span
                                  className="ant-input-affix-wrapper"
-                                 onMouseDown={[Function]}
+                                 onClick={[Function]}
                                  style={
                                    Object {
                                      "textAlign": "left",
                                      "width": "60%",
                                    }
    at Object.<anonymous> (/work/web/cashtab/src/components/Send/__tests__/Send.test.js:44:18)
    at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10)
    at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3)
    at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9)
    at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21)
    at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19)
    at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16)
    at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34)
    at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12)
====== CashTab Unit Tests:  Wallet with BCH balances ======
Error: expect(received).toMatchSnapshot()

Snapshot name: `Wallet with BCH balances 1`

- Snapshot  - 2
+ Received  + 2

@@ -157,11 +157,11 @@
                                  className="ant-input-wrapper ant-input-group"
                                >
                                  <span
                                    className="ant-input-affix-wrapper"
                                    hidden={null}
-                                   onMouseDown={[Function]}
+                                   onClick={[Function]}
                                    style={null}
                                  >
                                    <span
                                      className="ant-input-prefix"
                                    >
@@ -265,11 +265,11 @@
                              <span
                                className="ant-input-group ant-input-group-compact"
                              >
                                <span
                                  className="ant-input-affix-wrapper"
-                                 onMouseDown={[Function]}
+                                 onClick={[Function]}
                                  style={
                                    Object {
                                      "textAlign": "left",
                                      "width": "60%",
                                    }
    at Object.<anonymous> (/work/web/cashtab/src/components/Send/__tests__/Send.test.js:58:18)
    at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10)
    at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3)
    at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9)
    at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21)
    at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19)
    at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16)
    at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34)
    at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12)
====== CashTab Unit Tests:  Wallet with BCH balances and tokens ======
Error: expect(received).toMatchSnapshot()

Snapshot name: `Wallet with BCH balances and tokens 1`

- Snapshot  - 2
+ Received  + 2

@@ -157,11 +157,11 @@
                                  className="ant-input-wrapper ant-input-group"
                                >
                                  <span
                                    className="ant-input-affix-wrapper"
                                    hidden={null}
-                                   onMouseDown={[Function]}
+                                   onClick={[Function]}
                                    style={null}
                                  >
                                    <span
                                      className="ant-input-prefix"
                                    >
@@ -265,11 +265,11 @@
                              <span
                                className="ant-input-group ant-input-group-compact"
                              >
                                <span
                                  className="ant-input-affix-wrapper"
-                                 onMouseDown={[Function]}
+                                 onClick={[Function]}
                                  style={
                                    Object {
                                      "textAlign": "left",
                                      "width": "60%",
                                    }
    at Object.<anonymous> (/work/web/cashtab/src/components/Send/__tests__/Send.test.js:72:18)
    at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10)
    at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3)
    at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9)
    at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21)
    at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19)
    at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16)
    at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34)
    at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12)
====== CashTab Unit Tests:  Without wallet defined ======
Error: expect(received).toMatchSnapshot()

Snapshot name: `Without wallet defined 1`

- Snapshot  - 2
+ Received  + 2

@@ -152,11 +152,11 @@
                                  className="ant-input-wrapper ant-input-group"
                                >
                                  <span
                                    className="ant-input-affix-wrapper"
                                    hidden={null}
-                                   onMouseDown={[Function]}
+                                   onClick={[Function]}
                                    style={null}
                                  >
                                    <span
                                      className="ant-input-prefix"
                                    >
@@ -260,11 +260,11 @@
                              <span
                                className="ant-input-group ant-input-group-compact"
                              >
                                <span
                                  className="ant-input-affix-wrapper"
-                                 onMouseDown={[Function]}
+                                 onClick={[Function]}
                                  style={
                                    Object {
                                      "textAlign": "left",
                                      "width": "60%",
                                    }
    at Object.<anonymous> (/work/web/cashtab/src/components/Send/__tests__/Send.test.js:107:18)
    at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10)
    at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3)
    at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9)
    at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21)
    at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19)
    at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16)
    at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34)
    at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12)

Each failure log is accessible here:
CashTab Unit Tests: Wallet with BCH balances and tokens and state field
CashTab Unit Tests: Wallet without BCH balance
CashTab Unit Tests: Wallet with BCH balances
CashTab Unit Tests: Wallet with BCH balances and tokens
CashTab Unit Tests: Without wallet defined

Wondering why the huksy pre-commit testing didn't catch the snapshot issue, any ideas?

bytesofman requested changes to this revision.Dec 7 2022, 04:35

Wondering why the huksy pre-commit testing didn't catch the snapshot issue, any ideas?

Even weirder that there is a snapshot issue at all, since none of those files should be changing.

Try remaking this again from master and see if issue persists.

This revision now requires changes to proceed.Dec 7 2022, 04:35