From 0a5619df2d3261f0750354ad1abdbe2862c4df9b Mon Sep 17 00:00:00 2001 From: tsnobip Date: Thu, 9 Jul 2026 11:24:37 +0200 Subject: [PATCH] move to rescript v13 and use %component_identity --- README.md | 1 + package-lock.json | 126 ++++++++++++++++++++++------------------------ package.json | 6 +-- src/React.res | 2 +- 4 files changed, 65 insertions(+), 70 deletions(-) diff --git a/README.md b/README.md index a9b21c4..38bba91 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ | @rescript/react | ReScript | ReactJS | Documentation | | --------------- | ---------------------------------- | ------- | ----------------------------------------------------------------- | +| 0.16.x | 13.0+ | 19 | | 0.15.x | 12.0+ | 19 | | | 0.14.x | 11.0+ (JSX4 + uncurried mode only) | 19 | | | 0.12.x, 0.13.x | 11.0+ | 18 | [Link](https://rescript-lang.org/docs/react/latest/introduction) | diff --git a/package-lock.json b/package-lock.json index be0cbd5..dc066d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,28 +1,28 @@ { "name": "@rescript/react", - "version": "0.15.0", + "version": "0.16.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@rescript/react", - "version": "0.15.0", + "version": "0.16.0", "license": "MIT", "devDependencies": { "react": "^19.2.0", "react-dom": "^19.2.0", - "rescript": "^12.0.0" + "rescript": "^13.0.0-alpha.4" }, "peerDependencies": { - "@rescript/runtime": ">=12.0.0", + "@rescript/runtime": ">=13.0.0-alpha.4", "react": ">=19.2.0", "react-dom": ">=19.2.0" } }, "node_modules/@rescript/darwin-arm64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@rescript/darwin-arm64/-/darwin-arm64-12.2.0.tgz", - "integrity": "sha512-xc3K/J7Ujl1vPiFY2009mRf3kWRlUe/VZyJWprseKxlcEtUQv89ter7r6pY+YFbtYvA/fcaEncL9CVGEdattAg==", + "version": "13.0.0-alpha.4", + "resolved": "https://registry.npmjs.org/@rescript/darwin-arm64/-/darwin-arm64-13.0.0-alpha.4.tgz", + "integrity": "sha512-3+uPQvuPoweXQ2MatnADRa6PgXhRI/LtkdWkoy8DFSKN7lhtF3Pg+eVjKxY4x4OCECNvHYWLWBKaiVRa22tocA==", "cpu": [ "arm64" ], @@ -37,9 +37,9 @@ } }, "node_modules/@rescript/darwin-x64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@rescript/darwin-x64/-/darwin-x64-12.2.0.tgz", - "integrity": "sha512-qqcTvnlSeoKkywLjG7cXfYvKZ1e4Gz2kUKcD6SiqDgCqm8TF+spwlFAiM6sloRUOFsc0bpC/0R0B3yr01FCB1A==", + "version": "13.0.0-alpha.4", + "resolved": "https://registry.npmjs.org/@rescript/darwin-x64/-/darwin-x64-13.0.0-alpha.4.tgz", + "integrity": "sha512-L71KY+BfSgrMYPUEGMDmrtbrqgBnoYJ/2nJZQNhPV0FP9oQ23rHw8pPVO8+/OzHYPr/OklnB5RbaBphzMBnaxg==", "cpu": [ "x64" ], @@ -54,9 +54,9 @@ } }, "node_modules/@rescript/linux-arm64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@rescript/linux-arm64/-/linux-arm64-12.2.0.tgz", - "integrity": "sha512-ODmpG3ji+Nj/8d5yvXkeHlfKkmbw1Q4t1iIjVuNwtmFpz7TiEa7n/sQqoYdE+WzbDX3DoJfmJNbp3Ob7qCUoOg==", + "version": "13.0.0-alpha.4", + "resolved": "https://registry.npmjs.org/@rescript/linux-arm64/-/linux-arm64-13.0.0-alpha.4.tgz", + "integrity": "sha512-2sJ4+Ali2PHhNRwIW53jYSuRSbMoioawl1WKAKoH7sQ++1+bIzdMuB3TQpi9oOqTUGlm/5l6bK2Amf8nUiJQ7Q==", "cpu": [ "arm64" ], @@ -71,9 +71,9 @@ } }, "node_modules/@rescript/linux-x64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@rescript/linux-x64/-/linux-x64-12.2.0.tgz", - "integrity": "sha512-2W9Y9/g19Y4F/subl8yV3T8QBG2oRaP+HciNRcBjptyEdw9LmCKH8+rhWO6sp3E+nZLwoE2IAkwH0WKV3wqlxQ==", + "version": "13.0.0-alpha.4", + "resolved": "https://registry.npmjs.org/@rescript/linux-x64/-/linux-x64-13.0.0-alpha.4.tgz", + "integrity": "sha512-Gbmk44xkW4+1qG5g2iAATwx/Y6fZvGgEGUFZw1wK1sDpn2DKblmXIV3JLcWROgpmQv4Mfp4RHPSzZdmcBdPUoQ==", "cpu": [ "x64" ], @@ -88,16 +88,15 @@ } }, "node_modules/@rescript/runtime": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@rescript/runtime/-/runtime-12.2.0.tgz", - "integrity": "sha512-NwfljDRq1rjFPHUaca1nzFz13xsa9ZGkBkLvMhvVgavJT5+A4rMcLu8XAaVTi/oAhO/tlHf9ZDoOTF1AfyAk9Q==", - "license": "MIT", - "peer": true + "version": "13.0.0-alpha.4", + "resolved": "https://registry.npmjs.org/@rescript/runtime/-/runtime-13.0.0-alpha.4.tgz", + "integrity": "sha512-pOGJdN0R3+PeB+tvxqmJB9qWPLTgitHmQY89lBbF3Ddtcbu/aUra9gEeFiX5gXGznEUcS1SVU24Zjr3GBqfy8w==", + "license": "MIT" }, "node_modules/@rescript/win32-x64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@rescript/win32-x64/-/win32-x64-12.2.0.tgz", - "integrity": "sha512-fhf8CBj3p1lkIXPeNko3mVTKQfXXm4BoxJtR1xAXxUn43wDpd8Lox4w8/EPBbbW6C/YFQW6H7rtpY+2AKuNaDA==", + "version": "13.0.0-alpha.4", + "resolved": "https://registry.npmjs.org/@rescript/win32-x64/-/win32-x64-13.0.0-alpha.4.tgz", + "integrity": "sha512-NadOoXUe4ek9ZMdHp1hvfc6U11HAOV4VKczCZuM13MvNM0RsmiFUG6jsSNt37ZQuC3iY6I/v3qeKglVv/LG11g==", "cpu": [ "x64" ], @@ -117,7 +116,6 @@ "integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -136,9 +134,9 @@ } }, "node_modules/rescript": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-12.2.0.tgz", - "integrity": "sha512-1Jf2cmNhyx5Mj2vwZ4XXPcXvNSjGj9D1jPBUcoqIOqRpLPo1ch2Ta/7eWh23xAHWHK5ow7BCDyYFjvZSjyjLzg==", + "version": "13.0.0-alpha.4", + "resolved": "https://registry.npmjs.org/rescript/-/rescript-13.0.0-alpha.4.tgz", + "integrity": "sha512-bkUiLFWxwwQ2cEjA9j3h0xQSgVk5ZngmhAhoB8oTyGrrzYzWoFaF0IEJhT0ZV0bqc+sen2xJtfqF1V8kyMql/A==", "dev": true, "license": "(LGPL-3.0-or-later AND MIT)", "workspaces": [ @@ -153,24 +151,22 @@ "scripts/res" ], "dependencies": { - "@rescript/runtime": "12.2.0" + "@rescript/runtime": "13.0.0-alpha.4" }, "bin": { "bsc": "cli/bsc.js", - "bstracing": "cli/bstracing.js", "rescript": "cli/rescript.js", - "rescript-legacy": "cli/rescript-legacy.js", "rescript-tools": "cli/rescript-tools.js" }, "engines": { "node": ">=20.11.0" }, "optionalDependencies": { - "@rescript/darwin-arm64": "12.2.0", - "@rescript/darwin-x64": "12.2.0", - "@rescript/linux-arm64": "12.2.0", - "@rescript/linux-x64": "12.2.0", - "@rescript/win32-x64": "12.2.0" + "@rescript/darwin-arm64": "13.0.0-alpha.4", + "@rescript/darwin-x64": "13.0.0-alpha.4", + "@rescript/linux-arm64": "13.0.0-alpha.4", + "@rescript/linux-x64": "13.0.0-alpha.4", + "@rescript/win32-x64": "13.0.0-alpha.4" } }, "node_modules/scheduler": { @@ -183,43 +179,42 @@ }, "dependencies": { "@rescript/darwin-arm64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@rescript/darwin-arm64/-/darwin-arm64-12.2.0.tgz", - "integrity": "sha512-xc3K/J7Ujl1vPiFY2009mRf3kWRlUe/VZyJWprseKxlcEtUQv89ter7r6pY+YFbtYvA/fcaEncL9CVGEdattAg==", + "version": "13.0.0-alpha.4", + "resolved": "https://registry.npmjs.org/@rescript/darwin-arm64/-/darwin-arm64-13.0.0-alpha.4.tgz", + "integrity": "sha512-3+uPQvuPoweXQ2MatnADRa6PgXhRI/LtkdWkoy8DFSKN7lhtF3Pg+eVjKxY4x4OCECNvHYWLWBKaiVRa22tocA==", "dev": true, "optional": true }, "@rescript/darwin-x64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@rescript/darwin-x64/-/darwin-x64-12.2.0.tgz", - "integrity": "sha512-qqcTvnlSeoKkywLjG7cXfYvKZ1e4Gz2kUKcD6SiqDgCqm8TF+spwlFAiM6sloRUOFsc0bpC/0R0B3yr01FCB1A==", + "version": "13.0.0-alpha.4", + "resolved": "https://registry.npmjs.org/@rescript/darwin-x64/-/darwin-x64-13.0.0-alpha.4.tgz", + "integrity": "sha512-L71KY+BfSgrMYPUEGMDmrtbrqgBnoYJ/2nJZQNhPV0FP9oQ23rHw8pPVO8+/OzHYPr/OklnB5RbaBphzMBnaxg==", "dev": true, "optional": true }, "@rescript/linux-arm64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@rescript/linux-arm64/-/linux-arm64-12.2.0.tgz", - "integrity": "sha512-ODmpG3ji+Nj/8d5yvXkeHlfKkmbw1Q4t1iIjVuNwtmFpz7TiEa7n/sQqoYdE+WzbDX3DoJfmJNbp3Ob7qCUoOg==", + "version": "13.0.0-alpha.4", + "resolved": "https://registry.npmjs.org/@rescript/linux-arm64/-/linux-arm64-13.0.0-alpha.4.tgz", + "integrity": "sha512-2sJ4+Ali2PHhNRwIW53jYSuRSbMoioawl1WKAKoH7sQ++1+bIzdMuB3TQpi9oOqTUGlm/5l6bK2Amf8nUiJQ7Q==", "dev": true, "optional": true }, "@rescript/linux-x64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@rescript/linux-x64/-/linux-x64-12.2.0.tgz", - "integrity": "sha512-2W9Y9/g19Y4F/subl8yV3T8QBG2oRaP+HciNRcBjptyEdw9LmCKH8+rhWO6sp3E+nZLwoE2IAkwH0WKV3wqlxQ==", + "version": "13.0.0-alpha.4", + "resolved": "https://registry.npmjs.org/@rescript/linux-x64/-/linux-x64-13.0.0-alpha.4.tgz", + "integrity": "sha512-Gbmk44xkW4+1qG5g2iAATwx/Y6fZvGgEGUFZw1wK1sDpn2DKblmXIV3JLcWROgpmQv4Mfp4RHPSzZdmcBdPUoQ==", "dev": true, "optional": true }, "@rescript/runtime": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@rescript/runtime/-/runtime-12.2.0.tgz", - "integrity": "sha512-NwfljDRq1rjFPHUaca1nzFz13xsa9ZGkBkLvMhvVgavJT5+A4rMcLu8XAaVTi/oAhO/tlHf9ZDoOTF1AfyAk9Q==", - "peer": true + "version": "13.0.0-alpha.4", + "resolved": "https://registry.npmjs.org/@rescript/runtime/-/runtime-13.0.0-alpha.4.tgz", + "integrity": "sha512-pOGJdN0R3+PeB+tvxqmJB9qWPLTgitHmQY89lBbF3Ddtcbu/aUra9gEeFiX5gXGznEUcS1SVU24Zjr3GBqfy8w==" }, "@rescript/win32-x64": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@rescript/win32-x64/-/win32-x64-12.2.0.tgz", - "integrity": "sha512-fhf8CBj3p1lkIXPeNko3mVTKQfXXm4BoxJtR1xAXxUn43wDpd8Lox4w8/EPBbbW6C/YFQW6H7rtpY+2AKuNaDA==", + "version": "13.0.0-alpha.4", + "resolved": "https://registry.npmjs.org/@rescript/win32-x64/-/win32-x64-13.0.0-alpha.4.tgz", + "integrity": "sha512-NadOoXUe4ek9ZMdHp1hvfc6U11HAOV4VKczCZuM13MvNM0RsmiFUG6jsSNt37ZQuC3iY6I/v3qeKglVv/LG11g==", "dev": true, "optional": true }, @@ -227,8 +222,7 @@ "version": "19.2.4", "resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz", "integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==", - "dev": true, - "peer": true + "dev": true }, "react-dom": { "version": "19.2.4", @@ -240,17 +234,17 @@ } }, "rescript": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-12.2.0.tgz", - "integrity": "sha512-1Jf2cmNhyx5Mj2vwZ4XXPcXvNSjGj9D1jPBUcoqIOqRpLPo1ch2Ta/7eWh23xAHWHK5ow7BCDyYFjvZSjyjLzg==", + "version": "13.0.0-alpha.4", + "resolved": "https://registry.npmjs.org/rescript/-/rescript-13.0.0-alpha.4.tgz", + "integrity": "sha512-bkUiLFWxwwQ2cEjA9j3h0xQSgVk5ZngmhAhoB8oTyGrrzYzWoFaF0IEJhT0ZV0bqc+sen2xJtfqF1V8kyMql/A==", "dev": true, "requires": { - "@rescript/darwin-arm64": "12.2.0", - "@rescript/darwin-x64": "12.2.0", - "@rescript/linux-arm64": "12.2.0", - "@rescript/linux-x64": "12.2.0", - "@rescript/runtime": "12.2.0", - "@rescript/win32-x64": "12.2.0" + "@rescript/darwin-arm64": "13.0.0-alpha.4", + "@rescript/darwin-x64": "13.0.0-alpha.4", + "@rescript/linux-arm64": "13.0.0-alpha.4", + "@rescript/linux-x64": "13.0.0-alpha.4", + "@rescript/runtime": "13.0.0-alpha.4", + "@rescript/win32-x64": "13.0.0-alpha.4" } }, "scheduler": { diff --git a/package.json b/package.json index 3762776..fe66ae1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rescript/react", - "version": "0.15.0", + "version": "0.16.0", "description": "React bindings for ReScript", "files": [ "README.md", @@ -31,10 +31,10 @@ "devDependencies": { "react": "^19.2.0", "react-dom": "^19.2.0", - "rescript": "^12.0.0" + "rescript": "^13.0.0-alpha.4" }, "peerDependencies": { - "@rescript/runtime": ">=12.0.0", + "@rescript/runtime": ">=13.0.0-alpha.4", "react": ">=19.2.0", "react-dom": ">=19.2.0" } diff --git a/src/React.res b/src/React.res index e453bfc..33aa4c7 100644 --- a/src/React.res +++ b/src/React.res @@ -13,7 +13,7 @@ type componentLike<'props, 'return> = Jsx.componentLike<'props, 'return> type component<'props> = Jsx.component<'props> -external component: componentLike<'props, element> => component<'props> = "%identity" +external component: componentLike<'props, element> => component<'props> = "%component_identity" @module("react") external createElement: (component<'props>, 'props) => element = "createElement"