@cucumber/html-formatter
Advanced tools
Comparing version 21.4.0 to 21.5.0
{ | ||
"name": "@cucumber/html-formatter", | ||
"version": "21.4.0", | ||
"version": "21.5.0", | ||
"description": "HTML formatter for Cucumber", | ||
@@ -29,3 +29,3 @@ "main": "dist/src/CucumberHtmlStream.js", | ||
"devDependencies": { | ||
"@babel/core": "7.24.7", | ||
"@babel/core": "7.25.2", | ||
"@cucumber/compatibility-kit": "^15.0.0", | ||
@@ -37,7 +37,7 @@ "@cucumber/gherkin": "28.0.0", | ||
"@cucumber/messages": "24.1.0", | ||
"@cucumber/query": "12.1.2", | ||
"@cucumber/react-components": "22.2.0", | ||
"@cucumber/query": "12.2.0", | ||
"@cucumber/react-components": "22.3.0", | ||
"@types/glob": "^8.0.0", | ||
"@types/mocha": "10.0.6", | ||
"@types/node": "20.14.7", | ||
"@types/mocha": "10.0.7", | ||
"@types/node": "20.14.14", | ||
"@types/react": "18.3.3", | ||
@@ -57,5 +57,5 @@ "@types/react-dom": "18.3.0", | ||
"eslint-plugin-simple-import-sort": "^12.0.0", | ||
"glob": "^10.0.0", | ||
"glob": "^11.0.0", | ||
"mini-css-extract-plugin": "2.9.0", | ||
"mocha": "10.4.0", | ||
"mocha": "10.7.0", | ||
"prettier": "^3.0.0", | ||
@@ -65,3 +65,3 @@ "puppeteer": "^22.0.0", | ||
"react-dom": "18.3.1", | ||
"sass": "1.77.6", | ||
"sass": "1.77.8", | ||
"sass-loader": "14.2.1", | ||
@@ -72,4 +72,4 @@ "shx": "^0.3.4", | ||
"ts-node": "10.9.2", | ||
"typescript": "5.5.2", | ||
"webpack": "5.92.1", | ||
"typescript": "5.5.4", | ||
"webpack": "5.93.0", | ||
"webpack-cli": "5.1.4" | ||
@@ -76,0 +76,0 @@ }, |
@@ -106,3 +106,3 @@ "use strict"; | ||
} | ||
this.push(JSON.stringify(envelope)); | ||
this.push(JSON.stringify(envelope).replace(/\//g, '\\/')); | ||
} | ||
@@ -109,0 +109,0 @@ } |
@@ -68,3 +68,20 @@ "use strict"; | ||
})); | ||
it('escapes forward slashes', () => __awaiter(void 0, void 0, void 0, function* () { | ||
const e1 = { | ||
gherkinDocument: { | ||
comments: [ | ||
{ | ||
location: { | ||
line: 0, | ||
column: 0, | ||
}, | ||
text: `</script><script>alert('Hello')</script>`, | ||
}, | ||
], | ||
}, | ||
}; | ||
const html = yield renderAsHtml(e1); | ||
(0, assert_1.default)(html.indexOf(`window.CUCUMBER_MESSAGES = [{"gherkinDocument":{"comments":[{"location":{"line":0,"column":0},"text":"<\\/script><script>alert('Hello')<\\/script>"}]}}];`) >= 0); | ||
})); | ||
}); | ||
//# sourceMappingURL=CucumberHtmlStreamTest.js.map |
{ | ||
"name": "@cucumber/html-formatter", | ||
"version": "21.4.0", | ||
"version": "21.5.0", | ||
"description": "HTML formatter for Cucumber", | ||
@@ -29,3 +29,3 @@ "main": "dist/src/CucumberHtmlStream.js", | ||
"devDependencies": { | ||
"@babel/core": "7.24.7", | ||
"@babel/core": "7.25.2", | ||
"@cucumber/compatibility-kit": "^15.0.0", | ||
@@ -37,7 +37,7 @@ "@cucumber/gherkin": "28.0.0", | ||
"@cucumber/messages": "24.1.0", | ||
"@cucumber/query": "12.1.2", | ||
"@cucumber/react-components": "22.2.0", | ||
"@cucumber/query": "12.2.0", | ||
"@cucumber/react-components": "22.3.0", | ||
"@types/glob": "^8.0.0", | ||
"@types/mocha": "10.0.6", | ||
"@types/node": "20.14.7", | ||
"@types/mocha": "10.0.7", | ||
"@types/node": "20.14.14", | ||
"@types/react": "18.3.3", | ||
@@ -57,5 +57,5 @@ "@types/react-dom": "18.3.0", | ||
"eslint-plugin-simple-import-sort": "^12.0.0", | ||
"glob": "^10.0.0", | ||
"glob": "^11.0.0", | ||
"mini-css-extract-plugin": "2.9.0", | ||
"mocha": "10.4.0", | ||
"mocha": "10.7.0", | ||
"prettier": "^3.0.0", | ||
@@ -65,3 +65,3 @@ "puppeteer": "^22.0.0", | ||
"react-dom": "18.3.1", | ||
"sass": "1.77.6", | ||
"sass": "1.77.8", | ||
"sass-loader": "14.2.1", | ||
@@ -72,4 +72,4 @@ "shx": "^0.3.4", | ||
"ts-node": "10.9.2", | ||
"typescript": "5.5.2", | ||
"webpack": "5.92.1", | ||
"typescript": "5.5.4", | ||
"webpack": "5.93.0", | ||
"webpack-cli": "5.1.4" | ||
@@ -76,0 +76,0 @@ }, |
@@ -118,4 +118,4 @@ import * as messages from '@cucumber/messages' | ||
} | ||
this.push(JSON.stringify(envelope)) | ||
this.push(JSON.stringify(envelope).replace(/\//g, '\\/')) | ||
} | ||
} |
@@ -76,2 +76,24 @@ import * as messages from '@cucumber/messages' | ||
}) | ||
it('escapes forward slashes', async () => { | ||
const e1: messages.Envelope = { | ||
gherkinDocument: { | ||
comments: [ | ||
{ | ||
location: { | ||
line: 0, | ||
column: 0, | ||
}, | ||
text: `</script><script>alert('Hello')</script>`, | ||
}, | ||
], | ||
}, | ||
} | ||
const html = await renderAsHtml(e1) | ||
assert( | ||
html.indexOf( | ||
`window.CUCUMBER_MESSAGES = [{"gherkinDocument":{"comments":[{"location":{"line":0,"column":0},"text":"<\\/script><script>alert('Hello')<\\/script>"}]}}];` | ||
) >= 0 | ||
) | ||
}) | ||
}) |
Sorry, the diff of this file is not supported yet
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
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
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
1004646
775