Skip to content

Commit d24517c

Browse files
authored
Merge pull request #41 from angular-experts-io/feat/parse-all-methods
Feat/parse all methods
2 parents 4865a94 + 665515e commit d24517c

36 files changed

Lines changed: 320 additions & 54 deletions

package-lock.json

Lines changed: 23 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
"chalk": "^5.1.2",
4545
"commander": "^9.4.1",
4646
"cosmiconfig": "^8.0.0",
47+
"glob": "^8.0.3",
4748
"ora": "^5.4.1",
48-
"table": "^6.8.2",
49-
"glob": "^8.0.3"
49+
"table": "^6.8.2"
5050
},
5151
"devDependencies": {
5252
"@commitlint/cli": "^17.3.0",
@@ -66,6 +66,7 @@
6666
"jest": "^29.3.1",
6767
"jest-ts-webcompat-resolver": "^1.0.0",
6868
"lint-staged": "^13.0.3",
69+
"prettier": "^3.7.4",
6970
"replace-json-property": "^1.8.0",
7071
"ts-jest": "^29.0.3",
7172
"ts-mocha": "^10.0.0",

src/bin/ng-parsel.bin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ program.version(
1919
But import assertions are not supported by Node 14.
2020
*/
2121
JSON.parse(readFileSync(resolve(dirname(fileURLToPath(import.meta.url)), '../../package.json')).toString() as any)
22-
.version
22+
.version,
2323
);
2424

2525
program

src/commands/parse.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function writeParsedOutputToDisk(config: NgParselConfig, parseOutput: NgParselOu
4242
parseOutput.ngParselSpecs,
4343
parseOutput.ngParselHarnesses,
4444
parseOutput.ngParselPipes,
45-
parseOutput.ngParselValidators
45+
parseOutput.ngParselValidators,
4646
);
4747

4848
writeOutputSpinner.succeed(`Files successfully written to ${config.out}`);
@@ -60,7 +60,7 @@ function writeOutputFiles(
6060
ngParselSpecs: NgParselSpec[],
6161
ngParselHarnesses: NgParselHarness[],
6262
ngParselPipes: NgParselPipe[],
63-
ngParselValidators: NgParselValidator[]
63+
ngParselValidators: NgParselValidator[],
6464
): void {
6565
if (!existsSync(config.out as string)) {
6666
mkdirSync(config.out as string, { recursive: true });

src/converters/component/component.converter.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ describe('Component converter', () => {
1717
implementation: '',
1818
template: '',
1919
styles: '',
20+
methods: [],
2021
methodsPublicExplicit: [],
2122
fieldsPublicExplicit: [],
2223
},
@@ -33,6 +34,7 @@ describe('Component converter', () => {
3334
implementation: '',
3435
template: '',
3536
styles: '',
37+
methods: [],
3638
methodsPublicExplicit: [],
3739
fieldsPublicExplicit: [],
3840
},
@@ -49,6 +51,7 @@ describe('Component converter', () => {
4951
implementation: '',
5052
template: '',
5153
styles: '',
54+
methods: [],
5255
methodsPublicExplicit: [],
5356
fieldsPublicExplicit: [],
5457
},

src/converters/component/component.converter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ export function convertToComponentStats(componentStats: NgParselComponent[]): Ng
2828
moduleBased: 0,
2929
cva: 0,
3030
total: 0,
31-
}
31+
},
3232
);
3333
}

src/converters/directive/directive.converter.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ describe('Directive converter', () => {
1313
inputs: [],
1414
outputs: [],
1515
implementation: '',
16+
methods: [],
1617
methodsPublicExplicit: [],
1718
fieldsPublicExplicit: [],
1819
},
@@ -25,6 +26,7 @@ describe('Directive converter', () => {
2526
inputs: [],
2627
outputs: [],
2728
implementation: '',
29+
methods: [],
2830
methodsPublicExplicit: [],
2931
fieldsPublicExplicit: [],
3032
},
@@ -37,6 +39,7 @@ describe('Directive converter', () => {
3739
inputs: [],
3840
outputs: [],
3941
implementation: '',
42+
methods: [],
4043
methodsPublicExplicit: [],
4144
fieldsPublicExplicit: [],
4245
},

src/converters/directive/directive.converter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ export function convertToDirectiveStats(directiveStats: NgParselDirective[]): Ng
2121
standalone: 0,
2222
moduleBased: 0,
2323
total: 0,
24-
}
24+
},
2525
);
2626
}

src/converters/harness/harness.converter.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,21 @@ describe('Harness converter', () => {
88
className: 'first',
99
type: NgParselOutputType.HARNESS,
1010
filePath: '',
11+
methods: [],
1112
methodsPublicExplicit: [],
1213
},
1314
{
1415
className: 'second',
1516
type: NgParselOutputType.HARNESS,
1617
filePath: '',
18+
methods: [],
1719
methodsPublicExplicit: [],
1820
},
1921
{
2022
className: 'third',
2123
type: NgParselOutputType.HARNESS,
2224
filePath: '',
25+
methods: [],
2326
methodsPublicExplicit: [],
2427
},
2528
];

src/converters/pipes/pipes.converter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ export function convertToPipeStats(pipeStats: NgParselPipe[]): NgParselPipeStats
2222
standalone: 0,
2323
pure: 0,
2424
total: 0,
25-
}
25+
},
2626
);
2727
}

0 commit comments

Comments
 (0)