- #2820
df5d12a
Thanks @alex-page! - Remove React 17 compatability
- Updated dependencies [
d691952
]:- @shopify/useful-types@5.3.0
-
#2785
97f8f6cf5
Thanks @vsumner! - Drop support for node 14 and 16. Support node LTS and up. -
#2787
f50049004
Thanks @vsumner! - Drop support for React 17
- Updated dependencies [
97f8f6cf5
]:- @shopify/useful-types@5.2.0
- #2773
8498746a7
Thanks @jas7457! - Change act to use from 'react' if it exists, fallback to 'react-dom/test-utils'
- #2718
591e65366
Thanks @dependabot! - Bump @babel/traverse from 7.17.9 to 7.23.2
- #2709
a1ed06dc9
Thanks @developit! - Fix forceUpdate via cloneElement to re-render TestWrapper React tree
- #2612
39e910e30
Thanks @melnikov-s! - Fixed a null exception if the inner root component is unmounted by the outer wrapper during an act
-
#2608
ba4da84d5
Thanks @BPScott! - Useimport type
everywhere that we deal with importing types -
Updated dependencies [
ba4da84d5
]:- @shopify/useful-types@5.1.2
-
#2593
2f731db68
Thanks @BPScott! - Remove unneededvoid 0
class property initializations -
#2595
93ec0a0e5
Thanks @BPScott! - Useimport type
when importing types
-
#2540
8ba6cbbe0
Thanks @phbou72! - Remove last require() in react-testing so we can use it with a modern tests runner -
#2409
0bff6fad7
Thanks @BPScott! - Update types to account changes in TypeScript 4.8 and 4.9. Propogate contstraints on generic types and update type usage relating toWindow
andNavigator
. Technically this makes some types stricter, as attempting to passnull|undefined
into certain functions is now disallowed by TypeScript, but these were never expected runtime values in the first place.
-
#2438
bc50c0de2
Thanks @melnikov-s! - Fix act queue emptying for React 17 -
#2441
cf70a15a6
Thanks @melnikov-s! - Fixed an issue with useLazyQuery failing due to act resolving a tick later
-
#2352
963f1caf4
Thanks @melnikov-s! - Reactact
promise 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 beawait
ed.- destroyAll() + await destroyAll()
- #2404
afdf2f9dd
Thanks @melnikov-s! - TriggerKeypath now fails typecheck on invalid array indices
- #2398
b37ec58b6
Thanks @melnikov-s! - Fix triggerKeyPath when path resolves to a type that is unioned with an empty object type ({})
- #2356
84d4756eb
Thanks @melnikov-s! - Fully typed triggerKeypath method
-
#2389
03c1abc8c
Thanks @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-types
by using built-in types. [#2163]
- No updates. Transitive dependency bump.
- Rerelease after failed publish. No code changes.
- No updates. Transitive dependency bump.
- Added new
cleanup
option tocreateMount
[#2102]
- No updates. Transitive dependency bump.
- Fixed babel helpers file being generated with incorrect filename in esm build. [#2082]
- Migrate from
sewing-kit-next
toloom
for 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
findWhere
andfindWhereAll
[#1999] - Updated build tooling, types are now compiled with TypeScript 4.3. [#1997]
- Update to latest sewing-kit-next for build. Update
types
/typesVersions
fields to point directly into the build folder [#1980]
- Officially supports React
17.x
1969
- 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.1
in the list of dependencies. #1657
- Remove cast for
act
following update to@types/react-dom
jest.Matchers
type updated to match@types/jest
version25
[#1239]- Update
jest-matcher-utils
to25
[#1375]
- Type error while using
[toHaveReactProps](https://github.com/Shopify/quilt/issues/1212) is now resolved by updating
@types/jestto
24.9.1`. #1212
- new
debug()
function added toRoot
andElement
to inspect mounted structure (#1088)
- Fixed
html()
to properly return the outermost wrapping DOM tags (#1042)
- Both
toContainReactComponent
andtoContainReactComponentTimes
matcher will now throw a more useful error if the expected value isnull
orundefined
(#1047)
- Fixed
find
andfindAll
not returning the correct type when being passed a string that matchesJSX.IntrinsicElements
(#906)
- explicitly defining return type for
findWhere
andfindAllWhere
operators (#795)
- Added a
toContainReactComponentTimes
matcher (#781) - Added the ability to extend a custom mount function with
createMount().extend()
(#788) Root
andElement
now both implement the newly-exportedNode
type, which can be used to request any object that satisfies the traversal and introspection APIs (#793)
- Added a
toProvideReactContext
matcher (#735)
-
When using a custom mount with
createMount
, callingsetProps
on the resulting elements will now properly set props on the JSX that was mounted, not the element returned from thecreateMount
render
option (#726).Note: In order to support the above, a small change was made to the
Root
class’s constructor. If you were calling this directly (which is discouraged), you will need to use the newresolveRoot
option 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#find
now correctly find components created byReact.memo
andReact.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
null
fordomNode
(#622)
- Added
.toContainReactText
and.toContainReactHtml
matchers (#626)
- Calling
Root#act
within another callback toRoot#act
now groups the update into a singleact()
block (#626)
- Added a
createMount
factory that can create mount functions tailor-made to suit the global state for individual applications (#624)
- Added a
@shopify/react-testing/matchers
directory, which adds.toHaveReactProps
and.toContainReactComponent
assertions for Jest (#621) Element#find
andElement#findAll
now accept a second optional argument for required props on matched elements (#621)
Initial release.