Skip to content

Commit

Permalink
feat: upgrade to ESM
Browse files Browse the repository at this point in the history
BREAKING CHANGE

The module is now an ESM.

Signed-off-by: Raymond Feng <[email protected]>
  • Loading branch information
raymondfeng committed Dec 26, 2023
1 parent dc1024a commit 66e19b3
Show file tree
Hide file tree
Showing 59 changed files with 484 additions and 483 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"editor.trimAutoWhitespace": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.fixAll.eslint": true
"source.organizeImports": "explicit",
"source.fixAll.eslint": "explicit"
},

"files.exclude": {
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ To add a new staking contract, please follow the steps below.
```ts
import {BindingScope, extensionFor, injectable} from '@loopback/core';
import {BigNumber} from 'ethers';
import {STAKING_ADAPTERS_EXTENSION_POINT} from '../keys';
import {BaseStakingContractAdapter, StakingAsset} from '../staking';
import {STAKING_ADAPTERS_EXTENSION_POINT} from '../keys.js';
import {BaseStakingContractAdapter, StakingAsset} from '../staking.js';
// Use the full path to import instead of `../types`
import {Coco__factory} from '../types/factories/Coco__factory';
import {Coco__factory} from '../types/factories/Coco__factory.js';

@injectable(
{
Expand Down
3 changes: 2 additions & 1 deletion hardhat.config.js → hardhat.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

require('@nomiclabs/hardhat-ethers');
require('@nomiclabs/hardhat-solhint');
require('@typechain/hardhat');
require('@collabland/typechain-hardhat');
const path = require('path');

const DEPLOYER_PRIVATE_KEY =
Expand Down Expand Up @@ -60,6 +60,7 @@ const config = {
target: 'ethers-v5',
externalArtifacts: [path.join(__dirname, 'src/contracts/**/*.json')],
dontOverrideCompile: false,
node16Modules: true,
},
};

Expand Down
Loading

0 comments on commit 66e19b3

Please sign in to comment.