Skip to content

Latest commit

 

History

History
671 lines (580 loc) · 92 KB

File metadata and controls

671 lines (580 loc) · 92 KB

Changelog

All notable changes to this project will be documented in this file.

The entries are generated by release-please from the Conventional Commits history, and this project adheres to Semantic Versioning.

2.5.0 (2026-10-03)

Features

  • area-codes: add getMunicipalitiesByAreaCode and getAreaCodeByMunicipalityCode (538f915)
  • cbo: add formatCbo (c26888c)
  • cest: add isValidCest, formatCest, parseCest and getCest (32e2aff)
  • cfop: add formatCfop (ae2a308)
  • cid10: add isValidCid10, getCid10, formatCid10 and parseCid10 (495a0a8)
  • isbn: add isValidIsbn, parseIsbn, getIsbnInfo and formatIsbn (1a50bcc)
  • license-plate: let isValidLicensePlate take the format to accept (3dec90d)
  • municipalities: add getCodeByMunicipalityName (c69befc)
  • nbs: add parseNbs (6fe8ca1)
  • nbs: add the pad option to formatNbs (dc85223)
  • processo-juridico: add getProcessoJuridicoInfo (3640237)
  • registro-profissional: accept the CRO number form of art. 115 of the CFO norms (e60fe5a)
  • states: add getStateCapital, getRegions and getStatesByRegion (6e62985)
  • voter-id: add getVoterIdInfo (16d51e8)

Bug Fixes

  • area-codes: read codes by their digits, as getAreaCodeInfo and getMunicipalityByCode do (feeabca)
  • boleto: accept only the código de moeda 9 and the 988 layout, and generate dated factors (035a04e)
  • boleto: accept the 44 digit cobranca bancaria barcode (7334fba)
  • boleto: ignore an invalid referenceDate in getBoletoInfo (07a5780)
  • boleto: read a number only when it is a non-negative safe integer (c67c1ba)
  • boleto: reject letters and stray characters in isValidBoleto (e1a9b4d)
  • caepf: read a number only when it is a non-negative safe integer (a99fe3d)
  • caepf: reject negative and fractional numbers (6fc9a90)
  • capitalize: keep every roman numeral up to XXXIX upper case, not just to XXIII (0c419d5)
  • capitalize: keep more prepositions and S.A in the right case, scan linearly (e936f51)
  • capitalize: write the UF of a "Cidade - UF" address in upper case (526a27a)
  • cbo: build the table from the MTE's current release, kept in the repository (cac077f)
  • cbo: read a number only when it is a non-negative safe integer (3ff37bb)
  • cei,cno: reject negative and fractional numbers (801f2f9)
  • cei: read a number only when it is a non-negative safe integer (88f5bda)
  • cep: read a number only when it is a non-negative safe integer (040b530)
  • cep: reject negative and fractional numbers (97969c0)
  • certidao: read a number only when it is a non-negative safe integer (90592af)
  • cest: read a number only when it is a non-negative safe integer (4ae9a5d)
  • cfop: read a number only when it is a non-negative safe integer (a590084)
  • cid10: add the U07 codes of the DATASUS SIM table the V2008 files lack (196985e)
  • classifications: read null options as none in isValidCst and isValidClassTrib (840604f)
  • cnae: read a number only when it is a non-negative safe integer (72a5de6)
  • cnh: read a number only when it is a non-negative safe integer (3215bb6)
  • cno: read a number only when it is a non-negative safe integer (d19ad28)
  • cnpj: never generate the número de ordem 0000, which is never assigned (6e0dee4)
  • cnpj: read a number only when it is a non-negative safe integer (b6563f3)
  • cns: read a number only when it is a non-negative safe integer (8592439)
  • cns: reject negative and fractional numbers (29b5a18)
  • convert-number-to-words: export NumberToWordsGender from the subpath entry (7fbabbf)
  • cpf: read a number only when it is a non-negative safe integer (e484f4e)
  • cst: accept the bare 2 digit Tabela B codes for tax icms (f2f1aff)
  • email: cap the address length and accept a punycode final label (aafdabd)
  • format: return an empty string when the value has no digits, even with pad (960d9bb)
  • generate-cep: draw the CEP inside the ranges the states own (54bb018)
  • get-address-info-by-cep: abort the providers that lost the race (df8b01d)
  • get-address-info-by-cep: read a provider CEP without its leading zero as the same CEP (b32ce6c)
  • get-address-info-by-cep: reject an address that contradicts the CEP (17f121f)
  • get-address-info-by-cep: validate like isValidCep, add timeoutMs and signal (c3f3a7f)
  • get-cep-info-by-address: validate the city and street before the request (9ff2296)
  • get-holidays: drop the AM and PR optional days no state norm declares (c919097)
  • get-holidays: list Acre's Dia do Católico and name both transfer exceptions (567978d)
  • get-holidays: list Alagoas' 20 November from 1995 to 2023 under Lei AL 5.724/1995 (f6dc883)
  • get-holidays: list Carnaval Monday as a ponto facultativo next to the Tuesday (1e4a799)
  • get-holidays: list each national holiday only in the years a federal norm declared it (2ef1027)
  • get-holidays: list the first round of the elections as a national holiday (c67a7ec)
  • get-holidays: start each state holiday in the first year its law applied (905cf9e)
  • get-holidays: start the AM 8 December ponto facultativo in 1999 and keep tables literal (2eb0d06)
  • get-holidays: type Rio de Janeiro's Carnaval Tuesday as a state holiday from 2009 (7c56a74)
  • holidays,bank-account: add Rio de Janeiro's Corpus Christi and accept 12 digit Caixa accounts (b62fb2d)
  • holidays: add Alagoas' Dia Estadual do Evangélico, 30 November, from 2014 (cc084f9)
  • holidays: add Amapá's Dia de Cabralzinho, 15 May, from 2018 (Lei AP nº 2.213/2017) (8f0412c)
  • holidays: add Amapá's Dia de São Tiago, 25 July, from 2012 to 2018 (fd2aafd)
  • holidays: add Maranhão's Dia Internacional da Mulher, 8 March, from 2027 (d437782)
  • holidays: follow the official texts gathered for the open holiday questions (41290e7)
  • holidays: list Amapá's 20 November from 2008, the first one after Lei AP nº 1.169/2007 (f39c2dc)
  • holidays: list Paraíba's 5 August from 1968, under Lei PB nº 3.489/1967 (d52be2b)
  • holidays: list PR 19/12 from 1963 to 2013, AM 08/12 and PE 06/03 of 2008-2009 as the norms say (1e3d8a2)
  • holidays: list Sergipe's 8 July from 1990 and its 24 October from 1989 to 1999 (46331ca)
  • holidays: make Corpus Christi a feriado estadual in Maranhão from 2024 (0093e06)
  • holidays: read stateCode like the other state utils and reject a non-state (9225f30)
  • iban: accept an alphanumeric ISPB and cite Resolução BCB nº 585/2026 (8c91543)
  • iban: read a number only when it is a non-negative safe integer (3f0a860)
  • ie: accept only the Alagoas tipo de empresa digits 0, 3, 5, 7 and 8 (b8b3c3f)
  • ie: accept only the Pará prefixes 15 and 75 (a942d8f)
  • ie: accept the 9 digit Mato Grosso registration (0a854c8)
  • ie: accept the Distrito Federal prefix 08 (a224dcd)
  • ie: accept the Goiás prefixes 20 to 29 (22eabd8)
  • ie: accept the old 14 digit Pernambuco CACEPE registration (8cf1255)
  • ie: accept the Pará prefixes 76 to 79 the SINTEGRA page lists (65f9947)
  • ie: require the 0 after the P of a São Paulo produtor rural registration (3f224a4)
  • ie: trim the state code, as the other utils that take a state do (b139996)
  • is-valid-phone: apply the character check to the string form of any value (a3e5511)
  • isbn: reject 979-0, the ISMN range, in isValidIsbn (a070dbb)
  • legal-nature: accept numbers and read the documented mask only (f27b8a4)
  • legal-nature: read a number only when it is a non-negative safe integer (6259d13)
  • legal-nature: reject negative and fractional numbers in getLegalNature (ee00e23)
  • license-plate: draw the fifth letter of a generated Mercosul plate from K to Z (345450e)
  • license-plate: reject characters outside the mask, in isValidRegistroProfissional too (6fce860)
  • ncm: read a number only when it is a non-negative safe integer (cf0aeb0)
  • nfe-key: accept the alphanumeric CNPJ in positions 7 to 18 of the access key (32ebc70)
  • nfe-key: read a number only when it is a non-negative safe integer (0de7184)
  • nfe-key: strip the XML Id prefix and reject wrong types in formatNfeKey (2702a11)
  • phone: accept a country code in isValidServicePhone (660f5f7)
  • phone: drop an explicit country code in every formatPhone mask (2f12922)
  • phone: generate landlines that stay valid after March 2027 (24083b7)
  • phone: read a number only when it is a non-negative safe integer (674e125)
  • phone: reject a mobile number starting with 6 under the default version too (70346ff)
  • phone: reject letters and other junk in phone validators (e5f6f12)
  • phone: strip an explicit +55 or 0055 at any length (625dd25)
  • pis: read a number only when it is a non-negative safe integer (ca2ea73)
  • pix-key: drop the & the current DICT API removed from the e-mail key pattern (1402462)
  • pix-key: reject a phone key that repeats the country code (d4a6207)
  • pix: accept a dynamic BR Code whose txid is filled, as §2.7 has the payer ignore it (e3dbf4c)
  • pix: check an e-mail key against the DICT pattern instead of isValidEmail (9722941)
  • pix: read a BR Code amount the way the EMV writes it (649c0ef)
  • pix: reject a BR Code object whose declared length is 00 (205db69)
  • pix: require the CRC as the last object and reject repeated IDs (f909834)
  • pix: require the merchant category code of a BR Code to be 4 digits (49bb373)
  • pix: require the payload format indicator to open the BR Code (3459ee5)
  • pix: validate a BR Code by the rules of the Pix manual, not only its structure (433c78b)
  • processo-juridico: read a number only when it is a non-negative safe integer (a22a8d2)
  • read-municipality-area-code: read the index by own key only (99f3c20)
  • renavam: reject negative and fractional numbers (82d8395)
  • service-phone: take the SUP codes from the current Anatel list and accept 112 (52a904f)
  • states: read the state code ignoring case in every state-taking util (764c484)
  • to-standard-schema: report a throwing validator as an issue (74484c1)
  • types: re-export option types from the cnpj and license plate subpaths (ee75fa0)
  • validators: read the mask of every identifier the way isValidCpf does (1f82b56)
  • vin: check a VIN by the Brazilian rule, the 49 CFR check digit on request (38a2194)
  • vin: test for ASCII letters before upper casing in isValidVin and isValidNfeKey (b46084c)
  • voter-id: read a number only when it is a non-negative safe integer (f26cd3e)
  • voter-id: read a voter id as at most 12 digits, its leading zeros droppable (d2523a1)

Performance

  • area-codes: index each state's DDDs once instead of searching per municipality (71acede)
  • bank-account: stop bundling the COMPE codes twice in isValidBankAccount (945cd52)
  • banks: ship the banks as three columns, sharing the code list with the bank account validator (7ee5add)
  • business-days: reuse one Date per walk in eachLocalDay (8d174bd)
  • capitalize: cache the default word sets (a06da80)
  • cbo: check a CBO code without bundling the occupation titles (c9574ae)
  • cest: check a CEST without bundling the goods descriptions (69829e8)
  • cfop: check a CFOP code without bundling the operation descriptions (3e51724)
  • cid10: keep the code shape out of the dataset module (6913360)
  • cid10: look a CID-10 description up by index instead of by code (e00f170)
  • cid10: pack the category table as base 36 distances and subcategory masks (7ef9a79)
  • cities: build the cached list of every city with toSorted (d3edbf7)
  • cnae: check a CNAE code without bundling the subclass descriptions (0cc45b8)
  • cpf: read the states of a fiscal region from a cache (2b0d22b)
  • data: ship description tables as one string that shares the start of neighbouring texts (762bb34)
  • get-address-info-by-cep: check the answered state against the CEP range alone (0df8ce1)
  • gtin: split the GS1 check digit out of mod10 (ad72bee)
  • holidays: read holiday days from the memo instead of rebuilding dates (bbb085d)
  • ibs-cbs: split the cClassTrib codes and descriptions out of the CST table module (70ac08f)
  • isbn: write each range end without its trailing 9s and drop the separator before the length (1a79497)
  • legal-nature: check a legal nature code without bundling the descriptions (fe26735)
  • legal-nature: move the legal nature codes out of the module that holds the descriptions (4ac2825)
  • lookups: find a code in a packed table by bisection (f7e8ac5)
  • lookups: index the lookup tables lazily instead of scanning them per call (e985eb4)
  • lookups: pack the code tables as base 36 differences (01de6f1)
  • municipalities: pack the municipality names the way the descriptions are packed (6102c37)
  • municipalities: ship names and codes packed and apart, so a lookup bundles what it reads (f211288)
  • municipality: iterate the state codes instead of the states table (bae90c3)
  • nbs: check an NBS code without bundling the descriptions (99429c3)
  • ncm: ship the NCM codes as one packed string (c1b4fee)
  • phone: stop the mobile and generic phone validators importing each other's types (611a7e7)
  • pix: check a Pix phone key with isValidMobilePhone directly (e5d6722)
  • pix: checksum with a lookup table and parse TLV without regexes (781914c)
  • root: drop the module-level statements every root import kept (e133d57)
  • service-item: check a subitem without bundling the service descriptions (cc9b6b7)
  • states: check a state code against the util's own table (c947d54)

Documentation

  • address-form: fix the guide links and clear aria-busy on an incomplete CEP (808a359)
  • area-code: check the DDD tables against the current Anatel CN table (f6aa2e6)
  • area-codes: say the codes are read by their digits (62f27ef)
  • bank-account: cite the CNAB 240 v11.0 notes that leave the check digit to each bank (a958800)
  • bank-account: say where the check digit rules come from (955df10)
  • boleto: cite Bradesco for the fator de vencimento base date (cfc7cbc)
  • boleto: cite Layout de Arrecadação v8 and drop an unverified FEBRABAN communiqué (5dd780c)
  • boleto: state that a 44 digit barcode starting with 8 is always read as arrecadação (9a35612)
  • bundle: refresh the two table figures that moved by 0.1 KB (e883225)
  • bundle: regenerate every size figure from the tree-shaking script (397a3ce)
  • bundle: update the size figures for the perf changes (2b562e0)
  • business-days: cite IN MTP nº 2/2021 from the DOU and say what art. 14, I governs (ed5bf26)
  • business-days: quote art. 6º of Resolução CMN nº 4.880/2020 in full (f2b109d)
  • business-days: stop calling the default count the calendar of banks and courts (f5199a7)
  • caepf,cei,cno: cite the official format sources and say the check digits have none (a4432bb)
  • cep: fix the CEP, state and capital notes in the docs and JSDoc (630fe51)
  • certidao: trace book codes 8 and 9 to Prov. CNJ 3/2009 and say the DV was never published (f862881)
  • cest: name isValidCest among the dataset-backed utils (eee3887)
  • cid10: name the COVID-19 codes the DATASUS V2008 tables do not have (e054b44)
  • class-trib: say why getClassTrib reads its table instead of calling isValidClassTrib (718d1d7)
  • classifications: state the mask-run rule for the masked codes and drop stale CBO history (58b39aa)
  • cnh: cite Res. CONTRAN 1.020/2025, which repeats the layout and leaves the 886/2021 in force (45c21b3)
  • cnh: read art. 4º § 1º as the rule of the Espelho's check digit (a6cd5e0)
  • cnpj: cite IN RFB 2.229/2024 and its retificação, and pin the misprinted FAQ example (6279241)
  • cnpj: say the alphanumeric set is A to Z and lower case is only normalized (30e5409)
  • cns: cite the DATASUS validation routines and say that no official source names prefix 5 (8cf60b3)
  • context7: list every dataset-backed subpath in the lazy-load rule (c585777)
  • context7: list isValidCid10 among the dataset-backed utils to lazy-load (6aa8f00)
  • contributors: add kwy404 for the RENAVAM number fix (bcb3e75)
  • correct the CEP ranges wording, the legal nature successors and the plate format alias (425bc30)
  • cpf: cite the DJE layout for the reserved numbers and say IN RFB 2.172/2024 sets no DV rule (1b28890)
  • datasets: name the official versions the NCM, LC 116 and municipality tables match (a603dfb)
  • document the number rule of the guarded utils, and fix two JSDoc lines (73cab3c)
  • documents: align the docs and examples of the document utilities with the code (b9a1ff4)
  • documents: cite the reachable e-Financeira manual and tidy the JSDoc (3deac83)
  • each-local-day: describe the scratch date of eachLocalDay (ee6f635)
  • fix dead citations and small wording slips in the docs (f193887)
  • format-phone,format-cnpj: say no official rule masks a phone or a CNPJ, citing ANPD and BCB (0386232)
  • format: cite the LDO rule behind obfuscate, and none for the CNPJ (a3e40fa)
  • format: say which phone masks keep 190 and to pad a numeric voter id before masking it (b19d0b7)
  • format: state the empty value rule under pad in every formatter (871607b)
  • get-boleto-info: state the exact window where an old factor flips to the next cycle (91963e5)
  • get-timezone-by-state: cite the decree that sets the zones instead of the daylight saving one (5061f0a)
  • get-timezone-by-state: cite the legal source and warn about multi-zone states (ea03a17)
  • gtin: cite the version of NT 2021.003 the linked PDF serves (1f41e60)
  • gtin: read the prefix from the GS1 tables, not from an unread SEFAZ table (186fa6b)
  • gtin: say that rejecting a GTIN of zeros is a rule of this library (5ee6402)
  • holidays: cite the DOU texts of the 2024 and 2025 federal calendars for Carnaval (cef0039)
  • holidays: list the holidays of 2024 in full and state what isHoliday counts (06f3ab4)
  • holidays: name the one-year moves of Piauí's and Tocantins' dates the table leaves out (97561c5)
  • holidays: record the state sources a 2026 official-source check left open or ruled out (743be48)
  • holidays: say Goiás' dates come from the servants' statute and 26/07 moves every year (0de1f8c)
  • holidays: say Santa Catarina's law leaves Saturday open and how the table reads it (4793913)
  • holidays: say why Acre's Friday shift is not applied: its decrees apply it unevenly (4b4516f)
  • ibs-cbs: cite the 23/06/2026 publication and the final SVRS address (7b6e898)
  • ibs-cbs: say that the cst option belongs to isValidClassTrib only (930bba5)
  • ie: cite Portaria SEFAZ-MT 59/2025 art. 8º § 1º for the 9 digit Mato Grosso form (75dcd32)
  • ie: cite Portaria SEFAZ-TO 676/2002 art. 3º and RICMS-TO art. 90 for Tocantins (7cd13ad)
  • ie: cite the three Goiás sources for the prefixes and say where they disagree (1653501)
  • ie: correct the RJ, TO and header notes, and add MG and MS notes (a39ceda)
  • ie: note the typo in the São Paulo produtor rural example of the SINTEGRA page (6c8dc4a)
  • ie: quote both branches of the Amazonas check digit rule as the library reads them (c46e1c2)
  • ie: say the Goiás check digit follows the 2012 roteiro, not the SINTEGRA page (0fc6bb1)
  • ie: say the Mato Grosso do Sul prefix 50 comes from SINTEGRA and SEFAZ-MS, not the norm (6d0d8e5)
  • ie: say the Roraima prefix 24 is read from the SINTEGRA examples (9af1673)
  • ie: say the SINTEGRA page does not fix the Distrito Federal prefix 07 (1698d4a)
  • keys: document the VIN separators, the progressive plate mask and quote the outputs (fc110aa)
  • keys: move the norm notes above @param in the processo and license plate JSDoc (3fa9fe1)
  • license-plate: name IsValidLicensePlateOptions in the isValidLicensePlate section (ebdecb0)
  • license-plate: name the Python format values and list the options type as public (7273f78)
  • nfe-key: note that the current CT-e schema gives the GTV-e tpEmis 1 and 2 only (18a9efa)
  • nfe-key: note the cNF rule for older keys and the unchecked issuer document (425fd98)
  • nfse-key: leave out the TSChaveNFSe letter window note (3d9f1a8)
  • nfse-key: say the alphanumeric key schema is the restricted-production bundle (c1fdf48)
  • nfse-key: say the key accepts the mask between its fields (13535f1)
  • nfse-key: state that no official rule sets the check digit of a key with letters (5d8dd32)
  • obfuscate: cite art. 163 of the LDO 2026 (Lei 15.321/2025) next to art. 149 of the LDO 2022 (1c6e54f)
  • passport: say the Polícia Federal FAQ is the only official source of the number layout (9806856)
  • payments: state the limits of the bank and currency checks (64b0d18)
  • phone: document the Anatel numbering rules scheduled for 1 March 2027 (6864ed3)
  • pis: say that no official document publishes the PIS/PASEP/NIS check digit weights (5f1ee50)
  • pix-key: drop the claim that 2.4.0 accepted an e-mail key with & (cb7786e)
  • pix-payload: say that no BCB manual sets the case of the CRC or of "BR" (bfd183b)
  • pix: describe pointOfInitiation and the random key by what the sources say (842d556)
  • processo-juridico: give the check digits' true range and the Anexo II example in J.TR form (843b3fd)
  • processo-juridico: place the check digit algorithm in Anexo VIII of Res. CNJ 65/2008 (3a68e6a)
  • renavam: cite Portaria DENATRAN 27/2013, the official source of the 11 digit code and its DV (fd5a8fe)
  • say the public API is checked against the last release (c0615fd)
  • schema: validate an object in the Hono route and name the vee-validate version (6380311)
  • service-phone: rest the 0800-like numbers on Resolução 749/2022 arts. 18 and 28 (930b5ae)
  • state the non-negative safe integer rule for numbers among the conventions (595664b)
  • state-city: build the guide on getMunicipalities and fix the A, B, A race (829700d)
  • suframa: say reading an 8 digit ISUF as a lost leading zero is this library's inference (ed23fb9)
  • suframa: say the NF-e MOC, not the SUFRAMA, is the source of the layout and check digit (21e2fe7)
  • types: keep the JSDoc of exported type keys to one line (d06354d)
  • update the bundle sizes after the tree-shaking work (c5b1b7d)
  • vin: stop attributing the I, O and Q exclusion to Res. CONTRAN 968/2022 (e6fcbb0)
  • voter-id: quote Res. TSE 23.659/2021 art. 36 literally and flag the SP/MG rule as unsourced (706da94)
  • words: describe the e, de and zero reais rules of the words functions (9c14768)

Data

  • data: add NCM 85181020, in force since 01/10/2026 (45f63c8)
  • data: update the embedded datasets (0840365)

2.4.0 (2026-09-17)

Features

  • area-code: add getAreaCodeInfo and getAreaCodesByState (748d9b8)
  • area-code: list every state a DDD serves (42, 47, 49 and 61 span two states) (e17e55a)
  • banks: add getBanks, getBankByCode and getBankByIspb; validate every Bacen bank account (ac2e84d)
  • boleto: support boleto de arrecadação and a referenceDate option (6bde780)
  • business-days: add isBusinessDay, addBusinessDays and differenceInBusinessDays (2b78c29)
  • business-days: follow the date-fns signatures and add subBusinessDays (688359f)
  • capitalize: keep company designations, roman numerals and state codes upper case by default (b6cb522)
  • cbo: add getCbo and isValidCbo (a59ffbd)
  • cei-cno-caepf: add isValidCei, formatCei, isValidCno, formatCno, isValidCaepf and formatCaepf (fda26b0)
  • cep: declare the unidade, estado and regiao fields of the ViaCEP response (811cb10)
  • certidao: add formatCertidao, isValidCertidao and parseCertidao (db5a602)
  • cfop: add getCfop and isValidCfop (853202b)
  • cnae,ncm: add the pad option to formatCnae and formatNcm (09408b1)
  • cnae: add formatCnae, getCnae and isValidCnae (2defadd)
  • cnpj: accept a branch number in generateCnpj (33e27be)
  • cnpj: add an obfuscate option to formatCnpj (65c118c)
  • cns: add isValidCns and formatCns (d054ce6)
  • cpf: add an obfuscate option to formatCpf (b6150ab)
  • credit-card: add isValidCreditCard (5c74b88)
  • cst: add isValidCst and isValidCsosn (536eec5)
  • currency-to-words: add convertCurrencyToWords (e24e446)
  • date-to-words: add convertDateToWords (b9b3a63)
  • export public types from the package root (6c67309)
  • format: mask the new formatters progressively like formatCpf and add pad to formatLegalNature (e676688)
  • iban: add formatIban, isValidIban and parseIban (31d3cb4)
  • legal-nature: add getLegalNature (1abbd8c)
  • legal-nature: expose the CONCLA category and add getLegalNaturesByCategory (defbdf8)
  • legal-nature: mark the eight retired codes as legacy with their current code (bb52cda)
  • municipality: add getMunicipalities and getMunicipalityByCode (offline IBGE data) (bed7b3f)
  • municipality: add overloaded return types to getMunicipality (2687731)
  • ncm: add formatNcm and isValidNcm (80f50d1)
  • nfe-key: accept every 44-digit DF-e model, the SVC-SP emission and the XML id prefixes (60fcb46)
  • nfe-key: accept the CT-e OS model 67 (fe9e30f)
  • nfe-key: add formatNfeKey, isValidNfeKey and parseNfeKey (d639a7a)
  • number-to-words: add convertNumberToWords (3a54ca0)
  • parse: add the mask-stripping parse function of every new family (c2dfcfa)
  • phone: accept 7 and 8 as mobile first digits under version 2 (af21b77)
  • phone: add isValidServicePhone and an accept/auto-mask upgrade to isValidPhone/formatPhone (82df2d9)
  • pix: add generatePixPayload, isValidPixPayload, isValidPixKey, parsePixPayload and parsePixKey (088861e)
  • registro-profissional: add isValidRegistroProfissional (263c6ff)
  • remove-accents: add removeAccents (18ff45e)
  • renavam: add generateRenavam (e46aa21)
  • states: add getStateByIbgeCode, getStateCodeByName, getStateNameByCode and getTimezoneByState (cc3ce8a)
  • states: tie the name, region and IBGE code of State to its code (d8326f0)
  • types: export the public types from the subpath entries (6f2b2e8)
  • vin: add isValidVin (9d6c762)
  • voter-id: support 13-digit São Paulo/Minas Gerais voter ids (9a3c4c4)

Bug Fixes

  • account for FEBRABAN'"'"'s 22/02/2025 fator de vencimento cycle reset. (6bde780)
  • adjust build error and update deps (40e0d85)
  • api: align the new utils with the library conventions (58d561b)
  • area-codes: return regionName and regionCode from getAreaCodeInfo, as State does (72856eb)
  • bank-account: accept only P for a Bradesco remainder of 1 and drop the extinct bank 746 (e476a92)
  • banks: follow the Bacen STR participants CSV to its new address and repoint dead sources (e5b8f9b)
  • boleto: keep the fator de vencimento inside the first cycle for an early reference date (ee2f02b)
  • business-days: return false from isBusinessDay for a non-string state code (03e5c11)
  • caepf: reject a repeated base like CEI and CNO do (f7eb3bb)
  • capitalize: keep the English possessive, single-letter designators and a pronoun me low (7565d3d)
  • capitalize: match user word lists case-insensitively and treat - and / as word boundaries (2280040)
  • capitalize: read a designation written around a slash as the designation after ME (4013eb3)
  • capitalize: write ME as the pronoun after a hyphen and before a word that is not a designation (27581f2)
  • cbo,cnae: pad a numeric code before validating it (fe32617)
  • cep: reject non-digit characters and drop the dead widenet provider (ddaadd0)
  • cep: reject with the typed errors for a bad providers list, a missing UF and a BrasilAPI 404 (02bd64f)
  • certidao: reject unknown book types and take the matrícula as a string (862a782)
  • certidao: require the registro civil service code 55 (b8ded2e)
  • cfop: drop the 23 group headings ending in 50 from the table (27d6664)
  • cities: return fresh copies and cache the combined list (7ddcea0)
  • cnpj: fall back to the numeric format in generateCnpj for any version other than 2 (ff2e3c9)
  • cnpj: select the alphanumeric rule only for version 2 (3712fcd)
  • cns,cei: accept a run of separators like the other document formats (fac0769)
  • cns: reject values that are not fifteen digits with optional separators (b2795cd)
  • cpf: use the Receita Federal região fiscal digit for MS and MT (273a143)
  • credit-card: accept only digits, spaces and hyphens and reject unsafe numbers (203ea57)
  • csosn: read only the bare 3 digits, the code has no printed grouping (214da0d)
  • cst: accept a separator only after the origin digit (40bc6a8)
  • currency-to-words: never round a sub-cent amount up to the next cent (1fbcc08)
  • currency: coerce a non-string value without throwing and read the cents from the decimals (c9f5a5e)
  • currency: parse real decimal/thousands separators and never format non-finite values (d205308)
  • email: cap the final domain label at 63 letters (aeef62c)
  • email: follow the WHATWG domain label grammar (c415639)
  • fetch: reject a retries count that is not an integer (2433f90)
  • generate alphanumeric CNPJs using the full A-Z alphabet (cd6b5f4)
  • generate alphanumeric CNPJs using the full A-Z alphabet (dff411e)
  • generateCnpj generates alphanumeric CNPJs using the full A-Z alphabet. (65c118c)
  • generateCpf retries when the generated base would be a repeated-digit sequence. (b6150ab)
  • generate: never throw on a prototype key or an object without toString (ca8d37d)
  • holidays: add the GO and DF state entries, end PB 26/07 in 2015 and reject hostile state codes (4645f54)
  • holidays: audit every state holiday against its law (e010b79)
  • holidays: cite each state holiday's law and name the Consciência Negra entries (d048c01)
  • holidays: isHoliday returns a boolean and never throws (f44d3a8)
  • holidays: move the Santa Catarina state holidays to Sunday per the 1999, 2004 and 2005 laws (89cb3d5)
  • iban: accept every account type letter of the SFN dictionary (8b65923)
  • iban: accept only the printed IBAN characters before sanitizing (dab1a9d)
  • iban: reject 0 as the holder indicator and apply the printed character set to format and parse (b688fd0)
  • ie: accept SP produtor rural and Tocantins 11-digit registrations (464bb6e)
  • isValidCpf accepts whitespace and the common separators between groups. (b6150ab)
  • legal-nature: replace the table with IBGE/CONCLA Natureza Jurídica 2021 (501f8ac)
  • legal-nature: strip the mask from a numeric code in getLegalNature (ff7eda6)
  • license-plate: fall back to the default format instead of using an unknown one verbatim (85d7a2e)
  • license-plate: strip mask characters and add Mercosul conversion (0d12b7d)
  • lookups: read a code the same way whether it comes as a string or a number (5ef48fd)
  • lookups: read includeLegacy for truthiness in getBanks and getLegalNatures (4613b6d)
  • municipalities: keep a state code that is not a string out of the own-property lookup (aec89a6)
  • municipality: resolve a numeric IBGE code in getMunicipality (df51b0a)
  • municipality: return a fresh pair and overload the return type on the lookup direction (033d6bd)
  • never throw on nullish input across the public API (481fb92)
  • nfe-key: accept only the assigned tpEmis values (e773022)
  • nfe-key: return an empty string from formatNfeKey for a value that is not a key (7d23f3a)
  • package: resolve the subpath declarations under moduleResolution node (1a27003)
  • passport: accept lowercase and mask characters (c5644ec)
  • passport: never throw on hostile objects and delegate formatPassport to parsePassport (f6b1df2)
  • phone: group a 10-digit landline under nanp and auto, never throw on an unknown mask (33ebc6e)
  • phone: read a bare 55 before a service number as the country code (5c34f47)
  • pis: accept alphanumeric-style separators and avoid repeated-digit bases (a8a78dc)
  • pix: keep the word boundary when a merchant name carries non-ASCII whitespace (31bbcb8)
  • pix: optional point of initiation, Pix Saque payloads and amounts that round-trip (6334f2f)
  • pix: read only mobile numbers as phone keys (828b7dc)
  • pix: reject a dynamic payload that carries a Pix Saque facilitator (c16f096)
  • pix: validate the key syntax, the location encoding and the payload pairing (e76f0c3)
  • processo-juridico: check the órgão and tribunal codes against Resolução CNJ 65/2008 (110bc12)
  • processo-juridico: use the CNJ Resolução 65/2008 dot-separated mask (431e2b4)
  • registro-profissional: follow the CFC and CFP registration layouts (5915813)
  • registro-profissional: read T and S as transfer suffixes after the CRC check digit (898186f)
  • reject negative, fractional and unsafe numbers in every code lookup (9cb73d0)
  • reject stray characters in isValidCnh, isValidVoterId and isValidProcessoJuridico (47a9db2)
  • renavam: reject repeated digits and stray characters (873065e)
  • resolve to null when code is not exactly 7 digits, without making a request. (2687731)
  • service-phone: drop 112 and 911 and add 141 per the Anatel Ato 43.151/2004 (cfc5ed0)
  • states: sort by pt-BR locale and return fresh, mutation-safe copies (e894d3c)
  • tables: validate the input of every code lookup the same way (7cdd6c8)
  • types: keep the @deprecated tag of the 2.3.0 aliases in the declarations (8cb0a29)
  • types: re-export the bank and state types from the eight subpaths that still lacked them (4d44ec4)
  • types: re-export the option and state types from the calendar and area code subpaths (edf4577)
  • types: roll up declaration entrypoint (40f2f18)
  • types: roll up declaration entrypoint (9524bae)
  • validators: accept the CPF mask separators at the printed groups of the NF-e key, IBAN and card (0e38f5e)
  • words: write the groups the way the official texts do, without commas, and spell 14 quatorze (6d47c14)

Performance

  • cache Intl.NumberFormat instances per (symbol, precision) pair. (d205308)
  • remove top-level allocations to restore tree-shaking (f84dc93)

Documentation

  • add llms.txt, community health files and refresh docs/changelog (076d914)
  • align the README, migration guide, changelog header and release config with the toolchain (6804088)
  • badges, a "why" section, the brand logo on the docs cover and search (7160341)
  • bring the v1 to v2 migration guide up to 2.4.0 (edbc98e)
  • business-days: name the includeOptional and stateCode options in the three walkers (3600310)
  • cep: say a CEP that starts with 0 has to be a string when given as a number (882cf95)
  • cite the acts and ajustes behind the fiscal and calendar utilities (1d3aeb0)
  • cite the annexes, decrees and manuals behind the identifiers and refresh the generated pages (01b7d32)
  • cite the primary source behind every validator and lookup (5247e22)
  • describe every option used in the examples and correct the remaining citations (e35bc22)
  • describe the acervo codes of art. 473, the arrecadação result and the legal-nature header (e935499)
  • document every public type and export the types the API refers to (79f36f7)
  • final pass before the release (6a33dea)
  • final pass on the docs, README, package metadata and GitHub files (8170689)
  • fix the examples and source citations the function-by-function review flagged (b79cef0)
  • group the utilities reference by family (bffdcd2)
  • municipalities: deprecate getCities and getMunicipality in favour of the municipality family (d313bcc)
  • put every cited URL on its own citation line and fill the thin sections (68bc902)
  • readme: state the Node.js 24 development requirement, apart from the library range (bb91be4)
  • refine the utilities pages and use npm run for the package scripts (d0dba0a)
  • site: move the docsify site to v5 (5dd2a97)
  • state the measured isValidCpf size and fix two comments in the words tables (e879cb4)
  • state the supported Node.js range instead of 20+ in the feature list (3ab1b44)
  • track the public API surface with API Extractor (ec56e4f)
  • words: cite the articles of Lei 14.822/2024 that carry each spelling (5c8a9d4)

Data

  • data: refresh CFOP from the consolidated annex, CBO from the official CSV and the CST table (602800c)
  • data: refresh the banks dataset from the current Bacen STR list (e0f4e2d)
  • data: refresh the NCM table with the codes in force (413b955)

2.3.0 (2026-04-08)

Features

  • implement some extra utilities (0b57240)

Bug Fixes

2.2.0 (2026-04-07)

Features

  • add Brazilian passport validation utilities (f4e7a90)

Bug Fixes

2.1.0 (2026-04-02)

Features

  • add missing parse functions (d76c36e)

2.0.1 (2026-03-30)

Bug Fixes

  • adds test cases using the official Receita Federal example (12.ABC.345/01DE-35) to prevent future regressions (272ece0)
  • corrects sanitization to accept the entire alphabet in alphanumeric CNPJ (009d9c0)

2.0.0 (2026-01-21)

Features

  • add all formatters (84ee6d2)
  • add covenio files (00602b7)
  • add docs to cities data (954e953)
  • add public api test (158778d)
  • include some more utils (8df157c)
  • include some more utils (c3cfe0d)
  • is-valid-pj: adds validation for processo juridico (12ac657)

Bug Fixes

1.0.0-rc.12 (2020-10-27)

Features

  • licenseplate: add a validador for brazilian and mercosul license plates (580d961), closes #112

1.0.0-rc.11 (2020-08-25)

Features

  • add formatCurrency() and parseCurrency() (b0e6994)

Bug Fixes

  • deps: upgrade devDependency to fix security warning (af7c353)
  • esm filename in package.json (32cd815)
  • let formatCurrency() more flexible and remove default param from parseCurrency() (8a9a437)
  • replace array.flat with reduce to support node 10 (a47a51a)
  • workflow: update workflow config (fb449c0)

1.0.0-rc.10 (2020-07-27)

Features

  • add function capitalize() (6d915fd)
  • atualiza cidades novas (348ab84)

Bug Fixes

  • exported the function "capitalize()" to the public API (a16d603)

1.0.0-rc.9 (2020-07-09)

Features

  • add functions isValidLandlinePhone() and isValidMobilePhone() (e8fe8bd)

Bug Fixes

1.0.0-rc.8 (2020-06-17)

Features

  • add utility getCities (ebb949d)
  • black lives matters (cce58d8)
  • change the way the cities are filtered. Add docs (7f4ca6d)

Bug Fixes

1.0.0-rc.7 (2020-05-05)

Features

  • utilities: create getStates method (57e3174), closes #82

1.0.0-rc.6 (2020-04-29)

Features

  • cpf, cnpj: format accepts numbers, optional fillZeroes behavior (5293721)
  • cpf, cnpj: using an options object instead of a parameter (db9ca46)

1.0.0-rc.5 (2020-04-23)

Features

  • add cep formatter (d8b0deb)
  • boleto: add boleto formatter (3cfd0b4)
  • CheckSum generator (7dd6978)
  • CNPJ: migrate CNPJ formatter (f34317d)
  • cpf generator, requested on #4 (5ffc2a1)
  • CPF: migrate CPF formatter (ef1ed2a)
  • CPF: migrate CPF generation (6463b40)
  • CPF: migrate isValidCPF (620f798)
  • inscricao-estadual validator (c4cf9ae)
  • refactoring: add TSDX and rewrite helpers (ebb2d18)
  • validators: Add validators package (38207ff)

Bug Fixes

  • adjust circular dependency (6f4f53b)
  • adjust pt-BR documentation (bb79fe6)
  • build: update tsconfig rootDir for tsdx 0.13 (17ea338)
  • function typo on usage section (06ca0ca)
  • jest: update jest to fix security warning (a3af687)
  • length typo (711ba8a)
  • release-it: update config filename (afc46a3)
  • remove unnecessary escape (74c53ed)
  • tooling: remote git-add from lint-staged (b000e8e)

Continuous Integration

  • 🎡 adjust travis config (0ec107f)
  • 🎡 rename travis file (25da01e)