Skip to content

Commit

Permalink
fix: pull non-default directory in default project (#471)
Browse files Browse the repository at this point in the history
* fix: pull non-default directory in default project

* fix: bump to the latest minor version of source-tracking

Co-authored-by: Steve Hetzel <[email protected]>
  • Loading branch information
mshanemc and shetzel authored Apr 28, 2022
1 parent e1d1dcc commit 02d91ca
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 30 deletions.
3 changes: 1 addition & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"request": "attach",
"name": "Attach",
"port": 9229,
"skipFiles": ["<node_internals>/**"],
"continueOnAttach": true
"skipFiles": ["<node_internals>/**"]
},
{
"name": "Run All Tests",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@salesforce/command": "^4.2.2",
"@salesforce/core": "^2.35.0",
"@salesforce/source-deploy-retrieve": "^5.12.8",
"@salesforce/source-tracking": "^1.3.1",
"@salesforce/source-tracking": "^1.4.0",
"chalk": "^4.1.2",
"cli-ux": "^5.6.3",
"got": "^11.8.3",
Expand Down
27 changes: 4 additions & 23 deletions src/commands/force/source/pull.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,8 @@
import { flags, FlagsConfig } from '@salesforce/command';
import { Duration } from '@salesforce/kit';
import { Messages } from '@salesforce/core';
import {
ComponentSet,
FileResponse,
RequestStatus,
RetrieveResult,
SourceComponent,
} from '@salesforce/source-deploy-retrieve';
import { ChangeResult, SourceTracking } from '@salesforce/source-tracking';
import { FileResponse, RequestStatus, RetrieveResult, SourceComponent } from '@salesforce/source-deploy-retrieve';
import { SourceTracking } from '@salesforce/source-tracking';
import { SourceCommand } from '../../../sourceCommand';
import { PullResponse, PullResultFormatter } from '../../../formatters/source/pullFormatter';
import { trackingSetup, updateTracking } from '../../../trackingFunctions';
Expand Down Expand Up @@ -85,22 +79,9 @@ export default class Pull extends SourceCommand {
}

protected async retrieve(): Promise<void> {
const componentSet = new ComponentSet();
(
await this.tracking.getChanges<ChangeResult>({
origin: 'remote',
state: 'nondelete',
format: 'ChangeResult',
})
).map((component) => {
if (component.type && component.name) {
componentSet.add({
type: component.type,
fullName: component.name,
});
}
});
const componentSet = await this.tracking.remoteNonDeletesAsComponentSet();

// if it is't local, add it as a
if (componentSet.size === 0) {
return;
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -967,10 +967,10 @@
sinon "^10.0.0"
strip-ansi "^6.0.0"

"@salesforce/source-tracking@^1.3.1":
version "1.3.1"
resolved "https://registry.yarnpkg.com/@salesforce/source-tracking/-/source-tracking-1.3.1.tgz#881eabef12f8d0916ae071f29ea8346b34ad0e9f"
integrity sha512-I9NVwliT2nP/FlOeYtFFZ896GdldUDxhSGtTa/eopoGm6YQAIwqlnorBR9ypWd4l4x3i8t4fX0pJR4R5I00l9Q==
"@salesforce/source-tracking@^1.4.0":
version "1.4.0"
resolved "https://registry.npmjs.org/@salesforce/source-tracking/-/source-tracking-1.4.0.tgz#8b85214cc012d0f10b8938f251a2693b9395055c"
integrity sha512-o1XB6v3Amm33y9OeBXH9pke3TVVdtgOAUsxx3XfSdSakURKT8nnIqvoiqug7FHQTNkSo9vBkA4m6tuL00stSlg==
dependencies:
"@salesforce/core" "^2.33.1"
"@salesforce/kit" "^1.5.17"
Expand Down

0 comments on commit 02d91ca

Please sign in to comment.