From 8cc86e0b0fd3fe26ce9123153e53908e00f07f97 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Tue, 22 May 2018 15:00:46 -0400 Subject: [PATCH] remove legacy events --- lib/contracts/code_generator.js | 33 --------------------------------- lib/core/events.js | 2 +- 2 files changed, 1 insertion(+), 34 deletions(-) diff --git a/lib/contracts/code_generator.js b/lib/contracts/code_generator.js index 971ba0c05..b30807de8 100644 --- a/lib/contracts/code_generator.js +++ b/lib/contracts/code_generator.js @@ -43,39 +43,6 @@ class CodeGenerator { cb(providerCode); }); - // deprecated events; to remove in embark 2.7.0 - this.events.setCommandHandlerOnce('abi-vanila', function(cb) { - this.events.request("contracts:list", (contractsList) => { - let vanillaABI = self.generateABI(contractsList, {useEmbarkJS: false}); - let contractsJSON = self.generateContractsJSON(contractsList); - cb(vanillaABI, contractsJSON); - }); - }); - - this.events.setCommandHandlerOnce('abi', function(cb) { - this.events.request("contracts:list", (contractsList) => { - let embarkJSABI = self.generateABI(contractsList, {useEmbarkJS: true}); - let contractsJSON = self.generateContractsJSON(contractsList); - cb(embarkJSABI, contractsJSON); - }); - }); - - this.events.setCommandHandlerOnce('abi-contracts-vanila', function(cb) { - self.events.request("contracts:list", (contractsList) => { - let vanillaContractsABI = self.generateContracts(contractsList, false, true, false); - let contractsJSON = self.generateContractsJSON(contractsList); - cb(vanillaContractsABI, contractsJSON); - }); - }); - - this.events.setCommandHandlerOnce('abi-vanila-deployment', function(cb) { - self.events.request("contracts:list", (contractsList) => { - let vanillaABI = self.generateABI(contractsList, {useEmbarkJS: false, deployment: true}); - let contractsJSON = self.generateContractsJSON(contractsList); - cb(vanillaABI, contractsJSON); - }); - }); - // new events this.events.setCommandHandlerOnce('code-vanila', function(cb) { self.events.request("contracts:list", (contractsList) => { diff --git a/lib/core/events.js b/lib/core/events.js index 2111e221c..f68d736a3 100644 --- a/lib/core/events.js +++ b/lib/core/events.js @@ -1,7 +1,7 @@ var EventEmitter = require('events'); function warnIfLegacy(eventName) { - const legacyEvents = ['abi-vanila', 'abi', 'abi-contracts-vanila', 'abi-vanila-deployment']; + const legacyEvents = []; if (legacyEvents.indexOf(eventName) >= 0) { console.info(__("this event is deprecated and will be removed in future versions %s", eventName)); }