[bug report] Not all legal package names are legal eyeglass names
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 738
- Forks
- 48
- PR merge metrics
- No merged PRs in 30d
Description
If I name an eyeglass module `prefix.tool-name` or `prefix_tool-name` both of which are [legal package names](https://docs.npmjs.com/files/package.json) according to the NPM docs, eyeglass can't find my module.
e.g. this breaks
```
{
"name": "prefix.tool-name",
"version": "1.0.0",
"main": "stylesheets/_prefix.tool-name.scss",
"eyeglass": {
"needs": "^1.0.0",
"name": "prefix.tool-name",
"exports": "eyeglass-exports.js"
},
"keywords": [
"eyeglass-module",
"sass"
]
}
```
Changing the module name to `prefix-tool-name` causes the import to work fine.
i.e. this works:
```
{
"name": "prefix.tool-name",
"version": "1.0.0",
"main": "stylesheets/_prefix.tool-name.scss",
"eyeglass": {
"needs": "^1.0.0",
"name": "prefix-tool-name",
"exports": "eyeglass-exports.js"
},
"keywords": [
"eyeglass-module",
"sass"
]
}
```
There doesn't seem to be anything I can see in the docs about requirements for module names
Contributor guide
No contributing guide indexed for this repository
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
Start with the package.json examples and reproduce the failing imports for prefix.tool-name and prefix_tool-name, comparing them with the working prefix-tool-name case. Trace eyeglass's module lookup using stylesheets/_prefix.tool-name.scss and eyeglass-exports.js; done means legal package names resolve consistently without requiring a renamed eyeglass name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, sass
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100