You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
There is a PR that should fix this by changing the @ to a - in the filename. I've tested by having projen create a package file for the dependency, renaming by changing the @ sign, then including in the main project by adding a dependency (dep) of "dep-pkg-name@file:/path/to/dep-pkg-name-0.0.0.jsii.tgz and then running npx projen && npx projen install.
Support for the PR would be appreciated to get this in front of the JSII maintainers.
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 sayfoo
&bar
).bar
is depending onfoo
. I tried the following inbar
:but it fails with jsii and the error:
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):Acknowledgements
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
The text was updated successfully, but these errors were encountered: