From bc172493f04dfb0acd998e99e08a5b59bbd60326 Mon Sep 17 00:00:00 2001 From: Maksim Daunarovich Date: Thu, 3 Jun 2021 03:06:32 +0300 Subject: [PATCH] Fix unused import in contract templates (#2) * Update templates * Update CHANGELOG * Bump version --- CHANGELOG.md | 7 +++++-- package.json | 2 +- src/templates/contract.hbs | 3 +-- src/templates/index.js | 18 +++++++++--------- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c493c1a..2affe29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ +### 0.1.2 -- 2021-06-02 +- Regenerated templates to remove unused import, which would trigger linter. + ### 0.1.1 -- 2021-06-02 -- Regenerated templates to import `flow-cadut` +- Regenerated templates to import `flow-cadut`. ### 0.1.0 -- 2021-06-02 -- First release \ No newline at end of file +- First release. \ No newline at end of file diff --git a/package.json b/package.json index 2041faa..17ef0c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flow-cadut", - "version": "0.1.1", + "version": "0.1.2", "description": "Flow Cadence Template Utilities", "author": "Maksim Daunarovich", "license": "Apache-2.0", diff --git a/src/templates/contract.hbs b/src/templates/contract.hbs index 774b9cd..09a1819 100644 --- a/src/templates/contract.hbs +++ b/src/templates/contract.hbs @@ -3,8 +3,7 @@ import { deployContract } from '{{ ixDependency }}' import { getEnvironment, replaceImportAddresses, - reportMissingImports, - reportMissing + reportMissingImports } from 'flow-cadut' export const CODE = ` diff --git a/src/templates/index.js b/src/templates/index.js index b79e205..28d4f4c 100644 --- a/src/templates/index.js +++ b/src/templates/index.js @@ -163,7 +163,7 @@ templates["contract"] = template({ }) : helper) ) + - "'\n\nimport {\n getEnvironment,\n replaceImportAddresses,\n reportMissingImports,\n reportMissing\n} from 'flow-cadut'\n\nexport const CODE = `\n " + + "'\n\nimport {\n getEnvironment,\n replaceImportAddresses,\n reportMissingImports\n} from 'flow-cadut'\n\nexport const CODE = `\n " + ((stack1 = ((helper = (helper = @@ -176,7 +176,7 @@ templates["contract"] = template({ name: "code", hash: {}, data: data, - loc: { start: { line: 11, column: 2 }, end: { line: 11, column: 14 } }, + loc: { start: { line: 10, column: 2 }, end: { line: 10, column: 14 } }, }) : helper)) != null ? stack1 @@ -194,7 +194,7 @@ templates["contract"] = template({ name: "assetName", hash: {}, data: data, - loc: { start: { line: 15, column: 38 }, end: { line: 15, column: 53 } }, + loc: { start: { line: 14, column: 38 }, end: { line: 14, column: 53 } }, }) : helper) ) + @@ -211,7 +211,7 @@ templates["contract"] = template({ name: "assetName", hash: {}, data: data, - loc: { start: { line: 18, column: 13 }, end: { line: 18, column: 28 } }, + loc: { start: { line: 17, column: 13 }, end: { line: 17, column: 28 } }, }) : helper) ) + @@ -228,7 +228,7 @@ templates["contract"] = template({ name: "name", hash: {}, data: data, - loc: { start: { line: 26, column: 39 }, end: { line: 26, column: 49 } }, + loc: { start: { line: 25, column: 39 }, end: { line: 25, column: 49 } }, }) : helper) ) + @@ -245,7 +245,7 @@ templates["contract"] = template({ name: "assetName", hash: {}, data: data, - loc: { start: { line: 33, column: 10 }, end: { line: 33, column: 25 } }, + loc: { start: { line: 32, column: 10 }, end: { line: 32, column: 25 } }, }) : helper) ) + @@ -262,7 +262,7 @@ templates["contract"] = template({ name: "assetName", hash: {}, data: data, - loc: { start: { line: 38, column: 14 }, end: { line: 38, column: 29 } }, + loc: { start: { line: 37, column: 14 }, end: { line: 37, column: 29 } }, }) : helper) ) + @@ -279,7 +279,7 @@ templates["contract"] = template({ name: "assetName", hash: {}, data: data, - loc: { start: { line: 39, column: 21 }, end: { line: 39, column: 36 } }, + loc: { start: { line: 38, column: 21 }, end: { line: 38, column: 36 } }, }) : helper) ) + @@ -296,7 +296,7 @@ templates["contract"] = template({ name: "contractName", hash: {}, data: data, - loc: { start: { line: 40, column: 16 }, end: { line: 40, column: 34 } }, + loc: { start: { line: 39, column: 16 }, end: { line: 39, column: 34 } }, }) : helper) ) +