From 597143ee3d5c27ce87e9b1508b068dc7c1323201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerardo=20D=C3=ADaz=20de=20la=20Serna?= Date: Wed, 1 Mar 2023 19:36:25 -0600 Subject: [PATCH 01/27] Add `exports` field in package.json (#5559) * Add exports field in package.json * Create .changeset/early-pans-obey.md * Format --------- Co-authored-by: Rall3n Co-authored-by: Nathan Bierema --- .changeset/early-pans-obey.md | 5 +++++ packages/react-select/package.json | 32 ++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .changeset/early-pans-obey.md diff --git a/.changeset/early-pans-obey.md b/.changeset/early-pans-obey.md new file mode 100644 index 0000000000..a1980c304e --- /dev/null +++ b/.changeset/early-pans-obey.md @@ -0,0 +1,5 @@ +--- +'react-select': patch +--- + +Add `exports` field in package.json diff --git a/packages/react-select/package.json b/packages/react-select/package.json index c9cd5a90e3..8b94607341 100644 --- a/packages/react-select/package.json +++ b/packages/react-select/package.json @@ -59,5 +59,37 @@ "creatable/index.ts", "async-creatable/index.ts" ] + }, + "exports": { + ".": { + "require": "./dist/react-select.cjs.js", + "import": "./dist/react-select.esm.js", + "types": "./dist/react-select.cjs.d.ts" + }, + "./base": { + "require": "./base/dist/react-select-base.cjs.js", + "import": "./base/dist/react-select-base.esm.js", + "types": "./base/dist/react-select-base.cjs.d.ts" + }, + "./animated": { + "require": "./animated/dist/react-select-animated.cjs.js", + "import": "./animated/dist/react-select-animated.esm.js", + "types": "./animated/dist/react-select-animated.cjs.d.ts" + }, + "./async": { + "require": "./async/dist/react-select-async.cjs.js", + "import": "./async/dist/react-select-async.esm.js", + "types": "./async/dist/react-select-async.cjs.d.ts" + }, + "./creatable": { + "require": "./creatable/dist/react-select-creatable.cjs.js", + "import": "./creatable/dist/react-select-creatable.esm.js", + "types": "./creatable/dist/react-select-creatable.cjs.d.ts" + }, + "./async-creatable": { + "require": "./async-creatable/dist/react-select-async-creatable.cjs.js", + "import": "./async-creatable/dist/react-select-async-creatable.esm.js", + "types": "./async-creatable/dist/react-select-async-creatable.cjs.d.ts" + } } } From 11a7b342299327b98d015f6b2c126870192208dd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 20 Mar 2023 07:18:59 -0400 Subject: [PATCH 02/27] Version Packages (#5571) Co-authored-by: github-actions[bot] --- .changeset/early-pans-obey.md | 5 ----- packages/react-select/CHANGELOG.md | 6 ++++++ packages/react-select/package.json | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 .changeset/early-pans-obey.md diff --git a/.changeset/early-pans-obey.md b/.changeset/early-pans-obey.md deleted file mode 100644 index a1980c304e..0000000000 --- a/.changeset/early-pans-obey.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-select': patch ---- - -Add `exports` field in package.json diff --git a/packages/react-select/CHANGELOG.md b/packages/react-select/CHANGELOG.md index 932a90f969..0ba7bf6694 100644 --- a/packages/react-select/CHANGELOG.md +++ b/packages/react-select/CHANGELOG.md @@ -1,5 +1,11 @@ # react-select +## 5.7.1 + +### Patch Changes + +- [`597143ee`](https://github.com/JedWatson/react-select/commit/597143ee3d5c27ce87e9b1508b068dc7c1323201) [#5559](https://github.com/JedWatson/react-select/pull/5559) Thanks [@gdiazdelaserna](https://github.com/gdiazdelaserna)! - Add `exports` field in package.json + ## 5.7.0 ### Minor Changes diff --git a/packages/react-select/package.json b/packages/react-select/package.json index 8b94607341..fc04b99648 100644 --- a/packages/react-select/package.json +++ b/packages/react-select/package.json @@ -1,6 +1,6 @@ { "name": "react-select", - "version": "5.7.0", + "version": "5.7.1", "description": "A Select control built with and for ReactJS", "main": "dist/react-select.cjs.js", "module": "dist/react-select.esm.js", From 925cd4a26097823187fb14cdae2561dd3c637e8c Mon Sep 17 00:00:00 2001 From: Rall3n Date: Wed, 22 Mar 2023 15:54:29 +0100 Subject: [PATCH 03/27] `required` prop accessibiltiy and functionality improvements (#5536) * Hide `RequiredInput` from screen readers * Make `required` work without `name` prop Synonymous to default HTML form elements * Add changeset --- .changeset/gorgeous-bottles-bow.md | 5 +++++ packages/react-select/src/Select.tsx | 6 +++--- packages/react-select/src/internal/RequiredInput.tsx | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 .changeset/gorgeous-bottles-bow.md diff --git a/.changeset/gorgeous-bottles-bow.md b/.changeset/gorgeous-bottles-bow.md new file mode 100644 index 0000000000..becda2e767 --- /dev/null +++ b/.changeset/gorgeous-bottles-bow.md @@ -0,0 +1,5 @@ +--- +'react-select': patch +--- + +`required` prop accessibiltiy and functionality improvements diff --git a/packages/react-select/src/Select.tsx b/packages/react-select/src/Select.tsx index 9a029f31b0..16daa33094 100644 --- a/packages/react-select/src/Select.tsx +++ b/packages/react-select/src/Select.tsx @@ -2022,12 +2022,12 @@ export default class Select< const { delimiter, isDisabled, isMulti, name, required } = this.props; const { selectValue } = this.state; - if (!name || isDisabled) return; - - if (required && !this.hasValue()) { + if (required && !this.hasValue() && !isDisabled) { return ; } + if (!name || isDisabled) return; + if (isMulti) { if (delimiter) { const value = selectValue diff --git a/packages/react-select/src/internal/RequiredInput.tsx b/packages/react-select/src/internal/RequiredInput.tsx index 2d419f923b..834dfca3b3 100644 --- a/packages/react-select/src/internal/RequiredInput.tsx +++ b/packages/react-select/src/internal/RequiredInput.tsx @@ -3,13 +3,14 @@ import { FocusEventHandler, FunctionComponent } from 'react'; import { jsx } from '@emotion/react'; const RequiredInput: FunctionComponent<{ - readonly name: string; + readonly name?: string; readonly onFocus: FocusEventHandler; }> = ({ name, onFocus }) => ( Date: Wed, 22 Mar 2023 13:15:17 -0400 Subject: [PATCH 04/27] Version Packages (#5591) Co-authored-by: github-actions[bot] --- .changeset/gorgeous-bottles-bow.md | 5 ----- packages/react-select/CHANGELOG.md | 6 ++++++ packages/react-select/package.json | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 .changeset/gorgeous-bottles-bow.md diff --git a/.changeset/gorgeous-bottles-bow.md b/.changeset/gorgeous-bottles-bow.md deleted file mode 100644 index becda2e767..0000000000 --- a/.changeset/gorgeous-bottles-bow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-select': patch ---- - -`required` prop accessibiltiy and functionality improvements diff --git a/packages/react-select/CHANGELOG.md b/packages/react-select/CHANGELOG.md index 0ba7bf6694..d725000f39 100644 --- a/packages/react-select/CHANGELOG.md +++ b/packages/react-select/CHANGELOG.md @@ -1,5 +1,11 @@ # react-select +## 5.7.2 + +### Patch Changes + +- [`925cd4a2`](https://github.com/JedWatson/react-select/commit/925cd4a26097823187fb14cdae2561dd3c637e8c) [#5536](https://github.com/JedWatson/react-select/pull/5536) Thanks [@Rall3n](https://github.com/Rall3n)! - `required` prop accessibiltiy and functionality improvements + ## 5.7.1 ### Patch Changes diff --git a/packages/react-select/package.json b/packages/react-select/package.json index fc04b99648..faa325410a 100644 --- a/packages/react-select/package.json +++ b/packages/react-select/package.json @@ -1,6 +1,6 @@ { "name": "react-select", - "version": "5.7.1", + "version": "5.7.2", "description": "A Select control built with and for ReactJS", "main": "dist/react-select.cjs.js", "module": "dist/react-select.esm.js", From 59513d0035a20cf9c0575c4be52204de7f77d742 Mon Sep 17 00:00:00 2001 From: Emma Hamilton Date: Wed, 3 May 2023 13:57:41 +1000 Subject: [PATCH 05/27] Fix `exports` field (#5626) --- .changeset/nervous-islands-shake.md | 5 ++ .../generate/package.json | 3 +- docs/generate-magical-types/package.json | 13 +++++ .../serialize/package.json | 3 +- package.json | 11 ++-- packages/react-select/package.json | 43 ++++++++-------- yarn.lock | 50 +++++++++++++------ 7 files changed, 85 insertions(+), 43 deletions(-) create mode 100644 .changeset/nervous-islands-shake.md diff --git a/.changeset/nervous-islands-shake.md b/.changeset/nervous-islands-shake.md new file mode 100644 index 0000000000..fa2b4f6c36 --- /dev/null +++ b/.changeset/nervous-islands-shake.md @@ -0,0 +1,5 @@ +--- +'react-select': patch +--- + +Fix importing `react-select` in Node ESM diff --git a/docs/generate-magical-types/generate/package.json b/docs/generate-magical-types/generate/package.json index c8cade72a6..3ea23b80e4 100644 --- a/docs/generate-magical-types/generate/package.json +++ b/docs/generate-magical-types/generate/package.json @@ -1,3 +1,4 @@ { - "main": "dist/react-select-generate-magical-types-generate.cjs.js" + "main": "dist/react-select-generate-magical-types-generate.cjs.js", + "module": "dist/react-select-generate-magical-types-generate.esm.js" } diff --git a/docs/generate-magical-types/package.json b/docs/generate-magical-types/package.json index 9af9564a97..0879e4ece4 100644 --- a/docs/generate-magical-types/package.json +++ b/docs/generate-magical-types/package.json @@ -1,6 +1,19 @@ { "name": "@react-select/generate-magical-types", "main": "dist/generate-magical-types.cjs.js", + "exports": { + "./generate": { + "module": "./generate/dist/react-select-generate-magical-types-generate.esm.js", + "import": "./generate/dist/react-select-generate-magical-types-generate.cjs.mjs", + "default": "./generate/dist/react-select-generate-magical-types-generate.cjs.js" + }, + "./serialize": { + "module": "./serialize/dist/react-select-generate-magical-types-serialize.esm.js", + "import": "./serialize/dist/react-select-generate-magical-types-serialize.cjs.mjs", + "default": "./serialize/dist/react-select-generate-magical-types-serialize.cjs.js" + }, + "./package.json": "./package.json" + }, "//": "these deps aren't real, they're just to appease preconstruct", "dependencies": { "@babel/runtime": "*", diff --git a/docs/generate-magical-types/serialize/package.json b/docs/generate-magical-types/serialize/package.json index 2b2d88a1f4..c2c2c78370 100644 --- a/docs/generate-magical-types/serialize/package.json +++ b/docs/generate-magical-types/serialize/package.json @@ -1,3 +1,4 @@ { - "main": "dist/react-select-generate-magical-types-serialize.cjs.js" + "main": "dist/react-select-generate-magical-types-serialize.cjs.js", + "module": "dist/react-select-generate-magical-types-serialize.esm.js" } diff --git a/package.json b/package.json index 9124282c7d..90a96e2f70 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "@emotion/babel-plugin": "^11.10.2", "@emotion/jest": "^11.1.0", "@manypkg/cli": "^0.19.2", - "@preconstruct/cli": "^2.2.2", + "@preconstruct/cli": "^2.6.2", "@testing-library/dom": "8.19.0", "@testing-library/jest-dom": "5.1.1", "@testing-library/react": "12.1.4", @@ -120,11 +120,10 @@ "packages": [ "packages/*", "docs/generate-magical-types" - ] - }, - "browser": { - "./dist/react-select.cjs.js": "./dist/react-select.browser.cjs.js", - "./dist/react-select.esm.js": "./dist/react-select.browser.esm.js" + ], + "exports": { + "importConditionDefaultExport": "default" + } }, "resolutions": { "csstype": "^3.0.2" diff --git a/packages/react-select/package.json b/packages/react-select/package.json index faa325410a..3058a5aea0 100644 --- a/packages/react-select/package.json +++ b/packages/react-select/package.json @@ -62,34 +62,35 @@ }, "exports": { ".": { - "require": "./dist/react-select.cjs.js", - "import": "./dist/react-select.esm.js", - "types": "./dist/react-select.cjs.d.ts" + "module": "./dist/react-select.esm.js", + "import": "./dist/react-select.cjs.mjs", + "default": "./dist/react-select.cjs.js" }, "./base": { - "require": "./base/dist/react-select-base.cjs.js", - "import": "./base/dist/react-select-base.esm.js", - "types": "./base/dist/react-select-base.cjs.d.ts" - }, - "./animated": { - "require": "./animated/dist/react-select-animated.cjs.js", - "import": "./animated/dist/react-select-animated.esm.js", - "types": "./animated/dist/react-select-animated.cjs.d.ts" + "module": "./base/dist/react-select-base.esm.js", + "import": "./base/dist/react-select-base.cjs.mjs", + "default": "./base/dist/react-select-base.cjs.js" }, "./async": { - "require": "./async/dist/react-select-async.cjs.js", - "import": "./async/dist/react-select-async.esm.js", - "types": "./async/dist/react-select-async.cjs.d.ts" + "module": "./async/dist/react-select-async.esm.js", + "import": "./async/dist/react-select-async.cjs.mjs", + "default": "./async/dist/react-select-async.cjs.js" + }, + "./animated": { + "module": "./animated/dist/react-select-animated.esm.js", + "import": "./animated/dist/react-select-animated.cjs.mjs", + "default": "./animated/dist/react-select-animated.cjs.js" }, "./creatable": { - "require": "./creatable/dist/react-select-creatable.cjs.js", - "import": "./creatable/dist/react-select-creatable.esm.js", - "types": "./creatable/dist/react-select-creatable.cjs.d.ts" + "module": "./creatable/dist/react-select-creatable.esm.js", + "import": "./creatable/dist/react-select-creatable.cjs.mjs", + "default": "./creatable/dist/react-select-creatable.cjs.js" }, "./async-creatable": { - "require": "./async-creatable/dist/react-select-async-creatable.cjs.js", - "import": "./async-creatable/dist/react-select-async-creatable.esm.js", - "types": "./async-creatable/dist/react-select-async-creatable.cjs.d.ts" - } + "module": "./async-creatable/dist/react-select-async-creatable.esm.js", + "import": "./async-creatable/dist/react-select-async-creatable.cjs.mjs", + "default": "./async-creatable/dist/react-select-async-creatable.cjs.js" + }, + "./package.json": "./package.json" } } diff --git a/yarn.lock b/yarn.lock index 2a420179f0..2f85710693 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2102,6 +2102,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== +"@jridgewell/sourcemap-codec@^1.4.13": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.14", "@jridgewell/trace-mapping@^0.3.9": version "0.3.17" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985" @@ -2308,10 +2313,10 @@ resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.9.2.tgz#adea7b6953cbb34651766b0548468e743c6a2353" integrity sha512-VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30Q== -"@preconstruct/cli@^2.2.2": - version "2.2.2" - resolved "https://registry.yarnpkg.com/@preconstruct/cli/-/cli-2.2.2.tgz#2327aa2486f7c3650cfa726e667a9d80007e50d8" - integrity sha512-7Zk8g/G+SPusoL1Ir3oslj19QDoFuAKeQO8B6fnNkRRgvIntxnylGZyC4wdKVX/eeDHwca1LNLT/GyjXx1f1nA== +"@preconstruct/cli@^2.6.2": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@preconstruct/cli/-/cli-2.6.2.tgz#ee0dd6456129cd72b918a52440088e54f46bdc5d" + integrity sha512-KhWeiw3hutnue5CTRlfWAZrB8qjW/uJNuSKC0OkwaerH9v8LdnbnnpMEdave8LAbruTuDJKhZ9KQd67ooY2n4g== dependencies: "@babel/code-frame" "^7.5.5" "@babel/core" "^7.7.7" @@ -2335,7 +2340,7 @@ is-ci "^2.0.0" is-reference "^1.2.1" jest-worker "^26.3.0" - magic-string "^0.25.7" + magic-string "^0.30.0" meow "^7.1.0" ms "^2.1.2" normalize-path "^3.0.0" @@ -2346,9 +2351,9 @@ quick-lru "^5.1.1" resolve "^1.17.0" resolve-from "^5.0.0" - rollup "^2.32.0" + rollup "^2.79.1" semver "^7.3.4" - terser "^5.2.1" + terser "^5.16.8" v8-compile-cache "^2.1.1" "@preconstruct/hook@^0.4.0": @@ -9081,7 +9086,7 @@ fsevents@^1.2.7: bindings "^1.5.0" nan "^2.12.1" -fsevents@^2.1.2, fsevents@~2.3.1, fsevents@~2.3.2: +fsevents@^2.1.2, fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== @@ -12144,6 +12149,13 @@ magic-string@^0.25.7: dependencies: sourcemap-codec "^1.4.4" +magic-string@^0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.0.tgz#fd58a4748c5c4547338a424e90fa5dd17f4de529" + integrity sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.13" + make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -15542,12 +15554,12 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rollup@^2.32.0: - version "2.50.6" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.50.6.tgz#24e2211caf9031081656e98a5e5e94d3b5e786e2" - integrity sha512-6c5CJPLVgo0iNaZWWliNu1Kl43tjP9LZcp6D/tkf2eLH2a9/WeHxg9vfTFl8QV/2SOyaJX37CEm9XuGM0rviUg== +rollup@^2.79.1: + version "2.79.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7" + integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw== optionalDependencies: - fsevents "~2.3.1" + fsevents "~2.3.2" rst-selector-parser@^2.2.3: version "2.2.3" @@ -16880,7 +16892,7 @@ terser@^4.1.2, terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" -terser@^5.14.1, terser@^5.2.1, terser@^5.3.4: +terser@^5.14.1, terser@^5.3.4: version "5.15.1" resolved "https://registry.yarnpkg.com/terser/-/terser-5.15.1.tgz#8561af6e0fd6d839669c73b92bdd5777d870ed6c" integrity sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw== @@ -16890,6 +16902,16 @@ terser@^5.14.1, terser@^5.2.1, terser@^5.3.4: commander "^2.20.0" source-map-support "~0.5.20" +terser@^5.16.8: + version "5.17.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.17.1.tgz#948f10830454761e2eeedc6debe45c532c83fd69" + integrity sha512-hVl35zClmpisy6oaoKALOpS0rDYLxRFLHhRuDlEGTKey9qHjS1w9GMORjuwIMt70Wan4lwsLYyWDVnWgF+KUEw== + dependencies: + "@jridgewell/source-map" "^0.3.2" + acorn "^8.5.0" + commander "^2.20.0" + source-map-support "~0.5.20" + test-exclude@^4.2.1: version "4.2.3" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.3.tgz#a9a5e64474e4398339245a0a769ad7c2f4a97c20" From a465818786afd4857c9155bef1e9aa2fe3356097 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 3 May 2023 14:13:59 +1000 Subject: [PATCH 06/27] Version Packages (#5630) --- .changeset/nervous-islands-shake.md | 5 ----- README.md | 2 +- packages/react-select/CHANGELOG.md | 16 +++++++++++----- packages/react-select/README.md | 2 +- packages/react-select/package.json | 2 +- 5 files changed, 14 insertions(+), 13 deletions(-) delete mode 100644 .changeset/nervous-islands-shake.md diff --git a/.changeset/nervous-islands-shake.md b/.changeset/nervous-islands-shake.md deleted file mode 100644 index fa2b4f6c36..0000000000 --- a/.changeset/nervous-islands-shake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-select': patch ---- - -Fix importing `react-select` in Node ESM diff --git a/README.md b/README.md index f053de2e98..ffd55f5476 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ Thank you to everyone who has contributed to this project. It's been a wild ride If you like React Select, you should [follow me on Twitter](https://twitter.com/jedwatson)! -Shout out to [Joss Mackison](https://github.com/jossmac), [Charles Lee](https://github.com/gwyneplaine), [Ben Conolly](https://github.com/Noviny), [Tom Walker](https://github.com/bladey), [Nathan Bierema](https://github.com/Methuselah96), [Eric Bonow](https://github.com/ebonow), [Mitchell Hamilton](https://github.com/mitchellhamilton), [Dave Brotherstone](https://github.com/bruderstein), [Brian Vaughn](https://github.com/bvaughn), and the [Atlassian Design System](https://atlassian.design) team who along with many other contributors have made this possible ❤️ +Shout out to [Joss Mackison](https://github.com/jossmac), [Charles Lee](https://github.com/gwyneplaine), [Ben Conolly](https://github.com/Noviny), [Tom Walker](https://github.com/bladey), [Nathan Bierema](https://github.com/Methuselah96), [Eric Bonow](https://github.com/ebonow), [Emma Hamilton](https://github.com/emmatown), [Dave Brotherstone](https://github.com/bruderstein), [Brian Vaughn](https://github.com/bvaughn), and the [Atlassian Design System](https://atlassian.design) team who along with many other contributors have made this possible ❤️ ## License diff --git a/packages/react-select/CHANGELOG.md b/packages/react-select/CHANGELOG.md index d725000f39..8dabac9e04 100644 --- a/packages/react-select/CHANGELOG.md +++ b/packages/react-select/CHANGELOG.md @@ -1,5 +1,11 @@ # react-select +## 5.7.3 + +### Patch Changes + +- [`59513d00`](https://github.com/JedWatson/react-select/commit/59513d0035a20cf9c0575c4be52204de7f77d742) [#5626](https://github.com/JedWatson/react-select/pull/5626) Thanks [@emmatown](https://github.com/emmatown)! - Fix importing `react-select` in Node ESM + ## 5.7.2 ### Patch Changes @@ -285,7 +291,7 @@ - [c955415c](https://github.com/JedWatson/react-select/commit/c955415cd3724489423dd8e84d6dab5ace24c984) [#4437](https://github.com/JedWatson/react-select/pull/4437) Thanks [@ebonow](https://github.com/ebonow)! - Set event listeners to be non-passive to remove Chrome console warnings -- [3ca22b2f](https://github.com/JedWatson/react-select/commit/3ca22b2f49ad4f05f98ec8a565d74c483c0b98aa) [#3827](https://github.com/JedWatson/react-select/pull/3827) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Memoize stripDiacritics in createFilter for the input with memoize-one so that stripDiacritics is not called for the same string as many times as there are options every time the input changes +- [3ca22b2f](https://github.com/JedWatson/react-select/commit/3ca22b2f49ad4f05f98ec8a565d74c483c0b98aa) [#3827](https://github.com/JedWatson/react-select/pull/3827) Thanks [@emmatown](https://github.com/emmatown)! - Memoize stripDiacritics in createFilter for the input with memoize-one so that stripDiacritics is not called for the same string as many times as there are options every time the input changes Inspired by https://blog.johnnyreilly.com/2019/04/react-select-with-less-typing-lag.html @@ -371,7 +377,7 @@ ### Patch Changes -- [c8d74bd5](https://github.com/JedWatson/react-select/commit/c8d74bd5710b1db6736837fb4334a59e46614a27) [#3979](https://github.com/JedWatson/react-select/pull/3979) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Fix repository field +- [c8d74bd5](https://github.com/JedWatson/react-select/commit/c8d74bd5710b1db6736837fb4334a59e46614a27) [#3979](https://github.com/JedWatson/react-select/pull/3979) Thanks [@emmatown](https://github.com/emmatown)! - Fix repository field - [c8447f48](https://github.com/JedWatson/react-select/commit/c8447f480f8b9ca04386bee08e8d3a6fbb4f07c8) [#4034](https://github.com/JedWatson/react-select/pull/4034) Thanks [@sophiebits](https://github.com/sophiebits)! - Improve performance of option filtering when ignoreAccents is enabled (the default) @@ -397,12 +403,12 @@ ### Patch Changes - [83b48de4](https://github.com/JedWatson/react-select/commit/83b48de4a18263b361744fc5e89d9b9845b26e4f) [#3868](https://github.com/JedWatson/react-select/pull/3868) Thanks [@Tirzono](https://github.com/Tirzono)! - Fix for not focusing the selected value when the menu opens -- [563b046a](https://github.com/JedWatson/react-select/commit/563b046a57a94c47950e62cedc4ce1c489f19f91) [#3794](https://github.com/JedWatson/react-select/pull/3794) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Convert class components that don't have to be class components to function components to reduce bundle size +- [563b046a](https://github.com/JedWatson/react-select/commit/563b046a57a94c47950e62cedc4ce1c489f19f91) [#3794](https://github.com/JedWatson/react-select/pull/3794) Thanks [@emmatown](https://github.com/emmatown)! - Convert class components that don't have to be class components to function components to reduce bundle size - [c7e9c697](https://github.com/JedWatson/react-select/commit/c7e9c697dada15ce3ff9a767bf914ad890080433) [#3682](https://github.com/JedWatson/react-select/pull/3682) Thanks [@JedWatson](https://github.com/JedWatson)! - Allow the input component to be a `textarea` element - [3c7de0de](https://github.com/JedWatson/react-select/commit/3c7de0de52826fe74d303a01475c43fe88256156) [#3090](https://github.com/JedWatson/react-select/pull/3090) Thanks [@akiselev](https://github.com/akiselev)! - Add aria attributes to dummy input - [d2a820ef](https://github.com/JedWatson/react-select/commit/d2a820efc70835adf864169eebc76947783a15e2) [#3537](https://github.com/JedWatson/react-select/pull/3537) Thanks [@jdelStrother](https://github.com/jdelStrother)! - Fix Flow issues. Refer to the linked PR for more details on the specific issues. - [fc52085b](https://github.com/JedWatson/react-select/commit/fc52085b969b1b6f53adf29d52469db9560b828c) [#3662](https://github.com/JedWatson/react-select/pull/3662) Thanks [@eemeli](https://github.com/eemeli)! - Update react-transition-group to ^4.3.0 -- [edb18dd3](https://github.com/JedWatson/react-select/commit/edb18dd3d65b8fbc342bde9e805c5e3293ab6e37) [#3797](https://github.com/JedWatson/react-select/pull/3797) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Enable Babel loose mode to improve bundle size +- [edb18dd3](https://github.com/JedWatson/react-select/commit/edb18dd3d65b8fbc342bde9e805c5e3293ab6e37) [#3797](https://github.com/JedWatson/react-select/pull/3797) Thanks [@emmatown](https://github.com/emmatown)! - Enable Babel loose mode to improve bundle size ## 3.0.8 @@ -438,7 +444,7 @@ ### Patch Changes -- [cd8c3090](https://github.com/JedWatson/react-select/commit/cd8c3090) [#3586](https://github.com/JedWatson/react-select/pull/3586) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Add base entrypoint back +- [cd8c3090](https://github.com/JedWatson/react-select/commit/cd8c3090) [#3586](https://github.com/JedWatson/react-select/pull/3586) Thanks [@emmatown](https://github.com/emmatown)! - Add base entrypoint back - [#3569](https://github.com/JedWatson/react-select/pull/3569) Thanks [@vadimka123](https://github.com/vadimka123) - Performance improvement: menu items are built when the menu opens, not in the constructor diff --git a/packages/react-select/README.md b/packages/react-select/README.md index 8be7399afa..8a01c67c06 100644 --- a/packages/react-select/README.md +++ b/packages/react-select/README.md @@ -161,7 +161,7 @@ Thank you to everyone who has contributed to this project. It's been a wild ride If you like React Select, you should [follow me on twitter](https://twitter.com/jedwatson)! -Shout out to [Joss Mackison](https://github.com/jossmac), [Charles Lee](https://github.com/gwyneplaine), [Ben Conolly](https://github.com/Noviny), [Tom Walker](https://github.com/bladey), [Nathan Bierema](https://github.com/Methuselah96), [Eric Bonow](https://github.com/ebonow), [Mitchell Hamilton](https://github.com/mitchellhamilton), [Dave Brotherstone](https://github.com/bruderstein), [Brian Vaughn](https://github.com/bvaughn), and the [Atlassian Design System](https://atlassian.design) team who along with many other contributors have made this possible ❤️ +Shout out to [Joss Mackison](https://github.com/jossmac), [Charles Lee](https://github.com/gwyneplaine), [Ben Conolly](https://github.com/Noviny), [Tom Walker](https://github.com/bladey), [Nathan Bierema](https://github.com/Methuselah96), [Eric Bonow](https://github.com/ebonow), [Emma Hamilton](https://github.com/emmatown), [Dave Brotherstone](https://github.com/bruderstein), [Brian Vaughn](https://github.com/bvaughn), and the [Atlassian Design System](https://atlassian.design) team who along with many other contributors have made this possible ❤️ ## License diff --git a/packages/react-select/package.json b/packages/react-select/package.json index 3058a5aea0..8e05e4019e 100644 --- a/packages/react-select/package.json +++ b/packages/react-select/package.json @@ -1,6 +1,6 @@ { "name": "react-select", - "version": "5.7.2", + "version": "5.7.3", "description": "A Select control built with and for ReactJS", "main": "dist/react-select.cjs.js", "module": "dist/react-select.esm.js", From 16414bb53295b362690d2b089d74182ddeabc1dd Mon Sep 17 00:00:00 2001 From: Rall3n Date: Thu, 13 Jul 2023 15:47:25 +0200 Subject: [PATCH 07/27] Resolve `defaultProps` deprecation warning for React v18+ (#5689) * Remove `defaultProps` reference from functional components * Prettier * Add changeset * Change changeset message --- .changeset/metal-pens-boil.md | 5 ++ packages/react-select/src/components/Menu.tsx | 48 ++++++++++--------- .../src/components/indicators.tsx | 24 ++++++---- 3 files changed, 45 insertions(+), 32 deletions(-) create mode 100644 .changeset/metal-pens-boil.md diff --git a/.changeset/metal-pens-boil.md b/.changeset/metal-pens-boil.md new file mode 100644 index 0000000000..47b1fa5bbe --- /dev/null +++ b/.changeset/metal-pens-boil.md @@ -0,0 +1,5 @@ +--- +'react-select': patch +--- + +Resolve `defaultProps` deprecation warning for React v18+. diff --git a/packages/react-select/src/components/Menu.tsx b/packages/react-select/src/components/Menu.tsx index d5cc0a79ad..7483fa045e 100644 --- a/packages/react-select/src/components/Menu.tsx +++ b/packages/react-select/src/components/Menu.tsx @@ -498,49 +498,53 @@ export const NoOptionsMessage = < Option, IsMulti extends boolean, Group extends GroupBase