Skip to content

Commit

Permalink
Convert to using exports in package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Dec 19, 2024
1 parent f0a42cb commit 9728dcf
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 115 deletions.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
"version": "6.0.1",
"description": "High performance streaming Variant Call Format (VCF) parser in pure JavaScript",
"main": "dist/index.js",
"module": "esm/index.js",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./dist/index.js"
}
},
"repository": "github:GMOD/vcf-js",
"author": {
"name": "Garrett Stevens",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ export function parseBreakend(breakendString: string): Breakend | undefined {
return undefined
}

export type { Variant } from './parse'
export type { Variant } from './parse.ts'

export { default } from './parse'
export { default } from './parse.ts'
4 changes: 2 additions & 2 deletions src/parse.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { parseMetaString } from './parseMetaString'
import vcfReserved from './vcfReserved'
import { parseMetaString } from './parseMetaString.ts'
import vcfReserved from './vcfReserved.ts'

function decodeURIComponentNoThrow(uri: string) {
try {
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"allowImportingTsExtensions": true,
"rewriteRelativeImportExtensions": true,
"esModuleInterop": true
}
}
Loading

0 comments on commit 9728dcf

Please sign in to comment.