Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chiragrupani/karma-chromium-edge-launcher

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chiragrupani/karma-chromium-edge-launcher - npm Package Compare versions

Comparing version 2.1.1 to 2.2.1

dist/channels/EdgeAny.d.ts

6

dist/index.js

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const EdgeAny_1 = __importDefault(require("./channels/EdgeAny"));
const EdgeBeta_1 = __importDefault(require("./channels/EdgeBeta"));

@@ -11,2 +12,3 @@ const EdgeCanary_1 = __importDefault(require("./channels/EdgeCanary"));

const EdgeStable_1 = __importDefault(require("./channels/EdgeStable"));
const EdgeAnyHeadless_1 = __importDefault(require("./headlessChannels/EdgeAnyHeadless"));
const EdgeBetaHeadless_1 = __importDefault(require("./headlessChannels/EdgeBetaHeadless"));

@@ -21,2 +23,3 @@ const EdgeCanaryHeadless_1 = __importDefault(require("./headlessChannels/EdgeCanaryHeadless"));

'launcher:Edge': ['type', EdgeStable_1.default],
'launcher:EdgeAny': ['type', EdgeAny_1.default],
// Headless

@@ -26,3 +29,4 @@ 'launcher:EdgeHeadless': ['type', EdgeStableHeadless_1.default],

'launcher:EdgeBetaHeadless': ['type', EdgeBetaHeadless_1.default],
'launcher:EdgeCanaryHeadless': ['type', EdgeCanaryHeadless_1.default]
'launcher:EdgeCanaryHeadless': ['type', EdgeCanaryHeadless_1.default],
'launcher:EdgeAnyHeadless': ['type', EdgeAnyHeadless_1.default],
};

5

dist/Utilities.d.ts
export default class Utilities {
static GetLinuxBin(command: string): string | null;
static GetEdgeDarwin(defaultPath: any): any;
static GetEdgeDarwin(defaultPath: string): string | null;
static GetEdgeExe(edgeDirName: string): string | null;
static isJSFlags(flag: string): boolean;
static sanitizeJSFlags(flag: string): string;
static GetEdgeAnyLinux(): string | null;
static GetEdgeAnyDarwin(): string | null;
static GetAnyEdgeWindows(): string | null;
}

@@ -8,2 +8,3 @@ "use strict";

const path_1 = __importDefault(require("path"));
const Constants_1 = require("./Constants");
class Utilities {

@@ -36,10 +37,14 @@ static GetLinuxBin(command) {

}
try {
var homePath = path_1.default.join(process.env.HOME || '', defaultPath);
fs_1.default.accessSync(homePath);
return homePath;
var darwinPaths = [
path_1.default.join(process.env.HOME || '', defaultPath),
defaultPath,
];
for (let i = 0; i < darwinPaths.length; i++) {
try {
fs_1.default.accessSync(darwinPaths[i]);
return darwinPaths[i];
}
catch (_a) { }
}
catch (e) {
return defaultPath;
}
return null;
}

@@ -58,3 +63,3 @@ // Return location of Edge.exe file for a given directory.

];
var edgePath = '';
var edgePath = null;
for (let i = 0; i < prefixes.length; i++) {

@@ -84,3 +89,21 @@ try {

}
static GetEdgeAnyLinux() {
return (this.GetLinuxBin(Constants_1.LinuxConstants.EdgeCanary) ||
this.GetLinuxBin(Constants_1.LinuxConstants.EdgeDev) ||
this.GetLinuxBin(Constants_1.LinuxConstants.EdgeBeta) ||
this.GetLinuxBin(Constants_1.LinuxConstants.Edge));
}
static GetEdgeAnyDarwin() {
return (this.GetEdgeDarwin(`/Applications/${Constants_1.DarwinConstants.EdgeCanary}.app/Contents/MacOS/${Constants_1.DarwinConstants.EdgeCanary}`) ||
this.GetEdgeDarwin(`/Applications/${Constants_1.DarwinConstants.EdgeDev}.app/Contents/MacOS/${Constants_1.DarwinConstants.EdgeDev}`) ||
this.GetEdgeDarwin(`/Applications/${Constants_1.DarwinConstants.EdgeBeta}.app/Contents/MacOS/${Constants_1.DarwinConstants.EdgeBeta}`) ||
this.GetEdgeDarwin(`/Applications/${Constants_1.DarwinConstants.Edge}.app/Contents/MacOS/${Constants_1.DarwinConstants.Edge}`));
}
static GetAnyEdgeWindows() {
return (this.GetEdgeExe(Constants_1.WindowsConstants.EdgeCanary) ||
this.GetEdgeExe(Constants_1.WindowsConstants.EdgeDev) ||
this.GetEdgeExe(Constants_1.WindowsConstants.EdgeBeta) ||
this.GetEdgeExe(Constants_1.WindowsConstants.Edge));
}
}
exports.default = Utilities;
{
"name": "@chiragrupani/karma-chromium-edge-launcher",
"version": "2.1.1",
"version": "2.2.1",
"description": "A Karma plugin. Launcher for different Chromium Edge channels - Dev, Canary, Beta and Stable",

@@ -36,12 +36,12 @@ "main": "dist/index.js",

"devDependencies": {
"@types/chai": "^4.2.18",
"@types/mocha": "^8.2.2",
"@types/node": "^15.0.2",
"@types/sinon": "^10.0.0",
"@types/chai": "^4.3.0",
"@types/mocha": "^9.0.0",
"@types/node": "^17.0.9",
"@types/sinon": "^10.0.6",
"chai": "^4.3.4",
"mocha": "^8.4.0",
"mocha-junit-reporter": "^2.0.0",
"mocha": "^9.1.4",
"mocha-junit-reporter": "^2.0.2",
"nyc": "^15.1.0",
"ts-node": "^9.1.1",
"typescript": "^4.2.4"
"ts-node": "^10.4.0",
"typescript": "^4.5.4"
},

@@ -48,0 +48,0 @@ "nyc": {

@@ -43,2 +43,3 @@ # Karma-Chromium-Edge-Launcher

- "EdgeCanary"
- "EdgeAny"

@@ -51,7 +52,10 @@ If you want to launch browser in headless mode, below is correspondling list:

- "EdgeCanaryHeadless"
- "EdgeAnyHeadless"
EdgeAny and EdgeAnyHeadless launches the first available channel from Canary, Dev, Beta and Stable in the order.
If you want to explicity specify the path for browser installation, set environment variable from this list, corresponding to release channel:
```bash
EDGE_BIN, EDGE_BETA_BIN, EDGE_DEV_BIN, EDGE_CANARY_BIN
EDGE_BIN, EDGE_BETA_BIN, EDGE_DEV_BIN, EDGE_CANARY_BIN, EDGE_ANY_BIN
```

@@ -58,0 +62,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc