- #2820
df5d12aThanks @alex-page! - Remove React 17 compatability
- Updated dependencies [
d691952]:- @shopify/useful-types@5.3.0
-
#2785
97f8f6cf5Thanks @vsumner! - Drop support for node 14 and 16. Support node LTS and up. -
#2787
f50049004Thanks @vsumner! - Drop support for React 17
- Updated dependencies [
97f8f6cf5]:- @shopify/useful-types@5.2.0
- #2773
8498746a7Thanks @jas7457! - Change act to use from 'react' if it exists, fallback to 'react-dom/test-utils'
- #2718
591e65366Thanks @dependabot! - Bump @babel/traverse from 7.17.9 to 7.23.2
- #2709
a1ed06dc9Thanks @developit! - Fix forceUpdate via cloneElement to re-render TestWrapper React tree
- #2612
39e910e30Thanks @melnikov-s! - Fixed a null exception if the inner root component is unmounted by the outer wrapper during an act
-
#2608
ba4da84d5Thanks @BPScott! - Useimport typeeverywhere that we deal with importing types -
Updated dependencies [
ba4da84d5]:- @shopify/useful-types@5.1.2
-
#2593
2f731db68Thanks @BPScott! - Remove unneededvoid 0class property initializations -
#2595
93ec0a0e5Thanks @BPScott! - Useimport typewhen importing types
-
#2540
8ba6cbbe0Thanks @phbou72! - Remove last require() in react-testing so we can use it with a modern tests runner -
#2409
0bff6fad7Thanks @BPScott! - Update types to account changes in TypeScript 4.8 and 4.9. Propogate contstraints on generic types and update type usage relating toWindowandNavigator. Technically this makes some types stricter, as attempting to passnull|undefinedinto certain functions is now disallowed by TypeScript, but these were never expected runtime values in the first place.
-
#2438
bc50c0de2Thanks @melnikov-s! - Fix act queue emptying for React 17 -
#2441
cf70a15a6Thanks @melnikov-s! - Fixed an issue with useLazyQuery failing due to act resolving a tick later
-
#2352
963f1caf4Thanks @melnikov-s! - Reactactpromise queues are now emptied when root wrappers are destroyed. This prevents unresolved promises from causing stuck queues and thus failures in subsequent test cases.The
destroyAll()androot.destroy()functions are now asynchronous and return promises. Calls to either of these functions must now beawaited.- destroyAll() + await destroyAll()
- #2404
afdf2f9ddThanks @melnikov-s! - TriggerKeypath now fails typecheck on invalid array indices
- #2398
b37ec58b6Thanks @melnikov-s! - Fix triggerKeyPath when path resolves to a type that is unioned with an empty object type ({})
- #2356
84d4756ebThanks @melnikov-s! - Fully typed triggerKeypath method
-
#2389
03c1abc8cThanks @BPScott! - Add types field to package.json export maps to support typescript consumers that usemoduleResolution: "node16" -
Updated dependencies [
03c1abc8c]:- @shopify/useful-types@5.1.1
- Updated dependencies [
b42a99a7d]:- @shopify/useful-types@5.1.0
- Support for React 18 and backwards compatibility for React 17 [#2248]
- Matrix testing of React 17 & 18 versions in CI [#2248]
- Drop support for node 12 and Safari 10, 11 and 12. Remove wildcard export in exports field. [#2277]
- No updates. Transitive dependency bump.
- Correct wildcard export to
./*[#2209]
- No updates. Transitive dependency bump.
- Fix
Node.trigger()not resolving values that can beundefined. [#2192]
- Use
./*instead of./in package.json exports to fix deprecation warning. [#2184]
- Reduce usage of
@shopify/useful-typesby using built-in types. [#2163]
- No updates. Transitive dependency bump.
- Rerelease after failed publish. No code changes.
- No updates. Transitive dependency bump.
- Added new
cleanupoption tocreateMount[#2102]
- No updates. Transitive dependency bump.
- Fixed babel helpers file being generated with incorrect filename in esm build. [#2082]
- Migrate from
sewing-kit-nexttoloomfor building - package build output remains identical. [#2039]
- No updates. Transitive dependency bump.
- Enable type checking in tests and fix type errors. [#2034]
- Added file exclusion for tests to package.json. [#2005]
- Added ability to specify a generic when calling
findWhereandfindWhereAll[#1999] - Updated build tooling, types are now compiled with TypeScript 4.3. [#1997]
- Update to latest sewing-kit-next for build. Update
types/typesVersionsfields to point directly into the build folder [#1980]
- Officially supports React
17.x1969
- Changes to tests for compatibility in dev. #1957
- Now supports React-17 #1958
- Update minimum supported node version to 12.14.0. Add engines field to help enforce usage of this version. #1906
- Removed dependency on tslib, as we no-longer compile with
tsc. #1829
- Improved the performance of Root wrapper updates #1812
- Updated multi-build outputs to include mandatory extensions to fix "Module not found" issues reported by ESM supported bundlers #1759
- Add new build outputs (CommonJS, ESM, esnext, Node) for greater tree-shakability #1698
- Added
tslib@^1.14.1in the list of dependencies. #1657
- Remove cast for
actfollowing update to@types/react-dom
jest.Matcherstype updated to match@types/jestversion25[#1239]- Update
jest-matcher-utilsto25[#1375]
- Type error while using
[toHaveReactProps](https://github.com/Shopify/quilt/issues/1212) is now resolved by updating@types/jestto24.9.1`. #1212
- new
debug()function added toRootandElementto inspect mounted structure (#1088)
- Fixed
html()to properly return the outermost wrapping DOM tags (#1042)
- Both
toContainReactComponentandtoContainReactComponentTimesmatcher will now throw a more useful error if the expected value isnullorundefined(#1047)
- Fixed
findandfindAllnot returning the correct type when being passed a string that matchesJSX.IntrinsicElements(#906)
- explicitly defining return type for
findWhereandfindAllWhereoperators (#795)
- Added a
toContainReactComponentTimesmatcher (#781) - Added the ability to extend a custom mount function with
createMount().extend()(#788) RootandElementnow both implement the newly-exportedNodetype, which can be used to request any object that satisfies the traversal and introspection APIs (#793)
- Added a
toProvideReactContextmatcher (#735)
-
When using a custom mount with
createMount, callingsetPropson the resulting elements will now properly set props on the JSX that was mounted, not the element returned from thecreateMountrenderoption (#726).Note: In order to support the above, a small change was made to the
Rootclass’s constructor. If you were calling this directly (which is discouraged), you will need to use the newresolveRootoption instead of the existing second argument. Additionally, if you were manually passing through additional props in a component you used to wrap elements increateMount.render, you can now remove this workaround.
- Passing unresolved promises within
act()blocks required additional nesting (#697)
- Upgraded React to versions 16.9.0-alpha.0 and added support for async
act()calls (#688)
Root/Element#findnow correctly find components created byReact.memoandReact.forwardRef(#682)
Root/Element#trigger()now allow passing a deep partial version of the arguments of the prop being triggered (#661)
- Fixed an issue were a leaf DOM node would return
nullfordomNode(#622)
- Added
.toContainReactTextand.toContainReactHtmlmatchers (#626)
- Calling
Root#actwithin another callback toRoot#actnow groups the update into a singleact()block (#626)
- Added a
createMountfactory that can create mount functions tailor-made to suit the global state for individual applications (#624)
- Added a
@shopify/react-testing/matchersdirectory, which adds.toHaveReactPropsand.toContainReactComponentassertions for Jest (#621) Element#findandElement#findAllnow accept a second optional argument for required props on matched elements (#621)
Initial release.