Socket
Socket
Sign inDemoInstall

@cucumber/cucumber

Package Overview
Dependencies
Maintainers
2
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cucumber/cucumber - npm Package Compare versions

Comparing version 9.0.1 to 9.1.0

lib/try_require.d.ts

24

lib/api/formatters.js

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

const path_1 = __importDefault(require("path"));
const mkdirp_1 = require("mkdirp");
async function initializeFormatters({ env, cwd, stdout, logger, onStreamError, eventBroadcaster, eventDataCollector, configuration, supportCodeLibrary, }) {

@@ -39,8 +40,19 @@ async function initializeFormatter(stream, target, type) {

formatters.push(await initializeFormatter(stdout, 'stdout', configuration.stdout));
for (const [target, type] of Object.entries(configuration.files)) {
const stream = fs_1.default.createWriteStream(null, {
fd: await fs_1.default.open(path_1.default.resolve(cwd, target), 'w'),
});
formatters.push(await initializeFormatter(stream, target, type));
}
const streamPromises = [];
Object.entries(configuration.files).forEach(([target, type]) => {
streamPromises.push((async (target, type) => {
const absoluteTarget = path_1.default.resolve(cwd, target);
try {
await (0, mkdirp_1.mkdirp)(path_1.default.dirname(absoluteTarget));
}
catch (error) {
logger.warn('Failed to ensure directory for formatter target exists');
}
const stream = fs_1.default.createWriteStream(null, {
fd: await fs_1.default.open(absoluteTarget, 'w'),
});
formatters.push(await initializeFormatter(stream, target, type));
})(target, type));
});
await Promise.all(streamPromises);
return async function () {

@@ -47,0 +59,0 @@ await Promise.all(formatters.map(async (f) => await f.finished()));

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

const url_1 = require("url");
const try_require_1 = __importDefault(require("../try_require"));
// eslint-disable-next-line @typescript-eslint/no-var-requires

@@ -18,4 +19,4 @@ const { importer } = require('../importer');

});
requireModules.map((module) => require(module));
requirePaths.map((path) => require(path));
requireModules.map((module) => (0, try_require_1.default)(module));
requirePaths.map((path) => (0, try_require_1.default)(path));
for (const path of importPaths) {

@@ -22,0 +23,0 @@ await importer((0, url_1.pathToFileURL)(path));

@@ -29,6 +29,9 @@ "use strict";

async function teardownEnvironment(environment) {
await fs_1.default.rmdir(environment.cwd, { recursive: true });
environment.stdout.end();
return new Promise((resolve) => {
fs_1.default.rm(environment.cwd, { recursive: true }, resolve);
}).then(() => {
environment.stdout.end();
});
}
exports.teardownEnvironment = teardownEnvironment;
//# sourceMappingURL=test_helpers.js.map

@@ -52,10 +52,10 @@ "use strict";

async loadCustomClass(type, descriptor, cwd) {
let normalised = descriptor;
let normalized = descriptor;
if (descriptor.startsWith('.')) {
normalised = (0, url_1.pathToFileURL)(path_1.default.resolve(cwd, descriptor));
normalized = (0, url_1.pathToFileURL)(path_1.default.resolve(cwd, descriptor));
}
else if (descriptor.startsWith('file://')) {
normalised = new URL(descriptor);
normalized = new URL(descriptor);
}
let CustomClass = await FormatterBuilder.loadFile(normalised);
let CustomClass = await FormatterBuilder.loadFile(normalized);
CustomClass = FormatterBuilder.resolveConstructor(CustomClass);

@@ -62,0 +62,0 @@ if ((0, value_checker_1.doesHaveValue)(CustomClass)) {

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

exports.default = JsonFormatter;
JsonFormatter.documentation = 'Prints the feature as JSON. The JSON format is in maintenance mode. Please consider using the message formatter with the standalone json-formatter (https://github.com/cucumber/cucumber/tree/master/json-formatter).';
JsonFormatter.documentation = 'Prints the feature as JSON. The JSON format is in maintenance mode. Please consider using the message formatter with the standalone json-formatter (https://github.com/cucumber/json-formatter).';
//# sourceMappingURL=json_formatter.js.map

@@ -5,3 +5,3 @@ import * as messages from '@cucumber/messages';

constructor(sourceTable: messages.PickleTable | string[][]);
hashes(): any[];
hashes(): Record<string, string>[];
raw(): string[][];

@@ -8,0 +8,0 @@ rows(): string[][];

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

const test_case_runner_1 = __importDefault(require("../test_case_runner"));
const try_require_1 = __importDefault(require("../../try_require"));
// eslint-disable-next-line @typescript-eslint/no-var-requires

@@ -40,4 +41,4 @@ const { importer } = require('../../importer');

});
requireModules.map((module) => require(module));
requirePaths.map((module) => require(module));
requireModules.map((module) => (0, try_require_1.default)(module));
requirePaths.map((module) => (0, try_require_1.default)(module));
for (const path of importPaths) {

@@ -44,0 +45,0 @@ await importer((0, url_1.pathToFileURL)(path));

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

export declare const version = "9.0.1";
export declare const version = "9.1.0";

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

// Generated by genversion.
exports.version = '9.0.1';
exports.version = '9.1.0';
//# sourceMappingURL=version.js.map

@@ -11,3 +11,3 @@ {

],
"version": "9.0.1",
"version": "9.1.0",
"homepage": "https://github.com/cucumber/cucumber-js",

@@ -236,2 +236,3 @@ "author": "Julien Biezemans <jb@jbpros.com>",

"luxon": "3.2.1",
"mkdirp": "^2.1.5",
"mz": "^2.7.0",

@@ -238,0 +239,0 @@ "progress": "^2.0.3",

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