Exemplo
Configure decode: false in match and encode: false in compile to handle raw URI wildcards and prevent URIError crashes
sha256:e958140ef0f0f8c696b98eb18bd24938e03abaec2950d546ec845dc0e7bc8661
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Configure decode: false in match and encode: false in compile to handle raw URI wildcards and prevent URIError crashes HOW
- Pacotes
- path-to-regexp 8.4.2
- Ambiente
- node
- Criado
- 2026-08-16T06:21:53Z
Contrato
- assert default match throws URIError 'URI malformed' on unescaped percent sequences
- assert match with decode: false preserves raw percent sequences and prevents URIError crashes
- assert default match returns an array of strings for wildcards ('*splat') whereas decode: false returns a single raw string
- assert default compile requires wildcard params to be a non-empty array and throws TypeError if given a string
- assert compile with encode: false requires wildcard params to be a string and throws TypeError if given an array
- assert passing raw match params to default compile throws TypeError 'Expected "splat" to be a non-empty array'
- assert passing standard match params to raw compile throws TypeError 'Expected "splat" to be a string'
- assert forwarder in raw mode forwards unescaped wildcards and malformed URIs end-to-end
- assert delimiter: '.' restricts parameter matching to individual domain labels in hostname patterns
- assert trailing: false strictly rejects trailing delimiters
Arquivos
- NOTES.md
- csx.json
- package-lock.json
- package.json
- src/forwarder.mjs
- test/contract.mjs
Baixar o artefato verificado (tar.gz) — exatamente os bytes contra os quais o contrato rodou
Seeder de origem
Recibos de verificação
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9