diff --git a/.circleci/config.yml b/.circleci/config.yml index 537eec7e3..5b8d98eca 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,12 +17,14 @@ workflows: - release-management/test-nut: name: nuts-on-linux node_version: lts + size: large sfdx_version: latest requires: - node-latest - release-management/test-nut: name: nuts-on-windows sfdx_version: latest + size: large node_version: lts os: windows requires: diff --git a/package.json b/package.json index 67e669169..72eaefadb 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "@oclif/config": "^1", "@salesforce/command": "^3.1.0", "@salesforce/core": "^2.20.8", - "@salesforce/source-deploy-retrieve": "^2", + "@salesforce/source-deploy-retrieve": "^2.1.4", "chalk": "^4.1.0", "cli-ux": "^5.5.1", "tslib": "^2" diff --git a/src/commands/force/source/convert.ts b/src/commands/force/source/convert.ts index b35ba7791..5519542a5 100644 --- a/src/commands/force/source/convert.ts +++ b/src/commands/force/source/convert.ts @@ -97,6 +97,7 @@ export class Convert extends SourceCommand { type: 'directory', outputDirectory: this.getFlag('outputdir'), packageName: this.getFlag('packagename'), + genUniqueDir: false, }); } diff --git a/test/nuts/seeds/convert.seed.ts b/test/nuts/seeds/convert.seed.ts index 922319fc0..c0b88452b 100644 --- a/test/nuts/seeds/convert.seed.ts +++ b/test/nuts/seeds/convert.seed.ts @@ -43,21 +43,13 @@ context('Convert NUTs [name: %REPO_NAME%] [exec: %EXECUTABLE%]', () => { for (const testCase of REPO.convert.manifest) { it(`should convert ${testCase.toConvert}`, async () => { // Generate a package.xml by converting via sourcepath - const toConvert = path.normalize(testCase.toConvert); - await testkit.convert({ - args: `--sourcepath ${toConvert} --outputdir out1`, - exitCode: 0, - }); - const outputDir = path.join(process.cwd(), 'out1'); - testkit.findAndMoveManifest(outputDir); - const packageXml = path.join(process.cwd(), 'package.xml'); - - const res = await testkit.convert({ args: `--manifest ${packageXml} --outputdir out2`, exitCode: 0 }); + await testkit.convert({ args: `--sourcepath ${testCase.toConvert} --outputdir out1` }); + const packageXml = path.join('out1', 'package.xml'); - convertDir = path.relative(process.cwd(), asString(res.result?.location)); - await testkit.expect.directoryToHaveSomeFiles(convertDir); - await testkit.expect.fileToExist(path.join(convertDir, 'package.xml')); - await testkit.expect.filesToBeConverted(convertDir, testCase.toVerify); + await testkit.convert({ args: `--manifest ${packageXml} --outputdir out2` }); + await testkit.expect.directoryToHaveSomeFiles('out2'); + await testkit.expect.fileToExist(path.join('out2', 'package.xml')); + await testkit.expect.filesToBeConverted('out2', testCase.toVerify); }); afterEach(() => { diff --git a/test/nuts/seeds/deploy.manifest.seed.ts b/test/nuts/seeds/deploy.manifest.seed.ts index acf0bf640..0449f4895 100644 --- a/test/nuts/seeds/deploy.manifest.seed.ts +++ b/test/nuts/seeds/deploy.manifest.seed.ts @@ -41,11 +41,8 @@ context('Deploy manifest NUTs [name: %REPO_NAME%] [exec: %EXECUTABLE%]', () => { for (const testCase of REPO.deploy.manifest) { const toDeploy = path.normalize(testCase.toDeploy); it(`should deploy ${toDeploy}`, async () => { - // generate package.xml to use with the --manifest param - await testkit.convert({ args: `--sourcepath ${toDeploy} --outputdir out` }); - const outputDir = path.join(process.cwd(), 'out'); - testkit.findAndMoveManifest(outputDir); - const packageXml = path.join(process.cwd(), 'package.xml'); + await testkit.convert({ args: `--sourcepath ${testCase.toDeploy} --outputdir out` }); + const packageXml = path.join('out', 'package.xml'); await testkit.deploy({ args: `--manifest ${packageXml}` }); await testkit.expect.filesToBeDeployed(testCase.toVerify); diff --git a/test/nuts/seeds/retrieve.manifest.seed.ts b/test/nuts/seeds/retrieve.manifest.seed.ts index 9d605397e..c24893474 100644 --- a/test/nuts/seeds/retrieve.manifest.seed.ts +++ b/test/nuts/seeds/retrieve.manifest.seed.ts @@ -41,10 +41,8 @@ context('Retrieve manifest NUTs [name: %REPO_NAME%] [exec: %EXECUTABLE%]', () => const toRetrieve = path.normalize(testCase.toRetrieve); it(`should retrieve ${toRetrieve}`, async () => { // generate package.xml to use with the --manifest param - await testkit.convert({ args: `--sourcepath ${toRetrieve} --outputdir out` }); - const outputDir = path.join(process.cwd(), 'out'); - testkit.findAndMoveManifest(outputDir); - const packageXml = path.join(process.cwd(), 'package.xml'); + await testkit.convert({ args: `--sourcepath ${testCase.toRetrieve} --outputdir out` }); + const packageXml = path.join('out', 'package.xml'); await testkit.modifyLocalGlobs(testCase.toVerify); await testkit.retrieve({ args: `--manifest ${packageXml}` }); diff --git a/yarn.lock b/yarn.lock index a60004ecc..3d2512ab8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -746,7 +746,7 @@ resolved "https://registry.yarnpkg.com/@salesforce/schemas/-/schemas-1.1.0.tgz#bbf94a11ee036f2b0ec6ba82306cd9565a6ba26b" integrity sha512-6D7DvE6nFxpLyyTnrOIbbAeCJw2r/EpinFAcMh6gU0gA/CGfSbwV/8uR3uHLYL2zCyCZLH8jJ4dZ3BzCMqc+Eg== -"@salesforce/source-deploy-retrieve@^2", "@salesforce/source-deploy-retrieve@^2.1.3": +"@salesforce/source-deploy-retrieve@^2.1.3": version "2.1.3" resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-2.1.3.tgz#24dc96f0fa4f24cdf827c98078da1c1315219665" integrity sha512-Dkv+vkHAxr8eYVUyLechZDpIcHjfoBNGuBpFsERaGxqA63OmTzV8ZxoPwd52PyBOAsrxRGISd7NuE+NmS04WXw== @@ -762,6 +762,22 @@ unzipper "0.10.11" xmldom-sfdx-encoding "^0.1.29" +"@salesforce/source-deploy-retrieve@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-2.1.4.tgz#0d99aeea6a3d825dc7b101d4b2bd38e9498fa3a3" + integrity sha512-DczxXGUq0Qv4ZXgy3FBXeMlyW+ql8Ou7Kz+vAU22mdE53ES6T9RGcx0gb+qVR24J2tTxUYzMMf5ezXbg4zGb3g== + dependencies: + "@salesforce/core" "2.13.0" + "@salesforce/kit" "1.5.0" + "@salesforce/ts-types" "^1.4.2" + archiver "4.0.1" + fast-xml-parser "^3.17.4" + gitignore-parser "0.0.2" + ignore "^5.1.8" + mime "2.4.6" + unzipper "0.10.11" + xmldom-sfdx-encoding "^0.1.29" + "@salesforce/source-testkit@^0.0.5": version "0.0.5" resolved "https://registry.yarnpkg.com/@salesforce/source-testkit/-/source-testkit-0.0.5.tgz#9f9a83be85cbfbbf1fdf0bd3a5298d9391e2740f"