Skip to content

Commit

Permalink
move to index.ts file
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed May 6, 2024
1 parent 2fc110f commit e480be9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
23 changes: 21 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,21 @@
"name": "@npm/types",
"version": "1.0.2",
"description": "Typescript definitions for npm registry content",
"types": "./src/index.d.ts",
"main": "",
"main": "./dist/commonjs/index.js",
"types": "./dist/commonjs/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
}
},
"scripts": {
"template-oss-apply": "template-oss-apply --force",
"lintfix": "npm run lint -- --fix",
Expand Down Expand Up @@ -48,5 +61,11 @@
"type": "module",
"tap": {
"typecheck": true
},
"tshy": {
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
}
}
File renamed without changes.
2 changes: 1 addition & 1 deletion test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { join, dirname } from 'path'
import { fileURLToPath } from 'url'
import t from 'tap'

import type * as npm from '../src/index.d.ts'
import type * as npm from '../src/index.ts'

t.test('types', async () => {
const dir = dirname(fileURLToPath(import.meta.url))
Expand Down

0 comments on commit e480be9

Please sign in to comment.