Skip to content

Commit

Permalink
chore!: require nodejs@18
Browse files Browse the repository at this point in the history
BREAKING CHANGE: require nodejs@18 or newer
Because nodejs@16 is not maintained currently.
  • Loading branch information
davidyuk committed Apr 7, 2024
1 parent 14ead8c commit 5fd3bfa
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
presets: [
['@babel/preset-env', {
modules: false,
targets: { node: 14 },
targets: { node: 18 },
}],
],
plugins: [
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
],
"license": "ISC",
"engines": {
"node": ">=14.0.0"
"node": ">=18.19.0"
},
"files": [
"bin"
Expand Down
5 changes: 4 additions & 1 deletion test/contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,16 @@ describe('Contract Module', function contractTests() {
});

it('throws error if arguments invalid', async () => {
const expectedError = process.version.startsWith('v18.')
? 'Unexpected end of JSON input'
: 'Can\'t parse contract arguments: Expected \',\' or \']\' after array element in JSON at position 2';
await expect(executeContract([
'deploy',
WALLET_NAME, '--password', 'test',
'--contractSource', contractSourceFile,
'[3',
'--json',
])).to.be.rejectedWith(CliError, 'Can\'t parse contract arguments: Unexpected end of JSON input');
])).to.be.rejectedWith(CliError, expectedError);
});
});

Expand Down
2 changes: 1 addition & 1 deletion test/name.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ describe('AENS Module', () => {
name,
preClaim.salt,
'--json',
]).should.be.rejectedWith('Giving up after 5 blocks mined, transaction hash:');
]).should.be.rejectedWith(/Giving up after 5 blocks mined, transaction hash:|error: Transaction not found/);
}).timeout(15000);
});
});
6 changes: 3 additions & 3 deletions test/other.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import mainProgram from '../src/commands/main';
describe('Other tests', () => {
it('Config', async () => {
expect(await executeProgram(mainProgram, ['config'])).to.equal(
'Node https://testnet.aeternity.io network id ae_uat, version 6.8.1\n'
+ 'Compiler https://v7.compiler.aepps.com version 7.1.0',
'Node https://testnet.aeternity.io network id ae_uat, version 6.13.0\n'
+ 'Compiler https://v7.compiler.aepps.com version 7.4.0',
);
});
}).timeout(4000);

it('selects node', async () => {
expect(await executeProgram(mainProgram, ['select-node', 'http://example.com/node']))
Expand Down

0 comments on commit 5fd3bfa

Please sign in to comment.