`@` in file names is not working well with yarn classic (was: Support for local dependencies)
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 267
- Avg merge
- 1d 25m
- Merged PRs (30d)
- 14
Description
### Describe the feature
Would be great to support local dependencies (with `file:`)
### Use Case
My CDK library is used by another one. Both are in the same project and it makes no sense to release the dependency in order to work with the dependant (faster development cycle).
### Proposed Solution
Verify if the dependency is a file or folder and do not fail if this is the case.
### Other Information
Hi, I have a lerna project with 2 `AwsCdkConstructLibrary` projen projects (let's say `foo` & `bar`).
`bar` is depending on `foo`. I tried the following in `bar`:
```
deps: [
'foo@file:../foo',
],
```
but it fails with jsii and the error:
```
Declared dependency on version file:../foo of foo, but version 0.0.0 was found
at DependencyResolver.discoverDependencyTree (...node_modules/jsii/lib/project-info.js:161:23)
at loadProjectInfo (...node_modules/jsii/lib/project-info.js:50:31)
...
```
I also tried to use the tgz in the dist of `foo`, but had the error (plus it's not easy to have the foo project built before bar install):
```
Error: ENOTDIR: not a directory, open '.../dist/js/foo@0.0.0.tgz/package.json'
at _resolveVersion (...node_modules/jsii/lib/project-info.js:312:36)
at DependencyResolver.resolveDependency (...node_modules/jsii/lib/project-info.js:188:58)
```
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.94.0
### Environment details (OS name and version, etc.)
mac os 13.5.2, node 20.8.0, jsii ~5.2.16
Contributor guide
Research direction
Start with the jsii project-info.js entry points shown in the errors, especially DependencyResolver.discoverDependencyTree and resolveDependency. Reproduce the foo@file:../foo and local .tgz cases from the issue; done means local file or folder dependencies resolve without the false version or ENOTDIR errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100