Use native node 24 .env loader (#4970)

This commit is contained in:
Denys Vuika
2026-01-08 13:43:39 +00:00
committed by GitHub
parent b4f5ea1f05
commit dd7852ead1
4 changed files with 17 additions and 35 deletions
+8 -30
View File
@@ -66,13 +66,11 @@
"@types/event-emitter": "^0.3.3",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "^2.0.8",
"@types/node": "18.19.9",
"@types/node": "25.0.3",
"@types/superagent": "^4.1.10",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"@typescript-eslint/utils": "^8.40.0",
"dotenv": "17.2.3",
"dotenv-expand": "^5.1.0",
"eslint": "^8.57.0",
"eslint-plugin-ban": "^2.0.0",
"eslint-plugin-import": "2.32.0",
@@ -11563,14 +11561,14 @@
"license": "MIT"
},
"node_modules/@types/node": {
"version": "18.19.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.9.tgz",
"integrity": "sha512-oZFKlC8l5YtzGQNT4zC2PiSSKzQVZ8bAwwd+EYdPLtyk0nSEq6O16SkK+rkkT2eflDAbormJgEF3QnH3oDrTSw==",
"version": "25.0.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.3.tgz",
"integrity": "sha512-W609buLVRVmeW693xKfzHeIV6nJGGz98uCPfeXI1ELMLXVeKYZ9m15fAMSaUPBHYLGFsVRcMmSCksQOrZV9BYA==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~7.16.0"
}
},
"node_modules/@types/node-forge": {
@@ -16388,26 +16386,6 @@
"url": "https://github.com/fb55/domutils?sponsor=1"
}
},
"node_modules/dotenv": {
"version": "17.2.3",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz",
"integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==",
"dev": true,
"license": "BSD-2-Clause",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://dotenvx.com"
}
},
"node_modules/dotenv-expand": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz",
"integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==",
"dev": true,
"license": "BSD-2-Clause"
},
"node_modules/dunder-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
@@ -30094,9 +30072,9 @@
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
"integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
"dev": true,
"license": "MIT"
},
+1 -3
View File
@@ -98,13 +98,11 @@
"@types/event-emitter": "^0.3.3",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "^2.0.8",
"@types/node": "18.19.9",
"@types/node": "25.0.3",
"@types/superagent": "^4.1.10",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"@typescript-eslint/utils": "^8.40.0",
"dotenv": "17.2.3",
"dotenv-expand": "^5.1.0",
"eslint": "^8.57.0",
"eslint-plugin-ban": "^2.0.0",
"eslint-plugin-import": "2.32.0",
@@ -68,7 +68,7 @@ async function createOutputFolders() {
async function removeOutputFolders() {
if (fs.existsSync(paths.rootFolder)) {
fs.rmdirSync(paths.rootFolder, { recursive: true });
fs.rmSync(paths.rootFolder, { recursive: true, force: true });
}
}
@@ -23,12 +23,18 @@
*/
import { PlaywrightTestConfig, devices, chromium } from '@playwright/test';
import { loadEnvFile } from 'node:process';
import { timeouts } from '../utils';
import { getReporter } from './report-portal.config';
type LaunchOptions = Parameters<typeof chromium.launch>[0];
require('@alfresco/adf-cli/tooling').dotenvConfig();
try {
loadEnvFile();
} catch (error) {
// .env file is optional, continue without it
}
const { env } = process;
interface BrowserConfig {