npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@focused-spec/format-gherkin

v0.10.1

Published

Gherkin format adapter for focused-spec

Readme

@focused-spec/format-gherkin

Structural Gherkin parser for focused-spec Format API 2, using the Cucumber Gherkin parser. Requires Node.js 22.16.0+ and a project-local focused-spec installation. It exposes Scenario/Scenario Outline items and identities; it does not read evidence, implement a catalog binder, or execute Cucumber steps. No parser-specific options are required.

Registry composition

Install the selected parser, evidence adapter, and runner explicitly:

npm install --save-dev focused-spec @focused-spec/format-gherkin @focused-spec/format-registry @focused-spec/runner-go

.focused-spec/config.yaml:

version: 5
specifications:
  formats:
    gherkin:
      package: '@focused-spec/format-registry'
      options:
        parser: { package: '@focused-spec/format-gherkin' }
  documents:
    - { match: 'features/**/*.feature', scope: current, format: gherkin }
runners:
  go: { package: '@focused-spec/runner-go' }

features/auth.feature:

Feature: Account authentication
  @focused.auth-login
  Scenario: Blocked account submits valid credentials
    When a blocked account submits valid credentials
    Then authentication is rejected

.focused-spec/evidence.yaml:

scopes:
  current:
    auth-login:
      evidence:
        - planned:go::./auth::TestBlockedAccount

The registry adapter owns that evidence file and its default location. Read its installed README.md for explicit source lists, sharding, source safety, and external bindings. Read the selected runner's installed README.md for selectors. The planned reference above permits non-strict validation while the exact test is absent; it cannot execute. Once the real test exists, remove planned:, validate strictly, and run the evidence.

Focused tags

Attach exactly one @focused.<id> tag to one Scenario or Scenario Outline, including scenarios nested under a Rule. Focused tags do not bind a Feature, Rule, Background, or Examples; invalid placement, multiple focused tags, and malformed Gherkin fail validation.

The suffix is an exact opaque focused ID containing non-whitespace and no control characters, subject to Gherkin's tag syntax. Preserve case and spelling; do not normalize it to a dotted/lowercase convention. An outline is one native item, not an automatic evidence enrollment for each examples row. A marked item must receive exactly one evidence enrollment from a configured binder.

Native IDs for external binding

A scenario's own non-focused tags expose native IDs without the leading @: for example, @RULE-7 exposes RULE-7. These are local declarations, not inherited feature/rule tags or generated names. To bind an unmarked generated item, configure registry source.path and source.nativeId against one such stable native ID. It must resolve uniquely in the selected document and scope. Without an explicit stable tag, do not guess from the scenario name or line.

Core preserves native source locations and owns scope-local uniqueness and execution. Valid Gherkin or a successfully parsed tag does not prove that its outcome has executable evidence.

Verification

Use the same project-local CLI that served the workflow:

npx focused-spec validate --syntax-only
npx focused-spec validate

After replacing every selected planned reference with an existing exact test:

npx focused-spec validate --strict
npx focused-spec run --scenario auth-login