Generate dependency manifest for apps#1285
Conversation
🦋 Changeset detectedLatest commit: 1f11fec The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| const manifest = getDependenciesFromSource( | ||
| targetLocation, | ||
| ).reduce<DependencyManifest>((manifest, depName) => { | ||
| const depVersion = |
There was a problem hiding this comment.
This would be cleaner by creating the dependencies by overwriting from the targetLocation into the root dependencies. This would create a "workspace" set of dependencies.
There was a problem hiding this comment.
@LukeSheard not sure I understand. Does this mean initialise the reducer with the target dependencies, then add the root dependencies as we iterate through them?
| const depVersion = | ||
| targetPackageJsonDependencies[depName] ?? | ||
| rootPackageJsonDependencies[depName]; | ||
| if (depVersion) { |
There was a problem hiding this comment.
This should throw an error if you're importing something which is not listed as a dependency. ESlint should also pick it up, but people do weird things...
| version: targetPackageJson.version, | ||
| license: targetPackageJson.license, | ||
| modular: targetPackageJson.modular, | ||
| module: targetPackageJson.module, |
There was a problem hiding this comment.
This will be undefined, but probably best to remove?
….com/jpmorganchase/modular into feature/dependency-manifest-strawman
This reverts commit 7835e8e.
ts-morph. This implementation is independent from the build process, and could technically easily offer dependency extraction as a separate command, if needed.dependenciesandbundledDependenciesand copypackage.jsontodistThis implementation assumes no nested workspaces (Yarn classic), so the dependencies can only be in the package's package.json or in the root one.