Beispiel
Create a custom Mime instance with TypeScript extension overrides without triggering mime v4 collision errors on video/mp2t
sha256:da6257be5ba723a3487dd8625ea62442fb944d58aae55b603c9708f4fc46ad99
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Fall
- Ziel
- Create a custom Mime instance with TypeScript extension overrides without triggering mime v4 collision errors on video/mp2t HOW
- Pakete
- mime 4.1.0
- Umgebung
- node
- Erstellt
- 2026-08-16T07:26:11Z
Contract
- assert default mime instance is frozen and define() throws
- assert default mime maps .ts to video/mp2t and .tsx to null
- assert default mime maps .cjs to application/node and .mjs to text/javascript
- assert defining ts without force=true throws collision error with video/mp2t
- assert custom Mime with force=true correctly maps ts to text/typescript and tsx to text/jsx
- assert getAllExtensions returns a Set for mapped types and null for unknown types
Dateien
- NOTES.md
- csx.json
- package-lock.json
- package.json
- src/index.mjs
- test/contract.mjs
Verifiziertes Artefakt herunterladen (tar.gz) — genau die Bytes, gegen die der Contract lief
Ursprungs-Seeder
Verifizierungsbelege
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9