From 477a75d67171ddc81ad8d6be88a1515045d83aa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Fri, 30 Jun 2023 09:18:03 +0300 Subject: [PATCH] Drop cross-env npm dep --- editors/code/package-lock.json | 19 ------------------- editors/code/package.json | 3 +-- editors/code/tests/unit/settings.test.ts | 2 ++ 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/editors/code/package-lock.json b/editors/code/package-lock.json index 31b18a1bdd..d99fd8f617 100644 --- a/editors/code/package-lock.json +++ b/editors/code/package-lock.json @@ -23,7 +23,6 @@ "@typescript-eslint/parser": "^5.60.1", "@vscode/test-electron": "^2.3.3", "@vscode/vsce": "^2.19.0", - "cross-env": "^7.0.3", "esbuild": "^0.18.10", "eslint": "^8.43.0", "eslint-config-prettier": "^8.8.0", @@ -922,24 +921,6 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, - "node_modules/cross-env": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", - "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.1" - }, - "bin": { - "cross-env": "src/bin/cross-env.js", - "cross-env-shell": "src/bin/cross-env-shell.js" - }, - "engines": { - "node": ">=10.14", - "npm": ">=6", - "yarn": ">=1" - } - }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", diff --git a/editors/code/package.json b/editors/code/package.json index 581b3abb36..fe060ce698 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -38,7 +38,7 @@ "lint": "prettier --check . && eslint -c .eslintrc.js --ext ts ./src ./tests", "fix": "prettier --write . && eslint -c .eslintrc.js --ext ts ./src ./tests --fix", "pretest": "tsc && npm run build", - "test": "cross-env TEST_VARIABLE=test node ./out/tests/runTests.js" + "test": "node ./out/tests/runTests.js" }, "dependencies": { "@hpcc-js/wasm": "^2.13.0", @@ -55,7 +55,6 @@ "@typescript-eslint/parser": "^5.60.1", "@vscode/test-electron": "^2.3.3", "@vscode/vsce": "^2.19.0", - "cross-env": "^7.0.3", "esbuild": "^0.18.10", "eslint": "^8.43.0", "eslint-config-prettier": "^8.8.0", diff --git a/editors/code/tests/unit/settings.test.ts b/editors/code/tests/unit/settings.test.ts index 224cea5a23..2cc1b670dc 100644 --- a/editors/code/tests/unit/settings.test.ts +++ b/editors/code/tests/unit/settings.test.ts @@ -39,6 +39,7 @@ export async function getTests(ctx: Context) { }); suite.addTest("Should support external variables", async () => { + process.env["TEST_VARIABLE"] = "test"; const envJson = { USING_EXTERNAL_VAR: "${env:TEST_VARIABLE} test ${env:TEST_VARIABLE}", }; @@ -48,6 +49,7 @@ export async function getTests(ctx: Context) { const actualEnv = await substituteVariablesInEnv(envJson); assert.deepStrictEqual(actualEnv, expectedEnv); + delete process.env["TEST_VARIABLE"]; }); suite.addTest("should support VSCode variables", async () => {