From 0699111584fe065ff220243d2487b4fd0c7c576b Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Fri, 27 Aug 2021 10:58:19 -0400 Subject: [PATCH 01/14] enable/fix test type checking for /react-app-bridge-universal-provider --- packages/react-app-bridge-universal-provider/src/tests/setup.ts | 2 ++ packages/react-app-bridge-universal-provider/tsconfig.json | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 packages/react-app-bridge-universal-provider/src/tests/setup.ts diff --git a/packages/react-app-bridge-universal-provider/src/tests/setup.ts b/packages/react-app-bridge-universal-provider/src/tests/setup.ts new file mode 100644 index 0000000000..cbbfa6991a --- /dev/null +++ b/packages/react-app-bridge-universal-provider/src/tests/setup.ts @@ -0,0 +1,2 @@ +// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. +import '@shopify/react-testing/matchers'; diff --git a/packages/react-app-bridge-universal-provider/tsconfig.json b/packages/react-app-bridge-universal-provider/tsconfig.json index 3b21117610..7784eb9609 100644 --- a/packages/react-app-bridge-universal-provider/tsconfig.json +++ b/packages/react-app-bridge-universal-provider/tsconfig.json @@ -10,6 +10,5 @@ "./src/**/*.ts", "./src/**/*.tsx" ], - "exclude": ["**/test/**/*", "**/tests/**/*"], "references": [{"path": "../react-html"}] } From 1df9364642a23c8aed36f8be211b957603765bc0 Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Fri, 27 Aug 2021 10:58:47 -0400 Subject: [PATCH 02/14] enable/fix test type checking for /react-compose --- packages/react-compose/src/tests/setup.ts | 2 ++ packages/react-compose/tsconfig.json | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 packages/react-compose/src/tests/setup.ts diff --git a/packages/react-compose/src/tests/setup.ts b/packages/react-compose/src/tests/setup.ts new file mode 100644 index 0000000000..cbbfa6991a --- /dev/null +++ b/packages/react-compose/src/tests/setup.ts @@ -0,0 +1,2 @@ +// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. +import '@shopify/react-testing/matchers'; diff --git a/packages/react-compose/tsconfig.json b/packages/react-compose/tsconfig.json index fd8f22d114..4586c1dca1 100644 --- a/packages/react-compose/tsconfig.json +++ b/packages/react-compose/tsconfig.json @@ -10,6 +10,5 @@ "./src/**/*.ts", "./src/**/*.tsx" ], - "exclude": ["**/test/**/*", "**/tests/**/*"], "references": [{"path": "../useful-types"}] } From 1ab61b8d14a6579f584f9e6ffb71e7807dd55f9b Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Fri, 27 Aug 2021 10:59:21 -0400 Subject: [PATCH 03/14] enable/fix test type checking for /react-cookie --- packages/react-cookie/src/tests/setup.ts | 2 ++ packages/react-cookie/tsconfig.json | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 packages/react-cookie/src/tests/setup.ts diff --git a/packages/react-cookie/src/tests/setup.ts b/packages/react-cookie/src/tests/setup.ts new file mode 100644 index 0000000000..cbbfa6991a --- /dev/null +++ b/packages/react-cookie/src/tests/setup.ts @@ -0,0 +1,2 @@ +// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. +import '@shopify/react-testing/matchers'; diff --git a/packages/react-cookie/tsconfig.json b/packages/react-cookie/tsconfig.json index 2964d65bbe..7a3abcc811 100644 --- a/packages/react-cookie/tsconfig.json +++ b/packages/react-cookie/tsconfig.json @@ -11,6 +11,5 @@ "./src/**/*.ts", "./src/**/*.tsx" ], - "exclude": ["**/test/**/*", "**/tests/**/*"], "references": [{"path": "../react-hooks"}, {"path": "../react-network"}] } From bd2284a79c692501d2b2ec3bbcdd43d79ba8b5a6 Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Fri, 27 Aug 2021 11:01:16 -0400 Subject: [PATCH 04/14] enable/fix test type checking for /react-csrf --- packages/react-csrf/src/tests/setup.ts | 2 ++ packages/react-csrf/tsconfig.json | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 packages/react-csrf/src/tests/setup.ts diff --git a/packages/react-csrf/src/tests/setup.ts b/packages/react-csrf/src/tests/setup.ts new file mode 100644 index 0000000000..cbbfa6991a --- /dev/null +++ b/packages/react-csrf/src/tests/setup.ts @@ -0,0 +1,2 @@ +// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. +import '@shopify/react-testing/matchers'; diff --git a/packages/react-csrf/tsconfig.json b/packages/react-csrf/tsconfig.json index 7b3097cebc..1e336c43ca 100644 --- a/packages/react-csrf/tsconfig.json +++ b/packages/react-csrf/tsconfig.json @@ -9,6 +9,5 @@ "../../config/typescript/*.d.ts", "./src/**/*.ts", "./src/**/*.tsx" - ], - "exclude": ["**/test/**/*", "**/tests/**/*"] + ] } From 3232e3db5f98da9990b3fc5863a9a2ea2a72559b Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Fri, 27 Aug 2021 11:01:44 -0400 Subject: [PATCH 05/14] enable/fix test type checking for /react-csrf-universal-provider --- packages/react-csrf-universal-provider/src/tests/setup.ts | 2 ++ packages/react-csrf-universal-provider/tsconfig.json | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 packages/react-csrf-universal-provider/src/tests/setup.ts diff --git a/packages/react-csrf-universal-provider/src/tests/setup.ts b/packages/react-csrf-universal-provider/src/tests/setup.ts new file mode 100644 index 0000000000..cbbfa6991a --- /dev/null +++ b/packages/react-csrf-universal-provider/src/tests/setup.ts @@ -0,0 +1,2 @@ +// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. +import '@shopify/react-testing/matchers'; diff --git a/packages/react-csrf-universal-provider/tsconfig.json b/packages/react-csrf-universal-provider/tsconfig.json index 7a70c87e1b..83715d442c 100644 --- a/packages/react-csrf-universal-provider/tsconfig.json +++ b/packages/react-csrf-universal-provider/tsconfig.json @@ -10,7 +10,6 @@ "./src/**/*.ts", "./src/**/*.tsx" ], - "exclude": ["**/test/**/*", "**/tests/**/*"], "references": [ {"path": "../react-csrf"}, {"path": "../react-effect"}, From 278dc8757ced89c69ff7001c13eb3d22be045f66 Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Fri, 27 Aug 2021 11:02:13 -0400 Subject: [PATCH 06/14] enable/fix test type checking for /react-google-analytics --- packages/react-google-analytics/src/tests/setup.ts | 2 ++ packages/react-google-analytics/tsconfig.json | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 packages/react-google-analytics/src/tests/setup.ts diff --git a/packages/react-google-analytics/src/tests/setup.ts b/packages/react-google-analytics/src/tests/setup.ts new file mode 100644 index 0000000000..cbbfa6991a --- /dev/null +++ b/packages/react-google-analytics/src/tests/setup.ts @@ -0,0 +1,2 @@ +// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. +import '@shopify/react-testing/matchers'; diff --git a/packages/react-google-analytics/tsconfig.json b/packages/react-google-analytics/tsconfig.json index 617de02ed8..18f5b6f8d7 100644 --- a/packages/react-google-analytics/tsconfig.json +++ b/packages/react-google-analytics/tsconfig.json @@ -10,6 +10,5 @@ "./src/**/*.ts", "./src/**/*.tsx" ], - "exclude": ["**/test/**/*", "**/tests/**/*"], "references": [{"path": "../react-import-remote"}] } From 0a06bd277fa6a2e2b2ecc56a38891ad41dfd5906 Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Fri, 27 Aug 2021 11:03:20 -0400 Subject: [PATCH 07/14] enable/fix test type checking for /react-hydrate --- packages/react-hydrate/src/tests/setup.ts | 2 ++ packages/react-hydrate/tsconfig.json | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 packages/react-hydrate/src/tests/setup.ts diff --git a/packages/react-hydrate/src/tests/setup.ts b/packages/react-hydrate/src/tests/setup.ts new file mode 100644 index 0000000000..cbbfa6991a --- /dev/null +++ b/packages/react-hydrate/src/tests/setup.ts @@ -0,0 +1,2 @@ +// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. +import '@shopify/react-testing/matchers'; diff --git a/packages/react-hydrate/tsconfig.json b/packages/react-hydrate/tsconfig.json index 326097fa7e..f2d81cfe02 100644 --- a/packages/react-hydrate/tsconfig.json +++ b/packages/react-hydrate/tsconfig.json @@ -10,6 +10,5 @@ "./src/**/*.ts", "./src/**/*.tsx" ], - "exclude": ["**/test/**/*", "**/tests/**/*"], "references": [{"path": "../react-effect"}, {"path": "../react-hooks"}] } From c90d80dcb7c7f47c0bfdade55c4ee49ce5a73031 Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Fri, 27 Aug 2021 11:03:48 -0400 Subject: [PATCH 08/14] enable/fix test type checking for /react-i18n-universal-provider --- packages/react-i18n-universal-provider/src/tests/setup.ts | 2 ++ packages/react-i18n-universal-provider/tsconfig.json | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 packages/react-i18n-universal-provider/src/tests/setup.ts diff --git a/packages/react-i18n-universal-provider/src/tests/setup.ts b/packages/react-i18n-universal-provider/src/tests/setup.ts new file mode 100644 index 0000000000..cbbfa6991a --- /dev/null +++ b/packages/react-i18n-universal-provider/src/tests/setup.ts @@ -0,0 +1,2 @@ +// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. +import '@shopify/react-testing/matchers'; diff --git a/packages/react-i18n-universal-provider/tsconfig.json b/packages/react-i18n-universal-provider/tsconfig.json index 9be1fc9c23..2c46d69055 100644 --- a/packages/react-i18n-universal-provider/tsconfig.json +++ b/packages/react-i18n-universal-provider/tsconfig.json @@ -10,7 +10,6 @@ "./src/**/*.ts", "./src/**/*.tsx" ], - "exclude": ["**/test/**/*", "**/tests/**/*"], "references": [ {"path": "../react-effect"}, {"path": "../react-hooks"}, From 8fa0c2acf9f054c8070d8115f41ccf9ffa29f9fd Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Fri, 27 Aug 2021 11:05:38 -0400 Subject: [PATCH 09/14] enable/fix test type checking for /react-intersection-observer --- packages/react-intersection-observer/src/tests/setup.ts | 2 ++ packages/react-intersection-observer/tsconfig.json | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 packages/react-intersection-observer/src/tests/setup.ts diff --git a/packages/react-intersection-observer/src/tests/setup.ts b/packages/react-intersection-observer/src/tests/setup.ts new file mode 100644 index 0000000000..cbbfa6991a --- /dev/null +++ b/packages/react-intersection-observer/src/tests/setup.ts @@ -0,0 +1,2 @@ +// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. +import '@shopify/react-testing/matchers'; diff --git a/packages/react-intersection-observer/tsconfig.json b/packages/react-intersection-observer/tsconfig.json index 7b3097cebc..1e336c43ca 100644 --- a/packages/react-intersection-observer/tsconfig.json +++ b/packages/react-intersection-observer/tsconfig.json @@ -9,6 +9,5 @@ "../../config/typescript/*.d.ts", "./src/**/*.ts", "./src/**/*.tsx" - ], - "exclude": ["**/test/**/*", "**/tests/**/*"] + ] } From 88e0b5556110ed640dc78e9875d447cc110336cf Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Fri, 27 Aug 2021 11:06:08 -0400 Subject: [PATCH 10/14] enable/fix test type checking for /react-tracking-pixel --- packages/react-tracking-pixel/src/tests/setup.ts | 2 ++ packages/react-tracking-pixel/tsconfig.json | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 packages/react-tracking-pixel/src/tests/setup.ts diff --git a/packages/react-tracking-pixel/src/tests/setup.ts b/packages/react-tracking-pixel/src/tests/setup.ts new file mode 100644 index 0000000000..cbbfa6991a --- /dev/null +++ b/packages/react-tracking-pixel/src/tests/setup.ts @@ -0,0 +1,2 @@ +// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. +import '@shopify/react-testing/matchers'; diff --git a/packages/react-tracking-pixel/tsconfig.json b/packages/react-tracking-pixel/tsconfig.json index 3b21117610..7784eb9609 100644 --- a/packages/react-tracking-pixel/tsconfig.json +++ b/packages/react-tracking-pixel/tsconfig.json @@ -10,6 +10,5 @@ "./src/**/*.ts", "./src/**/*.tsx" ], - "exclude": ["**/test/**/*", "**/tests/**/*"], "references": [{"path": "../react-html"}] } From ea5a0dfcc941708aa2f3f9a9acfd53dd7d990334 Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Fri, 27 Aug 2021 11:06:30 -0400 Subject: [PATCH 11/14] enable/fix test type checking for /react-univeral-provider --- packages/react-universal-provider/src/tests/setup.ts | 2 ++ packages/react-universal-provider/tsconfig.json | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 packages/react-universal-provider/src/tests/setup.ts diff --git a/packages/react-universal-provider/src/tests/setup.ts b/packages/react-universal-provider/src/tests/setup.ts new file mode 100644 index 0000000000..cbbfa6991a --- /dev/null +++ b/packages/react-universal-provider/src/tests/setup.ts @@ -0,0 +1,2 @@ +// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. +import '@shopify/react-testing/matchers'; diff --git a/packages/react-universal-provider/tsconfig.json b/packages/react-universal-provider/tsconfig.json index 98889b3e5c..821d89ddaf 100644 --- a/packages/react-universal-provider/tsconfig.json +++ b/packages/react-universal-provider/tsconfig.json @@ -10,6 +10,5 @@ "./src/**/*.ts", "./src/**/*.tsx" ], - "exclude": ["**/test/**/*", "**/tests/**/*"], "references": [{"path": "../react-effect"}, {"path": "../react-html"}] } From 0dd29562d84d4507747f3b2492dc23e886bdb4f3 Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Fri, 27 Aug 2021 12:16:25 -0400 Subject: [PATCH 12/14] update changelog --- packages/react-app-bridge-universal-provider/CHANGELOG.md | 6 +++++- packages/react-compose/CHANGELOG.md | 6 +++++- packages/react-cookie/CHANGELOG.md | 6 +++++- packages/react-csrf-universal-provider/CHANGELOG.md | 6 +++++- packages/react-csrf/CHANGELOG.md | 6 +++++- packages/react-google-analytics/CHANGELOG.md | 6 +++++- packages/react-hydrate/CHANGELOG.md | 6 +++++- packages/react-i18n-universal-provider/CHANGELOG.md | 6 +++++- packages/react-intersection-observer/CHANGELOG.md | 6 +++++- packages/react-tracking-pixel/CHANGELOG.md | 6 +++++- packages/react-universal-provider/CHANGELOG.md | 6 +++++- 11 files changed, 55 insertions(+), 11 deletions(-) diff --git a/packages/react-app-bridge-universal-provider/CHANGELOG.md b/packages/react-app-bridge-universal-provider/CHANGELOG.md index 0b0548972c..0842260f71 100644 --- a/packages/react-app-bridge-universal-provider/CHANGELOG.md +++ b/packages/react-app-bridge-universal-provider/CHANGELOG.md @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - +## Unreleased + +## Changed + +- Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] ## 2.1.4 - 2021-08-24 diff --git a/packages/react-compose/CHANGELOG.md b/packages/react-compose/CHANGELOG.md index 4de21d61c6..571e14841e 100644 --- a/packages/react-compose/CHANGELOG.md +++ b/packages/react-compose/CHANGELOG.md @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - +## Unreleased + +## Changed + +- Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] ## 2.1.3 - 2021-08-24 diff --git a/packages/react-cookie/CHANGELOG.md b/packages/react-cookie/CHANGELOG.md index 589856a7de..d85d3458e0 100644 --- a/packages/react-cookie/CHANGELOG.md +++ b/packages/react-cookie/CHANGELOG.md @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - +## Unreleased + +## Changed + +- Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] ## 1.1.4 - 2021-08-24 diff --git a/packages/react-csrf-universal-provider/CHANGELOG.md b/packages/react-csrf-universal-provider/CHANGELOG.md index 5f1d7570a9..5ec3e1dad3 100644 --- a/packages/react-csrf-universal-provider/CHANGELOG.md +++ b/packages/react-csrf-universal-provider/CHANGELOG.md @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - +## Unreleased + +## Changed + +- Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] ## 2.1.4 - 2021-08-24 diff --git a/packages/react-csrf/CHANGELOG.md b/packages/react-csrf/CHANGELOG.md index 195e5f90d5..1cc3cb7810 100644 --- a/packages/react-csrf/CHANGELOG.md +++ b/packages/react-csrf/CHANGELOG.md @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - +## Unreleased + +## Changed + +- Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] ## 2.1.3 - 2021-08-24 diff --git a/packages/react-google-analytics/CHANGELOG.md b/packages/react-google-analytics/CHANGELOG.md index 591ad2d560..3bf987bb8d 100644 --- a/packages/react-google-analytics/CHANGELOG.md +++ b/packages/react-google-analytics/CHANGELOG.md @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - +## Unreleased + +## Changed + +- Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] ## 4.1.4 - 2021-08-24 diff --git a/packages/react-hydrate/CHANGELOG.md b/packages/react-hydrate/CHANGELOG.md index 1688f0c214..63aff3c42b 100644 --- a/packages/react-hydrate/CHANGELOG.md +++ b/packages/react-hydrate/CHANGELOG.md @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - +## Unreleased + +## Changed + +- Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] ## 2.1.3 - 2021-08-24 diff --git a/packages/react-i18n-universal-provider/CHANGELOG.md b/packages/react-i18n-universal-provider/CHANGELOG.md index 054a8deec7..7531de1048 100644 --- a/packages/react-i18n-universal-provider/CHANGELOG.md +++ b/packages/react-i18n-universal-provider/CHANGELOG.md @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - +## Unreleased + +## Changed + +- Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] ## 2.1.8 - 2021-08-26 diff --git a/packages/react-intersection-observer/CHANGELOG.md b/packages/react-intersection-observer/CHANGELOG.md index 96884c3830..0befaabda0 100644 --- a/packages/react-intersection-observer/CHANGELOG.md +++ b/packages/react-intersection-observer/CHANGELOG.md @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - +## Unreleased + +## Changed + +- Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] ## 3.1.3 - 2021-08-24 diff --git a/packages/react-tracking-pixel/CHANGELOG.md b/packages/react-tracking-pixel/CHANGELOG.md index 92e708c8b7..0a694aa29f 100644 --- a/packages/react-tracking-pixel/CHANGELOG.md +++ b/packages/react-tracking-pixel/CHANGELOG.md @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - +## Unreleased + +## Changed + +- Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] ## 4.1.4 - 2021-08-24 diff --git a/packages/react-universal-provider/CHANGELOG.md b/packages/react-universal-provider/CHANGELOG.md index 86b8f31a8d..58ace8919a 100644 --- a/packages/react-universal-provider/CHANGELOG.md +++ b/packages/react-universal-provider/CHANGELOG.md @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - +## Unreleased + +## Changed + +- Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] ## 2.1.4 - 2021-08-24 From 1e481e1970b7ff5eab3356c33af6305778f3fe09 Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Fri, 27 Aug 2021 12:53:03 -0400 Subject: [PATCH 13/14] fix changelog typo --- packages/react-app-bridge-universal-provider/CHANGELOG.md | 2 +- packages/react-compose/CHANGELOG.md | 2 +- packages/react-cookie/CHANGELOG.md | 2 +- packages/react-csrf-universal-provider/CHANGELOG.md | 2 +- packages/react-csrf/CHANGELOG.md | 2 +- packages/react-google-analytics/CHANGELOG.md | 2 +- packages/react-hydrate/CHANGELOG.md | 2 +- packages/react-i18n-universal-provider/CHANGELOG.md | 2 +- packages/react-intersection-observer/CHANGELOG.md | 2 +- packages/react-tracking-pixel/CHANGELOG.md | 2 +- packages/react-universal-provider/CHANGELOG.md | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/react-app-bridge-universal-provider/CHANGELOG.md b/packages/react-app-bridge-universal-provider/CHANGELOG.md index 0842260f71..23992dac84 100644 --- a/packages/react-app-bridge-universal-provider/CHANGELOG.md +++ b/packages/react-app-bridge-universal-provider/CHANGELOG.md @@ -7,7 +7,7 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased -## Changed +### Changed - Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] diff --git a/packages/react-compose/CHANGELOG.md b/packages/react-compose/CHANGELOG.md index 571e14841e..00579e3ad5 100644 --- a/packages/react-compose/CHANGELOG.md +++ b/packages/react-compose/CHANGELOG.md @@ -7,7 +7,7 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased -## Changed +### Changed - Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] diff --git a/packages/react-cookie/CHANGELOG.md b/packages/react-cookie/CHANGELOG.md index d85d3458e0..95a2264a7b 100644 --- a/packages/react-cookie/CHANGELOG.md +++ b/packages/react-cookie/CHANGELOG.md @@ -7,7 +7,7 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased -## Changed +### Changed - Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] diff --git a/packages/react-csrf-universal-provider/CHANGELOG.md b/packages/react-csrf-universal-provider/CHANGELOG.md index 5ec3e1dad3..d5f46ae600 100644 --- a/packages/react-csrf-universal-provider/CHANGELOG.md +++ b/packages/react-csrf-universal-provider/CHANGELOG.md @@ -7,7 +7,7 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased -## Changed +### Changed - Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] diff --git a/packages/react-csrf/CHANGELOG.md b/packages/react-csrf/CHANGELOG.md index 1cc3cb7810..a504e51b28 100644 --- a/packages/react-csrf/CHANGELOG.md +++ b/packages/react-csrf/CHANGELOG.md @@ -7,7 +7,7 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased -## Changed +### Changed - Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] diff --git a/packages/react-google-analytics/CHANGELOG.md b/packages/react-google-analytics/CHANGELOG.md index 3bf987bb8d..e21170d9b9 100644 --- a/packages/react-google-analytics/CHANGELOG.md +++ b/packages/react-google-analytics/CHANGELOG.md @@ -7,7 +7,7 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased -## Changed +### Changed - Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] diff --git a/packages/react-hydrate/CHANGELOG.md b/packages/react-hydrate/CHANGELOG.md index 63aff3c42b..61548624e8 100644 --- a/packages/react-hydrate/CHANGELOG.md +++ b/packages/react-hydrate/CHANGELOG.md @@ -7,7 +7,7 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased -## Changed +### Changed - Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] diff --git a/packages/react-i18n-universal-provider/CHANGELOG.md b/packages/react-i18n-universal-provider/CHANGELOG.md index 7531de1048..be3acae012 100644 --- a/packages/react-i18n-universal-provider/CHANGELOG.md +++ b/packages/react-i18n-universal-provider/CHANGELOG.md @@ -7,7 +7,7 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased -## Changed +### Changed - Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] diff --git a/packages/react-intersection-observer/CHANGELOG.md b/packages/react-intersection-observer/CHANGELOG.md index 0befaabda0..5c6d1c881d 100644 --- a/packages/react-intersection-observer/CHANGELOG.md +++ b/packages/react-intersection-observer/CHANGELOG.md @@ -7,7 +7,7 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased -## Changed +### Changed - Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] diff --git a/packages/react-tracking-pixel/CHANGELOG.md b/packages/react-tracking-pixel/CHANGELOG.md index 0a694aa29f..cc774da7f8 100644 --- a/packages/react-tracking-pixel/CHANGELOG.md +++ b/packages/react-tracking-pixel/CHANGELOG.md @@ -7,7 +7,7 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased -## Changed +### Changed - Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] diff --git a/packages/react-universal-provider/CHANGELOG.md b/packages/react-universal-provider/CHANGELOG.md index 58ace8919a..72d21c3ae0 100644 --- a/packages/react-universal-provider/CHANGELOG.md +++ b/packages/react-universal-provider/CHANGELOG.md @@ -7,7 +7,7 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased -## Changed +### Changed - Enable type checking in tests and fix type errors. [[#2011](https://github.com/Shopify/quilt/pull/2016)] From 81b16c478db2ace5ddf212a414b9453d1ac7e4ef Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Thu, 9 Sep 2021 16:53:38 -0400 Subject: [PATCH 14/14] Replace setup.ts files with a d.ts reference. --- config/typescript/matchers.d.ts | 30 +++++++++++++++++++ .../src/tests/setup.ts | 2 -- packages/react-compose/src/tests/setup.ts | 2 -- packages/react-cookie/src/tests/setup.ts | 2 -- .../src/tests/setup.ts | 2 -- packages/react-csrf/src/tests/setup.ts | 2 -- .../react-google-analytics/src/tests/setup.ts | 2 -- packages/react-hydrate/src/tests/setup.ts | 2 -- .../src/tests/setup.ts | 2 -- .../src/tests/setup.ts | 2 -- .../react-tracking-pixel/src/tests/setup.ts | 2 -- .../src/tests/setup.ts | 2 -- 12 files changed, 30 insertions(+), 22 deletions(-) create mode 100644 config/typescript/matchers.d.ts delete mode 100644 packages/react-app-bridge-universal-provider/src/tests/setup.ts delete mode 100644 packages/react-compose/src/tests/setup.ts delete mode 100644 packages/react-cookie/src/tests/setup.ts delete mode 100644 packages/react-csrf-universal-provider/src/tests/setup.ts delete mode 100644 packages/react-csrf/src/tests/setup.ts delete mode 100644 packages/react-google-analytics/src/tests/setup.ts delete mode 100644 packages/react-hydrate/src/tests/setup.ts delete mode 100644 packages/react-i18n-universal-provider/src/tests/setup.ts delete mode 100644 packages/react-intersection-observer/src/tests/setup.ts delete mode 100644 packages/react-tracking-pixel/src/tests/setup.ts delete mode 100644 packages/react-universal-provider/src/tests/setup.ts diff --git a/config/typescript/matchers.d.ts b/config/typescript/matchers.d.ts new file mode 100644 index 0000000000..4b85637e87 --- /dev/null +++ b/config/typescript/matchers.d.ts @@ -0,0 +1,30 @@ +import {ComponentType, Context as ReactContext} from 'react'; +import type {} from 'saddle-up/matchers'; +import type {} from 'saddle-up/koa-matchers'; + +// @shopify/react-testing/matchers +declare type PropsFromNode = T extends Node ? U : never; +declare global { + // eslint-disable-next-line @typescript-eslint/no-namespace + namespace jest { + interface Matchers { + toHaveReactProps(props: Partial>): void; + toHaveReactDataProps(data: {[key: string]: string}): void; + toContainReactComponent>( + type: Type, + props?: Partial>, + ): void; + toContainReactComponentTimes>( + type: Type, + times: number, + props?: Partial>, + ): void; + toProvideReactContext( + context: ReactContext, + value?: Type, + ): void; + toContainReactText(text: string): void; + toContainReactHtml(text: string): void; + } + } +} diff --git a/packages/react-app-bridge-universal-provider/src/tests/setup.ts b/packages/react-app-bridge-universal-provider/src/tests/setup.ts deleted file mode 100644 index cbbfa6991a..0000000000 --- a/packages/react-app-bridge-universal-provider/src/tests/setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. -import '@shopify/react-testing/matchers'; diff --git a/packages/react-compose/src/tests/setup.ts b/packages/react-compose/src/tests/setup.ts deleted file mode 100644 index cbbfa6991a..0000000000 --- a/packages/react-compose/src/tests/setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. -import '@shopify/react-testing/matchers'; diff --git a/packages/react-cookie/src/tests/setup.ts b/packages/react-cookie/src/tests/setup.ts deleted file mode 100644 index cbbfa6991a..0000000000 --- a/packages/react-cookie/src/tests/setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. -import '@shopify/react-testing/matchers'; diff --git a/packages/react-csrf-universal-provider/src/tests/setup.ts b/packages/react-csrf-universal-provider/src/tests/setup.ts deleted file mode 100644 index cbbfa6991a..0000000000 --- a/packages/react-csrf-universal-provider/src/tests/setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. -import '@shopify/react-testing/matchers'; diff --git a/packages/react-csrf/src/tests/setup.ts b/packages/react-csrf/src/tests/setup.ts deleted file mode 100644 index cbbfa6991a..0000000000 --- a/packages/react-csrf/src/tests/setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. -import '@shopify/react-testing/matchers'; diff --git a/packages/react-google-analytics/src/tests/setup.ts b/packages/react-google-analytics/src/tests/setup.ts deleted file mode 100644 index cbbfa6991a..0000000000 --- a/packages/react-google-analytics/src/tests/setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. -import '@shopify/react-testing/matchers'; diff --git a/packages/react-hydrate/src/tests/setup.ts b/packages/react-hydrate/src/tests/setup.ts deleted file mode 100644 index cbbfa6991a..0000000000 --- a/packages/react-hydrate/src/tests/setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. -import '@shopify/react-testing/matchers'; diff --git a/packages/react-i18n-universal-provider/src/tests/setup.ts b/packages/react-i18n-universal-provider/src/tests/setup.ts deleted file mode 100644 index cbbfa6991a..0000000000 --- a/packages/react-i18n-universal-provider/src/tests/setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. -import '@shopify/react-testing/matchers'; diff --git a/packages/react-intersection-observer/src/tests/setup.ts b/packages/react-intersection-observer/src/tests/setup.ts deleted file mode 100644 index cbbfa6991a..0000000000 --- a/packages/react-intersection-observer/src/tests/setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. -import '@shopify/react-testing/matchers'; diff --git a/packages/react-tracking-pixel/src/tests/setup.ts b/packages/react-tracking-pixel/src/tests/setup.ts deleted file mode 100644 index cbbfa6991a..0000000000 --- a/packages/react-tracking-pixel/src/tests/setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. -import '@shopify/react-testing/matchers'; diff --git a/packages/react-universal-provider/src/tests/setup.ts b/packages/react-universal-provider/src/tests/setup.ts deleted file mode 100644 index cbbfa6991a..0000000000 --- a/packages/react-universal-provider/src/tests/setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Import jest matchers for the purposes of type checking. sewing-kit performs a similar setup before running jest tests. -import '@shopify/react-testing/matchers';