Skip to content

Commit

Permalink
fix: distribute types in dist/types/
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Oct 12, 2022
1 parent ffc4e6f commit c6defdb
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 68 deletions.
66 changes: 33 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@
"npm": ">=7.0.0"
},
"type": "module",
"types": "./types/src/index.d.ts",
"types": "./dist/types/src/index.d.ts",
"typesVersions": {
"*": {
"*": [
"*",
"types/*",
"types/src/*",
"types/src/*/index"
"dist/types/*",
"dist/types/src/*",
"dist/types/src/*/index"
],
"src/*": [
"*",
"types/*",
"types/src/*",
"types/src/*/index"
"dist/types/*",
"dist/types/src/*",
"dist/types/src/*/index"
]
}
},
Expand All @@ -46,107 +46,107 @@
"src",
"test",
"tsconfig.json",
"types",
"dist/types",
"vendor",
"!**/*.tsbuildinfo",
"!test/ts-use/node_modules"
],
"exports": {
".": {
"types": "./types/src/index.d.ts",
"types": "./dist/types/src/index.d.ts",
"import": "./src/index.js"
},
"./bases/base10": {
"types": "./types/src/bases/base10.d.ts",
"types": "./dist/types/src/bases/base10.d.ts",
"import": "./src/bases/base10.js"
},
"./bases/base16": {
"types": "./types/src/bases/base16.d.ts",
"types": "./dist/types/src/bases/base16.d.ts",
"import": "./src/bases/base16.js"
},
"./bases/base2": {
"types": "./types/src/bases/base2.d.ts",
"types": "./dist/types/src/bases/base2.d.ts",
"import": "./src/bases/base2.js"
},
"./bases/base256emoji": {
"types": "./types/src/bases/base256emoji.d.ts",
"types": "./dist/types/src/bases/base256emoji.d.ts",
"import": "./src/bases/base256emoji.js"
},
"./bases/base32": {
"types": "./types/src/bases/base32.d.ts",
"types": "./dist/types/src/bases/base32.d.ts",
"import": "./src/bases/base32.js"
},
"./bases/base36": {
"types": "./types/src/bases/base36.d.ts",
"types": "./dist/types/src/bases/base36.d.ts",
"import": "./src/bases/base36.js"
},
"./bases/base58": {
"types": "./types/src/bases/base58.d.ts",
"types": "./dist/types/src/bases/base58.d.ts",
"import": "./src/bases/base58.js"
},
"./bases/base64": {
"types": "./types/src/bases/base64.d.ts",
"types": "./dist/types/src/bases/base64.d.ts",
"import": "./src/bases/base64.js"
},
"./bases/base8": {
"types": "./types/src/bases/base8.d.ts",
"types": "./dist/types/src/bases/base8.d.ts",
"import": "./src/bases/base8.js"
},
"./bases/identity": {
"types": "./types/src/bases/identity.d.ts",
"types": "./dist/types/src/bases/identity.d.ts",
"import": "./src/bases/identity.js"
},
"./basics": {
"types": "./types/src/basics.d.ts",
"types": "./dist/types/src/basics.d.ts",
"import": "./src/basics.js"
},
"./block": {
"types": "./types/src/block.d.ts",
"types": "./dist/types/src/block.d.ts",
"import": "./src/block.js"
},
"./bytes": {
"types": "./types/src/bytes.d.ts",
"types": "./dist/types/src/bytes.d.ts",
"import": "./src/bytes.js"
},
"./cid": {
"types": "./types/src/cid.d.ts",
"types": "./dist/types/src/cid.d.ts",
"import": "./src/cid.js"
},
"./codecs/json": {
"types": "./types/src/codecs/json.d.ts",
"types": "./dist/types/src/codecs/json.d.ts",
"import": "./src/codecs/json.js"
},
"./codecs/raw": {
"types": "./types/src/codecs/raw.d.ts",
"types": "./dist/types/src/codecs/raw.d.ts",
"import": "./src/codecs/raw.js"
},
"./hashes/digest": {
"types": "./types/src/hashes/digest.d.ts",
"types": "./dist/types/src/hashes/digest.d.ts",
"import": "./src/hashes/digest.js"
},
"./hashes/hasher": {
"types": "./types/src/hashes/hasher.d.ts",
"types": "./dist/types/src/hashes/hasher.d.ts",
"import": "./src/hashes/hasher.js"
},
"./hashes/identity": {
"types": "./types/src/hashes/identity.d.ts",
"types": "./dist/types/src/hashes/identity.d.ts",
"import": "./src/hashes/identity.js"
},
"./hashes/sha2": {
"types": "./types/src/hashes/sha2.d.ts",
"types": "./dist/types/src/hashes/sha2.d.ts",
"browser": "./src/hashes/sha2-browser.js",
"import": "./src/hashes/sha2.js"
},
"./interface": {
"types": "./types/src/interface.d.ts",
"types": "./dist/types/src/interface.d.ts",
"import": "./src/interface.js"
},
"./link": {
"types": "./types/src/link.d.ts",
"types": "./dist/types/src/link.d.ts",
"import": "./src/link.js"
},
"./traversal": {
"types": "./types/src/traversal.d.ts",
"types": "./dist/types/src/traversal.d.ts",
"import": "./src/traversal.js"
}
},
Expand Down Expand Up @@ -284,4 +284,4 @@
}
},
"main": "./src/index.js"
}
}
2 changes: 1 addition & 1 deletion test/test-varint.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* globals describe, it */

import { varint } from 'multiformats'
import { varint } from '../src/index.js'
import chai from 'chai'
import chaiAsPromised from 'chai-as-promised'

Expand Down
39 changes: 5 additions & 34 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,9 @@
{
"extends": "aegir/src/config/tsconfig.aegir.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": false,
"noImplicitAny": true,
"noImplicitThis": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strictFunctionTypes": false,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"strictBindCallApply": true,
"strict": true,
"alwaysStrict": true,
"esModuleInterop": true,
"target": "ES2020",
"moduleResolution": "node",
"declaration": true,
"declarationMap": true,
"outDir": "types",
"skipLibCheck": true,
"stripInternal": true,
"resolveJsonModule": true,
"outDir": "dist/types",
"emitDeclarationOnly": true,
"baseUrl": ".",
"composite": true,
"importsNotUsedAsValues": "preserve",
"paths": {
"multiformats": [
"./src/index.js"
Expand All @@ -45,11 +22,5 @@
"include": [
"src",
"test"
],
"exclude": [
"vendor",
"test/ts-use",
"node_modules"
],
"compileOnSave": false
}
]
}

0 comments on commit c6defdb

Please sign in to comment.