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

cy2

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cy2 - npm Package Compare versions

Comparing version 3.4.0 to 3.4.1-beta.1

9

dist/__tests__/ast.spec.js

@@ -56,4 +56,5 @@ "use strict";

try {
require('${path}');
require('${path}')('source', 'backup');
} catch (e) {
console.error(e);
}

@@ -71,9 +72,9 @@ }());

test('should inject new code', _asyncToGenerator(function*() {
expect((0, _js).instrumentCypressInit(nonPatchedFile, 'foo')).toEqual(result());
expect((0, _js).instrumentCypressInit(nonPatchedFile, 'foo', 'source', 'backup')).toEqual(result());
}));
test('should replace existing code', _asyncToGenerator(function*() {
expect((0, _js).instrumentCypressInit(patchedFile, 'foo')).toEqual(result());
expect((0, _js).instrumentCypressInit(patchedFile, 'foo', 'source', 'backup')).toEqual(result());
}));
test('should inject new code for windows path', _asyncToGenerator(function*() {
expect((0, _js).instrumentCypressInit(nonPatchedFile, 'C:\\Users\\Administrator\\Desktop\\node_modules\\cy2\\dist/injected.js')).toEqual(result((0, _path).normalizePath('C:\\Users\\Administrator\\Desktop\\node_modules\\cy2\\dist/injected.js')));
expect((0, _js).instrumentCypressInit(nonPatchedFile, 'C:\\Users\\Administrator\\Desktop\\node_modules\\cy2\\dist/injected.js', 'source', 'backup')).toEqual(result((0, _path).normalizePath('C:\\Users\\Administrator\\Desktop\\node_modules\\cy2\\dist/injected.js')));
}));

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

console.log(`[${label}] Running cypress with API URL: ${process.env.CYPRESS_API_URL}`);
yield lib.verify();
yield lib.patchServerInit(`${__dirname}/injected.js`);

@@ -69,0 +70,0 @@ const childProcess = yield lib.run();

@@ -31,3 +31,5 @@ "use strict";

try { require('${normalizedPath}')("${entryPointPath}", "${backupPath}"); }
catch (e) {}
catch (e) {
console.error(e);
}
}`;

@@ -34,0 +36,0 @@ const injectedCode = `(${injectedFn})();`;

@@ -22,1 +22,2 @@ import cp from 'child_process';

export declare function run(): Promise<cp.ChildProcess>;
export declare function verify(): Promise<void>;

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

exports.run = run;
exports.verify = verify;
var _childProcess = _interopRequireDefault(require("child_process"));

@@ -105,1 +106,16 @@ var _fs = _interopRequireDefault(require("fs"));

}
function _verify() {
_verify = _asyncToGenerator(function*() {
const cliBinPath = yield (0, _binPath).getCypressCLIBinPath();
(0, _debug).debug('Verifying cypress from %s', cliBinPath);
_childProcess.default.execFileSync(cliBinPath, [
'verify'
], {
stdio: 'pipe'
});
});
return _verify.apply(this, arguments);
}
function verify() {
return _verify.apply(this, arguments);
}
{
"name": "cy2",
"version": "3.4.0",
"version": "3.4.1-beta.1",
"author": "Andrew Goldis",

@@ -5,0 +5,0 @@ "main": "./dist",

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