Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Bug report
description: Report something that isn't working as expected in @brazilian-utils/brazilian-utils
title: "fix: <short description>"
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug! Please fill in as much detail as possible so we can reproduce it quickly.

- type: input
id: version
attributes:
label: Package version
description: Which version of `@brazilian-utils/brazilian-utils` are you using?
placeholder: "2.3.0"
validations:
required: true

- type: dropdown
id: runtime
attributes:
label: Runtime
description: Where are you seeing this behavior?
multiple: true
options:
- Node.js
- Bun
- Deno
- Browser
- Other
validations:
required: true

- type: textarea
id: description
attributes:
label: What happened?
description: A clear and concise description of the bug.
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected behavior
description: What did you expect to happen instead?
validations:
required: true

- type: textarea
id: repro
attributes:
label: Minimal reproduction
description: |
A minimal code sample that reproduces the issue. Include the exact input value(s) used.
render: typescript
placeholder: |
import { isValidCpf } from "@brazilian-utils/brazilian-utils";

isValidCpf("..."); // expected true, got false
validations:
required: true

- type: textarea
id: context
attributes:
label: Additional context
description: Anything else that might help (stack trace, screenshots, links to an official spec, etc).
validations:
required: false

- type: checkboxes
id: checks
attributes:
label: Checklist
options:
- label: I searched existing issues and this hasn't been reported yet.
required: true
- label: I'm using a version listed in [SECURITY.md](../../SECURITY.md#supported-versions) as supported.
required: false
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Questions & discussions
url: https://github.com/brazilian-utils/javascript/discussions
about: Ask a question, share an idea, or discuss usage before opening an issue.
- name: Report a security vulnerability
url: https://github.com/brazilian-utils/javascript/security/advisories/new
about: Report security issues privately instead of opening a public issue. See SECURITY.md.
81 changes: 81 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: New utility / feature request
description: Propose a new Brazilian document/format utility, or an improvement to an existing one
title: "feat: <short description>"
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for proposing an idea! Most requests here are for a new utility covering a Brazilian
document, format or business rule (e.g. a new document validator/formatter/generator).
The more concrete detail you give, the faster this can be reviewed and implemented.

- type: dropdown
id: type
attributes:
label: What kind of request is this?
options:
- New utility (validate/format/generate/parse something)
- Improvement to an existing utility
- Other
validations:
required: true

- type: input
id: document
attributes:
label: Brazilian document / spec name
description: What Brazilian document, identifier or business rule is this about?
placeholder: "e.g. CNH (Carteira Nacional de Habilitação), Nota Fiscal, RENAVAM..."
validations:
required: true

- type: input
id: source
attributes:
label: Official source / specification link
description: Link to the official government page, law, or specification describing the format and validation/check-digit algorithm.
placeholder: "https://www.gov.br/..."
validations:
required: true

- type: textarea
id: api
attributes:
label: Expected API
description: |
What would the function signature(s) look like? Follow the existing naming convention
(`isValidX`, `formatX`, `generateX`, `parseX`) if applicable.
render: typescript
placeholder: |
isValidRenavam(value: string | number): boolean;
formatRenavam(value: string | number): string;
validations:
required: true

- type: textarea
id: examples
attributes:
label: Example input/output
description: A few concrete examples of valid/invalid input and the expected output.
render: typescript
validations:
required: true

- type: textarea
id: context
attributes:
label: Additional context
description: Anything else that helps explain the use case or edge cases (regional variants, check-digit algorithm details, etc).
validations:
required: false

- type: checkboxes
id: checks
attributes:
label: Checklist
options:
- label: I searched existing issues/discussions and this hasn't been requested yet.
required: true
- label: I understand this library has zero runtime dependencies and any implementation should follow that constraint.
required: true
22 changes: 22 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## What does this PR do?

<!-- Briefly describe the change and, if applicable, link the related issue (e.g. "Closes #123"). -->

## Checklist

- [ ] My commit/PR title follows [Conventional Commits](https://www.conventionalcommits.org/) (e.g. `feat: ...`, `fix: ...`, `docs: ...`).
- [ ] I added or updated tests covering this change (`npm test`).
- [ ] I updated the documentation if this adds/changes a utility, in **both**:
- [ ] `docs/utilities.md` (English)
- [ ] `docs/pt-br/utilities.md` (Portuguese)
- [ ] `npm check` passes locally (format, lint, types).
- [ ] This change does not introduce a breaking change, **or** I flagged it clearly below and it was discussed with maintainers beforehand.
- [ ] This change does not add any runtime dependency (this library is zero-runtime-dependency by design).

## Breaking change?

<!-- If this PR introduces a breaking change, describe it here and link the discussion/issue where it was agreed on. Otherwise, delete this section. -->

## Additional context

<!-- Anything else reviewers should know (screenshots, benchmarks, official spec links, etc). -->
3 changes: 3 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@ jobs:
- name: Run checks
run: vp check

- name: Check llms.txt/llms-full.txt are up to date
run: npm run build:llms && git diff --exit-code -- docs/llms.txt docs/llms-full.txt

- name: Audit dependencies
run: npx --yes audit-ci@7.1.0 --high --allowlist GHSA-jmr9-qjv8-65gv GHSA-7pqw-9j4j-h8q3
Loading
Loading