Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
"node": ">=18.0.0"
},
"dependencies": {
"@salesforce/core": "^8.23.3",
"@salesforce/core": "^8.23.4",
"@salesforce/kit": "^3.2.4",
"@salesforce/source-deploy-retrieve": "^12.25.0",
"@salesforce/source-deploy-retrieve": "^12.26.1",
"@salesforce/ts-types": "^2.0.12",
"fast-xml-parser": "^4.5.3",
"graceful-fs": "^4.2.11",
Expand Down
9 changes: 8 additions & 1 deletion src/shared/localComponentSetArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
VirtualTreeContainer,
DestructiveChangesType,
RegistryAccess,
NodeFSTreeContainer,
} from '@salesforce/source-deploy-retrieve';
import { isDefined } from './guards';
import { supportsPartialDelete, pathIsInFolder } from './functions';
Expand Down Expand Up @@ -90,15 +91,21 @@ export const getComponentSets = ({
groupings,
sourceApiVersion,
registry,
projectPath,
}: {
groupings: GroupedFile[];
sourceApiVersion?: string;
registry: RegistryAccess;
/** absolute path to the project root */
projectPath: string;
}): ComponentSet[] => {
const logger = Logger.childFromRoot('localComponentSetArray');

// optimistic resolution...some files may not be possible to resolve
const resolverForNonDeletes = new MetadataResolver(registry);
const resolverForNonDeletes = new MetadataResolver(
registry,
process.env.ESBUILD_PLATFORM === 'web' ? new NodeFSTreeContainer(projectPath) : undefined
);

return groupings
.map((grouping) => {
Expand Down
3 changes: 2 additions & 1 deletion src/sourceTracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export class SourceTracking extends AsyncCreatable {
); // if the users specified true or false for the param, that overrides the project config
this.logger.debug(`will build array of ${groupings.length} componentSet(s)`);

return getComponentSets({ groupings, sourceApiVersion, registry: this.registry });
return getComponentSets({ groupings, sourceApiVersion, registry: this.registry, projectPath: this.projectPath });
}

/** reads tracking files for remote changes. It DOES NOT consider the effects of .forceignore unless told to */
Expand Down Expand Up @@ -505,6 +505,7 @@ export class SourceTracking extends AsyncCreatable {
}

public async reReadLocalTrackingCache(): Promise<void> {
await this.ensureLocalTracking();
await this.localRepo.getStatus(true);
}
/**
Expand Down
8 changes: 8 additions & 0 deletions test/nuts/local/partialBundleDelete.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { getComponentSets } from '../../../src/shared/localComponentSetArray';

describe('Bundle-like types delete', () => {
let session: TestSession;
let projectPath: string;

before(async () => {
session = await TestSession.create({
Expand All @@ -31,6 +32,7 @@ describe('Bundle-like types delete', () => {
},
devhubAuthStrategy: 'NONE',
});
projectPath = session.project.dir;
});

// We need a sinon sandbox to stub the file system to make it look like we
Expand Down Expand Up @@ -60,6 +62,7 @@ describe('Bundle-like types delete', () => {
},
],
registry,
projectPath,
});

expect(compSets.length).to.equal(1);
Expand Down Expand Up @@ -87,6 +90,7 @@ describe('Bundle-like types delete', () => {
},
],
registry,
projectPath,
});

expect(compSets.length).to.equal(1);
Expand All @@ -112,6 +116,7 @@ describe('Bundle-like types delete', () => {
},
],
registry,
projectPath,
});

expect(compSets.length).to.equal(1);
Expand Down Expand Up @@ -139,6 +144,7 @@ describe('Bundle-like types delete', () => {
},
],
registry,
projectPath,
});

expect(compSets.length).to.equal(1);
Expand All @@ -162,6 +168,7 @@ describe('Bundle-like types delete', () => {
},
],
registry,
projectPath,
});

expect(compSets.length).to.equal(1);
Expand All @@ -186,6 +193,7 @@ describe('Bundle-like types delete', () => {
},
],
registry,
projectPath,
});

expect(compSets.length).to.equal(1);
Expand Down
68 changes: 34 additions & 34 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@
strip-ansi "6.0.1"
ts-retry-promise "^0.8.1"

"@salesforce/core@^8.23.1", "@salesforce/core@^8.23.2", "@salesforce/core@^8.23.3", "@salesforce/core@^8.8.0":
"@salesforce/core@^8.23.1", "@salesforce/core@^8.8.0":
version "8.23.3"
resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-8.23.3.tgz#23d92d6eb887e946e26989552a605fa085e626e8"
integrity sha512-BD9cOUOw3wTR8ud6dBacLvA4x0KAfQXkNGdxtU9ujz5nEW86ms5tU1AEUzVXnhuDrrtdQZh7/yTGxqg5mS7rZg==
Expand All @@ -701,6 +701,31 @@
semver "^7.7.3"
ts-retry-promise "^0.8.1"

"@salesforce/core@^8.23.4":
version "8.23.4"
resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-8.23.4.tgz#f1fa18eace08f685e72975a09d96e7f6958ca3b4"
integrity sha512-+JZMFD76P7X8fLSrHJRi9+ygjTehqZqJRXxmNq51miqIHY1Xlb0qH/yr9u5QEGsFIOZ8H8oStl/Zj+ZbrFs0vw==
dependencies:
"@jsforce/jsforce-node" "^3.10.8"
"@salesforce/kit" "^3.2.4"
"@salesforce/schemas" "^1.10.3"
"@salesforce/ts-types" "^2.0.12"
ajv "^8.17.1"
change-case "^4.1.2"
fast-levenshtein "^3.0.0"
faye "^1.4.1"
form-data "^4.0.4"
js2xmlparser "^4.0.1"
jsonwebtoken "9.0.2"
jszip "3.10.1"
memfs "^4.30.1"
pino "^9.7.0"
pino-abstract-transport "^1.2.0"
pino-pretty "^11.3.0"
proper-lockfile "^4.1.2"
semver "^7.7.3"
ts-retry-promise "^0.8.1"

"@salesforce/dev-config@^4.3.1":
version "4.3.1"
resolved "https://registry.npmjs.org/@salesforce/dev-config/-/dev-config-4.3.1.tgz"
Expand Down Expand Up @@ -755,12 +780,12 @@
resolved "https://registry.yarnpkg.com/@salesforce/schemas/-/schemas-1.10.3.tgz#52c867fdd60679cf216110aa49542b7ad391f5d1"
integrity sha512-FKfvtrYTcvTXE9advzS25/DEY9yJhEyLvStm++eQFtnAaX1pe4G3oGHgiQ0q55BM5+0AlCh0+0CVtQv1t4oJRA==

"@salesforce/source-deploy-retrieve@^12.25.0":
version "12.25.0"
resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-12.25.0.tgz#e3902e53b526888766a520fecef66787c57be884"
integrity sha512-mNjgC6ol7ueQxCI3NdqpgWy5ofGUT/yeKP+mZiSiAArpc18f8GlhVACsRLODH8dbPungu9lBrP26LQ2SZaRA5Q==
"@salesforce/source-deploy-retrieve@^12.26.1":
version "12.26.1"
resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-12.26.1.tgz#161a37bf7f94273de49fbfb771e7f333937a00b2"
integrity sha512-PQJoURhTBCVM2Q4Sgo6iKZnZfQ1x+fE3r4uUKQ2nzDhPxrICm8OsGRXOS82NVPo8M8jL68sZ6CxPrRYgxZyCfg==
dependencies:
"@salesforce/core" "^8.23.2"
"@salesforce/core" "^8.23.4"
"@salesforce/kit" "^3.2.4"
"@salesforce/ts-types" "^2.0.12"
"@salesforce/types" "^1.5.0"
Expand Down Expand Up @@ -5729,16 +5754,7 @@ stop-iteration-iterator@^1.1.0:
es-errors "^1.3.0"
internal-slot "^1.1.0"

"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -5810,14 +5826,7 @@ stringify-entities@^4.0.0:
character-entities-html4 "^2.0.0"
character-entities-legacy "^3.0.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -6414,7 +6423,7 @@ workerpool@^6.5.1:
resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz"
integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -6432,15 +6441,6 @@ wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz"
Expand Down
Loading