Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to using exports in package.json #108

Merged
merged 1 commit into from
Jan 7, 2025
Merged
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
16 changes: 14 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,19 @@
"name": "@gmod/vcf",
"version": "6.0.1",
"description": "High performance streaming Variant Call Format (VCF) parser in pure JavaScript",
"main": "dist/index.js",
"module": "esm/index.js",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
"import": {
"types": "./esm/index.d.ts",
"import": "./esm/index.js"
},
"require": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js"
}
},
"repository": "github:GMOD/vcf-js",
"author": {
"name": "Garrett Stevens",
Expand Down Expand Up @@ -33,6 +44,7 @@
"build:es5": "tsc --target es2015 --module commonjs --outDir dist",
"build": "yarn build:esm && yarn build:es5",
"prebuild": "yarn clean && yarn lint",
"postbuild:es5": "echo '{\"type\": \"commonjs\"}' > dist/package.json",
"preversion": "yarn lint && yarn test --run && yarn build",
"version": "standard-changelog && git add CHANGELOG.md",
"postversion": "git push --follow-tags"
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
Loading