diff --git a/.changeset/swift-jeans-melt.md b/.changeset/swift-jeans-melt.md
new file mode 100644
index 00000000000..a845151cc84
--- /dev/null
+++ b/.changeset/swift-jeans-melt.md
@@ -0,0 +1,2 @@
+---
+---
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 38080071d9b..1ed1ded9d5e 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -6,7 +6,6 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
- "typescript.preferences.autoImportFileExcludePatterns": ["index.ts"],
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
diff --git a/packages/abi-coder/package.json b/packages/abi-coder/package.json
index 9545f724581..570d3028fb8 100644
--- a/packages/abi-coder/package.json
+++ b/packages/abi-coder/package.json
@@ -6,13 +6,7 @@
"exports": {
".": "./src/index.ts"
},
- "typesVersions": {
- "*": {
- "*": [
- "./dist/*"
- ]
- }
- },
+ "types": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
diff --git a/packages/abi-typegen/package.json b/packages/abi-typegen/package.json
index eca72e40492..c985b164a79 100644
--- a/packages/abi-typegen/package.json
+++ b/packages/abi-typegen/package.json
@@ -13,24 +13,36 @@
},
"typesVersions": {
"*": {
- "*": [
- "./dist/*"
+ "index": [
+ "./src/index.ts"
],
"cli": [
- "./dist/cli.d.ts"
+ "./src/cli.ts"
],
"runTypegen": [
- "./dist/runTypegen.d.ts"
+ "./src/runTypegen.ts"
]
}
},
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
- "types": "dist/index.d.ts",
"bin": {
"fuels-typegen": "dist/bin.js"
},
+ "typesVersions": {
+ "*": {
+ "index.d.ts": [
+ "./dist/index.d.ts"
+ ],
+ "cli": [
+ "./dist/cli.d.ts"
+ ],
+ "runTypegen": [
+ "./dist/runTypegen.d.ts"
+ ]
+ }
+ },
"exports": {
".": {
"import": "./dist/index.mjs",
@@ -75,6 +87,11 @@
"scripts": {
"build": "tsup --dts",
"build:watch": "tsup --dts --watch",
+ "postbuild": "pnpm run inject:secondary:entrypoints",
+ "inject:secondary:entrypoints": "run-p inject:*",
+ "inject:configs": "echo \"import './configs.d.ts';\" >> ./dist/index.d.ts",
+ "inject:cli": "echo \"import './cli.d.ts';\" >> ./dist/index.d.ts",
+ "inject:runTypegen": "echo \"import './runTypegen.d.ts';\" >> ./dist/index.d.ts",
"pretest": "pnpm forc build -p test/fixtures/forc-projects"
}
}
diff --git a/packages/abi-typegen/src/index.ts b/packages/abi-typegen/src/index.ts
index 0b9faf30765..b6da0abaa43 100644
--- a/packages/abi-typegen/src/index.ts
+++ b/packages/abi-typegen/src/index.ts
@@ -1,11 +1,3 @@
-/* eslint-disable @typescript-eslint/triple-slash-reference */
-
-/**
- * Referencing secondary entry-points
- */
-///
-///
-
export * from './AbiTypeGen';
export * from './types/interfaces/IFile';
diff --git a/packages/address/package.json b/packages/address/package.json
index 4127e977078..6454571f6f8 100644
--- a/packages/address/package.json
+++ b/packages/address/package.json
@@ -10,17 +10,26 @@
"typesVersions": {
"*": {
"*": [
- "./dist/*"
+ "./src/*"
],
"configs": [
- "./dist/configs.d.ts"
+ "./src/configs.ts"
]
}
},
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
- "types": "dist/index.d.ts",
+ "typesVersions": {
+ "*": {
+ "index.d.ts": [
+ "./dist/index.d.ts"
+ ],
+ "configs": [
+ "./dist/configs.ts"
+ ]
+ }
+ },
"exports": {
".": {
"import": "./dist/index.mjs",
@@ -51,6 +60,9 @@
"@fuel-ts/testcases": "workspace:*"
},
"scripts": {
- "build": "tsup --dts"
+ "build": "tsup --dts",
+ "postbuild": "pnpm run inject:secondary:entrypoints",
+ "inject:secondary:entrypoints": "run-p inject:*",
+ "inject:configs": "echo \"import './configs.d.ts';\" >> ./dist/index.d.ts"
}
}
diff --git a/packages/address/src/index.ts b/packages/address/src/index.ts
index 7ca4eaba808..5be958e4314 100644
--- a/packages/address/src/index.ts
+++ b/packages/address/src/index.ts
@@ -1,9 +1,2 @@
-/* eslint-disable @typescript-eslint/triple-slash-reference */
-
-/**
- * Referencing secondary entry-points
- */
-///
-
export * from './utils';
export { default as Address } from './address';
diff --git a/packages/contract/package.json b/packages/contract/package.json
index 92d144ae60d..2bcc97a0041 100644
--- a/packages/contract/package.json
+++ b/packages/contract/package.json
@@ -6,13 +6,7 @@
"exports": {
".": "./src/index.ts"
},
- "typesVersions": {
- "*": {
- "*": [
- "./dist/*"
- ]
- }
- },
+ "types": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
diff --git a/packages/fuels/package.json b/packages/fuels/package.json
index af1b501bda5..34a6f62cfdc 100644
--- a/packages/fuels/package.json
+++ b/packages/fuels/package.json
@@ -13,21 +13,30 @@
},
"typesVersions": {
"*": {
- "*": [
- "./dist/*"
+ "index": [
+ "./src/index.ts"
],
"cli": [
- "./dist/cli.d.ts"
+ "./src/cli.ts"
]
}
},
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
- "types": "dist/index.d.ts",
"bin": {
"fuels": "dist/bin.js"
},
+ "typesVersions": {
+ "*": {
+ "index.d.ts": [
+ "./dist/index.d.ts"
+ ],
+ "cli": [
+ "./dist/cli.d.ts"
+ ]
+ }
+ },
"exports": {
".": {
"import": "./dist/index.mjs",
@@ -77,6 +86,10 @@
"scripts": {
"build": "tsup --dts",
"build:watch": "tsup --dts --watch",
+ "postbuild": "pnpm run inject:secondary:entrypoints",
+ "inject:secondary:entrypoints": "run-p inject:*",
+ "inject:configs": "echo \"import './configs.d.ts';\" >> ./dist/index.d.ts",
+ "inject:cli": "echo \"import './cli.d.ts';\" >> ./dist/index.d.ts",
"prepublishOnly": "cp ../../README.md ./README.md"
}
}
diff --git a/packages/fuels/src/index.ts b/packages/fuels/src/index.ts
index c53a0826c79..70afb7ffbc7 100644
--- a/packages/fuels/src/index.ts
+++ b/packages/fuels/src/index.ts
@@ -1,10 +1,3 @@
-/* eslint-disable @typescript-eslint/triple-slash-reference */
-
-/**
- * Referencing secondary entry-points
- */
-///
-
export * from '@ethersproject/bytes';
export * from '@fuel-ts/abi-coder';
export * from '@fuel-ts/address';
diff --git a/packages/hasher/package.json b/packages/hasher/package.json
index 3a603384f2c..3728d33160c 100644
--- a/packages/hasher/package.json
+++ b/packages/hasher/package.json
@@ -6,13 +6,7 @@
"exports": {
".": "./src/index.ts"
},
- "typesVersions": {
- "*": {
- "*": [
- "./dist/*"
- ]
- }
- },
+ "types": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
diff --git a/packages/hdwallet/package.json b/packages/hdwallet/package.json
index a8e1f7a1198..84780f843bd 100644
--- a/packages/hdwallet/package.json
+++ b/packages/hdwallet/package.json
@@ -6,13 +6,7 @@
"exports": {
".": "./src/index.ts"
},
- "typesVersions": {
- "*": {
- "*": [
- "./dist/*"
- ]
- }
- },
+ "types": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
diff --git a/packages/interfaces/package.json b/packages/interfaces/package.json
index c27fce71b46..bec48bd77b2 100644
--- a/packages/interfaces/package.json
+++ b/packages/interfaces/package.json
@@ -6,13 +6,7 @@
"exports": {
".": "./src/index.ts"
},
- "typesVersions": {
- "*": {
- "*": [
- "./dist/*"
- ]
- }
- },
+ "types": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
diff --git a/packages/keystore/package.json b/packages/keystore/package.json
index 02e4bf5ad5a..ba45bfa9372 100644
--- a/packages/keystore/package.json
+++ b/packages/keystore/package.json
@@ -6,13 +6,7 @@
"exports": {
".": "./src/index.ts"
},
- "typesVersions": {
- "*": {
- "*": [
- "./dist/*"
- ]
- }
- },
+ "types": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
diff --git a/packages/math/package.json b/packages/math/package.json
index 366e7a49830..036c4277317 100644
--- a/packages/math/package.json
+++ b/packages/math/package.json
@@ -9,18 +9,27 @@
},
"typesVersions": {
"*": {
- "*": [
- "./dist/*"
+ "index": [
+ "./src/index.ts"
],
"configs": [
- "./dist/configs.d.ts"
+ "./src/configs.ts"
]
}
},
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
- "types": "dist/index.d.ts",
+ "typesVersions": {
+ "*": {
+ "index.d.ts": [
+ "./dist/index.d.ts"
+ ],
+ "configs": [
+ "./dist/configs.d.ts"
+ ]
+ }
+ },
"exports": {
".": {
"import": "./dist/index.mjs",
@@ -39,7 +48,10 @@
],
"license": "Apache-2.0",
"scripts": {
- "build": "tsup --dts"
+ "build": "tsup --dts",
+ "postbuild": "pnpm run inject:secondary:entrypoints",
+ "inject:secondary:entrypoints": "run-p inject:*",
+ "inject:configs": "echo \"import './configs.d.ts';\" >> ./dist/index.d.ts"
},
"dependencies": {
"@types/bn.js": "^5.1.1",
diff --git a/packages/math/src/index.ts b/packages/math/src/index.ts
index 826dc79c756..2b3c119592e 100644
--- a/packages/math/src/index.ts
+++ b/packages/math/src/index.ts
@@ -1,10 +1,3 @@
-/* eslint-disable @typescript-eslint/triple-slash-reference */
-
-/**
- * Referencing secondary entry-points
- */
-///
-
export * from './bn';
export * from './decimal';
export * from './functional';
diff --git a/packages/merkle-shared/package.json b/packages/merkle-shared/package.json
index f14445296eb..8d6fb938785 100644
--- a/packages/merkle-shared/package.json
+++ b/packages/merkle-shared/package.json
@@ -6,13 +6,7 @@
"exports": {
".": "./src/index.ts"
},
- "typesVersions": {
- "*": {
- "*": [
- "./dist/*"
- ]
- }
- },
+ "types": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
diff --git a/packages/merkle/package.json b/packages/merkle/package.json
index 66bc2021876..c313ddd5d2d 100644
--- a/packages/merkle/package.json
+++ b/packages/merkle/package.json
@@ -6,13 +6,7 @@
"exports": {
".": "./src/index.ts"
},
- "typesVersions": {
- "*": {
- "*": [
- "./dist/*"
- ]
- }
- },
+ "types": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
diff --git a/packages/merklesum/package.json b/packages/merklesum/package.json
index 5206abbea3e..c24517cfcfe 100644
--- a/packages/merklesum/package.json
+++ b/packages/merklesum/package.json
@@ -6,13 +6,7 @@
"exports": {
".": "./src/index.ts"
},
- "typesVersions": {
- "*": {
- "*": [
- "./dist/*"
- ]
- }
- },
+ "types": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
diff --git a/packages/mnemonic/package.json b/packages/mnemonic/package.json
index 30dfcc6cded..da4deeb7f93 100644
--- a/packages/mnemonic/package.json
+++ b/packages/mnemonic/package.json
@@ -6,13 +6,7 @@
"exports": {
".": "./src/index.ts"
},
- "typesVersions": {
- "*": {
- "*": [
- "./dist/*"
- ]
- }
- },
+ "types": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
diff --git a/packages/predicate/package.json b/packages/predicate/package.json
index d66e5366ab1..7dc604a19ec 100644
--- a/packages/predicate/package.json
+++ b/packages/predicate/package.json
@@ -6,13 +6,7 @@
"exports": {
".": "./src/index.ts"
},
- "typesVersions": {
- "*": {
- "*": [
- "./dist/*"
- ]
- }
- },
+ "types": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
diff --git a/packages/program/package.json b/packages/program/package.json
index 9b5e8280b03..24ef57f008c 100644
--- a/packages/program/package.json
+++ b/packages/program/package.json
@@ -9,18 +9,27 @@
},
"typesVersions": {
"*": {
- "*": [
- "./dist/*"
+ "index": [
+ "./src/index.ts"
],
"configs": [
- "./dist/configs.d.ts"
+ "./src/configs.ts"
]
}
},
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
- "types": "dist/index.d.ts",
+ "typesVersions": {
+ "*": {
+ "index.d.ts": [
+ "./dist/index.d.ts"
+ ],
+ "configs": [
+ "./dist/configs.d.ts"
+ ]
+ }
+ },
"exports": {
".": {
"import": "./dist/index.mjs",
@@ -38,7 +47,10 @@
"dist"
],
"scripts": {
- "build": "tsup --dts"
+ "build": "tsup --dts",
+ "postbuild": "pnpm run inject:secondary:entrypoints",
+ "inject:secondary:entrypoints": "run-p inject:*",
+ "inject:configs": "echo \"import './configs.d.ts';\" >> ./dist/index.d.ts"
},
"license": "Apache-2.0",
"dependencies": {
diff --git a/packages/program/src/index.ts b/packages/program/src/index.ts
index 7d41884577c..7e7b56b318b 100644
--- a/packages/program/src/index.ts
+++ b/packages/program/src/index.ts
@@ -1,10 +1,3 @@
-/* eslint-disable @typescript-eslint/triple-slash-reference */
-
-/**
- * Referencing secondary entry-points
- */
-///
-
export * from './types';
export * from './utils';
export * from './errors';
diff --git a/packages/providers/package.json b/packages/providers/package.json
index 2375461206b..a8a21737947 100644
--- a/packages/providers/package.json
+++ b/packages/providers/package.json
@@ -6,13 +6,7 @@
"exports": {
".": "./src/index.ts"
},
- "typesVersions": {
- "*": {
- "*": [
- "./dist/*"
- ]
- }
- },
+ "types": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
diff --git a/packages/script/package.json b/packages/script/package.json
index a1b60f5dd71..38480e17e39 100644
--- a/packages/script/package.json
+++ b/packages/script/package.json
@@ -6,13 +6,7 @@
"exports": {
".": "./src/index.ts"
},
- "typesVersions": {
- "*": {
- "*": [
- "./dist/*"
- ]
- }
- },
+ "types": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
diff --git a/packages/signer/package.json b/packages/signer/package.json
index b220c58d3d3..e70a4591d5a 100644
--- a/packages/signer/package.json
+++ b/packages/signer/package.json
@@ -6,13 +6,7 @@
"exports": {
".": "./src/index.ts"
},
- "typesVersions": {
- "*": {
- "*": [
- "./dist/*"
- ]
- }
- },
+ "types": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
diff --git a/packages/sparsemerkle/package.json b/packages/sparsemerkle/package.json
index d0c602da7e4..4c94f85b1b3 100644
--- a/packages/sparsemerkle/package.json
+++ b/packages/sparsemerkle/package.json
@@ -6,13 +6,7 @@
"exports": {
".": "./src/index.ts"
},
- "typesVersions": {
- "*": {
- "*": [
- "./dist/*"
- ]
- }
- },
+ "types": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
diff --git a/packages/transactions/package.json b/packages/transactions/package.json
index fd1ae4e2d73..6e672c4852e 100644
--- a/packages/transactions/package.json
+++ b/packages/transactions/package.json
@@ -9,18 +9,27 @@
},
"typesVersions": {
"*": {
- "*": [
- "./dist/*"
+ "index": [
+ "./src/index.ts"
],
"configs": [
- "./dist/configs.d.ts"
+ "./src/configs.ts"
]
}
},
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
- "types": "dist/index.d.ts",
+ "typesVersions": {
+ "*": {
+ "index.d.ts": [
+ "./dist/index.d.ts"
+ ],
+ "configs": [
+ "./dist/configs.d.ts"
+ ]
+ }
+ },
"exports": {
".": {
"import": "./dist/index.mjs",
@@ -46,6 +55,9 @@
"@fuel-ts/address": "workspace:*"
},
"scripts": {
- "build": "tsup --dts"
+ "build": "tsup --dts",
+ "postbuild": "pnpm run inject:secondary:entrypoints",
+ "inject:secondary:entrypoints": "run-p inject:*",
+ "inject:configs": "echo \"import './configs.d.ts';\" >> ./dist/index.d.ts"
}
}
diff --git a/packages/transactions/src/index.ts b/packages/transactions/src/index.ts
index 5363d15d0ab..c182a61a286 100644
--- a/packages/transactions/src/index.ts
+++ b/packages/transactions/src/index.ts
@@ -1,10 +1,3 @@
-/* eslint-disable @typescript-eslint/triple-slash-reference */
-
-/**
- * Referencing secondary entry-points
- */
-///
-
export * from './coders/input';
export * from './coders/output';
export * from './coders/receipt';
diff --git a/packages/versions/package.json b/packages/versions/package.json
index ada377dc52e..97b733ee66c 100644
--- a/packages/versions/package.json
+++ b/packages/versions/package.json
@@ -12,21 +12,30 @@
},
"typesVersions": {
"*": {
- "*": [
- "./dist/*"
+ "index": [
+ "./src/index.ts"
],
"cli": [
- "./dist/cli.d.ts"
+ "./src/cli.ts"
]
}
},
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
- "types": "dist/index.d.ts",
"bin": {
"fuels-versions": "dist/bin.js"
},
+ "typesVersions": {
+ "*": {
+ "index.d.ts": [
+ "./dist/index.d.ts"
+ ],
+ "cli": [
+ "./dist/cli.d.ts"
+ ]
+ }
+ },
"exports": {
".": {
"import": "./dist/index.mjs",
@@ -55,6 +64,10 @@
},
"scripts": {
"prebuild": "ts-node ./scripts/rewriteVersions.ts",
- "build": "tsup --dts"
+ "build": "tsup --dts",
+ "postbuild": "pnpm run inject:secondary:entrypoints",
+ "inject:secondary:entrypoints": "run-p inject:*",
+ "inject:configs": "echo \"import './configs.d.ts';\" >> ./dist/index.d.ts",
+ "inject:cli": "echo \"import './cli.d.ts';\" >> ./dist/index.d.ts"
}
}
diff --git a/packages/versions/src/index.ts b/packages/versions/src/index.ts
index 668dd56972c..3d0ed204664 100644
--- a/packages/versions/src/index.ts
+++ b/packages/versions/src/index.ts
@@ -1,10 +1,3 @@
-/* eslint-disable @typescript-eslint/triple-slash-reference */
-
-/**
- * Referencing secondary entry-points
- */
-///
-
/*
1) Variables
------------
diff --git a/packages/wallet-manager/package.json b/packages/wallet-manager/package.json
index 652b22f75e0..e648a362989 100644
--- a/packages/wallet-manager/package.json
+++ b/packages/wallet-manager/package.json
@@ -6,13 +6,7 @@
"exports": {
".": "./src/index.ts"
},
- "typesVersions": {
- "*": {
- "*": [
- "./dist/*"
- ]
- }
- },
+ "types": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
diff --git a/packages/wallet/package.json b/packages/wallet/package.json
index 36a7d539e9c..c30d7beea35 100644
--- a/packages/wallet/package.json
+++ b/packages/wallet/package.json
@@ -5,26 +5,38 @@
"author": "Fuel Labs (https://fuel.network/)",
"exports": {
".": "./src/index.ts",
- "./test-utils": "./test/utils/index.ts",
- "./configs": "./src/configs.ts"
+ "./configs": "./src/configs.ts",
+ "./test-utils": "./test/utils/index.ts"
},
"typesVersions": {
"*": {
- "*": [
- "./dist/*"
- ],
- "test-utils": [
- "./dist/test-utils.d.ts"
+ "index": [
+ "./src/index.ts"
],
"configs": [
- "./dist/configs.d.ts"
+ "./src/configs.ts"
+ ],
+ "test-utils": [
+ "./test/utils/index.ts"
]
}
},
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
- "types": "dist/index.d.ts",
+ "typesVersions": {
+ "*": {
+ "index.d.ts": [
+ "./dist/index.d.ts"
+ ],
+ "configs": [
+ "./dist/configs.d.ts"
+ ],
+ "test-utils": [
+ "./dist/test-utils.d.ts"
+ ]
+ }
+ },
"exports": {
".": {
"import": "./dist/index.mjs",
@@ -66,6 +78,10 @@
"@fuel-ts/testcases": "workspace:*"
},
"scripts": {
- "build": "tsup --dts"
+ "build": "tsup --dts",
+ "postbuild": "pnpm run inject:secondary:entrypoints",
+ "inject:secondary:entrypoints": "run-p inject:*",
+ "inject:configs": "echo \"import './configs.d.ts';\" >> ./dist/index.d.ts",
+ "inject:test-utils": "echo \"import './test-utils.d.ts';\" >> ./dist/index.d.ts"
}
}
diff --git a/packages/wallet/src/index.ts b/packages/wallet/src/index.ts
index ef34430f241..9e755c6bed0 100644
--- a/packages/wallet/src/index.ts
+++ b/packages/wallet/src/index.ts
@@ -1,11 +1,3 @@
-/* eslint-disable @typescript-eslint/triple-slash-reference */
-
-/**
- * Referencing secondary entry-points
- */
-///
-///
-
export * from './base-unlocked-wallet';
export * from './account';
export * from './wallet';
diff --git a/packages/wordlists/package.json b/packages/wordlists/package.json
index e7553142983..0076317257a 100644
--- a/packages/wordlists/package.json
+++ b/packages/wordlists/package.json
@@ -6,13 +6,7 @@
"exports": {
".": "./src/index.ts"
},
- "typesVersions": {
- "*": {
- "*": [
- "./dist/*"
- ]
- }
- },
+ "types": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",