Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 98b1789

Browse files
committed
chore: remove support for Node.js v12
1 parent 274d552 commit 98b1789

File tree

7 files changed

+40
-33
lines changed

7 files changed

+40
-33
lines changed

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
node: [12.0.0, 12.x, 14.x, 16.x, 18.x]
13+
node: [14.0.0, 14.x, 16.x, 18.x]
1414
os: [windows-2019, ubuntu-18.04, ubuntu-20.04, macos-11]
1515
exclude:
1616
# Node v18 does not run on ubuntu-18.04: https://github.com/nodejs/node/issues/42351#issuecomment-1068424442

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
node: [12.0.0, 12.x, 14.x, 16.x, 18.x]
13+
node: [14.0.0, 14.x, 16.x, 18.x]
1414
os: [ubuntu-20.04]
1515

1616
runs-on: ${{ matrix.os }}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v12.0.0
1+
v14.0.0

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
## Getting set up
44

5-
- Use Node.js v12.0.0.
6-
- Why v12.0.0? Because this is the first LTS release of Node.js v12 and is the earliest version Ganache supports.
5+
- Use Node.js v14.0.0.
6+
- Why v14.0.0? Because this is the first LTS release of Node.js v14 and is the earliest version Ganache supports.
77
- recommendation: use [nvm](https://github.com/nvm-sh/nvm) on Linux and macOS, and [nvm-windows](https://github.com/coreybutler/nvm-windows) on
88
Windows, to configure your node version.
9-
- On Linux and macOS, if you have `nvm` installed, just run `nvm use` to switch to Node.js v12.0.0.
9+
- On Linux and macOS, if you have `nvm` installed, just run `nvm use` to switch to Node.js v14.0.0.
1010
- `git clone [email protected]:trufflesuite/ganache.git`
1111
- `cd ganache`
1212
- `npm install` (use npm v6)
@@ -153,7 +153,7 @@ index 2a2aa9e..57cbf21 100644
153153

154154
These are guidelines, not rules. :-)
155155

156-
- Use Node.js v12.0.0 for most local development.
156+
- Use Node.js v14.0.0 for most local development.
157157
- Use `bigint` literals, e.g., `123n`; if the number is externally configurable and/or could exceed
158158
`Number.MAX_SAFE_INTEGER`.
159159
- Write tests.

UPGRADE-GUIDE.md

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Ganache Upgrade Guide
22

3+
## ganache v7.0.0 - v7.4.3 to ganache v7.5.0+
4+
5+
Node.js v12 and v13 support have been removed. You must upgrade your version of
6+
Node to v14 or later.
7+
8+
Kovan support has been removed. If you need Kovan support you must use an older
9+
version of ganache.
10+
311
## ganache-core v2.x.x and ganache-cli v6.x.x to ganache v7.x.x
412

513
### Installing
@@ -89,8 +97,8 @@ depending on how you originally installed ganache-cli or ganache-core._
8997
#### Allowed transaction signature changes
9098

9199
Previously, Ganache allowed transaction signatures to originate from 3 chains
92-
ids: `1`, `chainId`, and `networkId`. Ganache now allows only transactions
93-
signed with its own `chainId`.
100+
ids: `1`, `chainId`, and `networkId`. Ganache now allows only transactions
101+
signed with its own `chainId`.
94102

95103
#### `_chainId` and `_chainIdRpc` options removed
96104

@@ -113,7 +121,7 @@ and it defaulted to `true`.
113121

114122
Ganache now _disables_ the `vmErrorsOnRPCResponse` functionality by default.
115123

116-
If your code relies on these non-standard errors on transaction failure, you'll
124+
If your code relies on these non-standard errors on transaction failure, you'll
117125
need to _enable_ the `vmErrorsOnRpcResponse` flag to restore this behavior:
118126

119127
```console
@@ -144,7 +152,7 @@ You may want to remove your old Docker images and containers and then pull
144152
Ganache from the new location before updating, but this step is not required.
145153

146154
> Note: Before updating you may want to prune your Docker images and containers.
147-
Read more on [docker pruning](https://docs.docker.com/config/pruning/).
155+
> Read more on [docker pruning](https://docs.docker.com/config/pruning/).
148156
149157
You can view the list of local Docker containers by running:
150158

@@ -183,7 +191,6 @@ or to pull and run it simultaneously:
183191
$ docker run --port 8545:8545 trufflesuite/ganache:latest
184192
```
185193

186-
187194
#### Default startup ether is now 1000 instead of 100
188195

189196
We polled 50 developers about Ganache's startup Ether amount. 44% had no
@@ -207,7 +214,7 @@ ganache.provider({
207214
wallet: {
208215
defaultBalance: 100
209216
}
210-
})
217+
});
211218
```
212219

213220
#### Ganache's provider and server interfaces have changed
@@ -222,8 +229,8 @@ If you were previously programmatically accessing the VM step events by
222229
traversing Ganache internals you can now access these via a new Event System:
223230

224231
In addition to [EIP-1193's](https://eips.ethereum.org/EIPS/eip-1193) `"message"`
225-
event and the legacy `"data"` event, Ganache emits 3 additional events:
226-
`"ganache:vm:tx:before"`, `"ganache:vm:tx:step"`, and `"ganache:vm:tx:after"`.
232+
event and the legacy `"data"` event, Ganache emits 3 additional events:
233+
`"ganache:vm:tx:before"`, `"ganache:vm:tx:step"`, and `"ganache:vm:tx:after"`.
227234

228235
These events can be used to observe the lifecycle of any transaction executed
229236
via `*sendTransaction`, `eth_call`, `debug_traceTransaction`, or `debug_storageRangeAt`.
@@ -286,7 +293,7 @@ likely enable this in the future.
286293

287294
Ganache's old database format is incompatible with this version. We've decided
288295
to hold off on building migration tools for this. If you will need a migration
289-
tool (you use the `db` flag or the `db_path` option and are unable to recreate
296+
tool (you use the `db` flag or the `db_path` option and are unable to recreate
290297
your initial DB state) please
291298
[open an issue](https://github.com/trufflesuite/ganache/issues/new)
292299
to let us know.
@@ -341,7 +348,7 @@ If you send a transaction with `eth_sendTransaction` and that transaction doesn'
341348

342349
```typescript
343350
// send a "legacy" transaction
344-
const hash = await provider.request("eth_sendTransaction", [{ from }]);
351+
const hash = await provider.request("eth_sendTransaction", [{ from }]);
345352
const tx = await provider.request("eth_getTransactionByHash", [hash]);
346353
// The returned `type` field indicates it was updated to a type 2 transaction
347354
assert.strictEqual(tx.type, "0x2");
@@ -433,17 +440,17 @@ sending account to cover the maximum cost.
433440
- `logs` subscription events are emitted before `newHeads` events
434441
- the default `callGasLimit` has changed from `Number.MAX_SAFE_INTEGER` ($2^{53} - 1$) to `50_000_000`.
435442

436-
437-
438-
[^1]: yarn and pnpm don't support dependency lock files, like npm's npm-shrinkwrap.json,
439-
which permits supply-chain attacks through automatic transitive dependency
440-
updates, like the [left-pad attack](https://blog.npmjs.org/post/141577284765/kik-left-pad-and-npm.html) and mostly recently the
441-
[colors and faker attack](https://security.snyk.io/vuln/SNYK-JS-COLORS-2331906).
442-
443-
[^2]: `eth_call` can't always perfectly reproduce the state that the original
444-
transaction was run in if other transactions run before it in a block. This is
445-
very rare in testing scenarios, but should be something you are aware of. We'll
446-
be addressing this shortcoming in a future EIP and release by extending eth_call
447-
with an option to run the transaction at a certain _index_ in the specified
448-
block (you likely won't ever see this option enabled on public nodes, like
449-
Infura, as it can be a very CPU-intensive process).
443+
[^1]:
444+
yarn and pnpm don't support dependency lock files, like npm's npm-shrinkwrap.json,
445+
which permits supply-chain attacks through automatic transitive dependency
446+
updates, like the [left-pad attack](https://blog.npmjs.org/post/141577284765/kik-left-pad-and-npm.html) and mostly recently the
447+
[colors and faker attack](https://security.snyk.io/vuln/SNYK-JS-COLORS-2331906).
448+
449+
[^2]:
450+
`eth_call` can't always perfectly reproduce the state that the original
451+
transaction was run in if other transactions run before it in a block. This is
452+
very rare in testing scenarios, but should be something you are aware of. We'll
453+
be addressing this shortcoming in a future EIP and release by extending eth*call
454+
with an option to run the transaction at a certain \_index* in the specified
455+
block (you likely won't ever see this option enabled on public nodes, like
456+
Infura, as it can be a very CPU-intensive process).

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"author": "David Murdoch <[email protected]> (https://davidmurdoch.com)",
44
"private": true,
55
"engines": {
6-
"node": ">=12.0.0",
6+
"node": ">=14.0.0",
77
"npm": ">=6.12.0"
88
},
99
"scripts": {

src/packages/ganache/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Ganache can be used from the [command line](#command-line-use), [programmaticall
4747

4848
### Command line use
4949

50-
You must first install [Node.js](https://nodejs.org/) >= v12.0.0 and npm >= 6.12.0.
50+
You must first install [Node.js](https://nodejs.org/) >= v14.0.0 and npm >= 6.12.0.
5151

5252
To install Ganache globally, run:
5353

0 commit comments

Comments
 (0)