From 2618ff70aaed3cb050fa32986e176bf747dd3850 Mon Sep 17 00:00:00 2001 From: Muhammad-Altabba <24407834+Muhammad-Altabba@users.noreply.github.com> Date: Wed, 20 Sep 2023 11:52:42 +0200 Subject: [PATCH] restore mocking files and empty lines at packages/truffle --- .../success/migrations/3_migrations_async.js | 1 + .../node_modules/nodepkg/LocalNodeImport.sol | 0 .../truffle-mock/truffle-plugin.json | 8 +++--- .../node_modules/truffle-mock/index.js | 26 +++++++++---------- .../node_modules/truffle-mock/index.js | 6 ++--- .../truffle-mock/truffle-plugin.json | 10 +++---- 6 files changed, 26 insertions(+), 25 deletions(-) rename packages/truffle/test/sources/monorepo/{ => truffleproject}/node_modules/nodepkg/LocalNodeImport.sol (100%) diff --git a/packages/truffle/test/sources/migrations/success/migrations/3_migrations_async.js b/packages/truffle/test/sources/migrations/success/migrations/3_migrations_async.js index 8f19defa3eb..665d65d7862 100644 --- a/packages/truffle/test/sources/migrations/success/migrations/3_migrations_async.js +++ b/packages/truffle/test/sources/migrations/success/migrations/3_migrations_async.js @@ -14,6 +14,7 @@ module.exports = async function (deployer) { await deployer.link(IsLibrary, UsesLibrary); await deployer.deploy(UsesExample, IsLibrary.address); await deployer.deploy(UsesLibrary); + await deployer.deploy(PayableExample, { value: web3.utils.toWei("1", "ether") }); diff --git a/packages/truffle/test/sources/monorepo/node_modules/nodepkg/LocalNodeImport.sol b/packages/truffle/test/sources/monorepo/truffleproject/node_modules/nodepkg/LocalNodeImport.sol similarity index 100% rename from packages/truffle/test/sources/monorepo/node_modules/nodepkg/LocalNodeImport.sol rename to packages/truffle/test/sources/monorepo/truffleproject/node_modules/nodepkg/LocalNodeImport.sol diff --git a/packages/truffle/test/sources/preserve/mockProjectWithAbsolutePath/node_modules/truffle-mock/truffle-plugin.json b/packages/truffle/test/sources/preserve/mockProjectWithAbsolutePath/node_modules/truffle-mock/truffle-plugin.json index edc02791aa4..13ab657f222 100644 --- a/packages/truffle/test/sources/preserve/mockProjectWithAbsolutePath/node_modules/truffle-mock/truffle-plugin.json +++ b/packages/truffle/test/sources/preserve/mockProjectWithAbsolutePath/node_modules/truffle-mock/truffle-plugin.json @@ -1,6 +1,6 @@ { - "preserve": { - "tag": "mock", - "recipe": "/index.js" - } + "preserve": { + "tag": "mock", + "recipe": "/index.js" + } } diff --git a/packages/truffle/test/sources/preserve/mockProjectWithWorkingPlugin/node_modules/truffle-mock/index.js b/packages/truffle/test/sources/preserve/mockProjectWithWorkingPlugin/node_modules/truffle-mock/index.js index ffae726423f..5a7b2ac0558 100644 --- a/packages/truffle/test/sources/preserve/mockProjectWithWorkingPlugin/node_modules/truffle-mock/index.js +++ b/packages/truffle/test/sources/preserve/mockProjectWithWorkingPlugin/node_modules/truffle-mock/index.js @@ -1,20 +1,20 @@ class Recipe { - static help = "Mock Recipe"; + static help = "Mock Recipe"; - name = "truffle-mock"; - inputLabels = []; - outputLabels = []; + name = "truffle-mock"; + inputLabels = []; + outputLabels = []; - constructor(environment) { - this.environmentName = environment.selectedEnvironment; - } + constructor(environment) { + this.environmentName = environment.selectedEnvironment; + } - async *execute({ controls }) { - yield* controls.update({ - message: `Provided environment name: ${this.environmentName}` - }); - return "Successfully called truffle-mock:preserve()"; - } + async *execute({ controls }) { + yield* controls.update({ + message: `Provided environment name: ${this.environmentName}` + }); + return "Successfully called truffle-mock:preserve()"; + } } module.exports = { Recipe }; diff --git a/packages/truffle/test/sources/run/mockProjectWithWorkingPlugin/node_modules/truffle-mock/index.js b/packages/truffle/test/sources/run/mockProjectWithWorkingPlugin/node_modules/truffle-mock/index.js index bb56d56be27..a8712850b66 100644 --- a/packages/truffle/test/sources/run/mockProjectWithWorkingPlugin/node_modules/truffle-mock/index.js +++ b/packages/truffle/test/sources/run/mockProjectWithWorkingPlugin/node_modules/truffle-mock/index.js @@ -1,7 +1,7 @@ const Mock = { - run() { - console.log("Running truffle-mock!"); - } + run() { + console.log("Running truffle-mock!"); + } }; module.exports = Mock.run; diff --git a/packages/truffle/test/sources/run/mockProjectWithWorkingPlugin/node_modules/truffle-mock/truffle-plugin.json b/packages/truffle/test/sources/run/mockProjectWithWorkingPlugin/node_modules/truffle-mock/truffle-plugin.json index 16357fab7c2..727d3a41207 100644 --- a/packages/truffle/test/sources/run/mockProjectWithWorkingPlugin/node_modules/truffle-mock/truffle-plugin.json +++ b/packages/truffle/test/sources/run/mockProjectWithWorkingPlugin/node_modules/truffle-mock/truffle-plugin.json @@ -1,5 +1,5 @@ -{ - "commands": { - "mock": "index.js" - } -} +{ + "commands": { + "mock": "index.js" + } +}