-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve transitive dependencies based on package.json #3286
base: v2
Are you sure you want to change the base?
Conversation
Resolve transitive dependencies' versions based on package.json
@microsoft-github-policy-service agree company="wix" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See small comments regarding naming.
I suggest adding a bit more context in the PR description to explain the motivation. I think an example will help the typescript team understand what you did here
packages/ata/src/index.ts
Outdated
let typesPackageJson | ||
if (config.usePackageJson){ | ||
typesPackageJson = moduleMap.get(dts.moduleName)?.typesPackageJson | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let typesPackageJson | |
if (config.usePackageJson){ | |
typesPackageJson = moduleMap.get(dts.moduleName)?.typesPackageJson | |
} | |
const typesPackageJson = config.usePackageJson && moduleMap.get(dts.moduleName)?.typesPackageJson |
To be clear, is the intent here to ensure that all dependencies are loaded transitively? Should this flag be set for the website? Should it be disabled at all? |
@jakebailey The intent is to allow resolution of transitive (indirect) dependencies according to their module's package.json file. Before this change, any indirect dependency gets resolved to latest, since the only way to control versioning is via the For example, if the input file says
|
@jakebailey Hi, is any additional explanation needed before a review? |
When the newly added
resolveDependenciesFromPackageJson
flag is set to true, ATA will resolve the versions of any transitive dependency according to thepackage.json
file of the same module (unless any// types:
comment is specified).