Skip to content

Update JS reserved keywords list, clean up scripts, add documentation #6167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
- Fixed subtype checking for record types with "@as" attributes: The subtype relationship now takes into account the compatibility of "@as" attributes between corresponding fields, ensuring correctness in runtime representation.
https://github.com/rescript-lang/rescript-compiler/issues/6158

#### :nail_care: Polish

- Update list of reserved JS keywords. https://github.com/rescript-lang/rescript-compiler/pull/6167

# 11.0.0-alpha.3

Expand Down
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,17 @@ To generate the html:
../scripts/ninja docs
```

## Update JS Reserved Keywords Map

The compiler sources include a list of reserved JS keywords in `jscomp/ext/js_reserved_map.ml` which includes all identifiers in global scope (`window`). This list should be updated from time to time for newer browser versions.

To update it, run:

```sh
npm install puppeteer
node scripts/build_reserved.js
```

## Code structure

The highlevel architecture is illustrated as below:
Expand Down
14 changes: 0 additions & 14 deletions jscomp/build_reserved.js

This file was deleted.

Loading