diff --git a/test/nuts/REST/deploy.mpd.nut.ts b/test/nuts/REST/deploy.mpd.nut.ts index 3f7a9ad98..027accd67 100644 --- a/test/nuts/REST/deploy.mpd.nut.ts +++ b/test/nuts/REST/deploy.mpd.nut.ts @@ -6,6 +6,7 @@ */ import path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { get } from '@salesforce/ts-types'; import { FileResponse } from '@salesforce/source-deploy-retrieve'; @@ -76,7 +77,7 @@ context(`MPD REST Deploy NUTs [name: ${repo.name}]`, () => { process.env.SFDX_REST_DEPLOY = 'true'; testkit = await SourceTestkit.create({ repository: repo.gitUrl, - nut: __filename, + nut: fileURLToPath(import.meta.url), }); }); diff --git a/test/nuts/REST/deploy.nut.ts b/test/nuts/REST/deploy.nut.ts index bdecb33a7..8bb56b636 100644 --- a/test/nuts/REST/deploy.nut.ts +++ b/test/nuts/REST/deploy.nut.ts @@ -6,6 +6,7 @@ */ import path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { get } from '@salesforce/ts-types'; import { FileResponse } from '@salesforce/source-deploy-retrieve'; @@ -50,7 +51,7 @@ context(`REST Deploy NUTs [name: ${repo.name}]`, () => { process.env.SFDX_REST_DEPLOY = 'true'; testkit = await SourceTestkit.create({ repository: repo.gitUrl, - nut: __filename, + nut: fileURLToPath(import.meta.url), }); await testkit.deploy({ args: '-p force-app' }); }); diff --git a/test/nuts/deployDestructive.nut.ts b/test/nuts/deployDestructive.nut.ts index 140f94421..b63314c6f 100644 --- a/test/nuts/deployDestructive.nut.ts +++ b/test/nuts/deployDestructive.nut.ts @@ -6,6 +6,7 @@ */ import path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { expect } from 'chai'; import { execCmd } from '@salesforce/cli-plugins-testkit'; import { SourceTestkit } from '@salesforce/source-testkit'; @@ -33,7 +34,7 @@ describe('source:deploy --destructive NUTs', () => { before(async () => { testkit = await SourceTestkit.create({ - nut: __filename, + nut: fileURLToPath(import.meta.url), repository: 'https://github.com/trailheadapps/dreamhouse-lwc.git', }); execCmd('force:source:deploy --sourcepath force-app', { ensureExitCode: 0 }); diff --git a/test/nuts/seeds/deploy.async.seed.ts b/test/nuts/seeds/deploy.async.seed.ts index 02d76d8ed..fdc74444d 100644 --- a/test/nuts/seeds/deploy.async.seed.ts +++ b/test/nuts/seeds/deploy.async.seed.ts @@ -5,6 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { getBoolean, getString } from '@salesforce/ts-types'; import { Result } from '@salesforce/source-testkit/lib/types.js'; @@ -23,7 +24,7 @@ context('Async Deploy NUTs [name: %REPO_NAME%]', () => { before(async () => { testkit = await SourceTestkit.create({ repository: REPO.gitUrl, - nut: __filename, + nut: fileURLToPath(import.meta.url), }); // an initial deploy to initialize testkit source tracking await testkit.deploy({ args: `--sourcepath ${testkit.packageNames.join(',')}` }); diff --git a/test/nuts/seeds/deploy.manifest.seed.ts b/test/nuts/seeds/deploy.manifest.seed.ts index 0e9a6b6b1..b25612e8d 100644 --- a/test/nuts/seeds/deploy.manifest.seed.ts +++ b/test/nuts/seeds/deploy.manifest.seed.ts @@ -6,6 +6,7 @@ */ import path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { get } from '@salesforce/ts-types'; import { FileResponse } from '@salesforce/source-deploy-retrieve'; @@ -20,7 +21,7 @@ context('Deploy manifest NUTs [name: %REPO_NAME%]', () => { before(async () => { testkit = await SourceTestkit.create({ repository: REPO.gitUrl, - nut: __filename, + nut: fileURLToPath(import.meta.url), }); // some deploys reference other metadata not included in the deploy, if it's not already in the org it will fail await testkit.deploy({ args: `--sourcepath ${testkit.packageNames.join(',')}` }); diff --git a/test/nuts/seeds/deploy.metadata.seed.ts b/test/nuts/seeds/deploy.metadata.seed.ts index 94e32a612..4d64e2b36 100644 --- a/test/nuts/seeds/deploy.metadata.seed.ts +++ b/test/nuts/seeds/deploy.metadata.seed.ts @@ -5,6 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { get } from '@salesforce/ts-types'; import { FileResponse } from '@salesforce/source-deploy-retrieve'; @@ -19,7 +20,7 @@ context('Deploy metadata NUTs [name: %REPO_NAME%]', () => { before(async () => { testkit = await SourceTestkit.create({ repository: REPO.gitUrl, - nut: __filename, + nut: fileURLToPath(import.meta.url), }); // some deploys reference other metadata not included in the deploy, if it's not already in the org it will fail await testkit.deploy({ args: `--sourcepath ${testkit.packageNames.join(',')}` }); diff --git a/test/nuts/seeds/deploy.quick.seed.ts b/test/nuts/seeds/deploy.quick.seed.ts index fb9294519..df660e33d 100644 --- a/test/nuts/seeds/deploy.quick.seed.ts +++ b/test/nuts/seeds/deploy.quick.seed.ts @@ -5,6 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { get } from '@salesforce/ts-types'; import { FileResponse } from '@salesforce/source-deploy-retrieve'; @@ -19,7 +20,7 @@ context('Quick Deploy NUTs [name: %REPO_NAME%] [exec: %EXECUTABLE%]', () => { before(async () => { testkit = await SourceTestkit.create({ repository: REPO.gitUrl, - nut: __filename, + nut: fileURLToPath(import.meta.url), }); }); diff --git a/test/nuts/seeds/deploy.sourcepath.seed.ts b/test/nuts/seeds/deploy.sourcepath.seed.ts index 86936ee7e..9a550b6fb 100644 --- a/test/nuts/seeds/deploy.sourcepath.seed.ts +++ b/test/nuts/seeds/deploy.sourcepath.seed.ts @@ -6,6 +6,7 @@ */ import path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { get } from '@salesforce/ts-types'; import { FileResponse } from '@salesforce/source-deploy-retrieve'; @@ -20,7 +21,7 @@ context('Deploy sourcepath NUTs [name: %REPO_NAME%]', () => { before(async () => { testkit = await SourceTestkit.create({ repository: REPO.gitUrl, - nut: __filename, + nut: fileURLToPath(import.meta.url), }); }); diff --git a/test/nuts/seeds/deploy.testlevel.seed.ts b/test/nuts/seeds/deploy.testlevel.seed.ts index 64efd2542..4977348c9 100644 --- a/test/nuts/seeds/deploy.testlevel.seed.ts +++ b/test/nuts/seeds/deploy.testlevel.seed.ts @@ -5,6 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { RepoConfig, TEST_REPOS_MAP } from '../testMatrix.js'; @@ -17,7 +18,7 @@ context('Deploy testlevel NUTs [name: %REPO_NAME%]', () => { before(async () => { testkit = await SourceTestkit.create({ repository: REPO.gitUrl, - nut: __filename, + nut: fileURLToPath(import.meta.url), }); await testkit.deploy({ args: `--sourcepath ${testkit.packageNames.join(',')}` }); diff --git a/test/nuts/seeds/mpd.deploy.seed.ts b/test/nuts/seeds/mpd.deploy.seed.ts index 3cf06d36e..21bde41a8 100644 --- a/test/nuts/seeds/mpd.deploy.seed.ts +++ b/test/nuts/seeds/mpd.deploy.seed.ts @@ -5,6 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ import path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; context('MPD Deploy NUTs', () => { @@ -13,7 +14,7 @@ context('MPD Deploy NUTs', () => { before(async () => { testkit = await SourceTestkit.create({ repository: 'https://github.com/salesforcecli/sample-project-multiple-packages.git', - nut: __filename, + nut: fileURLToPath(import.meta.url), }); }); diff --git a/test/nuts/seeds/mpd.retrieve.seed.ts b/test/nuts/seeds/mpd.retrieve.seed.ts index 38fb65efa..3ebaaadb4 100644 --- a/test/nuts/seeds/mpd.retrieve.seed.ts +++ b/test/nuts/seeds/mpd.retrieve.seed.ts @@ -7,6 +7,7 @@ import path from 'node:path'; import fs from 'node:fs'; +import { fileURLToPath } from 'node:url'; import { Dictionary } from '@salesforce/ts-types'; import { SourceTestkit } from '@salesforce/source-testkit'; @@ -16,7 +17,7 @@ context('MPD Retrieve NUTs', () => { before(async () => { testkit = await SourceTestkit.create({ repository: 'https://github.com/salesforcecli/sample-project-multiple-packages.git', - nut: __filename, + nut: fileURLToPath(import.meta.url), }); await testkit.trackGlobs(testkit.packageGlobs); await testkit.deploy({ args: `--sourcepath ${testkit.packageNames.join(',')}` }); diff --git a/test/nuts/seeds/retrieve.manifest.seed.ts b/test/nuts/seeds/retrieve.manifest.seed.ts index ea0c95957..e6bb5ecc7 100644 --- a/test/nuts/seeds/retrieve.manifest.seed.ts +++ b/test/nuts/seeds/retrieve.manifest.seed.ts @@ -6,9 +6,10 @@ */ import path from 'node:path'; +import { fileURLToPath } from 'node:url'; // DO NOT TOUCH. generateNuts.ts will insert these values import { SourceTestkit } from '@salesforce/source-testkit'; import { JsonMap } from '@salesforce/ts-types'; -import { RepoConfig, TEST_REPOS_MAP } from '../testMatrix.js'; // DO NOT TOUCH. generateNuts.ts will insert these values +import { RepoConfig, TEST_REPOS_MAP } from '../testMatrix.js'; // DO NOT TOUCH. generateNuts.ts will insert these values const REPO = TEST_REPOS_MAP.get('%REPO_URL%') as RepoConfig; @@ -19,7 +20,7 @@ context('Retrieve manifest NUTs [name: %REPO_NAME%]', () => { before(async () => { testkit = await SourceTestkit.create({ repository: REPO.gitUrl, - nut: __filename, + nut: fileURLToPath(import.meta.url), }); await testkit.trackGlobs(testkit.packageGlobs); await testkit.deploy({ args: `--sourcepath ${testkit.packageNames.join(',')}` }); diff --git a/test/nuts/seeds/retrieve.metadata.seed.ts b/test/nuts/seeds/retrieve.metadata.seed.ts index 18760288e..e0c0a36fe 100644 --- a/test/nuts/seeds/retrieve.metadata.seed.ts +++ b/test/nuts/seeds/retrieve.metadata.seed.ts @@ -6,6 +6,7 @@ */ import path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { JsonMap } from '@salesforce/ts-types'; import { RepoConfig, TEST_REPOS_MAP } from '../testMatrix.js'; @@ -19,7 +20,7 @@ context('Retrieve metadata NUTs [name: %REPO_NAME%]', () => { before(async () => { testkit = await SourceTestkit.create({ repository: REPO.gitUrl, - nut: __filename, + nut: fileURLToPath(import.meta.url), }); await testkit.trackGlobs(testkit.packageGlobs); await testkit.deploy({ args: `--sourcepath ${testkit.packageNames.join(',')}` }); diff --git a/test/nuts/seeds/retrieve.packagenames.seed.ts b/test/nuts/seeds/retrieve.packagenames.seed.ts index c3261e931..625296e56 100644 --- a/test/nuts/seeds/retrieve.packagenames.seed.ts +++ b/test/nuts/seeds/retrieve.packagenames.seed.ts @@ -6,6 +6,7 @@ */ import path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { exec } from 'shelljs'; @@ -18,7 +19,7 @@ context('Retrieve packagenames NUTs', () => { before(async () => { testkit = await SourceTestkit.create({ repository: 'https://github.com/salesforcecli/sample-project-multiple-packages.git', - nut: __filename, + nut: fileURLToPath(import.meta.url), }); await testkit.deploy({ args: `--sourcepath ${testkit.packageNames.join(',')}` }); }); diff --git a/test/nuts/seeds/retrieve.retrievetargetdir.seed.ts b/test/nuts/seeds/retrieve.retrievetargetdir.seed.ts index ca97b2a51..b6622021f 100644 --- a/test/nuts/seeds/retrieve.retrievetargetdir.seed.ts +++ b/test/nuts/seeds/retrieve.retrievetargetdir.seed.ts @@ -5,6 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { JsonMap } from '@salesforce/ts-types'; import { RepoConfig, TEST_REPOS_MAP } from '../testMatrix.js'; @@ -18,7 +19,7 @@ context('Retrieve metadata NUTs [name: %REPO_NAME%]', () => { before(async () => { testkit = await SourceTestkit.create({ repository: REPO.gitUrl, - nut: __filename, + nut: fileURLToPath(import.meta.url), }); await testkit.trackGlobs(testkit.packageGlobs); await testkit.deploy({ args: `--sourcepath ${testkit.packageNames.join(',')}` }); diff --git a/test/nuts/seeds/retrieve.sourcepath.seed.ts b/test/nuts/seeds/retrieve.sourcepath.seed.ts index d5e611575..a051a937a 100644 --- a/test/nuts/seeds/retrieve.sourcepath.seed.ts +++ b/test/nuts/seeds/retrieve.sourcepath.seed.ts @@ -6,9 +6,10 @@ */ import path from 'node:path'; +import { fileURLToPath } from 'node:url'; // DO NOT TOUCH. generateNuts.ts will insert these values import { SourceTestkit } from '@salesforce/source-testkit'; import { JsonMap } from '@salesforce/ts-types'; -import { RepoConfig, TEST_REPOS_MAP } from '../testMatrix.js'; // DO NOT TOUCH. generateNuts.ts will insert these values +import { RepoConfig, TEST_REPOS_MAP } from '../testMatrix.js'; // DO NOT TOUCH. generateNuts.ts will insert these values const REPO = TEST_REPOS_MAP.get('%REPO_URL%') as RepoConfig; @@ -19,7 +20,7 @@ context('Retrieve Sourcepath NUTs [name: %REPO_NAME%]', () => { before(async () => { testkit = await SourceTestkit.create({ repository: REPO.gitUrl, - nut: __filename, + nut: fileURLToPath(import.meta.url), }); await testkit.trackGlobs(testkit.packageGlobs); await testkit.deploy({ args: `--sourcepath ${testkit.packageNames.join(',')}` });