@deepakvishwakarma/cucumber-json-formatter

中文文档
0.0.3发布于 2022/10/29MITCommonJS零依赖近 30 天下载 2.7万

This module is wrapper around json-formatter. This module includes latest binary of cucumber/json-formatter(v19.0.0) for linux, mac and windows system.

原始使用文档
文档目录4 节
  1. Installation
  2. How to use
  3. Others uses
  4. Note:

cucumber-json-formatter

This module is wrapper around json-formatter. This module includes latest binary of cucumber/json-formatter(v19.0.0) for linux, mac and windows system.

Installation

npm install -g @deepakvishwakarma/cucumber-json-formatter

How to use

This module works same as cucumber/json-formatter. You can install module globally. The node.js script will detect the current platform and execute corresponding binary to generate output.

cat test/cucumber-messages.ndjson | cucumber-json-formatter > cucumber-report.json

Others uses

This module can also used as dependency. You can use the absolute path for main.js in config.

Example

{
  "cypress-cucumber-preprocessor": {
    "json": {
      "enabled": true,
      "output": "reports.json",
      "formatter": "./node_modules/@deepakvishwakarma/cucumber-json-formatter/lib/main.js"
    }
  }
}
  • Install globally
{
  "cypress-cucumber-preprocessor": {
    "json": {
      "enabled": true,
      "output": "reports.json",
      "formatter": "cucumber-json-formatter"
    }
  }
}

Note:

Paweł Kruszczyński found strenge issue related to settings in latest node. I have not test the issue. However, If you find such issue. You can also follow the setting that Paweł has mentioned as below.

Explanation: Maybe I have some new version of nodejs or something, but "formatter" value is called with spawn, from child_process package, so the JS script cannot be directly invoked, but with "node" and script as args, it works flawlessly, so if you can add it to your README, maybe someone struggles with same problem.

{
  "devDependencies": {
    "@badeball/cypress-cucumber-preprocessor": "^13.0.1",
    "@bahmutov/cypress-esbuild-preprocessor": "^2.1.4",
    "@deepakvishwakarma/cucumber-json-formatter": "^0.0.2",
    "cypress": "^10.10.0",
    "cypress-xpath": "^2.0.1",
    "esbuild": "^0.15.8"
  },
  "cypress-cucumber-preprocessor": {
    "nonGlobalStepDefinitions": true,
    "filterSpecs": true,
    "omitFiltered": true,
    "json": {
      "enabled": true,
      "output": "cypress/cucumber-json/log.json",
      "formatter": "node",
      "args": [
        "./node_modules/@deepakvishwakarma/cucumber-json-formatter/lib/main.js"
      ]
    }
  }
}

版本与发布记录

@deepakvishwakarma/cucumber-json-formatter 共发布 3 个版本,首次发布于 2022/06/30;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.0.3latest2022/10/294 年前
0.0.22022/08/254 年前
0.0.12022/06/304 年前

关于 @deepakvishwakarma/cucumber-json-formatter 的常见问题

@deepakvishwakarma/cucumber-json-formatter 是什么?

This module is wrapper around json-formatter. This module includes latest binary of cucumber/json-formatter(v19.0.0) for linux, mac and windows system.

如何安装 @deepakvishwakarma/cucumber-json-formatter?

在项目目录运行 npm install @deepakvishwakarma/cucumber-json-formatter,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 cucumber-json-formatter,可以用 npx cucumber-json-formatter 直接运行。

@deepakvishwakarma/cucumber-json-formatter 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/deepakvishwakarma__cucumber-json-formatter 是否存在。

@deepakvishwakarma/cucumber-json-formatter 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@deepakvishwakarma/cucumber-json-formatter 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=0.12.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@deepakvishwakarma/cucumber-json-formatter 可以商用吗?

@deepakvishwakarma/cucumber-json-formatter 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@deepakvishwakarma/cucumber-json-formatter 的下载量有多少?

根据 npm 官方下载统计,@deepakvishwakarma/cucumber-json-formatter 在 2026/10/12 – 2026/11/10 这 30 天内被下载 26,658 次,日均约 889 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@deepakvishwakarma/cucumber-json-formatter 还在维护吗?

最新版本 0.0.3 发布于 2022/10/29(4 年前);至今共发布 3 个版本,其中过去 12 个月发布了 0 个;首次发布于 2022/06/30。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。