Skip to content
Open
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
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
lib/
lib.commonjs/
lib.esm/

# Created by https://www.gitignore.io/api/node,linux,macos,windows,intellij
# Edit at https://www.gitignore.io/?templates=node,linux,macos,windows,intellij
Expand Down Expand Up @@ -224,4 +225,4 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

# End of https://www.gitignore.io/api/node,linux,macos,windows,intellij
# End of https://www.gitignore.io/api/node,linux,macos,windows,intellij
28 changes: 0 additions & 28 deletions esm/index.js

This file was deleted.

3 changes: 0 additions & 3 deletions esm/package.json

This file was deleted.

1 change: 1 addition & 0 deletions jest.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const config = {
'ts-jest',
{
useESM: true,
tsconfig: 'tsconfig.esm.json',
},
],
},
Expand Down
24 changes: 10 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,21 @@
"name": "ethr-did-resolver",
"version": "11.0.4",
"description": "Resolve DID documents for ethereum addresses and public keys",
"type": "commonjs",
"source": "./src/index.ts",
"main": "./lib/index.js",
"module": "./esm/index.js",
"types": "./lib/index.d.ts",
"main": "./lib.commonjs/index.js",
"types": "./lib.commonjs/index.d.ts",
"exports": {
".": {
"types": "./lib/index.d.ts",
"import": "./esm/index.js",
"require": "./lib/index.js"
"import": "./lib.esm/index.js",
"default": "./lib.commonjs/index.js"
}
},
"repository": {
"type": "git",
"url": "[email protected]:decentralized-identity/ethr-did-resolver.git"
},
"files": [
"lib",
"esm",
"src",
"LICENSE"
"lib.commonjs",
"lib.esm"
],
"author": "Pelle Braendgaard",
"contributors": [
Expand All @@ -49,8 +43,10 @@
"scripts": {
"test": "jest",
"test:ci": "jest --coverage",
"build": "tsc",
"clean": "rm -rf ./lib",
"build": "yarn run build:common && yarn run build:esm",
"build:common": "tsc --project tsconfig.common.json",
"build:esm": "tsc --project tsconfig.esm.json",
"clean": "rm -rf ./lib.commonjs ./lib.esm",
"format": "prettier --write \"src/**/*.[jt]s\"",
"lint": "eslint --ignore-pattern \"src/**/*.test.[jt]s\" \"src/**/*.[jt]s\"",
"prepublishOnly": "yarn test:ci && yarn format && yarn lint",
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json → tsconfig.common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"outDir": "lib",
"outDir": "lib.commonjs",
"strict": true,
"skipLibCheck": true,
"noImplicitThis": false,
Expand All @@ -22,7 +22,8 @@
"exclude": [
"**/__tests__/*",
"node_modules",
"lib"
"lib.commonjs",
"lib.esm"
],
"include": [
"src"
Expand Down
26 changes: 26 additions & 0 deletions tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "nodenext",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"outDir": "lib.esm",
"strict": true,
"skipLibCheck": true,
"noImplicitThis": false,
"moduleResolution": "nodenext",
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"esModuleInterop": true
},
"exclude": [
"**/__tests__/*",
"node_modules",
"lib.commonjs",
"lib.esm"
],
"include": [
"src"
]
}