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
26 changes: 14 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@
"description": "Transfer setup data from one org to another in a single step",
"version": "1.0.0",
"dependencies": {
"@oclif/core": "^4",
"@salesforce/core": "^8",
"@salesforce/sf-plugins-core": "^12"
"@oclif/core": "^4.11.4",
"@salesforce/core": "^8.31.0",
"@salesforce/sf-plugins-core": "^12.2.22"
},
"devDependencies": {
"@oclif/plugin-command-snapshot": "^5.1.9",
"@salesforce/cli-plugins-testkit": "^5.3.10",
"@salesforce/dev-scripts": "^10",
"@types/node": "^18",
"eslint-plugin-sf-plugin": "^1.18.6",
"husky": "^9",
"oclif": "^4.14.0",
"@oclif/plugin-command-snapshot": "^5.3.22",
"@salesforce/cli-plugins-testkit": "^5.3.58",
"@salesforce/dev-scripts": "^11.0.4",
"@types/mocha": "^10.0.10",
"@types/node": "^25.9.1",
"eslint-plugin-sf-plugin": "^1.20.33",
"husky": "^9.1.7",
"oclif": "^4.23.8",
"ts-node": "^10.9.2",
"typescript": "^5.4.5",
"typescript": "^6.0.3",
"wireit": "^0.14.12"
},
"engines": {
Expand Down Expand Up @@ -132,7 +133,8 @@
"test:only": {
"command": "nyc mocha \"test/**/*.test.ts\"",
"env": {
"FORCE_COLOR": "2"
"FORCE_COLOR": "2",
"TS_NODE_PROJECT": "test/tsconfig.json"
},
"files": [
"test/**/*.ts",
Expand Down
10 changes: 9 additions & 1 deletion test/commands/data/setup/transfer.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import * as fs from 'node:fs';
import * as os from 'node:os';
import * as path from 'node:path';
import { TestContext, MockTestOrgData } from '@salesforce/core/testSetup';
import { expect } from 'chai';
import { stubSfCommandUx } from '@salesforce/sf-plugins-core';
Expand Down Expand Up @@ -96,14 +99,17 @@ describe('data setup transfer', () => {
});

it('throws error when both standard and custom definition flags are provided', async () => {
const tmpDefFile = path.join(os.tmpdir(), `test-definition-${Date.now()}.json`);
fs.writeFileSync(tmpDefFile, '{}', 'utf8');

try {
await SetupTransfer.run([
'--definition-identifier',
'testDefinition',
'--version',
'1.0.0',
'--extended-definition-file',
'/tmp/test-definition.json',
tmpDefFile,
'--source-org',
'source@test.org',
'--target-org',
Expand All @@ -112,6 +118,8 @@ describe('data setup transfer', () => {
expect.fail('Should have thrown an error');
} catch (error) {
expect((error as Error).message).to.include('Cannot use');
} finally {
fs.rmSync(tmpDefFile, { force: true });
}
});
});
Expand Down
3 changes: 2 additions & 1 deletion test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "@salesforce/dev-config/tsconfig-test-strict-esm",
"include": ["./**/*.ts"],
"compilerOptions": {
"skipLibCheck": true
"skipLibCheck": true,
"types": ["node", "mocha"]
}
}
Loading