You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Fix issue with gentype and stdlib json. https://github.com/rescript-lang/rescript/pull/7378
29
+
- Fix type of `RegExp.Result.matches`. https://github.com/rescript-lang/rescript/pull/7393
30
+
- Add optional `flags` argument to `RegExp.fromString` and deprecate `RegExp.fromStringWithFlags`. https://github.com/rescript-lang/rescript/pull/7393
31
+
32
+
#### :house: Internal
33
+
34
+
- Better representation of JSX in AST. https://github.com/rescript-lang/rescript/pull/7286
35
+
36
+
#### :nail_care: Polish
37
+
38
+
- Improve error message for missing value when the identifier is also the name of a module in scope. https://github.com/rescript-lang/rescript/pull/7384
39
+
- Upgrade Flow parser to 0.267.0. https://github.com/rescript-lang/rescript/pull/7390
- Fix signature of `throw`. https://github.com/rescript-lang/rescript/pull/7365
47
+
- Fix formatter adds superfluous parens in pipe chain. https://github.com/rescript-lang/rescript/pull/7370
48
+
49
+
#### :house: Internal
50
+
51
+
- Remove `Stdlib_Char` module for now. https://github.com/rescript-lang/rescript/pull/7367
52
+
- Convert internal JavaScript codebase into ESM, ReScript package itself is now ESM (`"type": "module"`). https://github.com/rescript-lang/rescript/pull/6899
53
+
- Add built-in support for the JavaScript `in` operator. https://github.com/rescript-lang/rescript/pull/7342
54
+
- AST cleanup: add `Pexp_await` ast node instead of `res.await` attribute. (The attribute is still used for await on modules currently). https://github.com/rescript-lang/rescript/pull/7368
55
+
56
+
#### :nail_care: Polish
57
+
58
+
- More deprecations in `Pervasives`; add `Stdlib.Pair` and `Stdlib.Int.Ref`. https://github.com/rescript-lang/rescript/pull/7371
59
+
60
+
# 12.0.0-alpha.10
14
61
15
62
#### :rocket: New Feature
16
63
17
64
- Add `Dict.has` and double `Dict.forEachWithKey`/`Dict.mapValues` performance. https://github.com/rescript-lang/rescript/pull/7316
18
-
- Add popover attributes to JsxDOM.domProps. https://github.com/rescript-lang/rescript/pull/7317
65
+
- Add popover attributes to `JsxDOM.domProps`. https://github.com/rescript-lang/rescript/pull/7317
19
66
- Add `Array.removeInPlace` helper based on `splice`. https://github.com/rescript-lang/rescript/pull/7321
20
67
- Add `inert` attribute to `JsxDOM.domProps`. https://github.com/rescript-lang/rescript/pull/7326
21
68
- Make reanalyze exception tracking work with the new stdlib. https://github.com/rescript-lang/rescript/pull/7328
22
-
- Fix Pervasive.max using boolean comparison for floats. https://github.com/rescript-lang/rescript/pull/7333
69
+
- Fix `Pervasive.max` using boolean comparison for floats. https://github.com/rescript-lang/rescript/pull/7333
23
70
- Experimental: Support nested/inline record types - records defined inside of other records, without needing explicit separate type definitions. https://github.com/rescript-lang/rescript/pull/7241
24
71
- Add unified exponentiation (`**`) operator for numeric types using ES7 `**`. https://github.com/rescript-lang/rescript-compiler/pull/7153
25
72
- Rename `raise` to `throw` to align with JavaScript vocabulary. `raise` has been deprecated. https://github.com/rescript-lang/rescript/pull/7346
- Hide stdlib modules in output. https://github.com/rescript-lang/rescript/pull/7305
43
92
- Deprecate unsafe host-specific bindings from stdlib. https://github.com/rescript-lang/rescript/pull/7334
44
-
- Make unsafe function names consistent in Stdlib.String. https://github.com/rescript-lang/rescript/pull/7337
93
+
- Make unsafe function names consistent in `Stdlib.String`. https://github.com/rescript-lang/rescript/pull/7337
45
94
-`rescript` package does not trigger `postinstall` script anymore. https://github.com/rescript-lang/rescript/pull/7350
46
-
- Add Stdlib Bool and Char modules and improve Pervasives deprecation messages. https://github.com/rescript-lang/rescript/pull/7361
95
+
- Add Stdlib `Bool` and `Char` modules and improve Pervasives deprecation messages. https://github.com/rescript-lang/rescript/pull/7361
47
96
48
97
#### :bug: Bug fix
49
98
50
-
- Fix recursive untagged variant type checking by delaying well-formedness checks until environment construction completes. [#7320](https://github.com/rescript-lang/rescript/pull/7320)
99
+
- Fix recursive untagged variant type checking by delaying well-formedness checks until environment construction completes. https://github.com/rescript-lang/rescript/pull/7320
51
100
- Fix incorrect expansion of polymorphic return types in uncurried function applications. https://github.com/rescript-lang/rescript/pull/7338
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,19 +123,19 @@ After adding a new file to the repository that should go into the npm package -
123
123
124
124
```sh
125
125
make lib # Build compiler and standard library
126
-
./cli/bsc myTestFile.res
126
+
./cli/bsc.js myTestFile.res
127
127
```
128
128
129
129
To view the untyped tree of the file run:
130
130
131
131
```sh
132
-
./cli/bsc -dparsetree myTestFile.res
132
+
./cli/bsc.js -dparsetree myTestFile.res
133
133
```
134
134
135
135
To view the typed tree of the file run:
136
136
137
137
```sh
138
-
./cli/bsc -dtypedtree myTestFile.res
138
+
./cli/bsc.js -dtypedtree myTestFile.res
139
139
```
140
140
141
141
### Project
@@ -241,39 +241,39 @@ make playground
241
241
make playground-cmijs
242
242
```
243
243
244
-
Note that building the cmijs is based on the dependencies defined in `packages/playground-bundling/package.json`. In case you want to build some different version of e.g. `@rescript/react` or just want to add a new package, change the definition within the `package.json` file and run `make playground-cmijs` again.
244
+
Note that building the cmijs is based on the dependencies defined in `packages/playground/package.json`. In case you want to build some different version of e.g. `@rescript/react` or just want to add a new package, change the definition within the `package.json` file and run `yarn workspace playground build` again.
245
245
246
246
After a successful compilation, you will find following files in your project:
247
247
248
248
-`playground/compiler.js` -> This is the ReScript compiler, which binds the ReScript API to the `window` object.
249
-
-`playground/packages` -> Contains third party deps with cmij.js files (as defined in `packages/playground-bundling/bsconfig.json`)
250
-
-`playground/compilerCmij.js` -> The compiler base cmij containing all the relevant core modules (`Js`, `Belt`, `Pervasives`, etc.)
249
+
-`playground/packages/compiler-builtins` -> The compiler base cmij containing all the relevant core modules (`Js`, `Belt`, `Pervasives`, etc.)
250
+
-`playground/packages/*` -> Contains third party deps with cmij.js files (as defined in `packages/playground/rescript.json`)
251
251
252
252
You can now use the `compiler.js` file either directly by using a `<script src="/path/to/compiler.js"/>` and `<script src="/path/to/packages/compilerCmij.js"/>` inside a html file, use a browser bundler infrastructure to optimize it, or use `nodejs` to run it on a command line:
253
253
254
254
```
255
255
$ node
256
-
> require("./compiler.js");
257
-
> require("./packages/compilerCmij.js")
258
-
> let compiler = rescript_compiler.make()
259
-
> let result = compiler.rescript.compile(`Js.log(Sys.ocaml_version)`);
256
+
> let { rescript_compiler } = require("./compiler.js");
257
+
> require("./packages/compiler-builtins/cmij.js")
258
+
> let { rescript } = rescript_compiler.make()
259
+
> let result = rescript.compile(`Console.log(${rescript.version})`);
260
260
> eval(result.js_code);
261
-
4.06.2+BS
262
261
```
263
262
264
263
### Testing the Playground bundle
265
264
266
-
Run `node playground/playground_test.js` for a quick sanity check to see if all the build artifacts are working together correctly. When releasing the playground bundle, the test will always be executed before publishing to catch regressions.
265
+
Run `yarn workspace playground test` for a quick sanity check to see if all the build artifacts are working together correctly. When releasing the playground bundle, the test will always be executed before publishing to catch regressions.
267
266
268
267
### Working on the Playground JS API
269
268
270
269
Whenever you are modifying any files in the ReScript compiler, or in the `jsoo_playground_main.ml` file, you'll need to rebuild the source and recreate the JS bundle.
271
270
272
271
```
273
272
make playground
273
+
yarn workspace playground build
274
274
275
275
# optionally run your test / arbitrary node script to verify your changes
276
-
node playground/playground_test.js
276
+
yarn workspace playground test
277
277
```
278
278
279
279
### Publishing the Playground Bundle on our KeyCDN
0 commit comments