cjs-module-lexer icon indicating copy to clipboard operation
cjs-module-lexer copied to clipboard

Fast lexer to extract named exports via analysis from CommonJS modules

Results 26 cjs-module-lexer issues
Sort by recently updated
recently updated
newest added

Object expressons like: ```js module.exports = { render: _render2['default'], shallow: _shallow2['default'], mount: _mount2['default'], ShallowWrapper: _ShallowWrapper2['default'], ReactWrapper: _ReactWrapper2['default'], configure: _configuration.merge, EnzymeAdapter: _EnzymeAdapter2['default'] }; ``` would still be beneficial to fully support...

wontfix
edge case

Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1. Changelog Sourced from terser's changelog. v4.8.1 (backport) Security fix for RegExps that should not be evaluated (regexp DDOS) Commits See full diff in compare...

dependencies

Hi, TypeScript export default as syntax seems not working with this module. Considering the following TS code: ```ts export { default as fs } from 'fs'; ``` Test its output...

wontfix
edge case

swc use TypeScript Similar function to reexport module. The function details of swc are a little different from tsc. To avoid naming conflicts, different names are used by swc. The...

This adds a third `requires[]` property to the output object in both modes. It's an Array of `{s:number,e:number}` start/end offsets, like those of `es-module-lexer`. All require() calls are added to...

Input File: ```js Object.defineProperty(exports, 'a', { enumerable: true, value: 'a' }); Object.defineProperty(exports, 'b', { enumerable: !0, value: 'b' }); ``` Expected Result: `["a", "b"]` Actual Result: `["a"]` We can get...

wontfix
edge case

In CommonJS modules the `this` assignment also works for named exports: ```js this.exportName = 'value'; ``` So long as we are at the top-level, the above would be straightforward to...

wontfix
edge case

As always, awesome work on this library, @guybedford :) I'm integrating this into Snowpack to match Node.js support, and was surprised to see this limitation: https://github.com/guybedford/cjs-module-lexer/blob/9f32d7a83a435ed6f7716318a5367a82d6480079/test/_unit.js#L317-L320 I assumed many packages...

wontfix
edge case

Consider these two inputs: ```js void { x: [] } / "/ //" /* /*/ module.exports.foo = 2; // */ ``` ```js { x: [] } / "/ //" /*...

bug