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.1.4 to 3.1.5

1

dist/js.d.ts
import { Program } from 'estree';
export declare const parseJS: (code: string) => Program;
export declare const generateJS: (ast: Program) => any;
export declare const FN_ID = "cy2_injected";
export declare const instrumentCypressInit: (code: string, injectedModulePath: string) => any;
export declare function hasInjected(ast: Program): boolean;

11

dist/js.js

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

exports.hasInjected = hasInjected;
exports.parseJS = exports.instrumentCypressInit = exports.FN_ID = void 0;
exports.instrumentCypressInit = exports.generateJS = exports.parseJS = exports.FN_ID = void 0;
var _acorn = require("acorn");

@@ -21,2 +21,7 @@ var _escodegen = _interopRequireDefault(require("escodegen"));

exports.parseJS = parseJS;
const generateJS = (ast)=>_escodegen.default.generate(ast, {
verbatim: 'raw'
})
;
exports.generateJS = generateJS;
const FN_ID = 'cy2_injected';

@@ -33,5 +38,5 @@ exports.FN_ID = FN_ID;

if (!hasInjected(ast)) {
return _escodegen.default.generate(injectAST(ast, parseJS(injectedCode)));
return generateJS(injectAST(ast, parseJS(injectedCode)));
}
return _escodegen.default.generate(replaceAST(ast, parseJS(injectedFn)));
return generateJS(replaceAST(ast, parseJS(injectedFn)));
};

@@ -38,0 +43,0 @@ exports.instrumentCypressInit = instrumentCypressInit;

{
"name": "cy2",
"version": "3.1.4",
"version": "3.1.5",
"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