We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3655aa3 commit fefd9a0Copy full SHA for fefd9a0
package-lock.json
package.json
@@ -23,9 +23,7 @@
23
"@docsearch/react": "^3.5.2",
24
"@headlessui/react": "^1.2.0",
25
"@mdx-js/loader": "^3.1.0",
26
- "@rescript/core": "^1.4.0",
27
"@rescript/react": "^0.12.0-alpha.3",
28
- "@rescript/tools": "^0.5.0",
29
"codemirror": "^5.54.0",
30
"docson": "^2.1.0",
31
"escodegen": "^2.1.0",
@@ -52,7 +50,7 @@
52
50
"remark-rehype": "^11.1.1",
53
51
"remark-stringify": "^11.0.0",
54
"request": "^2.88.0",
55
- "rescript": "^11.1.0",
+ "rescript": "^12.0.0-alpha.9",
56
"stringify-object": "^3.3.0",
57
"unified": "^11.0.5",
58
"vfile-matter": "^5.0.0"
@@ -80,4 +78,4 @@
80
78
"simple-functional-loader": "^1.2.1",
81
79
"tailwindcss": "^3.3.3"
82
}
83
-}
+}
rescript.json
@@ -5,14 +5,7 @@
5
"version": 4
6
},
7
"bs-dependencies": [
8
- "@rescript/react",
9
- "@rescript/tools",
10
- "@rescript/core"
11
- ],
12
- "uncurried": true,
13
- "ppx-flags": [],
14
- "bsc-flags": [
15
- "-open RescriptCore"
+ "@rescript/react"
16
],
17
"sources": [
18
{
@@ -38,4 +31,4 @@
38
"shims": [],
39
32
"module": "es6"
40
33
41
34
scripts/gendocs.res
@@ -115,7 +115,9 @@ let docs = docsDecoded->Array.map(doc => {
115
let rec getModules = (lst: list<Docgen.item>, moduleNames: list<module_>) =>
116
switch lst {
117
| list{
118
- Module({id, items, name, docstrings}) | ModuleAlias({id, items, name, docstrings}),
+ Module({id, items, name, docstrings})
119
+ | ModuleAlias({id, items, name, docstrings})
120
+ | ModuleType({id, items, name, docstrings}),
121
...rest,
122
} =>
123
if Array.includes(hiddenModules, id) {
@@ -255,7 +257,10 @@ let () = {
255
257
256
258
let rec getModules = (lst: list<Docgen.item>, moduleNames, path) => {
259
- | list{Module({id, items, name}) | ModuleAlias({id, items, name}), ...rest} =>
260
+ | list{
261
+ Module({id, items, name}) | ModuleAlias({id, items, name}) | ModuleType({id, items, name}),
262
+ ...rest,
263
+ } =>
264
265
getModules(rest, moduleNames, path)
266
} else {
src/ApiDocs.res
@@ -307,7 +307,7 @@ let default = (props: props) => {
307
let valuesAndType = items->Array.map(item => {
308
switch item {
309
| Value({name, signature, docstrings, deprecated}) =>
310
- let code = String.replaceRegExp(signature, %re("/\\n/g"), "\n")
+ let code = String.replaceRegExp(signature, /\\n/g, "\n")
311
let slugPrefix = "value-" ++ name
312
<>
313
<H2 id=slugPrefix> {name->React.string} </H2>
@@ -316,7 +316,7 @@ let default = (props: props) => {
316
<DocstringsStylize docstrings slugPrefix />
317
</>
318
| Type({name, signature, docstrings, deprecated}) =>
319
320
let slugPrefix = "type-" ++ name
321
322
@@ -474,6 +474,7 @@ let processStaticProps = (~slug: array<string>, ~version: string) => {
474
})
475
476
Variant({items: items})->Null.make
477
+ | Signature(_) => Null.null
478
479
| None => Null.null
480
src/Blog.res
@@ -95,8 +95,8 @@ module BlogCard = {
95
96
let className = "absolute top-0 h-full w-full object-cover"
97
switch previewImg {
98
- | Some(src) => <img className src loading={#"lazy"} />
99
- | None => <img className src=defaultPreviewImg loading={#"lazy"} />
+ | Some(src) => <img className src loading={#lazy} />
+ | None => <img className src=defaultPreviewImg loading={#lazy} />
100
101
102
</Link>
src/CommunityContent.res
@@ -20,7 +20,7 @@ module LinkCard = {
20
let make = (~link, ~index) => {
21
let loading = switch index {
22
| 0 => #eager
- | _ => #"lazy"
+ | _ => #lazy
<div className="rounded-lg hover:text-fire overflow-hidden bg-gray-10 border-2 border-gray-30">
<a href=link.url className="flex flex-col h-full">
src/ConsolePanel.res
@@ -34,7 +34,7 @@ let make = (~logs, ~appendLog) => {
->Array.mapWithIndex(({level: logLevel, content: log}, i) => {
35
let log = Array.join(log, " ")
36
<pre
37
- key={RescriptCore.Int.toString(i)}
+ key={Int.toString(i)}
className={switch logLevel {
| #log => ""
| #warn => "text-orange"
src/SyntaxLookup.res
@@ -151,14 +151,14 @@ type params = {slug: string}
151
152
let decode = (json: JSON.t) => {
153
open Json.Decode
154
- let id = json->(field("id", string, _))
155
- let keywords = json->(field("keywords", array(string, ...), _))
156
- let name = json->(field("name", string, _))
157
- let summary = json->(field("summary", string, _))
158
- let category = json->field("category", string, _)->Category.fromString
+ let id = json->field("id", string, _)
+ let keywords = json->field("keywords", array(string, ...), _)
+ let name = json->field("name", string, _)
+ let summary = json->field("summary", string, _)
+ let category = json->(field("category", string, _))->Category.fromString
159
let status =
160
json
161
- ->optional(field("status", string, _), _)
+ ->(optional(field("status", string, _), _))
162
->Option.mapOr(Status.Active, Status.fromString)
163
164
src/Try.res
@@ -37,11 +37,9 @@ let getStaticProps: Next.GetStaticProps.t<props, _> = async _ => {
switch line->String.startsWith("<a href") {
| true =>
// Adapted from https://semver.org/
- let semverRe = %re(
- "/v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?/"
42
- )
43
- switch Re.exec(semverRe, line) {
44
- | Some(result) => Re.Result.fullMatch(result)->Some
+ let semverRe = /v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?/
+ switch RegExp.exec(semverRe, line) {
+ | Some(result) => RegExp.Result.fullMatch(result)->Some
45
| None => None
46
47
| false => None
0 commit comments