Antlr 4.13.0 typescript target introduced invalid module configuration
envgap__antlr__antlr4-4285
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
3f91870c1fdf11b168b176baeb6312f8c6df0fb2- Manifest
runtime/JavaScript/package.json- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
antlr/antlr4 #4285 · read the original issue
<!--
All ANTLR contributors provide implementation, maintenance and support for free.
We therefore kindly ask that before submitting any issue to ANTLR, you please check off these boxes:
- [ ] I have reproduced my issue using the latest version of ANTLR
- [ ] I have asked at [stackoverflow](http://stackoverflow.com/questions/tagged/antlr4)
- [ ] Responses from the above seem to indicate that my issue could be an ANTLR bug
- [ ] I have done a search of the existing issues to make sure I'm not sending in a duplicate
Please include the following information:
- target information (Java, C++ ...)
- smallest possible grammar and code that reproduces the behavior
- description of the expected behavior and actual behavior
Pointers to suspicious code regions are also very welcome.
-->
Hi,
This [PR](https://github.com/antlr/antlr4/pull/4217/files#diff-7c99c0b7a2507f0ed32c83f5634f6d281157f04c1391820f3ccb734bbb7652fb) introduces a bug in the npm package definition.
In the `exports` section of the package.json file the file referenced in the `node`/`browser` sections does not exist.
```
"exports": {
".": {
"node": {
"types": "src/index.node.d.ts",
"import": "./dist/antlr4.node.mjs",
"require": "./dist/antlr4.node.cjs",
"default": "./dist/antlr4.node.mjs"
},
"browser": {
"types": "src/index.web.d.ts",
"import": "./dist/antlr4.web.mjs",
"require": "./dist/antlr4.web.cjs",
"default": "./dist/antlr4.web.mjs"
}
}
```
`src/index.node.d.ts` and `src/index.web.d.ts` does not exist in the shipped package. All files in the `src` directory in the released module is located in `src/antlr4`, and even here there is no combined definition files.
Unless you create a combined file the intention is maybe to point this path at `src/antlr4/index.d.ts`?
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]