diff --git a/package.json b/package.json index 746f351..70767e7 100644 --- a/package.json +++ b/package.json @@ -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": { @@ -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", diff --git a/test/commands/data/setup/transfer.test.ts b/test/commands/data/setup/transfer.test.ts index 463b970..de2e28b 100644 --- a/test/commands/data/setup/transfer.test.ts +++ b/test/commands/data/setup/transfer.test.ts @@ -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'; @@ -96,6 +99,9 @@ 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', @@ -103,7 +109,7 @@ describe('data setup transfer', () => { '--version', '1.0.0', '--extended-definition-file', - '/tmp/test-definition.json', + tmpDefFile, '--source-org', 'source@test.org', '--target-org', @@ -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 }); } }); }); diff --git a/test/tsconfig.json b/test/tsconfig.json index a5f451c..04f7dc5 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -2,6 +2,7 @@ "extends": "@salesforce/dev-config/tsconfig-test-strict-esm", "include": ["./**/*.ts"], "compilerOptions": { - "skipLibCheck": true + "skipLibCheck": true, + "types": ["node", "mocha"] } }