diff --git a/.changeset/modern-toolchain.md b/.changeset/modern-toolchain.md deleted file mode 100644 index 553d5ba..0000000 --- a/.changeset/modern-toolchain.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'use-editable': major ---- - -Require React 18 or newer, and ship modern JavaScript. - -- **Breaking:** the `react` peer dependency is now `>=18.0.0` (was `>=16.8.0`). -- **Breaking:** `dist/` now targets ES2022 instead of ES5. Bundlers that transpile `node_modules` for older browsers are unaffected. -- Types now live at `dist/use-editable.d.ts` (was `dist/types/index.d.ts`); the `types` field points there, so normal imports are unaffected. The `main` and `module` filenames are unchanged. -- The build moved from rollup, Babel, buble, closure-compiler and terser to tsdown; releases are published from CI with npm provenance. diff --git a/.changeset/stale-caret-restore.md b/.changeset/stale-caret-restore.md deleted file mode 100644 index a24164e..0000000 --- a/.changeset/stale-caret-restore.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'use-editable': patch ---- - -pr: #37 - -Don't restore a stale caret position onto content it wasn't computed against. An unrelated re-render landing between a keystroke's `keydown` and `keyup` no longer yanks the caret to the wrong offset. diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a73bb1..e5de761 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # use-editable +## 3.0.0 + +### Major Changes + +- [#40](https://github.com/FormidableLabs/use-editable/pull/40) [`7097f72`](https://github.com/FormidableLabs/use-editable/commit/7097f72318d8c2ac8c366a6e160df92dea8d861c) - Require React 18 or newer, and ship modern JavaScript. + + - **Breaking:** the `react` peer dependency is now `>=18.0.0` (was `>=16.8.0`). + - **Breaking:** `dist/` now targets ES2022 instead of ES5. Bundlers that transpile `node_modules` for older browsers are unaffected. + - Types now live at `dist/use-editable.d.ts` (was `dist/types/index.d.ts`); the `types` field points there, so normal imports are unaffected. The `main` and `module` filenames are unchanged. + - The build moved from rollup, Babel, buble, closure-compiler and terser to tsdown; releases are published from CI with npm provenance. + +### Patch Changes + +- [#37](https://github.com/FormidableLabs/use-editable/pull/37) [`033a70c`](https://github.com/FormidableLabs/use-editable/commit/033a70cd746c5f869b3efeb4fbf27a792f82ee80) - Don't restore a stale caret position onto content it wasn't computed against. An unrelated re-render landing between a keystroke's `keydown` and `keyup` no longer yanks the caret to the wrong offset. + ## 2.3.3 - Prevent empty text from being inserted diff --git a/package-lock.json b/package-lock.json index b06fce9..4aafe00 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "use-editable", - "version": "2.3.3", + "version": "3.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "use-editable", - "version": "2.3.3", + "version": "3.0.0", "license": "MIT", "devDependencies": { "@arethetypeswrong/core": "^0.18.5", diff --git a/package.json b/package.json index da2d927..3e68c14 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "use-editable", "description": "A small React hook to turn elements into fully renderable & editable content surfaces, like code editors, using contenteditable (and magic)", - "version": "2.3.3", + "version": "3.0.0", "type": "commonjs", "main": "dist/use-editable.js", "module": "dist/use-editable.es.js",