happo-cypress
Advanced tools
Comparing version 1.9.3 to 1.9.4-rc.1
@@ -11,6 +11,2 @@ { | ||
"pages": { | ||
"/": [ | ||
"static/runtime/webpack.js", | ||
"static/runtime/main.js" | ||
], | ||
"/_app": [ | ||
@@ -27,8 +23,4 @@ "static/runtime/webpack.js", | ||
"static/runtime/polyfills.js.map" | ||
], | ||
"/index": [ | ||
"static/runtime/webpack.js", | ||
"static/runtime/main.js" | ||
] | ||
} | ||
} |
@@ -1,1 +0,1 @@ | ||
{"/_app":"static/development/pages/_app.js","/_document":"static/development/pages/_document.js","/_error":"static/development/pages/_error.js","/index":"static/development/pages/index.js","/":"static/development/pages/index.js"} | ||
{"/_app":"static/development/pages/_app.js","/_document":"static/development/pages/_document.js","/_error":"static/development/pages/_error.js"} |
@@ -116,3 +116,3 @@ /******/ (function(modules) { // webpackBootstrap | ||
/******/ // eslint-disable-next-line no-unused-vars | ||
/******/ var hotCurrentHash = "27f528a2dd226eaa1cc1"; | ||
/******/ var hotCurrentHash = "a7cdff6775c213013d7b"; | ||
/******/ var hotRequestTimeout = 10000; | ||
@@ -119,0 +119,0 @@ /******/ var hotCurrentModuleData = {}; |
23
index.js
@@ -175,10 +175,17 @@ const md5 = require('crypto-js/md5'); | ||
const cssBlocks = extractCSSBlocks({ doc }); | ||
cy.task('happoRegisterSnapshot', { | ||
html, | ||
cssBlocks, | ||
assetUrls, | ||
component, | ||
variant, | ||
targets: options.targets, | ||
}); | ||
// Even though cy.task can handle an object argument here, we serialize | ||
// the object ourselves to avoid running into performance issues with | ||
// large payloads. See https://github.com/cypress-io/code-coverage/issues/76 | ||
cy.task( | ||
'happoRegisterSnapshot', | ||
JSON.stringify({ | ||
html, | ||
cssBlocks, | ||
assetUrls, | ||
component, | ||
variant, | ||
targets: options.targets, | ||
}), | ||
); | ||
if (transformCleanup) { | ||
@@ -185,0 +192,0 @@ transformCleanup(); |
{ | ||
"name": "happo-cypress", | ||
"version": "1.9.3", | ||
"version": "1.9.4-rc.1", | ||
"description": "A Happo integration with Cypress.io", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
21
task.js
@@ -76,10 +76,15 @@ const nodeFetch = require('node-fetch'); | ||
module.exports = { | ||
happoRegisterSnapshot({ | ||
html, | ||
assetUrls, | ||
cssBlocks, | ||
component, | ||
variant: rawVariant, | ||
targets, | ||
}) { | ||
// Even though task automatically serialize and deserialize arguments, we | ||
// serialize the object ourselves to avoid running into performance issues | ||
// with large payloads. See | ||
// https://github.com/cypress-io/code-coverage/issues/76 | ||
happoRegisterSnapshot(jsonPayload) { | ||
const { | ||
html, | ||
assetUrls, | ||
cssBlocks, | ||
component, | ||
variant: rawVariant, | ||
targets, | ||
} = JSON.parse(jsonPayload); | ||
if (!happoConfig) { | ||
@@ -86,0 +91,0 @@ return null; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58346
9869854
177
2