From d37e7d93e13db8ba0c511e5dae4c136c40ef4100 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Mon, 28 Sep 2020 21:06:02 -0400 Subject: [PATCH] chore(test): use @types/packages internally (#646) --- .../package.json | 2 + .../src/es6template.ts | 6 -- .../src/simple-diff.ts | 64 ------------------- yarn.lock | 17 +++-- 4 files changed, 13 insertions(+), 76 deletions(-) delete mode 100644 packages/redux-devtools-test-generator/src/es6template.ts delete mode 100644 packages/redux-devtools-test-generator/src/simple-diff.ts diff --git a/packages/redux-devtools-test-generator/package.json b/packages/redux-devtools-test-generator/package.json index 31684bd0..12fddd16 100644 --- a/packages/redux-devtools-test-generator/package.json +++ b/packages/redux-devtools-test-generator/package.json @@ -54,6 +54,7 @@ "simple-diff": "^1.6.0" }, "devDependencies": { + "@types/es6template": "^1.0.0", "@types/history": "^4.7.7", "@types/jsan": "^3.1.0", "@types/lodash.shuffle": "^4.2.6", @@ -61,6 +62,7 @@ "@types/react": "^16.9.46", "@types/react-router": "^5.1.8", "@types/redux-logger": "^3.0.8", + "@types/simple-diff": "^1.6.0", "connected-react-router": "^6.8.0", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.3", diff --git a/packages/redux-devtools-test-generator/src/es6template.ts b/packages/redux-devtools-test-generator/src/es6template.ts deleted file mode 100644 index 9828d0ef..00000000 --- a/packages/redux-devtools-test-generator/src/es6template.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare module 'es6template' { - const _default: { - compile(template: string): (locals: Locals) => string; - }; - export default _default; -} diff --git a/packages/redux-devtools-test-generator/src/simple-diff.ts b/packages/redux-devtools-test-generator/src/simple-diff.ts deleted file mode 100644 index e5fcafff..00000000 --- a/packages/redux-devtools-test-generator/src/simple-diff.ts +++ /dev/null @@ -1,64 +0,0 @@ -declare module 'simple-diff' { - interface AddEvent { - oldPath: (string | number)[]; - newPath: (string | number)[]; - type: 'add'; - oldValue: undefined; - newValue: unknown; - } - - interface RemoveEvent { - oldPath: (string | number)[]; - newPath: (string | number)[]; - type: 'remove'; - oldValue: unknown; - newValue: undefined; - } - - interface ChangeEvent { - oldPath: (string | number)[]; - newPath: (string | number)[]; - type: 'change'; - oldValue: unknown; - newValue: unknown; - } - - interface AddItemEvent { - oldPath: (string | number)[]; - newPath: (string | number)[]; - type: 'add-item'; - oldIndex: -1; - curIndex: -1; - newIndex: number; - newValue: unknown; - } - - interface RemoveItemEvent { - oldPath: (string | number)[]; - newPath: (string | number)[]; - type: 'remove-item'; - oldIndex: number; - curIndex: number; - newIndex: -1; - oldValue: unknown; - } - - interface MoveItemEvent { - oldPath: (string | number)[]; - newPath: (string | number)[]; - type: 'move-item'; - oldIndex: number; - curIndex: number; - newIndex: number; - } - - export type Event = - | AddEvent - | RemoveEvent - | ChangeEvent - | AddItemEvent - | RemoveItemEvent - | MoveItemEvent; - - export default function (oldObj: unknown, newObj: unknown): Event[]; -} diff --git a/yarn.lock b/yarn.lock index 58a70246..c6d78b92 100644 --- a/yarn.lock +++ b/yarn.lock @@ -395,7 +395,7 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-dynamic-import" "^7.8.0" -"@babel/plugin-proposal-export-default-from@^7.10.4", "@babel/plugin-proposal-export-default-from@^7.8.3": +"@babel/plugin-proposal-export-default-from@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.10.4.tgz#08f66eef0067cbf6a7bc036977dcdccecaf0c6c5" integrity sha512-G1l00VvDZ7Yk2yRlC5D8Ybvu3gmeHS3rCHoUYdjrqGYUtdeOBoRypnvDZ5KQqxyaiiGHWnVDeSEzA5F9ozItig== @@ -3385,6 +3385,11 @@ "@types/cheerio" "*" "@types/react" "*" +"@types/es6template@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/es6template/-/es6template-1.0.0.tgz#aeff9046c3332b587a65485a8383292afba82b10" + integrity sha512-wvlFvfUd3FAJyRhgjfibljYSPJ/XKmB3sSlPV+1P5dinRmdSE0lYOFXfJ/ZiWSfBN0Cex5MENBUw8kjsvft+8w== + "@types/eslint-visitor-keys@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" @@ -3822,6 +3827,11 @@ "@types/express-serve-static-core" "*" "@types/mime" "*" +"@types/simple-diff@^1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@types/simple-diff/-/simple-diff-1.6.0.tgz#f27f0a9a849a97695795a46e5b91ad86bbe66986" + integrity sha512-qWru8xXShCbzXVk1YbQ1nomukLjTvF/FZ1BKxQBAp4UHuVxjsXvc6mur2WFXWHcRjDl9FAS7BygfCenDNjbsog== + "@types/simple-element-resize-detector@^1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@types/simple-element-resize-detector/-/simple-element-resize-detector-1.3.0.tgz#19b40d71fefa1876ac5d4ba585197ef438946353" @@ -14408,11 +14418,6 @@ react-popper@^1.3.7: typed-styles "^0.0.7" warning "^4.0.2" -react-pure-render@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/react-pure-render/-/react-pure-render-1.0.2.tgz#9d8a928c7f2c37513c2d064e57b3e3c356e9fabb" - integrity sha1-nYqSjH8sN1E8LQZOV7Pjw1bp+rs= - react-redux@^7.2.1: version "7.2.1" resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.1.tgz#8dedf784901014db2feca1ab633864dee68ad985"