-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Use thin ESM wrapper for CJS output instead of double tsc compilation. - Replace webpack with esbuild - Add bundled versions of ESM build. fixes #1383
- Loading branch information
Showing
15 changed files
with
110 additions
and
564 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { parseJson } from "./modern_ecmascript/modern_ecmascript_json.mjs" | ||
import assert from "assert" | ||
|
||
describe("The ability to use Chevrotain using modern ECMAScript", () => { | ||
it("works with ESM", () => { | ||
const inputText = '{ "arr": [1,2,3], "obj": {"num":666}}' | ||
const lexAndParseResult = parseJson(inputText) | ||
|
||
assert.equal(lexAndParseResult.lexErrors.length, 0) | ||
assert.equal(lexAndParseResult.parseErrors.length, 0) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
examples/implementation_languages/scripts/is-esm-supported.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const { gte } = require("semver") | ||
|
||
const nodeVersion = process.version | ||
|
||
if (gte(nodeVersion, "12.17.0") === true) { | ||
process.exit(1) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,9 +32,13 @@ as any other pure code without requiring any new tools or processes. | |
- Latest: | ||
- `https://unpkg.com/chevrotain/lib/chevrotain.js` | ||
- `https://unpkg.com/chevrotain/lib/chevrotain.min.js` | ||
- `https://unpkg.com/chevrotain/lib_esm/chevrotain.mjs` | ||
- `https://unpkg.com/chevrotain/lib_esm/chevrotain.min.mjs` | ||
- Explicit version number: | ||
- `https://unpkg.com/[email protected]/lib/chevrotain.js` | ||
- `https://unpkg.com/[email protected]/lib/chevrotain.min.js` | ||
- `https://unpkg.com/[email protected]/lib_esm/chevrotain.mjs` | ||
- `https://unpkg.com/[email protected]/lib_esm/chevrotain.min.mjs` | ||
|
||
## Documentation & Resources | ||
|
||
|
Oops, something went wrong.