-
Notifications
You must be signed in to change notification settings - Fork 409
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
fix: upgrade source deploy retrieve library to 2.1.1 #3147
Conversation
Codecov Report
@@ Coverage Diff @@
## release/v51.10.0 #3147 +/- ##
====================================================
- Coverage 76.17% 76.15% -0.02%
====================================================
Files 276 276
Lines 10521 10513 -8
Branches 1236 1237 +1
====================================================
- Hits 8014 8006 -8
+ Misses 2158 2157 -1
- Partials 349 350 +1
Continue to review full report at Codecov.
|
@@ -226,7 +228,7 @@ export class LibraryRetrieveSourcePathExecutor extends RetrieveExecutor< | |||
|
|||
export async function forceSourceRetrieveCmp( | |||
trigger: RetrieveMetadataTrigger, | |||
openAfterRetrieve: boolean = false |
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.
Only for trying to debug issues locally - this will be reverted.
include: filter | ||
}); | ||
// If no results from local source components, return the filter. | ||
return sourceResult.getSourceComponents().toArray().length === 0 ? filter : sourceResult; |
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.
This is important in the event that the source is not local. We would still want to make sure we have the results from the filter before continuing.
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.
Good catch. A nice API for this would be something like the following in the library:
ComponentSet.fromMembers({
members: [
{ fullName: 'MyClass', type: 'ApexClass' },
{ fullName: 'MyClass2', type: 'ApexClass' }
],
resolveSourcePaths: ['/path/to/force-app']
})
So that it always adds the members even if source wasn't found for them. CLI team requested this as well.
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.
Ah nice, that seems much more intuitive.
packages/salesforcedx-vscode-core/src/commands/baseDeployCommand.ts
Outdated
Show resolved
Hide resolved
c53762c
to
31398c4
Compare
Pending the fix of one of the vscode integration tests. |
packages/salesforcedx-vscode-core/src/commands/forceSourceDeploySourcePath.ts
Outdated
Show resolved
Hide resolved
@@ -21,7 +21,7 @@ import { | |||
SourceComponent | |||
} from '@salesforce/source-deploy-retrieve'; | |||
import { SourceRetrieveResult } from '@salesforce/source-deploy-retrieve/lib/src/client/types'; | |||
import { ComponentLike } from '@salesforce/source-deploy-retrieve/lib/src/common/types'; | |||
import { ComponentLike } from '@salesforce/source-deploy-retrieve/lib/src/resolve/types'; |
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.
Not for this PR, but we should expose these types (SourceRetrieveResult
, ComponentLike
, etc) at the top level of the library so we can import them just using @salesforce/source-deploy-retrieve
.
@@ -29,7 +29,7 @@ | |||
"@salesforce/salesforcedx-sobjects-faux-generator": "51.9.0", | |||
"@salesforce/salesforcedx-utils-vscode": "51.9.0", | |||
"@salesforce/schemas": "^1", | |||
"@salesforce/source-deploy-retrieve": "1.1.20", | |||
"@salesforce/source-deploy-retrieve": "2.0.0", |
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.
FYI, @salesforce/source-deploy-retrieve
is also used in the salesforcedx-vscode-apex
module.
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.
@lcampos I'll add a follow-up story for updating apex. It probably isn't wise to have two different versions in the extensions.
@sfsholden @brpowell I think this PR is ready to merge but it's open against last week's release branch ( |
We're thinking we'll use 51.10.0 and just skip 51.9.0 this week. I'll update this base branch once we can create 51.10.0. |
What does this PR do?
Upgrades SDR to v2.0.0.
This includes registry changes and code restructuring with breaking API changes (fromSource, fromManifest).
What issues does this PR fix or reference?
#3114, #3157, @W-9102368@