Skip to content

Commit

Permalink
fix(typos): fix typo in ExportsAnalyzerResult abstract property
Browse files Browse the repository at this point in the history
BREAKING CHANGE: rename abstact to abstract
  • Loading branch information
RyuuGan committed Aug 29, 2021
1 parent 18481aa commit ba01183
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions lib/exportsAnalyzer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ExportType } from './types';
const error = Debug('sol-merger:error');

export interface ExportsAnalyzerResult {
abstact: boolean;
abstract: boolean;
type: ExportType;
name: string;
is: string;
Expand All @@ -18,7 +18,7 @@ export class ExportsAnalyzer {
/**
* Analyzes all the exports of the file (Contract, Interface, Library)
*
* Single export statement to process. Basicly it analizes next things:
* Single export statement to process. Basically it analyzes next things:
*
* 1. Get the type of the export
* 2. Get the body of the export
Expand All @@ -31,7 +31,7 @@ export class ExportsAnalyzer {
const visitor = new SolidityExportVisitor(this.contents);
visitor.visit((e) => {
results.push({
abstact: e.abstract,
abstract: e.abstract,
type: e.type,
name: e.name,
body: this.contents.substring(e.body.start, e.body.end + 1).trim(),
Expand Down
2 changes: 1 addition & 1 deletion lib/fileAnalyzer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class FileAnalyzer {
});
}

const abstract = e.abstact ? 'abstract ' : '';
const abstract = e.abstract ? 'abstract ' : '';
return `${abstract}${e.type} ${newName || e.name} ${is}${e.body}`;
}
/**
Expand Down
16 changes: 8 additions & 8 deletions test/exportsAnalyzer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,37 +33,37 @@ describe('ExportsAnalyzer', () => {
const exports = exportsAnalyzer.analyzeExports();

assert.deepEqual(exports, [
{ abstact: false, type: 'contract', name: 'A', is: '', body: '{ }' },
{ abstract: false, type: 'contract', name: 'A', is: '', body: '{ }' },
{
abstact: false,
abstract: false,
type: 'contract',
name: 'B',
is: 'is A ',
body: '{\n // some body here...\n }',
},
{
abstact: false,
abstract: false,
type: 'library',
name: 'L',
is: '',
body: '{\n // l...\n }',
},
{
abstact: false,
abstract: false,
type: 'interface',
name: 'I',
is: '',
body: '{\n // i...\n }',
},
{
abstact: false,
abstract: false,
body: '{\n uint weight;\n bool voted;\n }',
is: '',
name: 'S',
type: 'struct',
},
{
abstact: false,
abstract: false,
body:
'{\n Created,\n Locked,\n Inactive\n }',
is: '',
Expand All @@ -83,14 +83,14 @@ describe('ExportsAnalyzer', () => {

assert.deepEqual(exports, [
{
abstact: false,
abstract: false,
body: '// Some contracts without exports',
is: '',
name: 'Comment#9',
type: 'comment',
},
{
abstact: false,
abstract: false,
body: '// Some contract text that is not required here',
is: '',
name: 'Comment#52',
Expand Down
4 changes: 2 additions & 2 deletions test/plugins/SPDXLicenseRemovePlugin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('SPDXLicenseRemovePlugin', () => {

const comment: ExportsAnalyzerResult = {
type: ExportType.comment,
abstact: false,
abstract: false,
body: `// SPDX-License-Identifier: MIT `,
is: '',
name: 'Test',
Expand All @@ -24,7 +24,7 @@ describe('SPDXLicenseRemovePlugin', () => {

const comment: ExportsAnalyzerResult = {
type: ExportType.comment,
abstact: false,
abstract: false,
body: `/*
SPDX-License-Identifier: MIT
SPDX-License-Identifier: EPL-1.0+
Expand Down

0 comments on commit ba01183

Please sign in to comment.