nodejs / nodejs/cjs-module-lexer
this.exportname
Open
Nobody has claimed this yet.
edge case
wontfix
- Dominant language
- JavaScript
- Stars
- 262
- Forks
- 31
- Avg merge
- 9d 2h
- Merged PRs (30d)
- 5
Description
In CommonJS modules the this assignment also works for named exports:
this.exportName = 'value';
So long as we are at the top-level, the above would be straightforward to track, although it's such an uncommon pattern the benefit would likely be marginal but it seems worth doing nonetheless.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name a file or test. Start by locating the CommonJS named-export analysis for top-level assignments, then trace how an assignment such as this.exportName = 'value' is handled. Add coverage for the example and verify that the name is extracted as an export.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100