Skip to content

Commit de5f3cf

Browse files
committed
fix: resolve dependency conflicts and restore dotenv functionality
- Fix mocha/cliui dependency conflict by adding [email protected] resolution - Restore dotenv functionality for .nut.ts test files - Update test/tsconfig.json to properly include .nut.ts files - All 56 tests passing with dependencies resolved
1 parent 8981473 commit de5f3cf

File tree

4 files changed

+9
-21
lines changed

4 files changed

+9
-21
lines changed

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"@types/node-fetch": "^2.6.12",
3232
"@types/xml2js": "^0.4.14",
3333
"@typescript-eslint/eslint-plugin": "^6.21.0",
34+
"dotenv": "^16.5.0",
3435
"eslint": "^8.57.0",
3536
"eslint-config-prettier": "^9.1.0",
3637
"eslint-plugin-header": "^3.1.1",
@@ -111,6 +112,9 @@
111112
"publishConfig": {
112113
"access": "public"
113114
},
115+
"resolutions": {
116+
"cliui": "7.0.4"
117+
},
114118
"wireit": {
115119
"build": {
116120
"dependencies": [

test/commands/lightning/dev/componentLocalPreview.nut.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ import fs from 'node:fs';
1010
import { expect } from 'chai';
1111
import { TestSession } from '@salesforce/cli-plugins-testkit';
1212
import axios from 'axios';
13+
import * as dotenv from 'dotenv';
1314
import { toKebabCase } from './helpers/utils.js';
1415
import { createSfdxProject, createLwcComponent } from './helpers/projectSetup.js';
1516
import { startLightningDevServer } from './helpers/devServerUtils.js';
1617

17-
// Note: dotenv not available, using process.env directly
18+
// Load environment variables from .env file
19+
dotenv.config();
1820

1921
const INSTANCE_URL = process.env.TESTKIT_HUB_INSTANCE;
2022
const TEST_TIMEOUT_MS = 60_000;

test/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "@salesforce/dev-config/tsconfig-test-strict-esm",
3-
"include": ["./**/*.ts"],
3+
"include": ["./**/*.ts", "./**/*.nut.ts"],
44
"compilerOptions": {
55
"skipLibCheck": true
66
}

yarn.lock

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5565,16 +5565,7 @@ cli-width@^4.1.0:
55655565
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-4.1.0.tgz#42daac41d3c254ef38ad8ac037672130173691c5"
55665566
integrity sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==
55675567

5568-
cliui@^6.0.0:
5569-
version "6.0.0"
5570-
resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1"
5571-
integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==
5572-
dependencies:
5573-
string-width "^4.2.0"
5574-
strip-ansi "^6.0.0"
5575-
wrap-ansi "^6.2.0"
5576-
5577-
cliui@^7.0.2:
5568+
[email protected], cliui@^6.0.0, cliui@^7.0.2, cliui@^8.0.1:
55785569
version "7.0.4"
55795570
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
55805571
integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==
@@ -5583,15 +5574,6 @@ cliui@^7.0.2:
55835574
strip-ansi "^6.0.0"
55845575
wrap-ansi "^7.0.0"
55855576

5586-
cliui@^8.0.1:
5587-
version "8.0.1"
5588-
resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa"
5589-
integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==
5590-
dependencies:
5591-
string-width "^4.2.0"
5592-
strip-ansi "^6.0.1"
5593-
wrap-ansi "^7.0.0"
5594-
55955577
co@^4.6.0:
55965578
version "4.6.0"
55975579
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"

0 commit comments

Comments
 (0)