diff --git a/analysis/tests/package-lock.json b/analysis/tests/package-lock.json index a8358bffd..f17e6ff13 100644 --- a/analysis/tests/package-lock.json +++ b/analysis/tests/package-lock.json @@ -8,17 +8,17 @@ "rescript": "^10.1.0-rc.2" }, "devDependencies": { - "@rescript/react": "^0.10.3" + "@rescript/react": "^0.11.0-alpha.1" } }, "node_modules/@rescript/react": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/@rescript/react/-/react-0.10.3.tgz", - "integrity": "sha512-Lf9rzrR3bQPKJjOK3PBRa/B3xrJ7CqQ1HYr9VHPVxJidarIJJFZBhj0Dg1uZURX+Wg/xiP0PHFxXmdj2bK8Vxw==", + "version": "0.11.0-alpha.1", + "resolved": "https://registry.npmjs.org/@rescript/react/-/react-0.11.0-alpha.1.tgz", + "integrity": "sha512-9JN9+K1MFrVIMncAJlCM5MjENP/MfPZxXmIKAD31cAYoDPAeSzYn/+theay93B/BsF71tSw8UUKQEgG8MB6e/g==", "dev": true, "peerDependencies": { - "react": ">=16.8.1", - "react-dom": ">=16.8.1" + "react": ">=18.2.0", + "react-dom": ">=18.2.0" } }, "node_modules/js-tokens": { @@ -93,9 +93,9 @@ }, "dependencies": { "@rescript/react": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/@rescript/react/-/react-0.10.3.tgz", - "integrity": "sha512-Lf9rzrR3bQPKJjOK3PBRa/B3xrJ7CqQ1HYr9VHPVxJidarIJJFZBhj0Dg1uZURX+Wg/xiP0PHFxXmdj2bK8Vxw==", + "version": "0.11.0-alpha.1", + "resolved": "https://registry.npmjs.org/@rescript/react/-/react-0.11.0-alpha.1.tgz", + "integrity": "sha512-9JN9+K1MFrVIMncAJlCM5MjENP/MfPZxXmIKAD31cAYoDPAeSzYn/+theay93B/BsF71tSw8UUKQEgG8MB6e/g==", "dev": true, "requires": {} }, diff --git a/analysis/tests/package.json b/analysis/tests/package.json index d978e0299..979331309 100644 --- a/analysis/tests/package.json +++ b/analysis/tests/package.json @@ -5,7 +5,7 @@ }, "private": true, "devDependencies": { - "@rescript/react": "^0.10.3" + "@rescript/react": "^0.11.0-alpha.1" }, "dependencies": { "rescript": "^10.1.0-rc.2" diff --git a/analysis/tests/src/expected/Div.res.txt b/analysis/tests/src/expected/Div.res.txt index b9b76fdbc..530a94e2b 100644 --- a/analysis/tests/src/expected/Div.res.txt +++ b/analysis/tests/src/expected/Div.res.txt @@ -1,6 +1,6 @@ Hover src/Div.res 0:10 getLocItem #3: heuristic for
-{"contents": "```rescript\n(\n string,\n ~props: ReactDOMRe.domProps=?,\n array,\n) => React.element\n```\n\n\n```\n \n```\n```rescript\ntype ReactDOMRe.domProps = ReactDOM.Props.domProps\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22ReactDOMRe.res%22%2C57%2C2%5D)\n\n---\n\n\n\n```\n \n```\n```rescript\ntype React.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C0%2C0%5D)\n\n---\n"} +{"contents": "```rescript\n(\n string,\n ~props: ReactDOMRe.domProps=?,\n array,\n) => React.element\n```\n\n\n```\n \n```\n```rescript\ntype ReactDOMRe.domProps = ReactDOM.Props.domProps\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22ReactDOMRe.res%22%2C57%2C2%5D)\n\n---\n\n\n\n```\n \n```\n```rescript\ntype React.element = Jsx.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C0%2C0%5D)\n\n---\n"} Complete src/Div.res 3:17 posCursor:[3:17] posNoWhite:[3:16] Found expr:[3:4->3:17] diff --git a/analysis/tests/src/expected/Fragment.res.txt b/analysis/tests/src/expected/Fragment.res.txt index f61e4c82e..60b024539 100644 --- a/analysis/tests/src/expected/Fragment.res.txt +++ b/analysis/tests/src/expected/Fragment.res.txt @@ -1,7 +1,7 @@ Hover src/Fragment.res 6:19 getLocItem #4: heuristic for within fragments: take make as makeProps does not work the type is not great but jump to definition works -{"contents": "```rescript\nReact.component<{\"children\": React.element}>\n```\n\n\n```\n \n```\n```rescript\ntype React.component<'props> = componentLike<\n 'props,\n element,\n>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C12%2C0%5D)\n\n---\n"} +{"contents": "```rescript\nReact.component<{\"children\": React.element}>\n```\n\n\n```\n \n```\n```rescript\ntype React.component<'props> = Jsx.component<'props>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C12%2C0%5D)\n\n---\n"} Hover src/Fragment.res 9:56 Nothing at that position. Now trying to use completion. diff --git a/analysis/tests/src/expected/Hover.res.txt b/analysis/tests/src/expected/Hover.res.txt index 6b820516a..2b196dc7f 100644 --- a/analysis/tests/src/expected/Hover.res.txt +++ b/analysis/tests/src/expected/Hover.res.txt @@ -159,7 +159,7 @@ Completable: Cpath Value[y2].content."" }] Hover src/Hover.res 197:4 -{"contents": "```rescript\nCompV4.props => React.element\n```\n\n\n```\n \n```\n```rescript\ntype CompV4.props<'n, 's> = {n?: 'n, s: 's}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C190%2C2%5D)\n\n---\n\n\n\n```\n \n```\n```rescript\ntype React.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C0%2C0%5D)\n\n---\n"} +{"contents": "```rescript\nCompV4.props => React.element\n```\n\n\n```\n \n```\n```rescript\ntype CompV4.props<'n, 's> = {n?: 'n, s: 's}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C190%2C2%5D)\n\n---\n\n\n\n```\n \n```\n```rescript\ntype React.element = Jsx.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C0%2C0%5D)\n\n---\n"} Hover src/Hover.res 202:16 {"contents": "```rescript\nuseR\n```\n\n\n```\n \n```\n```rescript\ntype useR = {x: int, y: list>>}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C200%2C0%5D)\n\n---\n\n\n\n```\n \n```\n```rescript\ntype r<'a> = {i: 'a, f: float}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C101%2C0%5D)\n\n---\n"} diff --git a/analysis/tests/src/expected/Jsx2.res.txt b/analysis/tests/src/expected/Jsx2.res.txt index 2de65d15b..ba4e490b4 100644 --- a/analysis/tests/src/expected/Jsx2.res.txt +++ b/analysis/tests/src/expected/Jsx2.res.txt @@ -294,7 +294,7 @@ Completable: Cpath Type[React, e] "label": "element", "kind": 22, "tags": [], - "detail": "type element", + "detail": "type element = Jsx.element", "documentation": null }] diff --git a/analysis/tests/src/expected/Jsx2.resi.txt b/analysis/tests/src/expected/Jsx2.resi.txt index bff16aa8c..cc5a28214 100644 --- a/analysis/tests/src/expected/Jsx2.resi.txt +++ b/analysis/tests/src/expected/Jsx2.resi.txt @@ -14,7 +14,7 @@ Completable: Cpath Type[React, e] "label": "element", "kind": 22, "tags": [], - "detail": "type element", + "detail": "type element = Jsx.element", "documentation": null }] @@ -26,7 +26,7 @@ Completable: Cpath Type[React, e] "label": "element", "kind": 22, "tags": [], - "detail": "type element", + "detail": "type element = Jsx.element", "documentation": null }]