{"id":23069701,"url":"https://github.com/gherking/gpc-filter","last_synced_at":"2026-04-29T09:33:30.724Z","repository":{"id":42473725,"uuid":"458778387","full_name":"gherking/gpc-filter","owner":"gherking","description":"The Filter precompiler is responsible for including or excluding the elements of a feature file in the result, which match a cucumber-tag-expression (e.g., has a given tag, does not have a given tag)","archived":false,"fork":false,"pushed_at":"2024-06-13T04:29:46.000Z","size":695,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-09T00:34:05.407Z","etag":null,"topics":["cucumber","feature-file","gherkin","gherking","gpc","hacktoberfest","precompiler","typescript"],"latest_commit_sha":null,"homepage":"https://gherking.github.io/gpc-filter/","language":"Gherkin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gherking.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-13T10:38:58.000Z","updated_at":"2024-06-13T04:29:49.000Z","dependencies_parsed_at":"2023-02-08T10:31:59.093Z","dependency_job_id":"66a28972-580e-4a0b-b495-6fcbb427f18f","html_url":"https://github.com/gherking/gpc-filter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":"gherking/gpc-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gherking%2Fgpc-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gherking%2Fgpc-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gherking%2Fgpc-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gherking%2Fgpc-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gherking","download_url":"https://codeload.github.com/gherking/gpc-filter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246981136,"owners_count":20863825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cucumber","feature-file","gherkin","gherking","gpc","hacktoberfest","precompiler","typescript"],"created_at":"2024-12-16T06:16:43.018Z","updated_at":"2026-04-29T09:33:30.684Z","avatar_url":"https://github.com/gherking.png","language":"Gherkin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gpc-filter\n\n![Downloads](https://img.shields.io/npm/dw/gpc-filter?style=flat-square)\n![Version@npm](https://img.shields.io/npm/v/gpc-filter?label=version%40npm\u0026style=flat-square)\n![Version@git](https://img.shields.io/github/package-json/v/gherking/gpc-filter/master?label=version%40git\u0026style=flat-square)\n![CI](https://img.shields.io/github/workflow/status/gherking/gpc-filter/CI/master?label=ci\u0026style=flat-square)\n![Docs](https://img.shields.io/github/workflow/status/gherking/gpc-filter/Docs/master?label=docs\u0026style=flat-square)\n\nThe Filter precompiler is responsible for including or excluding the elements of a feature file in the result, which match a cucumber-tag-expression (e.g., has a given tag, does not have a given tag)\n\n## Usage\n\n```javascript\n'use strict';\nconst compiler = require('gherking');\nconst Filter = require('gpc-filter');\n\nlet ast = await compiler.load('./features/src/login.feature');\nast = compiler.process(\n    ast,\n    new Filter({\n        // config\n    })\n);\nawait compiler.save('./features/dist/login.feature', ast, {\n    lineBreak: '\\r\\n'\n});\n```\n\n```typescript\n'use strict';\nimport {load, process, save} from \"gherking\";\nimport Filter = require(\"gpc-filter\");\n\nlet ast = await load(\"./features/src/login.feature\");\nast = process(\n    ast,\n    new Filter({\n        // config\n    })\n);\nawait save('./features/dist/login.feature', ast, {\n    lineBreak: '\\r\\n'\n});\n```\n\n## Configuration\n\nThe precompiler accepts the following configuration:\n\n| Type | Description | Necessity | Default value |\n|:----:|:------------|:----------|:--------------|\n| `string` | Cucumber-tag-expression the filtering is based on | Optional | `not @wip` |\n\n## Example\nKeeping elements with @current tag\n\nnew Filter(\"@current\")\n\n```@wip\nScenario: One tag\n    Given A scenario with one tag is created\n    When this Scenario is compiled\n    Then something should happen\n\n@current\nScenario: Another tag\n    Given A scenario with another tag is created\n    When this Scenario is compiled\n    Then something should happen\n\nScenario Outline: Multiple tags in multiple examples\n    Given A scenarioOutline with tags in multiple examples is created\n    When this Scenario Outline is compiled\n    Then something should happen\n\n    Examples:\n        | multiple examples no tag column |\n        | multiple examples no tag row    | \n        \n    @wip    \n    Examples:\n        | multiple examples one tag column |\n        | multiple examples one tag row    |\n\n    @current\n    Examples:\n        | multiple examples other tag column |\n        | multiple examples other tag row    |\n```\n\nWill be processed into:\n\n```\n@current\nScenario: Another tag\n    Given A scenario with another tag is created\n    When this Scenario is compiled\n    Then something should happen\n\nScenario Outline: Multiple tags in multiple examples\n    Given A scenarioOutline with tags in multiple examples is created\n    When this Scenario Outline is compiled\n    Then something should happen\n\n    @current\n    Examples:\n        | multiple examples other tag column |\n        | multiple examples other tag row    |\n```\n\n## Other\n\nThis package uses [debug](https://www.npmjs.com/package/debug) for logging, use `gpc:filter` :\n\n```shell\nDEBUG=gpc:filter* gherking ...\n```\n\nFor detailed documentation see the [TypeDocs documentation](https://gherking.github.io/gpc-filter/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgherking%2Fgpc-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgherking%2Fgpc-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgherking%2Fgpc-filter/lists"}