Skip to content
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

change dataSource to datasource #10438

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

warisniz02
Copy link
Contributor

@warisniz02 warisniz02 commented Mar 24, 2024

The lb4 discoverer names the argument to pass datasource as "dataSource". This PR makes the argument consistent with the lb4 datasource without breaking existing cli command 'lb4 dataSource'.

Checklist

  • DCO (Developer Certificate of Origin) signed in all commits
  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

👉 Check out how to submit a PR 👈

@coveralls
Copy link

coveralls commented Mar 30, 2024

Pull Request Test Coverage Report for Build 8738018459

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 55.371%

Totals Coverage Status
Change from base Build 8721360373: 0.0%
Covered Lines: 9563
Relevant Lines: 12457

💛 - Coveralls

@warisniz02 warisniz02 force-pushed the fix/datasource-consistency branch 2 times, most recently from 6a4d7fc to d2d223f Compare April 18, 2024 12:37
@warisniz02
Copy link
Contributor Author

@dhmlau please have a look at my PR.

Copy link
Contributor

@aaqilniz aaqilniz left a comment

Choose a reason for hiding this comment

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

Looks good to me. It becomes consistent with other commands. rest-crud uses keyword datasource.

@warisniz02
Copy link
Contributor Author

Hello @samarpanB. Can you please have a look at this PR?

@@ -35,7 +35,7 @@ Models can be discovered from a supported datasource by running the

### Options

`--dataSource`: Put a valid datasource name here to skip the datasource prompt
`--datasource`: Put a valid datasource name here to skip the datasource prompt
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than replacing the old prompt, can we not support both old and new. This will ensure backward compatibility. Otherwise it will break existing cli command.

@warisniz02 warisniz02 marked this pull request as draft August 16, 2024 11:23
@warisniz02 warisniz02 force-pushed the fix/datasource-consistency branch 3 times, most recently from 9ec6487 to 28c7c11 Compare August 19, 2024 07:10
@warisniz02 warisniz02 marked this pull request as ready for review August 19, 2024 07:12
@warisniz02 warisniz02 force-pushed the fix/datasource-consistency branch 2 times, most recently from 564fb5e to ade4914 Compare August 20, 2024 06:50
@warisniz02
Copy link
Contributor Author

@samarpanB please have a look at my PR!

if (
this.dataSourceChoices
.map(d => d.name)
.includes(this.options.dataSource)
.includes(this.options.dataSource || this.opetions.datasource)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.includes(this.options.dataSource || this.opetions.datasource)
.includes(this.options.dataSource || this.options.datasource)

Copy link
Contributor Author

@warisniz02 warisniz02 Aug 31, 2024

Choose a reason for hiding this comment

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

Resolved!! @samparanB, please have a look at my PR now!!

@warisniz02 warisniz02 marked this pull request as draft September 1, 2024 08:11
Signed-off-by: warisniz02 <[email protected]>

Signed-off-by: warisniz02 <[email protected]>

Signed-off-by: warisniz02 <[email protected]>

Signed-off-by: warisniz02 <[email protected]>

Signed-off-by: warisniz02 <[email protected]>

Signed-off-by: warisniz02 <[email protected]>

Signed-off-by: warisniz02 <[email protected]>

Signed-off-by: warisniz02 <[email protected]>
@warisniz02 warisniz02 marked this pull request as ready for review September 1, 2024 09:06
@samarpanB
Copy link
Contributor

one of the test case is failing

Copy link
Contributor

@samarpanB samarpanB left a comment

Choose a reason for hiding this comment

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

Please check the failing test case.

@warisniz02
Copy link
Contributor Author

warisniz02 commented Sep 4, 2024

@samarpanB, this test case fails in every PR. This PR is to fix this issue(
#10634)

@dhmlau
Copy link
Member

dhmlau commented Sep 5, 2024

There seems to be some issue with the setup-node GH action, and not related to the changes introduced in this PR. So I'm going to merge this PR.

@dhmlau dhmlau merged commit 0c69224 into loopbackio:master Sep 5, 2024
12 of 13 checks passed
@dhmlau
Copy link
Member

dhmlau commented Sep 5, 2024

@warisniz02, thanks for your contribution. Your PR has been merged! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants