Skip to content

Commit 3270f34

Browse files
authored
Merge pull request #184 from hyperweb-io/apply-tsc-esm-fix
apply tsc esm fix to add js ext to import paths
2 parents bee7973 + cc45c67 commit 3270f34

File tree

20 files changed

+160
-48
lines changed

20 files changed

+160
-48
lines changed

libs/cosmos-types/package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@
3333
"copy": "copyfiles -f ../../LICENSE-MIT ../../LICENSE-Apache README.md package.json dist",
3434
"clean": "rimraf dist/**",
3535
"prepare": "npm run build",
36-
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy",
36+
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run fix-esm; npm run copy",
3737
"build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy",
38-
"lint": "eslint . --fix"
38+
"lint": "eslint . --fix",
39+
"fix-esm": "tsc-esm-fix --target=dist/esm"
3940
},
4041
"dependencies": {
4142
"@interchainjs/math": "1.17.4",
@@ -47,5 +48,8 @@
4748
"blockchain",
4849
"query"
4950
],
50-
"gitHead": "25cc22e03504ea6164707192deb0f3c6f572fad3"
51+
"gitHead": "25cc22e03504ea6164707192deb0f3c6f572fad3",
52+
"devDependencies": {
53+
"tsc-esm-fix": "^3.1.2"
54+
}
5155
}

libs/injective-react/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@
3232
"scripts": {
3333
"copy": "copyfiles -f ../../LICENSE-MIT ../../LICENSE-Apache README.md package.json dist",
3434
"clean": "rimraf dist/**",
35-
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy",
35+
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run fix-esm; npm run copy",
3636
"build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy",
3737
"lint": "eslint . --fix",
38-
"prepare": "npm run build"
38+
"prepare": "npm run build",
39+
"fix-esm": "tsc-esm-fix --target=dist/esm"
3940
},
4041
"dependencies": {
4142
"@interchainjs/cosmos": "1.17.4",
@@ -49,7 +50,8 @@
4950
"decimal.js": "^10.4.3"
5051
},
5152
"devDependencies": {
52-
"@tanstack/react-query": "4.29.1"
53+
"@tanstack/react-query": "4.29.1",
54+
"tsc-esm-fix": "^3.1.2"
5355
},
5456
"peerDependencies": {
5557
"@tanstack/react-query": "4.29.1"

libs/injective-vue/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@
3232
"scripts": {
3333
"copy": "copyfiles -f ../../LICENSE-MIT ../../LICENSE-Apache README.md package.json dist",
3434
"clean": "rimraf dist/**",
35-
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy",
35+
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run fix-esm; npm run copy",
3636
"build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy",
3737
"lint": "eslint . --fix",
38-
"prepare": "npm run build"
38+
"prepare": "npm run build",
39+
"fix-esm": "tsc-esm-fix --target=dist/esm"
3940
},
4041
"dependencies": {
4142
"@interchainjs/cosmos": "1.17.4",
@@ -50,6 +51,7 @@
5051
},
5152
"devDependencies": {
5253
"@tanstack/vue-query": "^5.62.7",
54+
"tsc-esm-fix": "^3.1.2",
5355
"vue": "^3.5.13"
5456
},
5557
"peerDependencies": {

libs/injectivejs/package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@
3232
"scripts": {
3333
"copy": "copyfiles -f ../../LICENSE-MIT ../../LICENSE-Apache README.md package.json dist",
3434
"clean": "rimraf dist/**",
35-
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy",
35+
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run fix-esm; npm run copy",
3636
"build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy",
3737
"lint": "eslint . --fix",
38-
"prepare": "npm run build"
38+
"prepare": "npm run build",
39+
"fix-esm": "tsc-esm-fix --target=dist/esm"
3940
},
4041
"dependencies": {
4142
"@interchainjs/cosmos": "1.17.4",
@@ -55,5 +56,8 @@
5556
"cosmjs",
5657
"wallet"
5758
],
58-
"gitHead": "25cc22e03504ea6164707192deb0f3c6f572fad3"
59+
"gitHead": "25cc22e03504ea6164707192deb0f3c6f572fad3",
60+
"devDependencies": {
61+
"tsc-esm-fix": "^3.1.2"
62+
}
5963
}

libs/interchain-react/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@
3232
"scripts": {
3333
"copy": "copyfiles -f ../../LICENSE-MIT ../../LICENSE-Apache README.md package.json dist",
3434
"clean": "rimraf dist/**",
35-
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy",
35+
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run fix-esm; npm run copy",
3636
"build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy",
3737
"lint": "eslint . --fix",
38-
"prepare": "npm run build"
38+
"prepare": "npm run build",
39+
"fix-esm": "tsc-esm-fix --target=dist/esm"
3940
},
4041
"dependencies": {
4142
"@interchainjs/cosmos": "1.17.4",
@@ -49,7 +50,8 @@
4950
"decimal.js": "^10.4.3"
5051
},
5152
"devDependencies": {
52-
"@tanstack/react-query": "4.29.1"
53+
"@tanstack/react-query": "4.29.1",
54+
"tsc-esm-fix": "^3.1.2"
5355
},
5456
"peerDependencies": {
5557
"@tanstack/react-query": "4.29.1"

libs/interchain-vue/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@
3232
"scripts": {
3333
"copy": "copyfiles -f ../../LICENSE-MIT ../../LICENSE-Apache README.md package.json dist",
3434
"clean": "rimraf dist/**",
35-
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy",
35+
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run fix-esm; npm run copy",
3636
"build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy",
3737
"lint": "eslint . --fix",
38-
"prepare": "npm run build"
38+
"prepare": "npm run build",
39+
"fix-esm": "tsc-esm-fix --target=dist/esm"
3940
},
4041
"dependencies": {
4142
"@interchainjs/cosmos": "1.17.4",
@@ -50,6 +51,7 @@
5051
},
5152
"devDependencies": {
5253
"@tanstack/vue-query": "^5.62.7",
54+
"tsc-esm-fix": "^3.1.2",
5355
"vue": "^3.5.13"
5456
},
5557
"peerDependencies": {

libs/interchainjs/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"scripts": {
3333
"copy": "copyfiles -f ../../LICENSE-MIT ../../LICENSE-Apache README.md package.json dist",
3434
"clean": "rimraf dist/**",
35-
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy",
35+
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run fix-esm; npm run copy",
3636
"build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy",
3737
"lint": "eslint . --fix",
3838
"starship": "starship --config ./starship/configs/config.yaml",
@@ -42,7 +42,8 @@
4242
"starship:watch": "jest --watch --config ./jest.starship.config.js",
4343
"starship:all": "yarn starship start",
4444
"starship:clean": "yarn starship stop",
45-
"prepare": "npm run build"
45+
"prepare": "npm run build",
46+
"fix-esm": "tsc-esm-fix --target=dist/esm"
4647
},
4748
"dependencies": {
4849
"@interchainjs/cosmos": "1.17.4",
@@ -60,7 +61,8 @@
6061
"devDependencies": {
6162
"@chain-registry/client": "1.18.1",
6263
"@chain-registry/types": "^2.0.42",
63-
"starshipjs": "^2.4.0"
64+
"starshipjs": "^2.4.0",
65+
"tsc-esm-fix": "^3.1.2"
6466
},
6567
"keywords": [
6668
"cosmos",

networks/cosmos/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@
3333
"copy": "copyfiles -f ../../LICENSE-MIT ../../LICENSE-Apache README.md package.json dist",
3434
"clean": "rimraf dist/**",
3535
"prepare": "npm run build",
36-
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy",
37-
"build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy",
36+
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run fix-esm; npm run copy",
37+
"build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run fix-esm; npm run copy",
38+
"fix-esm": "tsc-esm-fix --target=dist/esm",
3839
"lint": "eslint . --fix",
3940
"starship": "starship --config ./starship/configs/config.yaml",
4041
"starship:local": "starship --config ./starship/configs/config.local.yaml",
@@ -69,7 +70,8 @@
6970
"@chain-registry/types": "^2.0.42",
7071
"@jest/globals": "^30.0.0",
7172
"interchainjs": "1.17.4",
72-
"starshipjs": "^2.4.0"
73+
"starshipjs": "^2.4.0",
74+
"tsc-esm-fix": "^3.1.2"
7375
},
7476
"keywords": [
7577
"cosmos",

networks/ethereum/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"copy": "copyfiles -f ../../LICENSE-MIT ../../LICENSE-Apache README.md package.json dist",
3434
"clean": "rimraf dist/**",
3535
"prepare": "npm run build",
36-
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy",
36+
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run fix-esm; npm run copy",
3737
"build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy",
3838
"lint": "eslint . --fix",
3939
"test:devnet": "npx jest --preset ts-jest devnet/__tests__/send.icjs.test.ts",
@@ -53,7 +53,8 @@
5353
"debug:test-rpc": "ts-node debug/test-rpc-calls.ts",
5454
"test:signers": "jest --config ./jest.signer.config.js --verbose",
5555
"test:signers:watch": "jest --config ./jest.signer.config.js --watch",
56-
"test:signers:coverage": "jest --config ./jest.signer.config.js --coverage"
56+
"test:signers:coverage": "jest --config ./jest.signer.config.js --coverage",
57+
"fix-esm": "tsc-esm-fix --target=dist/esm"
5758
},
5859
"dependencies": {
5960
"@ethersproject/bignumber": "^5.7.0",
@@ -82,6 +83,7 @@
8283
"jest": "^29.5.0",
8384
"starshipjs": "^3.3.0",
8485
"ts-jest": "^29.1.0",
86+
"tsc-esm-fix": "^3.1.2",
8587
"typescript": "^5.0.0"
8688
},
8789
"gitHead": "25cc22e03504ea6164707192deb0f3c6f572fad3"

networks/injective/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"scripts": {
3232
"copy": "copyfiles -f ../../LICENSE-MIT ../../LICENSE-Apache README.md package.json dist",
3333
"clean": "rimraf dist/**",
34-
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy",
34+
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run fix-esm; npm run copy",
3535
"build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy",
3636
"lint": "eslint . --fix",
3737
"prepare": "npm run build",
@@ -42,7 +42,8 @@
4242
"starship:test": "jest --config ./jest.starship.config.js --verbose --bail",
4343
"starship:debug": "jest --config ./jest.starship.config.js --runInBand --verbose --bail",
4444
"starship:watch": "jest --watch --config ./jest.starship.config.js",
45-
"injective:test": "jest --config ./jest.testnet.config.js --verbose"
45+
"injective:test": "jest --config ./jest.testnet.config.js --verbose",
46+
"fix-esm": "tsc-esm-fix --target=dist/esm"
4647
},
4748
"dependencies": {
4849
"@ethersproject/transactions": "^5.7.0",
@@ -68,7 +69,8 @@
6869
"@chain-registry/client": "1.18.1",
6970
"@chain-registry/types": "^2.0.42",
7071
"dotenv": "^16.4.5",
71-
"starshipjs": "^2.4.0"
72+
"starshipjs": "^2.4.0",
73+
"tsc-esm-fix": "^3.1.2"
7274
},
7375
"gitHead": "25cc22e03504ea6164707192deb0f3c6f572fad3"
7476
}

0 commit comments

Comments
 (0)