From 79cb4a080fb7adf65f972feacdb09a5dbfa2801c Mon Sep 17 00:00:00 2001 From: Anton Lavrevov Date: Thu, 14 Aug 2025 07:29:56 +0900 Subject: [PATCH] record changes --- CHANGELOG.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++- release.sh | 14 +------------ 2 files changed, 56 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 695abcf0..8d4f7766 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,60 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## 10.0.0-0 (2025-08-14) + +- **Breaking**: Konva module is fully migrated from CommonJS modules to ES modules. It may break some older bundlers and CommonJS environments. In CommonJS environment you have to use default property from require: + +```js +// before +const Konva = require('konva'); + +// after +const Konva = require('konva').default; +``` + +- **Breaking:** Dropped default support for node.js environment. Now you have to explicitly import it: + +```bash +npm install canvas +``` + +```js +import Konva from 'konva'; +import 'konva/canvas-backend'; +``` + +- Added new `skia` render backend for node.js: + +```bash +npm install skia-canvas +``` + +```js +import Konva from 'konva'; +import 'konva/skia-backend'; +``` + +- New property `charRenderFunc` for `Konva.Text` for controlling "per-character-render". May be useful any character animations: + +````js +var text = new Konva.Text({ + x: 10, + y: 10, + text: 'AB', + fontSize: 20, + charRenderFunc: function ({ context, index }) { + if (index === 1) { + // shift only the second character + context.translate(0, 10); + } + }, +}); +``` + +- Fixed corner radius render for `Konva.Rect` when negative width or height are used +- Added `cornerRadius` support for `Konva.RegularPolygon` + ## 9.3.22 (2025-07-08) - Fixed possible crash on `node.to()` method @@ -304,7 +358,7 @@ group.find('Shape').visible(false); // new code: group.find('Shape').forEach((shape) => shape.visible(false)); -``` +```` - argument `selector` is removed from `node.getIntersection(pos)` API. I don't think you even knew about it. - `Konva.Util.extend` is removed. diff --git a/release.sh b/release.sh index 57355c8b..aa42245d 100755 --- a/release.sh +++ b/release.sh @@ -59,19 +59,7 @@ git tag $1 >/dev/null cd ../konva git push >/dev/null git push --tags >/dev/null -npm publish +npm publish --tag next -# echo "copy konva.js into konva-site" -# cp ./konva.js ../konva-site/ -# cd ../konva-site - -# echo "replace CDN links" - - -# find source themes/hexo3/layout react-demos vue-demos main-demo -name "*.json" -exec perl -i -pe "s|${old_version}|${new_version}|g" {} + >/dev/null -# find source themes/hexo3/layout react-demos vue-demos main-demo -name "*.html" -exec perl -i -pe "s|${old_version}|${new_version}|g" {} + >/dev/null - -# echo "regenerate site" -# ./deploy.sh >/dev/null echo "DONE!"