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

eshost

Package Overview
Dependencies
Maintainers
2
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eshost - npm Package Compare versions

Comparing version 3.8.0 to 3.8.1

lib/recast.js

14

lib/ConsoleAgent.js

@@ -84,3 +84,3 @@ 'use strict';

if (runtime && hostOptions.shortName) {
if (runtime) {
let ast = recast.parse(runtime);

@@ -95,7 +95,10 @@

// Replace $ in runtime source
if (node.value.type === "Identifier" &&
node.value.name === "$") {
node.value.name = hostOptions.shortName;
if (hostOptions.shortName) {
// Replace $ in runtime source
if (node.value.type === "Identifier" &&
node.value.name === "$") {
node.value.name = hostOptions.shortName;
}
}
this.traverse(node);

@@ -136,2 +139,3 @@ }

/* This is not the agent you're looking for */
const name = 'ConsoleAgent';
`;

@@ -138,0 +142,0 @@

{
"name": "eshost",
"version": "3.8.0",
"version": "3.8.1",
"description": "Invoke ECMAScript scripts in any command line JS engine.",

@@ -5,0 +5,0 @@ "main": "lib/eshost.js",

@@ -69,3 +69,3 @@ 'use strict';

assert.equal(compiled, `${ConsoleAgent.runtime}${program}`.replace(/\r?\n/g, ''));
assert.equal(compiled, ` const name = 'ConsoleAgent';${program}`.replace(/\r?\n/g, ''));
});

@@ -72,0 +72,0 @@ });

@@ -7,2 +7,3 @@ 'use strict';

const fs = require('fs');
const path = require('path');

@@ -34,2 +35,17 @@ const isWindows = process.platform === 'win32' ||

// console.log(`isWindows: ${isWindows}`);
if (isWindows) {
hosts.forEach(record => {
if (record[1].hostPath) {
record[1].hostPath += '.exe';
const ESHOST_ENV_NAME = `ESHOST_${record[0].toUpperCase()}_PATH`;
console.log(`ESHOST_ENV_NAME: ${ESHOST_ENV_NAME}`);
if (process.env[ESHOST_ENV_NAME]) {
record[1].hostPath = path.join(process.env[ESHOST_ENV_NAME], record[1].hostPath);
}
}
});
}
const timeout = function(ms) {

@@ -46,9 +62,8 @@ return new Promise(res => {

options.capabilities.browserName : type;
if (options.hostPath && isWindows) {
options.hostPath += '.exe';
}
const isSkipped = process.env[`ESHOST_SKIP_${effectiveType.toUpperCase()}`];
console.log(`ESHOST_SKIP_${effectiveType.toUpperCase()} isSkipped ${isSkipped}`);
if (options.hostPath &&
(!hasbin.sync(options.hostPath) && !fs.existsSync(options.hostPath))) {
console.error('Unable to run tests - host not found: ' + options.hostPath);
if (!isSkipped &&
(options.hostPath && (!hasbin.sync(options.hostPath) && !fs.existsSync(options.hostPath)))) {
console.error(`Unable to run tests - host not found: ${options.hostPath}`);
}

@@ -60,3 +75,3 @@

before(function() {
if (process.env['ESHOST_SKIP_' + type.toUpperCase()]) {
if (isSkipped) {
this.skip();

@@ -63,0 +78,0 @@ return;

Sorry, the diff of this file is not supported yet

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