Skip to content
This repository was archived by the owner on Mar 18, 2024. It is now read-only.

Feat/dpendency validation - #1124

Closed
zhebinliu wants to merge 11 commits into
developfrom
feat/dpendency-validation
Closed

zhebinliu wants to merge 11 commits into
developfrom
feat/dpendency-validation

Conversation

@zhebinliu

Copy link
Copy Markdown
Contributor

Checklist

All items have to be completed before a PR is merged

  • Adhere to Contribution Guidelines
  • Updates to Decision Records considered?
  • Updates to documentation at DX@Scale Guide considered?
  • Tested changes?
  • Unit Tests new and existing passing locally?

@codecov-commenter

codecov-commenter commented Sep 21, 2022 •

Copy link
Copy Markdown

Codecov Report

Base: 52.03% // Head: 52.57% // Increases project coverage by +0.53% 🎉

Coverage data is based on head (6a8327f) compared to base (b973a93).
Patch coverage: 83.92% of modified lines in pull request are covered.

❗ Current head 6a8327f differs from pull request most recent head 13f7f62. Consider uploading reports for the commit 13f7f62 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1124      +/-   ##
===========================================
+ Coverage    52.03%   52.57%   +0.53%     
===========================================
  Files           74       75       +1     
  Lines         3309     3365      +56     
  Branches       720      728       +8     
===========================================
+ Hits          1722     1769      +47     
- Misses        1467     1475       +8     
- Partials       120      121       +1     
Impacted Files Coverage Δ
...ore/src/dependency/TransitiveDependencyResolver.ts 83.92% <83.92%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@azlam-abdulsalam azlam-abdulsalam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my comments

Comment thread packages/core/package.json Outdated
{
"name": "@dxatscale/sfpowerscripts.core",
"version": "32.0.9",
"version": "32.0.10",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets remove versioning using PRs. and this should be a minor as well


}

private getAllPackageDependencyMap(projectConfig: any): any {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

define type


}

private async ExternalPackageDependencyFetcher(packageId: string){

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function name typo

const resolvedProjectConfig: any = await transitiveDependencyResolver.exec();

let packageDescriptor = resolvedProjectConfig.packageDirectories.find((dir) => dir.package === "candidate-management");
let coreDependency = packageDescriptor.dependencies.find(dependency => dependency.package === "temp");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't understand what the test does here,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to check whether the missing dependencies are added, and the version is same as its dependent pacakge


let packageDescriptor = resolvedProjectConfig.packageDirectories.find((dir) => dir.package === "candidate-management");
let coreDependency = packageDescriptor.dependencies.find(dependency => dependency.package === "temp");
expect(coreDependency.versionNumber).toBe("1.0.0.LATEST");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it wrong expect, shouldn't be the test whether temp got added


//Validate dependencies in sfdx-project.json // Read Manifest
this.projectConfig = ProjectConfig.getSFDXProjectConfig(this.props.projectDirectory);
const transitiveDependencyResolver = new TransitiveDependencyResolver(this.projectConfig, this.sfpOrg.getConnection());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Group it as a function and move it after doing git operations


describe("Given a TransitiveDependencyResolver", () => {

beforeEach(async () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being a very core feature, can we add.more tests, such as ordering?

@azlam-abdulsalam
azlam-abdulsalam deleted the feat/dpendency-validation branch January 13, 2023 09:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'validate' to identify incorrect transitive dependencies

3 participants