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

@cucumber/html-formatter

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cucumber/html-formatter - npm Package Compare versions

Comparing version 13.0.0 to 14.0.0

21

dist/main.js.LICENSE.txt

@@ -95,2 +95,17 @@ /*

/*! *****************************************************************************
Copyright (C) Microsoft. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/**

@@ -115,4 +130,4 @@ * elasticlunr - http://weixsong.github.io

/** @license React v16.13.1
* react-is.production.min.js
/** @license React v17.0.2
* react-dom.production.min.js
*

@@ -126,3 +141,3 @@ * Copyright (c) Facebook, Inc. and its affiliates.

/** @license React v17.0.2
* react-dom.production.min.js
* react-is.production.min.js
*

@@ -129,0 +144,0 @@ * Copyright (c) Facebook, Inc. and its affiliates.

46

dist/package.json
{
"name": "@cucumber/html-formatter",
"version": "13.0.0",
"version": "14.0.0",
"description": "HTML formatter for Cucumber",

@@ -21,27 +21,27 @@ "bin": {

"dependencies": {
"@cucumber/messages": "^15.0.0",
"commander": "^7.2.0",
"source-map-support": "^0.5.19"
"@cucumber/messages": "^16.0.0",
"commander": "7.2.0",
"source-map-support": "0.5.19"
},
"devDependencies": {
"@babel/core": "^7.13.14",
"@cucumber/gherkin-utils": "^4.0.0",
"@cucumber/query": "^9.0.2",
"@cucumber/react": "^13.0.0",
"@cucumber/gherkin-streams": "^1.0.0",
"@babel/core": "7.14.2",
"@cucumber/gherkin-streams": "^2.0.1",
"@cucumber/gherkin-utils": "^5.0.1",
"@cucumber/message-streams": "^1.0.0",
"@types/mocha": "^8.2.2",
"@types/node": "^14.14.37",
"@types/react": "^17.0.3",
"@types/react-dom": "^17.0.3",
"babel-loader": "^8.2.2",
"mocha": "^8.3.2",
"puppeteer": "^8.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"ts-loader": "^8.1.0",
"ts-node": "^9.1.1",
"typescript": "^4.2.3",
"webpack": "^5.30.0",
"webpack-cli": "^4.6.0"
"@cucumber/query": "^10.0.0",
"@cucumber/react": "^14.0.0",
"@types/mocha": "8.2.2",
"@types/node": "15.3.0",
"@types/react": "17.0.5",
"@types/react-dom": "17.0.5",
"babel-loader": "8.2.2",
"mocha": "8.4.0",
"puppeteer": "9.1.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"ts-loader": "9.1.2",
"ts-node": "9.1.1",
"typescript": "4.2.4",
"webpack": "5.37.0",
"webpack-cli": "4.7.0"
},

@@ -48,0 +48,0 @@ "bugs": {

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

Object.defineProperty(exports, "__esModule", { value: true });
const messages_1 = require("@cucumber/messages");
const message_streams_1 = require("@cucumber/message-streams");

@@ -14,7 +13,4 @@ const commander_1 = __importDefault(require("commander"));

commander_1.default.version(package_json_1.default.version);
commander_1.default.option('-f, --format <format>', 'output format: ndjson|protobuf', 'protobuf');
commander_1.default.parse(process.argv);
const toMessageStream = commander_1.default.opts().format === 'ndjson'
? new message_streams_1.NdjsonToMessageStream(messages_1.messages.Envelope.fromObject.bind(messages_1.messages.Envelope))
: new message_streams_1.BinaryToMessageStream(messages_1.messages.Envelope.decodeDelimited.bind(messages_1.messages.Envelope));
const toMessageStream = new message_streams_1.NdjsonToMessageStream();
stream_1.pipeline(process.stdin, toMessageStream, new CucumberHtmlStream_1.default(__dirname + '/../../dist/cucumber-react.css', __dirname + '/../../dist/main.js'), process.stdout, (err) => {

@@ -21,0 +17,0 @@ if (err) {

/// <reference types="node" />
import { Transform, TransformCallback } from 'stream';
import { messages } from '@cucumber/messages';
import * as messages from '@cucumber/messages';
export default class CucumberHtmlStream extends Transform {

@@ -5,0 +5,0 @@ private readonly cssPath;

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

}
this.push(JSON.stringify(envelope.toJSON()));
this.push(JSON.stringify(envelope));
}

@@ -108,0 +108,0 @@ }

@@ -1,7 +0,7 @@

import { messages } from '@cucumber/messages';
import * as messages from '@cucumber/messages';
declare global {
interface Window {
CUCUMBER_MESSAGES: messages.IEnvelope[];
CUCUMBER_MESSAGES: messages.Envelope[];
}
}
//# sourceMappingURL=main.d.ts.map

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

Object.defineProperty(exports, "__esModule", { value: true });
const messages_1 = require("@cucumber/messages");
const react_1 = require("@cucumber/react");

@@ -16,4 +15,3 @@ const gherkin_utils_1 = require("@cucumber/gherkin-utils");

const envelopesQuery = new react_1.EnvelopesQuery();
for (const envelopeObject of window.CUCUMBER_MESSAGES) {
const envelope = messages_1.messages.Envelope.fromObject(envelopeObject);
for (const envelope of window.CUCUMBER_MESSAGES) {
gherkinQuery.update(envelope);

@@ -20,0 +18,0 @@ cucumberQuery.update(envelope);

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

Object.defineProperty(exports, "__esModule", { value: true });
const messages_1 = require("@cucumber/messages");
const CucumberHtmlStream_1 = __importDefault(require("../src/CucumberHtmlStream"));

@@ -47,19 +46,26 @@ const stream_1 = require("stream");

it('writes one message to html', () => __awaiter(void 0, void 0, void 0, function* () {
const e1 = messages_1.messages.Envelope.create({
testRunStarted: messages_1.messages.TestRunStarted.create({}),
});
const e1 = {
testRunStarted: {
timestamp: { seconds: 0, nanos: 0 },
},
};
const html = yield renderAsHtml(e1);
assert_1.default(html.indexOf(`window.CUCUMBER_MESSAGES = [${JSON.stringify(e1.toJSON())}]`) >= 0);
assert_1.default(html.indexOf(`window.CUCUMBER_MESSAGES = [${JSON.stringify(e1)}]`) >= 0);
}));
it('writes two messages to html', () => __awaiter(void 0, void 0, void 0, function* () {
const e1 = messages_1.messages.Envelope.create({
testRunStarted: messages_1.messages.TestRunStarted.create({}),
});
const e2 = messages_1.messages.Envelope.create({
testRunFinished: messages_1.messages.TestRunFinished.create({}),
});
const e1 = {
testRunStarted: {
timestamp: { seconds: 0, nanos: 0 },
},
};
const e2 = {
testRunFinished: {
timestamp: { seconds: 0, nanos: 0 },
success: true,
},
};
const html = yield renderAsHtml(e1, e2);
assert_1.default(html.indexOf(`window.CUCUMBER_MESSAGES = [${JSON.stringify(e1.toJSON())},${JSON.stringify(e2.toJSON())}]`) >= 0);
assert_1.default(html.indexOf(`window.CUCUMBER_MESSAGES = [${JSON.stringify(e1)},${JSON.stringify(e2)}]`) >= 0);
}));
});
//# sourceMappingURL=CucumberHtmlStreamTest.js.map
{
"name": "@cucumber/html-formatter",
"version": "13.0.0",
"version": "14.0.0",
"description": "HTML formatter for Cucumber",

@@ -21,27 +21,27 @@ "bin": {

"dependencies": {
"@cucumber/messages": "^15.0.0",
"commander": "^7.2.0",
"source-map-support": "^0.5.19"
"@cucumber/messages": "^16.0.0",
"commander": "7.2.0",
"source-map-support": "0.5.19"
},
"devDependencies": {
"@babel/core": "^7.13.14",
"@cucumber/gherkin-utils": "^4.0.0",
"@cucumber/query": "^9.0.2",
"@cucumber/react": "^13.0.0",
"@cucumber/gherkin-streams": "^1.0.0",
"@babel/core": "7.14.2",
"@cucumber/gherkin-streams": "^2.0.1",
"@cucumber/gherkin-utils": "^5.0.1",
"@cucumber/message-streams": "^1.0.0",
"@types/mocha": "^8.2.2",
"@types/node": "^14.14.37",
"@types/react": "^17.0.3",
"@types/react-dom": "^17.0.3",
"babel-loader": "^8.2.2",
"mocha": "^8.3.2",
"puppeteer": "^8.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"ts-loader": "^8.1.0",
"ts-node": "^9.1.1",
"typescript": "^4.2.3",
"webpack": "^5.30.0",
"webpack-cli": "^4.6.0"
"@cucumber/query": "^10.0.0",
"@cucumber/react": "^14.0.0",
"@types/mocha": "8.2.2",
"@types/node": "15.3.0",
"@types/react": "17.0.5",
"@types/react-dom": "17.0.5",
"babel-loader": "8.2.2",
"mocha": "8.4.0",
"puppeteer": "9.1.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"ts-loader": "9.1.2",
"ts-node": "9.1.1",
"typescript": "4.2.4",
"webpack": "5.37.0",
"webpack-cli": "4.7.0"
},

@@ -48,0 +48,0 @@ "bugs": {

@@ -1,3 +0,2 @@

import { messages } from '@cucumber/messages'
import { BinaryToMessageStream, NdjsonToMessageStream } from '@cucumber/message-streams'
import { NdjsonToMessageStream } from '@cucumber/message-streams'
import program from 'commander'

@@ -9,10 +8,5 @@ import p from '../package.json'

program.version(p.version)
program.option('-f, --format <format>', 'output format: ndjson|protobuf', 'protobuf')
program.parse(process.argv)
const toMessageStream =
program.opts().format === 'ndjson'
? new NdjsonToMessageStream(messages.Envelope.fromObject.bind(messages.Envelope))
: new BinaryToMessageStream(messages.Envelope.decodeDelimited.bind(messages.Envelope))
const toMessageStream = new NdjsonToMessageStream()
pipeline(

@@ -19,0 +13,0 @@ process.stdin,

import fs from 'fs'
import { Readable, Transform, TransformCallback } from 'stream'
import { messages } from '@cucumber/messages'
import * as messages from '@cucumber/messages'

@@ -107,4 +107,4 @@ export default class CucumberHtmlStream extends Transform {

}
this.push(JSON.stringify(envelope.toJSON()))
this.push(JSON.stringify(envelope))
}
}

@@ -1,2 +0,2 @@

import { messages } from '@cucumber/messages'
import * as messages from '@cucumber/messages'
import CucumberHtmlStream from '../src/CucumberHtmlStream'

@@ -6,3 +6,3 @@ import { Writable } from 'stream'

async function renderAsHtml(...envelopes: messages.IEnvelope[]): Promise<string> {
async function renderAsHtml(...envelopes: messages.Envelope[]): Promise<string> {
return new Promise((resolve, reject) => {

@@ -38,23 +38,28 @@ let html = ''

it('writes one message to html', async () => {
const e1 = messages.Envelope.create({
testRunStarted: messages.TestRunStarted.create({}),
})
const e1: messages.Envelope = {
testRunStarted: {
timestamp: { seconds: 0, nanos: 0 },
},
}
const html = await renderAsHtml(e1)
assert(html.indexOf(`window.CUCUMBER_MESSAGES = [${JSON.stringify(e1.toJSON())}]`) >= 0)
assert(html.indexOf(`window.CUCUMBER_MESSAGES = [${JSON.stringify(e1)}]`) >= 0)
})
it('writes two messages to html', async () => {
const e1 = messages.Envelope.create({
testRunStarted: messages.TestRunStarted.create({}),
})
const e2 = messages.Envelope.create({
testRunFinished: messages.TestRunFinished.create({}),
})
const e1: messages.Envelope = {
testRunStarted: {
timestamp: { seconds: 0, nanos: 0 },
},
}
const e2: messages.Envelope = {
testRunFinished: {
timestamp: { seconds: 0, nanos: 0 },
success: true,
},
}
const html = await renderAsHtml(e1, e2)
assert(
html.indexOf(
`window.CUCUMBER_MESSAGES = [${JSON.stringify(e1.toJSON())},${JSON.stringify(e2.toJSON())}]`
) >= 0
html.indexOf(`window.CUCUMBER_MESSAGES = [${JSON.stringify(e1)},${JSON.stringify(e2)}]`) >= 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

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

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

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