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

fiscalspec

v0.2.0

Published

Fiscal CI — a especificação fiscal que roda no seu pipeline. Valida XMLs de NF-e/NFC-e contra rulesets fiscais versionados (NT 2025.002-RTC / IBS / CBS), com código provável de rejeição e rastreabilidade até a fonte oficial.

Readme

fiscalspec

Fiscal CI — a especificação fiscal que roda no seu pipeline.

Valida XMLs de NF-e/NFC-e contra um ruleset fiscal versionado (regras de validação da NT 2025.002-RTC — Reforma Tributária, IBS/CBS) e diz, antes da homologação, qual regra quebra, com o código provável de rejeição e link para o trecho da fonte oficial.

  • Processamento local: o conteúdo dos seus XMLs nunca sai da sua máquina, e nada é transmitido por padrão. Duas coisas usam rede e são separadas disso: o download do ruleset na primeira execução (exige chave, fica em cache local) e a telemetria de uso, que é opt-in (--telemetry) e envia só contagens agregadas.
  • Ruleset imutável e fixável: [email protected] produz o mesmo resultado hoje e em seis meses.
  • Toda violação vem com ruleId, código de rejeição, versão da NT, vigência e página da fonte — nada sem evidência.
  • O default é avisar, não quebrar o build: só regra revisada (confidence: reviewed) pode falhar o pipeline, e só com --fail-on reviewed.

Uso

npx fiscalspec check "notas/*.xml" --ruleset [email protected]

Saídas para CI:

npx fiscalspec check "notas/*.xml" --ruleset [email protected] --format junit --output resultado.xml
npx fiscalspec check "notas/*.xml" --ruleset [email protected] --format sarif --output resultado.sarif

Exit codes: 0 ok (mesmo com violações) · 1 só com --fail-on reviewed · 2 erro de uso.

O que ele responde

| Pergunta | Campo no relatório | |---|---| | Qual regra quebrou? | ruleId (ex.: VC02-14) | | Qual rejeição a SEFAZ deve dar? | rejectionCode (ex.: 321) | | Em qual versão da norma? | provenance.ntVersion, vigenciaInicio | | Onde está escrito? | provenance.source (documento + página) | | Dá para confiar? | confidence (extracted avisa · reviewed pode bloquear) e class (deterministic-offline · needs-external-data · sefaz-observable-only) |

Regra que depende de dado externo (cadastro SEFAZ, tabela não publicada) reporta cannot-decide — o relatório declara o limite em vez de chutar.

Uso programático

import { loadRuleset, evaluateXml, buildReport } from "@fiscalspec/core";

Ver @fiscalspec/core.

Escopo desta versão

NF-e/NFC-e (modelos 55/65), regras de validação da NT 2025.002-RTC v1.50. Requer Node.js 24 LTS.

Licença

Source-available, uso permitido inclusive comercial; redistribuição e derivação do corpus proibidas — ver LICENSE.md.


https://fiscalspec.com.br