diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index dc9017105..2931b7fef 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,11 +1,11 @@ blank_issues_enabled: false contact_links: - name: 🚀 rescript-compiler - url: https://github.com/rescript-lang/rescript-compiler/issues - about: Please report problems about the ReScript compiler and build system here. + url: https://github.com/rescript-lang/rescript/issues + about: Please report problems about the ReScript compiler, build system and tools here. - name: 💻 rescript-vscode url: https://github.com/rescript-lang/rescript-vscode/issues - about: VSCode language support, LSP, tools + about: VSCode language support, LSP - name: 📦 create-rescript-app url: https://github.com/rescript-lang/create-rescript-app/issues about: ReScript's project generator diff --git a/README.md b/README.md index 60d321eac..48b2e84bd 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This is the official documentation platform for the [ReScript](https://rescript-lang.org) programming language. -**Please report any technical issues with ReScript to the [compiler repository](https://github.com/rescript-lang/rescript-compiler).** +**Please report any technical issues with ReScript to the [compiler repository](https://github.com/rescript-lang/rescript).** **In case you are missing some specific documentation:** diff --git a/_blogposts/2020-09-25-release-8-3.mdx b/_blogposts/2020-09-25-release-8-3.mdx index a3a629be9..5975e6678 100644 --- a/_blogposts/2020-09-25-release-8-3.mdx +++ b/_blogposts/2020-09-25-release-8-3.mdx @@ -17,7 +17,7 @@ It's focused on type safety, performance and JS interop. It used to be called Bu npm i bs-platform@8.3.0 ``` -The changes are listed [here](https://github.com/rescript-lang/rescript-compiler/blob/master/Changes.md#83), this is a large release, and we will go through some highlighted changes. +The changes are listed [here](https://github.com/rescript-lang/rescript/blob/master/Changes.md#83), this is a large release, and we will go through some highlighted changes. @@ -122,7 +122,7 @@ Now user can pick up their js file extension support per module format: ## More flexible filename support -To have better integration with other [JS infrastructures](https://github.com/rescript-lang/rescript-compiler/issues/4624), +To have better integration with other [JS infrastructures](https://github.com/rescript-lang/rescript/issues/4624), for example, Next.js/React Native, we allow file names like `404.res`, `Button.Android.res` so that it can just be picked up by those tools diff --git a/_blogposts/2020-12-07-release-8-4.mdx b/_blogposts/2020-12-07-release-8-4.mdx index a51a0dfe0..bc7484feb 100644 --- a/_blogposts/2020-12-07-release-8-4.mdx +++ b/_blogposts/2020-12-07-release-8-4.mdx @@ -19,7 +19,7 @@ It's focused on type safety, performance and JS interop. It used to be called Bu npm i bs-platform@8.4.2 ``` -The changes are listed [here](https://github.com/rescript-lang/rescript-compiler/blob/master/Changes.md#841). +The changes are listed [here](https://github.com/rescript-lang/rescript/blob/master/Changes.md#841). We will go through some highlighted changes. @@ -33,11 +33,10 @@ In this release, we fix the integrity of `bsb -make-world` which allows user to The fix is well implemented that people who don't do such modifications will not pay for it. This is one of the highest desired feature request based on the -[user feedback](https://github.com/rescript-lang/rescript-compiler/issues/4361#issuecomment-739538789), so we will expand a bit here why it is tricky -to implement it without compromising performance. +[user feedback](https://github.com/rescript-lang/rescript/issues/4361#issuecomment-739538789), so we will expand a bit here why it is tricky to implement it without compromising performance. In ReScript compilation scheme, dependencies as packages are treated as a black box, -changes of dependencies should be *transitive*. The is due to that we have cross module +changes of dependencies should be _transitive_. The is due to that we have cross module optimizations and the binary interface itself is a hash of its dependencies. So for a package dependency chain: A -> B -> C, if A changes and B does not change, C still needs get rebuilt. Because the intermediate output of B may still change due to the change of A. @@ -68,6 +67,6 @@ of such stale outptu, such stale `List.cmi` file will break the integrity of the In this release, we introduced a more robust algorithm that will always remove stale output before the build so that such integrity is not broken. -Last but not the least, we continue improving the readability, debuggability of the [generated output](https://github.com/rescript-lang/rescript-compiler/pull/4858) : ) +Last but not the least, we continue improving the readability, debuggability of the [generated output](https://github.com/rescript-lang/rescript/pull/4858) : ) Happy Hacking! -- Hongbo Zhang diff --git a/_blogposts/2021-02-09-release-9-0.mdx b/_blogposts/2021-02-09-release-9-0.mdx index 3a220ed93..0ae1f049c 100644 --- a/_blogposts/2021-02-09-release-9-0.mdx +++ b/_blogposts/2021-02-09-release-9-0.mdx @@ -22,13 +22,13 @@ npm install bs-platform@9.0.1 You can also try our new release in the [Online Playground](/try). -In this post we will highlight the most notable changes. The full changelog for this release can be found [here](https://github.com/rescript-lang/rescript-compiler/blob/master/Changes.md#90). +In this post we will highlight the most notable changes. The full changelog for this release can be found [here](https://github.com/rescript-lang/rescript/blob/master/Changes.md#90). ## Compiler Improvements ### New External Stdlib Configuration -This is a long-awaited [feature request](https://github.com/rescript-lang/rescript-compiler/pull/2171). +This is a long-awaited [feature request](https://github.com/rescript-lang/rescript/pull/2171). Our compiler comes with a set of stdlib modules (such as `Belt`, `Pervasives`, etc.) for core functionality. Compiled ReScript code relies on the JS runtime version of these stdlib modules. @@ -47,7 +47,7 @@ We made a small [demo repo](https://github.com/bobzhang/zero-cost-rescript) and ### Improved Code Generation for Pattern Matching -We fine-tuned our pattern matching engine to optimize the JS output even more. Here is an example of a pretty substantial optimization, based on [this issue](https://github.com/rescript-lang/rescript-compiler/issues/4924): +We fine-tuned our pattern matching engine to optimize the JS output even more. Here is an example of a pretty substantial optimization, based on [this issue](https://github.com/rescript-lang/rescript/issues/4924): ```res type test = @@ -87,7 +87,7 @@ function test(x) { As you can see, the 9.0 compiler removes all the unnecessary `typeof` checks! -This is possible because our optimizer will try to analyze several predicates and get rid of redundant ones. More diffs can be found [here](https://github.com/rescript-lang/rescript-compiler/pull/4927/files?file-filters%5B%5D=.js). +This is possible because our optimizer will try to analyze several predicates and get rid of redundant ones. More diffs can be found [here](https://github.com/rescript-lang/rescript/pull/4927/files?file-filters%5B%5D=.js). Another important improvement is that we fixed the pattern match offset issue, which lead to the consequence that magic numbers will not be generated for complex pattern matches anymore. diff --git a/_blogposts/2021-05-07-release-9-1.mdx b/_blogposts/2021-05-07-release-9-1.mdx index e5573cf00..75f021180 100644 --- a/_blogposts/2021-05-07-release-9-1.mdx +++ b/_blogposts/2021-05-07-release-9-1.mdx @@ -10,7 +10,7 @@ description: | ## Exciting Improvements in ReScript 9.1 -Our recent few releases of ReScript contains [lots of improvements](https://github.com/rescript-lang/rescript-compiler/blob/3134392a364b70c9c172aa6c1dbaa1ac6580265d/Changes.md#91), among which are a few standout features we'd like to further promote. Hope you're as excited as we are about these! It goes without saying, our [updated editor plugin](https://forum.rescript-lang.org/t/ann-rescript-vscode-1-1-1-released/1542/3) works with the new releases. +Our recent few releases of ReScript contains [lots of improvements](https://github.com/rescript-lang/rescript/blob/3134392a364b70c9c172aa6c1dbaa1ac6580265d/Changes.md#91), among which are a few standout features we'd like to further promote. Hope you're as excited as we are about these! It goes without saying, our [updated editor plugin](https://forum.rescript-lang.org/t/ann-rescript-vscode-1-1-1-released/1542/3) works with the new releases. ### New NPM Package @@ -159,6 +159,6 @@ let helloUnicode = (x) =>{ ## Conclusion -Don't miss our various other improvements in [our changelog](https://github.com/rescript-lang/rescript-compiler/blob/3134392a364b70c9c172aa6c1dbaa1ac6580265d/Changes.md#91). As always we try to keep our changes performant, lean and robust. We hope you'll enjoy these. +Don't miss our various other improvements in [our changelog](https://github.com/rescript-lang/rescript/blob/3134392a364b70c9c172aa6c1dbaa1ac6580265d/Changes.md#91). As always we try to keep our changes performant, lean and robust. We hope you'll enjoy these. See you next time! diff --git a/_blogposts/2022-08-25-release-10-0-0.mdx b/_blogposts/2022-08-25-release-10-0-0.mdx index 0cd4ef112..b66493af2 100644 --- a/_blogposts/2022-08-25-release-10-0-0.mdx +++ b/_blogposts/2022-08-25-release-10-0-0.mdx @@ -14,7 +14,7 @@ ReScript version 10 is available! Version 10 is a culmination of over a year's w npm install rescript@10 ``` -All changes are listed [here](https://github.com/rescript-lang/rescript-compiler/blob/10.0_release/CHANGELOG.md). Let's take a tour of a few of the features we're extra excited about. +All changes are listed [here](https://github.com/rescript-lang/rescript/blob/10.0_release/CHANGELOG.md). Let's take a tour of a few of the features we're extra excited about. ## Faster builds with native M1 support Users with M1 chips should see a notable speedup, as the new ReScript version has full native support for M1. @@ -27,9 +27,9 @@ let str = "Σ" You can also pattern match on Unicode characters: ```res -switch someCharacter { - | 'Σ' => "what a fine Unicode char" - | _ => "Unicode is fun" +switch someCharacter { + | 'Σ' => "what a fine Unicode char" + | _ => "Unicode is fun" } ``` @@ -79,7 +79,7 @@ Version 10 brings the building blocks needed for a number of exciting new featur ## Upgrade guide -Please see the detailed [changelog](https://github.com/rescript-lang/rescript-compiler/blob/10.0_release/CHANGELOG.md) for a list of breaking changes. +Please see the detailed [changelog](https://github.com/rescript-lang/rescript/blob/10.0_release/CHANGELOG.md) for a list of breaking changes. Each breaking change lists suggestions on how to upgrade your project. This can be out of your control in case of dependencies. In that case, please raise issues with the maintainers of those libraries. diff --git a/_blogposts/2023-02-02-release-10-1.mdx b/_blogposts/2023-02-02-release-10-1.mdx index cfe3cefe3..cce653a2e 100644 --- a/_blogposts/2023-02-02-release-10-1.mdx +++ b/_blogposts/2023-02-02-release-10-1.mdx @@ -27,7 +27,7 @@ This version comes with two major language improvements we've all been waiting f Alongside the major changes, there have been many bugfixes and other improvements that won't be covered in this post. -Feel free to check the [Changelog](https://github.com/rescript-lang/rescript-compiler/blob/master/CHANGELOG.md#1011) for all the details. +Feel free to check the [Changelog](https://github.com/rescript-lang/rescript/blob/master/CHANGELOG.md#1011) for all the details. ## New `async` / `await` syntax @@ -293,16 +293,16 @@ Our contributors are already one step ahead and are currently working on improve - New tooling to generate markdown from docstrings (module, type and value level). This will be super simple, but very effective. - Explorations for a [localized documentation page](https://forum.rescript-lang.org/t/translation-project-rescript-lang-org/4022) (currently in a slowed-down exploration phase, but we will be getting there) -Check out the [v11](https://github.com/rescript-lang/rescript-compiler/issues?q=is%3Aopen+is%3Aissue+milestone%3Av11.0) milestone on our `rescript-lang` repo for more details on future improvements. +Check out the [v11](https://github.com/rescript-lang/rescript/issues?q=is%3Aopen+is%3Aissue+milestone%3Av11.0) milestone on our `rescript-lang` repo for more details on future improvements. ## Acknowledgements -As always, we want to thank our [contributors](https://github.com/rescript-lang/rescript-compiler/graphs/contributors?from=2019-11-24&to=2023-02-02&type=c) for building an amazing platform. Special thanks go out to [mununki](https://github.com/mununki) for building the new JSX v4 syntax. Amazing work! +As always, we want to thank our [contributors](https://github.com/rescript-lang/rescript/graphs/contributors?from=2019-11-24&to=2023-02-02&type=c) for building an amazing platform. Special thanks go out to [mununki](https://github.com/mununki) for building the new JSX v4 syntax. Amazing work! ## That's it We hope you enjoy the newest improvements as much as we do. -In case there's any issues / problems, make sure to report bugs to [rescript-lang/rescript-compiler](https://github.com/rescript-lang/rescript-compiler) (language / syntax / jsx), [rescript-lang/rescript-react](https://github.com/rescript-lang/rescript-react) (React 16 / 18 binding) or [rescript-association/rescript-lang.org](https://github.com/rescript-lang/rescript-lang.org) (documentation) repositories. +In case there's any issues / problems, make sure to report bugs to [rescript-lang/rescript](https://github.com/rescript-lang/rescript) (language / syntax / jsx), [rescript-lang/rescript-react](https://github.com/rescript-lang/rescript-react) (React 16 / 18 binding) or [rescript-association/rescript-lang.org](https://github.com/rescript-lang/rescript-lang.org) (documentation) repositories. Also feel free to visit the [ReScript forum](https://forum.rescript-lang.org/) to ask questions and connect with other ReScripters. diff --git a/_blogposts/2023-06-05-first-class-dynamic-import-support.mdx b/_blogposts/2023-06-05-first-class-dynamic-import-support.mdx index 19c2ca484..0baf66778 100644 --- a/_blogposts/2023-06-05-first-class-dynamic-import-support.mdx +++ b/_blogposts/2023-06-05-first-class-dynamic-import-support.mdx @@ -138,6 +138,6 @@ The most important take away of the new dynamic imports functionality in ReScrip We hope that it will help shipping software with better end-user experience with faster load times and quicker app interaction, especially on slower network connections. -As always, we're eager to hear about your experiences with our new features. Feel free to share your thoughts and feedback with us on our [issue tracker](https://github.com/rescript-lang/rescript-compiler/issues) or on the [forum](https://forum.rescript-lang.org). +As always, we're eager to hear about your experiences with our new features. Feel free to share your thoughts and feedback with us on our [issue tracker](https://github.com/rescript-lang/rescript/issues) or on the [forum](https://forum.rescript-lang.org). Happy hacking! diff --git a/_blogposts/2023-09-18-uncurried-mode.mdx b/_blogposts/2023-09-18-uncurried-mode.mdx index 050c280df..f448e73b7 100644 --- a/_blogposts/2023-09-18-uncurried-mode.mdx +++ b/_blogposts/2023-09-18-uncurried-mode.mdx @@ -145,6 +145,6 @@ Many thoughts have led to this decision, but we think this change is a great fit We hope that this new way of writing ReScript will make it both easier for beginners and also more enjoyable for the seasoned developers. -As always, we're eager to hear about your experiences with our new features. Feel free to share your thoughts and feedback with us on our [issue tracker](https://github.com/rescript-lang/rescript-compiler/issues) or on the [forum](https://forum.rescript-lang.org). +As always, we're eager to hear about your experiences with our new features. Feel free to share your thoughts and feedback with us on our [issue tracker](https://github.com/rescript-lang/rescript/issues) or on the [forum](https://forum.rescript-lang.org). Happy hacking! diff --git a/_blogposts/2024-01-11-release-11-0-0.mdx b/_blogposts/2024-01-11-release-11-0-0.mdx index 513cffb3f..eef0dd5de 100644 --- a/_blogposts/2024-01-11-release-11-0-0.mdx +++ b/_blogposts/2024-01-11-release-11-0-0.mdx @@ -18,7 +18,7 @@ npm install rescript@11 To upgrade your project or to find out if there are any breaking changes that affect you, please follow the [migration guide](/docs/manual/latest/migrate-to-v11). -The complete list of changes can be found [here](https://github.com/rescript-lang/rescript-compiler/blob/v11.0.0/CHANGELOG.md). Let's have a look at the most notable improvements. +The complete list of changes can be found [here](https://github.com/rescript-lang/rescript/blob/v11.0.0/CHANGELOG.md). Let's have a look at the most notable improvements. ## Highlights @@ -123,15 +123,15 @@ npx rescript-language-server --stdio As we now finish up the work on v11, we're looking forward to working on the next ReScript version. Here are some of the features we're planning to focus on in upcoming versions: - Make JSX usable beyond React: - - [Generic JSX transform](https://github.com/rescript-lang/rescript-compiler/issues/6408) - - [JSX preserve mode](https://github.com/rescript-lang/rescript-compiler/issues/6197) + - [Generic JSX transform](https://github.com/rescript-lang/rescript/issues/6408) + - [JSX preserve mode](https://github.com/rescript-lang/rescript/issues/6197) - Integrate the Rescript Core standard library into the compiler - remove the OCaml standard library - remove `Belt` but keep it available as external package -- Make maintaining TS libraries with ReScript a breeze, [thanks to genType](https://github.com/rescript-lang/rescript-compiler/issues/6210) -- Support [tagged template literals](https://github.com/rescript-lang/rescript-compiler/pull/6250) -- [Dedicated syntax for creating Dicts](https://github.com/rescript-lang/rescript-compiler/issues/6545) -- [Array spread syntax](https://github.com/rescript-lang/rescript-compiler/issues/6546) +- Make maintaining TS libraries with ReScript a breeze, [thanks to genType](https://github.com/rescript-lang/rescript/issues/6210) +- Support [tagged template literals](https://github.com/rescript-lang/rescript/pull/6250) +- [Dedicated syntax for creating Dicts](https://github.com/rescript-lang/rescript/issues/6545) +- [Array spread syntax](https://github.com/rescript-lang/rescript/issues/6546) - A [new custom build system](https://github.com/rolandpeelen/rewatch) with better support for workspaces / monorepos - More improvements to the type system @@ -145,7 +145,7 @@ We hope you enjoy the newest improvements as much as we do. In case of issues / problems, make sure to report bugs to one of the following repositories: -- [rescript-lang/rescript-compiler](https://github.com/rescript-lang/rescript-compiler) (language / syntax / jsx) +- [rescript-lang/rescript](https://github.com/rescript-lang/rescript) (language / syntax / jsx) - [rescript-lang/rescript-react](https://github.com/rescript-lang/rescript-react) (React bindings) - [rescript-lang/rescript-vscode](https://github.com/rescript-lang/rescript-vscode) (VSCode language support, LSP, tools) - [rescript-lang/create-rescript-app](https://github.com/rescript-lang/create-rescript-app) (project generator) or diff --git a/_blogposts/2024-02-01-release-11-1-0.mdx b/_blogposts/2024-02-01-release-11-1-0.mdx index 5a916fedd..868ef6619 100644 --- a/_blogposts/2024-02-01-release-11-1-0.mdx +++ b/_blogposts/2024-02-01-release-11-1-0.mdx @@ -236,7 +236,7 @@ See ["Compile with stricter errors in CI"](/docs/manual/latest/build-overview#co ## Other changes -Of course we also got a bunch of other changes and bug fixes in this release. Check out the [compiler changelog](https://github.com/rescript-lang/rescript-compiler/blob/11.0_release/CHANGELOG.md#1110-rc1) if you are interested. +Of course we also got a bunch of other changes and bug fixes in this release. Check out the [compiler changelog](https://github.com/rescript-lang/rescript/blob/11.0_release/CHANGELOG.md#1110-rc1) if you are interested. ## v12 is next @@ -254,4 +254,4 @@ We hope you enjoy the newest improvements as much as we do. If you find any problems with this new release, make sure to report them here: -- [rescript-lang/rescript-compiler](https://github.com/rescript-lang/rescript-compiler/issues/new/choose) +- [rescript-lang/rescript](https://github.com/rescript-lang/rescript/issues/new/choose) diff --git a/pages/community/overview.mdx b/pages/community/overview.mdx index 60b312676..019eaacce 100644 --- a/pages/community/overview.mdx +++ b/pages/community/overview.mdx @@ -9,29 +9,32 @@ canonical: "/community/overview" ## Official Channels - This website -- [Twitter](https://twitter.com/rescriptlang) +- [X (previously Twitter)](https://x.com/rescriptlang) +- [BlueSky](https://bsky.app/profile/rescript-lang.org) - [Forum](https://forum.rescript-lang.org) - [ReScript GitHub Org](https://github.com/rescript-lang/) +- [ReScript YouTube Channel](https://www.youtube.com/@rescriptlang) - [ReScript Online Meetup on Guild](https://guild.host/rescript-online-meetup) - [ReScript Online Meetup YouTube Channel](https://www.youtube.com/@ReScriptOnlineMeetup) -News are broadcasted on this site's blog and on Twitter. Some extra, less important news are also posted on the forum's [Announcements category](https://forum.rescript-lang.org/c/announcements/). +News are broadcasted on this site's blog, on BlueSky and X. Some extra, less important news are also posted on the forum's [Announcements category](https://forum.rescript-lang.org/c/announcements/). **We don't use any other channel to communicate officially**. Any announcement made by users on Reddit, Discord, Medium and others don't necessarily represent our intent. ## Articles -- [Getting rid of your dead code in ReScript](https://dev.to/zth/getting-rid-of-your-dead-code-in-rescript-3mba) +- [Getting rid of your dead code in ReScript](https://dev.to/zth/getting-rid-of-your-dead-code-in-rescript-3mba) - [Speeding up ReScript compilation using interface files](https://dev.to/zth/speeding-up-rescript-compilation-using-interface-files-4fgn) - Articles in [awesome-rescript](https://github.com/fhammerschmidt/awesome-rescript#readme) ## Questions Your questions can go on: + - [The General category](https://forum.rescript-lang.org/c/general/) of the forum. - Various GitHub repositories in our [GitHub org](https://github.com/rescript-lang/). - [Stack Overflow's `rescript` tag](https://stackoverflow.com/questions/tagged/rescript) (not frequently monitored). > We stand for inclusivity and good behavior. Please read our [Code of -Conduct](/community/code-of-conduct) and help us keeping our community healthy and -friendly! +> Conduct](/community/code-of-conduct) and help us keeping our community healthy and +> friendly! diff --git a/pages/community/roadmap.mdx b/pages/community/roadmap.mdx index 2d192f62e..bc4c0a0f7 100644 --- a/pages/community/roadmap.mdx +++ b/pages/community/roadmap.mdx @@ -12,7 +12,7 @@ For latest development updates, please check out the [ReScript forum](https://fo ## Current focus -Major v12.0 release (see [v12 milestone](https://github.com/rescript-lang/rescript-compiler/milestone/16)). +Major v12.0 release (see [v12 milestone](https://github.com/rescript-lang/rescript/milestone/16)). - Move the [Rescript Core](https://github.com/rescript-lang/rescript-core) standard library into the compiler / remove the OCaml standard library - A new build system tailored to ReScript's needs ([rewatch](https://github.com/teamwalnut/rewatch)) for better monorepo support and even faster compilation speed diff --git a/pages/docs/manual/latest/async-await.mdx b/pages/docs/manual/latest/async-await.mdx index fa481f8c3..5688e41b3 100644 --- a/pages/docs/manual/latest/async-await.mdx +++ b/pages/docs/manual/latest/async-await.mdx @@ -109,7 +109,7 @@ let fetchData: string => promise = async (userId: string): string { } ``` -**Note:** In a practical scenario you'd either use a type signature, or inline types, not both at the same time. In case you are interested in the design decisions, check out [this discussion](https://github.com/rescript-lang/rescript-compiler/pull/5913#issuecomment-1359003870). +**Note:** In a practical scenario you'd either use a type signature, or inline types, not both at the same time. In case you are interested in the design decisions, check out [this discussion](https://github.com/rescript-lang/rescript/pull/5913#issuecomment-1359003870). ### Promises don't auto-collapse in async functions diff --git a/pages/docs/manual/latest/build-configuration.mdx b/pages/docs/manual/latest/build-configuration.mdx index 6cf0f91d1..99543ffc0 100644 --- a/pages/docs/manual/latest/build-configuration.mdx +++ b/pages/docs/manual/latest/build-configuration.mdx @@ -240,4 +240,4 @@ When `NINJA_ANSI_FORCED` is set to `1`: `rescript` produces color. When `NINJA_ANSI_FORCED` is set to `0`: `rescript` doesn't produce color. When `NINJA_ANSI_FORCED` is not set: `rescript` might or might not produce color, depending on a smart detection of where it's outputted. -> Note that the underlying compiler will always be passed `-color always`. See more details in [this issue](https://github.com/rescript-lang/rescript-compiler/issues/2984#issuecomment-410669163). +> Note that the underlying compiler will always be passed `-color always`. See more details in [this issue](https://github.com/rescript-lang/rescript/issues/2984#issuecomment-410669163). diff --git a/pages/docs/manual/latest/migrate-to-v11.mdx b/pages/docs/manual/latest/migrate-to-v11.mdx index dfa1ef2dc..81faf323b 100644 --- a/pages/docs/manual/latest/migrate-to-v11.mdx +++ b/pages/docs/manual/latest/migrate-to-v11.mdx @@ -100,32 +100,32 @@ Below is an excerpt from the compiler changelog about all the breaking changes o ### Language and Compiler -- Add smart printer for pipe chains. https://github.com/rescript-lang/rescript-compiler/pull/6411 (the formatter will reformat existing code in certain cases) -- Parse `assert` as a regular function. `assert` is no longer a unary expression. Example: before `assert 1 == 2` is parsed as `(assert 1) == 2`, now it is parsed as `assert(1 == 2)`. https://github.com/rescript-lang/rescript-compiler/pull/6180 +- Add smart printer for pipe chains. https://github.com/rescript-lang/rescript/pull/6411 (the formatter will reformat existing code in certain cases) +- Parse `assert` as a regular function. `assert` is no longer a unary expression. Example: before `assert 1 == 2` is parsed as `(assert 1) == 2`, now it is parsed as `assert(1 == 2)`. https://github.com/rescript-lang/rescript/pull/6180 - Remove support for the legacy Reason syntax. Existing Reason code can be converted to ReScript syntax using ReScript 9 as follows: - `npx rescript@9 convert ` - Curried after uncurried is not fused anymore: `(. x) => y => 3` is not equivalent to `(. x, y) => 3` anymore. It's instead equivalent to `(. x) => { y => 3 }`. Also, `(. int) => string => bool` is not equivalen to `(. int, string) => bool` anymore. These are only breaking changes for unformatted code. - Exponentiation operator `**` is now right-associative. `2. ** 3. ** 2.` now compile to `Math.pow(2, Math.pow(3, 2))` and not anymore `Math.pow(Math.pow(2, 3), 2)`. Parentheses can be used to change precedence. -- Stop mangling object field names. If you had objects with field names containing "\__" or leading "_", they won't be mangled in the compiled JavaScript and represented as it is without changes. https://github.com/rescript-lang/rescript-compiler/pull/6354 -- `$$default` is no longer exported from the generated JavaScript when using default exports. https://github.com/rescript-lang/rescript-compiler/pull/6328 -- `-bs-super-errors` flag has been deprecated along with Super_errors. https://github.com/rescript-lang/rescript-compiler/pull/6243 -- Remove unsafe `` j`$(a)$(b)` `` interpolation deprecated in compiler version 10 https://github.com/rescript-lang/rescript-compiler/pull/6068 -- `@deriving(jsConverter)` not supported anymore for variant types https://github.com/rescript-lang/rescript-compiler/pull/6088 -- New representation for variants, where the tag is a string instead of a number. https://github.com/rescript-lang/rescript-compiler/pull/6088 +- Stop mangling object field names. If you had objects with field names containing "\__" or leading "_", they won't be mangled in the compiled JavaScript and represented as it is without changes. https://github.com/rescript-lang/rescript/pull/6354 +- `$$default` is no longer exported from the generated JavaScript when using default exports. https://github.com/rescript-lang/rescript/pull/6328 +- `-bs-super-errors` flag has been deprecated along with Super_errors. https://github.com/rescript-lang/rescript/pull/6243 +- Remove unsafe `` j`$(a)$(b)` `` interpolation deprecated in compiler version 10 https://github.com/rescript-lang/rescript/pull/6068 +- `@deriving(jsConverter)` not supported anymore for variant types https://github.com/rescript-lang/rescript/pull/6088 +- New representation for variants, where the tag is a string instead of a number. https://github.com/rescript-lang/rescript/pull/6088 ### Compiler Libraries -- Fixed name collision between the newly defined Js.Json.t and the variant constructor in the existing Js.Json.kind type. To address this, the usage of the existing Js.Json.kind type can be updated to Js.Json.Kind.t. https://github.com/rescript-lang/rescript-compiler/pull/6317 -- Remove rudimentary node bindings and undocumented `%node` extension. https://github.com/rescript-lang/rescript-compiler/pull/6285 -- `@rescript/react` >= 0.12.0-alpha.2 is now required because of the React.fragment's children type fix. https://github.com/rescript-lang/rescript-compiler/pull/6238 +- Fixed name collision between the newly defined Js.Json.t and the variant constructor in the existing Js.Json.kind type. To address this, the usage of the existing Js.Json.kind type can be updated to Js.Json.Kind.t. https://github.com/rescript-lang/rescript/pull/6317 +- Remove rudimentary node bindings and undocumented `%node` extension. https://github.com/rescript-lang/rescript/pull/6285 +- `@rescript/react` >= 0.12.0-alpha.2 is now required because of the React.fragment's children type fix. https://github.com/rescript-lang/rescript/pull/6238 - Remove deprecated module `Printexc` ### Build System and Tools -- Update watcher rules to recompile only on config and `*.res`/`*.resi`/`*.ml`/`.mli` file changes. Solves the issue of unnecessary recompiles on `.css`, `.ts`, and other unrelated file changes. https://github.com/rescript-lang/rescript-compiler/pull/6420 +- Update watcher rules to recompile only on config and `*.res`/`*.resi`/`*.ml`/`.mli` file changes. Solves the issue of unnecessary recompiles on `.css`, `.ts`, and other unrelated file changes. https://github.com/rescript-lang/rescript/pull/6420 - Made pinned dependencies transitive: if _a_ is a pinned dependency of _b_ and _b_ is a pinned dependency of _c_, then _a_ is implicitly a pinned dependency of _c_. This change is only breaking if your build process assumes non-transitivity. - Remove obsolete built-in project templates and the "rescript init" functionality. This is replaced by [create-rescript-app](https://github.com/rescript-lang/create-rescript-app) which is maintained separately. - Do not attempt to build ReScript from source on npm postinstall for platforms without prebuilt binaries anymore. -- GenType: removed support for `@genType.as` for records and variants which has become unnecessary. Use the language's `@as` instead to channge the runtime representation without requiring any runtime conversion during FFI. https://github.com/rescript-lang/rescript-compiler/pull/6099 https://github.com/rescript-lang/rescript-compiler/pull/6101 +- GenType: removed support for `@genType.as` for records and variants which has become unnecessary. Use the language's `@as` instead to channge the runtime representation without requiring any runtime conversion during FFI. https://github.com/rescript-lang/rescript/pull/6099 https://github.com/rescript-lang/rescript/pull/6101 diff --git a/pages/docs/manual/latest/typescript-integration.mdx b/pages/docs/manual/latest/typescript-integration.mdx index 7bbcccdf9..193683cec 100644 --- a/pages/docs/manual/latest/typescript-integration.mdx +++ b/pages/docs/manual/latest/typescript-integration.mdx @@ -198,7 +198,7 @@ In case of the TypeScript project using `Bundler` module resolution, `allowImpor ## Testing the Whole Setup -Open any relevant `*.res` file and add `@genType` annotations to any bindings / values / functions to be used from JavaScript. If an annotated value uses a type, the type must be annotated too. See e.g. [Hooks.res](https://github.com/rescript-lang/rescript-compiler/blob/master/tests/gentype_tests/typescript-react-example/src/Hooks.res). +Open any relevant `*.res` file and add `@genType` annotations to any bindings / values / functions to be used from JavaScript. If an annotated value uses a type, the type must be annotated too. See e.g. [Hooks.res](https://github.com/rescript-lang/rescript/blob/master/tests/gentype_tests/typescript-react-example/src/Hooks.res). Save the file and rebuild the project via `npm run res:build` or similar. You should now see a `*.gen.tsx` file with the same name (e.g. `MyComponent.res` -> `MyComponent.gen.tsx`). @@ -251,17 +251,17 @@ and add relevant `.shim.ts` files in a directory which is visible by ReScript e. Here are some examples: ```ts -// Excerpt from https://github.com/rescript-lang/rescript-compiler/blob/master/tests/gentype_tests/typescript-react-example/src/shims/Js.shim.ts +// Excerpt from https://github.com/rescript-lang/rescript/blob/master/tests/gentype_tests/typescript-react-example/src/shims/Js.shim.ts export type Json_t = unknown; export type t = unknown; ``` ```ts -// Excerpt from https://github.com/rescript-lang/rescript-compiler/tree/master/jscomp/gentype_tests/typescript-react-example/src/shims +// Excerpt from https://github.com/rescript-lang/rescript/tree/master/tests/gentype_tests/typescript-react-example/src/shims/JsxEvent.shim.ts export type inputFocusEvent = React.FocusEvent; ``` -More complete example shims can be found [here](https://github.com/rescript-lang/rescript-compiler/blob/master/jscomp/gentype_tests/typescript-react-example/src/shims/). +More complete example shims can be found [here](https://github.com/rescript-lang/rescript/blob/master/tests/gentype_tests/typescript-react-example/src/shims/). ## Deprecated features @@ -272,7 +272,7 @@ Features related to generating runtimes were deprecated since v11 and should no - **`@genType.import`** - TypeScript Shims -genType does not generate anything runtime-related, and in the near future it generates definition files (`*.d.ts`) directly (See the [roadmap](https://github.com/rescript-lang/rescript-compiler/issues/6196)). +genType does not generate anything runtime-related, and in the near future it generates definition files (`*.d.ts`) directly (See the [roadmap](https://github.com/rescript-lang/rescript/issues/6196)). If any runtime code is required for interoperability with JavaScript / TypeScript projects, it can be written by hand, or request a relevant features (e.g. `@deriving`) to the compiler. diff --git a/pages/docs/manual/v10.0.0/async-await.mdx b/pages/docs/manual/v10.0.0/async-await.mdx index d5ae72fde..0f53753f4 100644 --- a/pages/docs/manual/v10.0.0/async-await.mdx +++ b/pages/docs/manual/v10.0.0/async-await.mdx @@ -111,7 +111,7 @@ let fetchData: string => promise = async (userId: string): string { } ``` -**Note:** In a practical scenario you'd either use a type signature, or inline types, not both at the same time. In case you are interested in the design decisions, check out [this discussion](https://github.com/rescript-lang/rescript-compiler/pull/5913#issuecomment-1359003870). +**Note:** In a practical scenario you'd either use a type signature, or inline types, not both at the same time. In case you are interested in the design decisions, check out [this discussion](https://github.com/rescript-lang/rescript/pull/5913#issuecomment-1359003870). ### `async` uncurried functions diff --git a/pages/docs/manual/v10.0.0/build-configuration.mdx b/pages/docs/manual/v10.0.0/build-configuration.mdx index f91bd0c20..cf73a1da4 100644 --- a/pages/docs/manual/v10.0.0/build-configuration.mdx +++ b/pages/docs/manual/v10.0.0/build-configuration.mdx @@ -197,4 +197,4 @@ When `NINJA_ANSI_FORCED` is set to `1`: `rescript` produces color. When `NINJA_ANSI_FORCED` is set to `0`: `rescript` doesn't produce color. When `NINJA_ANSI_FORCED` is not set: `rescript` might or might not produce color, depending on a smart detection of where it's outputted. -> Note that the underlying compiler will always be passed `-color always`. See more details in [this issue](https://github.com/rescript-lang/rescript-compiler/issues/2984#issuecomment-410669163). +> Note that the underlying compiler will always be passed `-color always`. See more details in [this issue](https://github.com/rescript-lang/rescript/issues/2984#issuecomment-410669163). diff --git a/pages/docs/manual/v8.0.0/build-configuration.mdx b/pages/docs/manual/v8.0.0/build-configuration.mdx index e7df22881..4d7938592 100644 --- a/pages/docs/manual/v8.0.0/build-configuration.mdx +++ b/pages/docs/manual/v8.0.0/build-configuration.mdx @@ -33,6 +33,7 @@ Your source files need to be specified explicitly (we don't want to accidentally "sources": ["src", "examples"] } ``` + ```json { "sources": { @@ -58,9 +59,9 @@ You can mark your directories as dev-only (for e.g. tests). These won't be built ```json { - "sources" : { - "dir" : "test", - "type" : "dev" + "sources": { + "dir": "test", + "type": "dev" } } ``` @@ -77,7 +78,7 @@ Note that only sources marked with `"type":"dev"` will be able to resolve module ```json { - "reason": {"react-jsx": 3}, + "reason": { "react-jsx": 3 }, "refmt": 3 } ``` @@ -171,9 +172,8 @@ When `NINJA_ANSI_FORCED` is set to `1`: `bsb` produces color. When `NINJA_ANSI_FORCED` is set to `0`: `bsb` doesn't produce color. When `NINJA_ANSI_FORCED` is not set: `bsb` might or might not produce color, depending on a smart detection of where it's outputted. -> Note that bsc, the barebone compiler, will always be passed `-color always`. See more details in [this issue](https://github.com/rescript-lang/rescript-compiler/issues/2984#issuecomment-410669163). +> Note that bsc, the barebone compiler, will always be passed `-color always`. See more details in [this issue](https://github.com/rescript-lang/rescript/issues/2984#issuecomment-410669163). ### BS_VSCODE error output adapted for VSCODE -If you run bsb under VSCODE task runner like [this](https://github.com/rescript-lang/rescript-compiler/blob/master/jscomp/bsb/templates/basic-reason/.vscode/tasks.json#L6), it is recommended to have BS_VSCODE set - +If you run bsb under VSCODE task runner like [this](https://github.com/rescript-lang/rescript/blob/master/jscomp/bsb/templates/basic-reason/.vscode/tasks.json#L6), it is recommended to have BS_VSCODE set diff --git a/pages/docs/manual/v9.0.0/build-configuration.mdx b/pages/docs/manual/v9.0.0/build-configuration.mdx index 6848c7dda..8cf9d0f23 100644 --- a/pages/docs/manual/v9.0.0/build-configuration.mdx +++ b/pages/docs/manual/v9.0.0/build-configuration.mdx @@ -16,7 +16,7 @@ canonical: "/docs/manual/latest/build-configuration" If you're using an editor like VSCode, put the following code as your first field in `bsconfig.json` to get schema autocompletion! ```json -"$schema": "https://raw.githubusercontent.com/rescript-lang/rescript-compiler/master/docs/docson/build-schema.json" +"$schema": "https://raw.githubusercontent.com/rescript-lang/rescript/master/docs/docson/build-schema.json" ``` ## name, namespace @@ -193,4 +193,4 @@ When `NINJA_ANSI_FORCED` is set to `1`: `bsb` produces color. When `NINJA_ANSI_FORCED` is set to `0`: `bsb` doesn't produce color. When `NINJA_ANSI_FORCED` is not set: `bsb` might or might not produce color, depending on a smart detection of where it's outputted. -> Note that bsc, the barebone compiler, will always be passed `-color always`. See more details in [this issue](https://github.com/rescript-lang/rescript-compiler/issues/2984#issuecomment-410669163). +> Note that bsc, the barebone compiler, will always be passed `-color always`. See more details in [this issue](https://github.com/rescript-lang/rescript/issues/2984#issuecomment-410669163). diff --git a/pages/docs/react/latest/elements-and-jsx.mdx b/pages/docs/react/latest/elements-and-jsx.mdx index 4ac84a02e..d357b964b 100644 --- a/pages/docs/react/latest/elements-and-jsx.mdx +++ b/pages/docs/react/latest/elements-and-jsx.mdx @@ -187,7 +187,7 @@ To create DOM elements (`
`, ``, etc.), use `ReactDOM.createDOMElement ReactDOM.createDOMElementVariadic("div", ~props={className: "card"}, []) ``` -ReScript can make sure that we are only passing valid dom props. You can find an exhaustive list of all available props in the [JsxDOM](https://github.com/rescript-lang/rescript-compiler/blob/3bc159f33a3534280bbc26be88fa37ea2114dafe/jscomp/others/jsxDOM.res#L31) module. +ReScript can make sure that we are only passing valid dom props. You can find an exhaustive list of all available props in the [JsxDOM](https://github.com/rescript-lang/rescript/blob/3bc159f33a3534280bbc26be88fa37ea2114dafe/jscomp/others/jsxDOM.res#L31) module. ### Cloning Elements diff --git a/pages/docs/react/latest/forwarding-refs.mdx b/pages/docs/react/latest/forwarding-refs.mdx index 617198278..ad1997534 100644 --- a/pages/docs/react/latest/forwarding-refs.mdx +++ b/pages/docs/react/latest/forwarding-refs.mdx @@ -76,7 +76,7 @@ We use the `ReactDOM.domRef` type to represent our `inputRef`. We pass our ref i ## [Discouraged] React.forwardRef -**Note:** We discourage this method since it [will likely go away](https://twitter.com/dan_abramov/status/1173372190395445251) at some point, and doesn't yield any obvious advantages over the previously mentioned ref prop passing. +**Note:** We discourage this method since it will likely go away at some point, and doesn't yield any obvious advantages over the previously mentioned ref prop passing. `React.forwardRef` offers a way to "emulate a `ref` prop" within custom components. Internally the component will forward the passed `ref` value to the target DOM element instead. diff --git a/pages/docs/react/v0.10.0/forwarding-refs.mdx b/pages/docs/react/v0.10.0/forwarding-refs.mdx index 9c3f3c1a8..30433be4a 100644 --- a/pages/docs/react/v0.10.0/forwarding-refs.mdx +++ b/pages/docs/react/v0.10.0/forwarding-refs.mdx @@ -78,7 +78,7 @@ We use the `ReactDOM.domRef` type to represent our `inputRef`. We pass our ref i ## [Discouraged] React.forwardRef -**Note:** We discourage this method since it [will likely go away](https://twitter.com/dan_abramov/status/1173372190395445251) at some point, and doesn't yield any obvious advantages over the previously mentioned ref prop passing. +**Note:** We discourage this method since it will likely go away at some point, and doesn't yield any obvious advantages over the previously mentioned ref prop passing. `React.forwardRef` offers a way to "emulate a `ref` prop" within custom components. Internally the component will forward the passed `ref` value to the target DOM element instead. diff --git a/pages/docs/react/v0.11.0/elements-and-jsx.mdx b/pages/docs/react/v0.11.0/elements-and-jsx.mdx index 571f7b966..8597a5d62 100644 --- a/pages/docs/react/v0.11.0/elements-and-jsx.mdx +++ b/pages/docs/react/v0.11.0/elements-and-jsx.mdx @@ -187,7 +187,7 @@ To create DOM elements (`
`, ``, etc.), use `ReactDOM.createDOMElement ReactDOM.createDOMElementVariadic("div", ~props={className: "card"}, []) ``` -ReScript can make sure that we are only passing valid dom props. You can find an exhaustive list of all available props in the [JsxDOM](https://github.com/rescript-lang/rescript-compiler/blob/3bc159f33a3534280bbc26be88fa37ea2114dafe/jscomp/others/jsxDOM.res#L31) module. +ReScript can make sure that we are only passing valid dom props. You can find an exhaustive list of all available props in the [JsxDOM](https://github.com/rescript-lang/rescript/blob/3bc159f33a3534280bbc26be88fa37ea2114dafe/jscomp/others/jsxDOM.res#L31) module. ### Cloning Elements diff --git a/pages/docs/react/v0.11.0/forwarding-refs.mdx b/pages/docs/react/v0.11.0/forwarding-refs.mdx index b1fe51949..56990b368 100644 --- a/pages/docs/react/v0.11.0/forwarding-refs.mdx +++ b/pages/docs/react/v0.11.0/forwarding-refs.mdx @@ -78,7 +78,7 @@ We use the `ReactDOM.domRef` type to represent our `inputRef`. We pass our ref i ## [Discouraged] React.forwardRef -**Note:** We discourage this method since it [will likely go away](https://twitter.com/dan_abramov/status/1173372190395445251) at some point, and doesn't yield any obvious advantages over the previously mentioned ref prop passing. +**Note:** We discourage this method since it will likely go away at some point, and doesn't yield any obvious advantages over the previously mentioned ref prop passing. `React.forwardRef` offers a way to "emulate a `ref` prop" within custom components. Internally the component will forward the passed `ref` value to the target DOM element instead. diff --git a/src/Blog.res b/src/Blog.res index eea39c33f..0c1a99416 100644 --- a/src/Blog.res +++ b/src/Blog.res @@ -170,7 +170,7 @@ module FeatureCard = {
{React.string(author.fullname)} diff --git a/src/BlogArticle.res b/src/BlogArticle.res index 9e8d0bb42..cde9c4ba4 100644 --- a/src/BlogArticle.res +++ b/src/BlogArticle.res @@ -39,7 +39,7 @@ module AuthorBox = {
authorImg
{React.string(author.fullname)} diff --git a/src/common/BlogFrontmatter.res b/src/common/BlogFrontmatter.res index cd40a7064..c54e06c35 100644 --- a/src/common/BlogFrontmatter.res +++ b/src/common/BlogFrontmatter.res @@ -3,7 +3,7 @@ type author = { fullname: string, role: string, imgUrl: string, - twitter: string, + xHandle: string, } let authors = [ @@ -12,56 +12,56 @@ let authors = [ fullname: "Hongbo Zhang", role: "Compiler & Build System", imgUrl: "https://pbs.twimg.com/profile_images/1369548222314598400/E2y46vrB_400x400.jpg", - twitter: "bobzhang1988", + xHandle: "bobzhang1988", }, { username: "chenglou", fullname: "Cheng Lou", role: "Syntax & Tools", imgUrl: "https://pbs.twimg.com/profile_images/554199709909131265/Y5qUDaCB_400x400.jpeg", - twitter: "_chenglou", + xHandle: "_chenglou", }, { username: "maxim", fullname: "Maxim Valcke", role: "Syntax Lead", imgUrl: "https://pbs.twimg.com/profile_images/970271048812974080/Xrr8Ob6J_400x400.jpg", - twitter: "_binary_search", + xHandle: "_binary_search", }, { username: "ryyppy", fullname: "Patrick Ecker", role: "Documentation", imgUrl: "https://pbs.twimg.com/profile_images/1388426717006544897/B_a7D4GF_400x400.jpg", - twitter: "ryyppy", + xHandle: "ryyppy", }, { username: "rickyvetter", fullname: "Ricky Vetter", role: "ReScript & React", imgUrl: "https://pbs.twimg.com/profile_images/541111032207273984/DGsZmmfr_400x400.jpeg", - twitter: "rickyvetter", + xHandle: "rickyvetter", }, { username: "made_by_betty", fullname: "Bettina Steinbrecher", role: "Brand / UI / UX", imgUrl: "https://pbs.twimg.com/profile_images/1366785342704136195/3IGyRhV1_400x400.jpg", - twitter: "made_by_betty", + xHandle: "made_by_betty", }, { username: "rescript-team", fullname: "ReScript Team", role: "Core Development", imgUrl: "https://pbs.twimg.com/profile_images/1358354824660541440/YMKNWE1V_400x400.png", - twitter: "rescriptlang", + xHandle: "rescriptlang", }, { username: "rescript-association", fullname: "ReScript Association", role: "Foundation", imgUrl: "https://pbs.twimg.com/profile_images/1045362176117100545/MioTQoTp_400x400.jpg", - twitter: "ReScriptAssoc", + xHandle: "ReScriptAssoc", }, ] diff --git a/src/common/Constants.res b/src/common/Constants.res index 445270367..dd9386857 100644 --- a/src/common/Constants.res +++ b/src/common/Constants.res @@ -26,7 +26,7 @@ let ecosystem = [ let tools = [("Syntax Lookup", "/syntax-lookup")] -let githubHref = "https://github.com/rescript-lang/rescript-compiler" +let githubHref = "https://github.com/rescript-lang/rescript" let xHref = "https://x.com/rescriptlang" let blueSkyHref = "https://bsky.app/profile/rescript-lang.org" let discourseHref = "https://forum.rescript-lang.org" diff --git a/src/components/Docson.res b/src/components/Docson.res index a7456d0fa..94b118b7a 100644 --- a/src/components/Docson.res +++ b/src/components/Docson.res @@ -12,7 +12,7 @@ let make = (~tag) => { let element = React.useRef(Nullable.null) React.useEffect(() => { - let segment = `https://raw.githubusercontent.com/rescript-lang/rescript-compiler/${tag}/docs/docson/build-schema.json` + let segment = `https://raw.githubusercontent.com/rescript-lang/rescript/${tag}/docs/docson/build-schema.json` // The api for docson is a little bit funky, so you need to check out the source to understand what it's doing // See: https://github.com/lbovet/docson/blob/master/src/index.js