fix: allow reserved word 'mod' in exports (#21537)

This problem occurred trying to load tensorflow.js
```
> import * as tf from 'npm:@tensorflow/tfjs';
Uncaught SyntaxError: Identifier 'mod' has already been declared at file:///Users/ry/Library/Caches/deno/npm/registry.npmjs.org/@tensorflow/tfjs/4.14.0/dist/tf.node.js:167:14
    at async <anonymous>:1:33
```
This commit is contained in:
Ryan Dahl 2023-12-11 11:23:50 -05:00 committed by GitHub
parent 7bf267c197
commit 98121de5be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 0 deletions

View file

@ -38,6 +38,7 @@ exports["int"] = "int";
exports["interface"] = "interface";
exports["let"] = "let";
exports["long"] = "long";
exports["mod"] = "mod";
exports["native"] = "native";
exports["new"] = "new";
exports["null"] = "null";

View file

@ -56,6 +56,7 @@ Download http://localhost:4545/npm/registry/@denotest/reserved-word-exports/1.0.
interface: "interface",
let: "let",
long: "long",
mod: "mod",
native: "native",
new: "new",
null: "null",
@ -109,6 +110,7 @@ Download http://localhost:4545/npm/registry/@denotest/reserved-word-exports/1.0.
interface: "interface",
let: "let",
long: "long",
mod: "mod",
native: "native",
new: "new",
null: "null",

View file

@ -351,6 +351,7 @@ static RESERVED_WORDS: Lazy<HashSet<&str>> = Lazy::new(|| {
"interface",
"let",
"long",
"mod",
"native",
"new",
"null",