From 36c1c8ab304b95a84538d9ce69405547caee4830 Mon Sep 17 00:00:00 2001 From: Brandon Lenz <15805554+brandonlenz@users.noreply.github.com> Date: Fri, 29 Sep 2023 11:18:09 -0400 Subject: [PATCH] feat(deps): Allow consumers to use newer uswds minor versions (#2600) Co-authored-by: Mazdak Atighi --- README.md | 5 ++++- package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2dd924ff19..653e453ef1 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,10 @@ npm i @trussworks/react-uswds ### USWDS -It is strongly suggested applications use the same version of USWDS that was used to build the version of ReactUSWDS they're using. A version mismatch may result in unexpected markup & CSS combinations. +It is strongly suggested applications use the same version of USWDS that was used to build the version of ReactUSWDS they're using (see this repo's uswds `devDependency` in [package.json](./package.json)). +A version mismatch may result in unexpected markup & CSS combinations. +For flexibility, ReactUSWDS will not trigger warnings if consumers choose to use a higher minor version of `uswds` (hence the careted uswds `peerDependency` in [package.json](./package.json)). +If encountering unexpected markup issues when choosing _not_ to use the matching `devDependency` version of `uswds`, consumers should check whether aligning the versions resolves their issue(s). You can import ReactUSWDS components using ES6 syntax: diff --git a/package.json b/package.json index 0c4c2a1430..5c33f766f6 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ }, "homepage": "https://github.com/trussworks/react-uswds#readme", "peerDependencies": { - "@uswds/uswds": "3.6.0", + "@uswds/uswds": "^3.6.0", "react": "^16.x || ^17.x || ^18.x", "react-dom": "^16.x || ^17.x || ^18.x" },