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

feat: new default api version definition algorithm #372

Merged
merged 13 commits into from
Oct 21, 2022

Conversation

scolladon
Copy link
Owner

What does this pull request contain?


  • Added (for new features).
  • Changed (for changes in existing functionality).
  • Deprecated (for soon-to-be removed features).
  • Removed (for now removed features).
  • Fixed (for any bug fixes).
  • Security (for vulnerability fixes).

Explain your changes


When --api-version parameter is set then use this version
Else try to find the sourceApiVersion from the sfdx-project.json
If the API version found is not handled by the plugin then use the latest and log a warning in the result

Some changes have been required in the metadataManager in order to get the latest api version handled by the plugin and to check if a version is managed by the plugin

Does this close any currently open issues?


closes #362

  • Jest test added to check the fix is applied.

Any particular element that can be tested locally


use the -a parameter and play with the possible values
use a sfdx-project.json file and play with the sourceApiVersion attribut value

Any other comments


unit tests try to represent the full spec of this feature

@scolladon scolladon requested a review from mehdicherf as a code owner October 15, 2022 20:52
@codecov
Copy link

codecov bot commented Oct 15, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (1c11843) compared to base (72551cd).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #372   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           30        30           
  Lines          767       792   +25     
=========================================
+ Hits           767       792   +25     
Impacted Files Coverage Δ
src/locales/en.js 100.00% <ø> (ø)
src/main.js 100.00% <100.00%> (ø)
src/metadata/metadataManager.js 100.00% <100.00%> (ø)
src/utils/cliHelper.js 100.00% <100.00%> (ø)

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.

@scolladon scolladon force-pushed the feat/deduce-api-version branch from 6d309c1 to fb68cb2 Compare October 17, 2022 08:03
@scolladon scolladon force-pushed the feat/deduce-api-version branch from fb68cb2 to 9f20873 Compare October 20, 2022 20:35
Co-authored-by: Mehdi Cherfaoui <mcherfaoui@salesforce.com>
mehdicherf
mehdicherf previously approved these changes Oct 21, 2022
@codeclimate
Copy link

codeclimate bot commented Oct 21, 2022

Code Climate has analyzed commit 1c11843 and detected 0 issues on this pull request.

View more on Code Climate.

@scolladon scolladon enabled auto-merge (squash) October 21, 2022 09:21
@scolladon scolladon merged commit e58d63a into main Oct 21, 2022
@scolladon scolladon deleted the feat/deduce-api-version branch October 21, 2022 09:44
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.

dynamic api version
2 participants