Skip to content

Commit

Permalink
Finish 1.1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
vogloblinsky committed Mar 1, 2019
2 parents 565dcfc + f6a2311 commit d75135b
Show file tree
Hide file tree
Showing 61 changed files with 4,311 additions and 2,267 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,25 @@
<a name="1.1.9"></a>

# [1.1.9](https://github.com/compodoc/compodoc/compare/1.1.8...1.1.9) (2019-03-01)

### Features

- feat(app): documentation coverage for files with lint-staged tools ([59ff58e](https://github.com/compodoc/compodoc/commit/59ff58e)), closes [#546](https://github.com/compodoc/compodoc/issues/546)

### Merged

- fix(UI): a few issues with the src on customLogo img [#688](https://github.com/compodoc/compodoc/pull/688) Thanks [Zachary Feldman](https://github.com/feldmanz66)
- fix: use consistent semver range specifiers [#733](https://github.com/compodoc/compodoc/pull/733) Thanks [Justin Beckwith](https://github.com/JustinBeckwith)

### Bug fixes

- fix(app): output + serve ([8332344](https://github.com/compodoc/compodoc/commit/8332344)), closes [#742](https://github.com/compodoc/compodoc/issues/742)
- fix(deps): jsdoc param comment for accessor ([655be32](https://github.com/compodoc/compodoc/commit/655be32)), closes [#735](https://github.com/compodoc/compodoc/issues/735)
- fix(deps): injectables inheritance ([35da83e](https://github.com/compodoc/compodoc/commit/35da83e)), closes [#738](https://github.com/compodoc/compodoc/issues/738)
- fix(deps): no link if ignored data ([242e42d](https://github.com/compodoc/compodoc/commit/242e42d)), closes [#737](https://github.com/compodoc/compodoc/issues/737)
- fix(deps): multiple inheritance class support ([62f1bd0](https://github.com/compodoc/compodoc/commit/62f1bd0)), closes [#728](https://github.com/compodoc/compodoc/issues/728)
- fix(deps): Type casting inside decorator ([f597531](https://github.com/compodoc/compodoc/commit/f597531)), closes [#727](https://github.com/compodoc/compodoc/issues/727)

<a name="1.1.8"></a>

# [1.1.8](https://github.com/compodoc/compodoc/compare/1.1.7...1.1.8) (2019-02-08)
Expand Down
9 changes: 3 additions & 6 deletions DONTUPDATE.md
@@ -1,8 +1,5 @@
**Don't update the following dependencies**

- handlebars
- mocha
- mocha-parallel-tests
- marked
- live-server
- ts-simple-ast
- mocha
- mocha-parallel-tests
- ts-simple-ast
2,819 changes: 1,437 additions & 1,382 deletions package-lock.json

Large diffs are not rendered by default.

59 changes: 31 additions & 28 deletions package.json
@@ -1,14 +1,14 @@
{
"name": "@compodoc/compodoc",
"version": "1.1.8",
"version": "1.1.9",
"description": "The missing documentation tool for your Angular application",
"main": "dist/index.js",
"bin": {
"compodoc": "./bin/index-cli.js"
},
"scripts": {
"build": "rollup -c rollup/rollup.config.js -i ./src/index-cli.ts -o dist/index-cli.js -f cjs && rollup -c rollup/rollup.config.js -i ./src/index.ts -o dist/index.js -f cjs",
"changelog": " auto-changelog -o CH.md --template tools/changelog-template.hbs --starting-commit XXX",
"changelog": " auto-changelog -o CH.md --template tools/changelog-template.hbs --starting-commit f597531e",
"download-api-list": "node tools/download-api-list.js",
"start": "npm run test:watch",
"pretest": "tsc -p test/tsconfig.json && node test/dist/cli/cli-clean-root-folder.js",
Expand Down Expand Up @@ -69,60 +69,63 @@
"@compodoc/ngd-transformer": "^2.0.0",
"chalk": "^2.4.2",
"cheerio": "^1.0.0-rc.2",
"chokidar": "^2.1.0",
"chokidar": "^2.1.2",
"colors": "^1.3.3",
"commander": "2.19.0",
"cosmiconfig": "^5.0.7",
"commander": "^2.19.0",
"cosmiconfig": "^5.1.0",
"fancy-log": "^1.3.3",
"findit2": "^2.2.3",
"fs-extra": "^7.0.1",
"glob": "^7.1.3",
"handlebars": "4.0.10",
"handlebars": "^4.1.0",
"html-entities": "^1.2.1",
"i18next": "^14.1.1",
"i18next": "^15.0.4",
"inside": "^1.0.0",
"json5": "^2.1.0",
"live-server": "1.2.1",
"live-server": "^1.2.1",
"lodash": "^4.17.11",
"lunr": "2.3.5",
"marked": "^0.4.0",
"lunr": "^2.3.6",
"marked": "^0.6.1",
"minimist": "^1.2.0",
"opencollective": "^1.0.3",
"os-name": "^3.0.0",
"pdfmake": "^0.1.53",
"semver": "^5.6.0",
"traverse": "^0.6.6",
"ts-simple-ast": "12.4.0",
"uuid": "^3.3.2"
},
"devDependencies": {
"@types/chai": "4.1.7",
"@types/fs-extra": "5.0.4",
"@types/handlebars": "^4.0.39",
"@types/lodash": "^4.14.120",
"@types/marked": "0.4.2",
"@types/mocha": "2.2.48",
"@types/node": "10.12.21",
"@types/chai": "^4.1.7",
"@types/fs-extra": "^5.0.5",
"@types/handlebars": "^4.0.40",
"@types/lodash": "^4.14.121",
"@types/marked": "^0.6.1",
"@types/mocha": "^2.2.48",
"@types/node": "^11.9.6",
"@types/semver": "^5.5.0",
"@types/traverse": "^0.6.32",
"auto-changelog": "^1.11.0",
"chai": "^4.2.0",
"codecov": "^3.1.0",
"cross-env": "5.2.0",
"codecov": "^3.2.0",
"cross-env": "^5.2.0",
"husky": "^1.3.1",
"mocha": "3.5.3",
"mocha-parallel-tests": "1.2.10",
"nodemon": "^1.18.9",
"npm-watch": "0.6.0",
"nyc": "13.2.0",
"mocha": "^3.5.3",
"mocha-parallel-tests": "^1.2.10",
"nodemon": "^1.18.10",
"npm-watch": "^0.6.0",
"nyc": "^13.3.0",
"pdfjs-dist": "^2.0.943",
"prettier": "^1.16.4",
"pretty-quick": "^1.10.0",
"request": "^2.88.0",
"rimraf": "^2.6.3",
"rollup": "1.1.2",
"rollup": "^1.4.0",
"rollup-plugin-typescript": "^1.0.0",
"rollup-watch": "^4.3.1",
"selenium-webdriver": "^4.0.0-alpha.1",
"ts-node": "8.0.2",
"tslint": "^5.12.1"
"ts-node": "^8.0.2",
"tslint": "^5.13.1"
},
"nyc": {
"include": [
Expand All @@ -146,7 +149,7 @@
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
"pre-commit": "pretty-quick --staged --pattern \"**/*.ts\""
}
}
}
27 changes: 17 additions & 10 deletions src/app/application.ts
Expand Up @@ -40,7 +40,6 @@ import {

import { AdditionalNode } from './interfaces/additional-node.interface';
import { CoverageData } from './interfaces/coverageData.interface';
import { resolve } from 'url';

let cwd = process.cwd();
let startTime = new Date();
Expand Down Expand Up @@ -751,7 +750,7 @@ export class Application {
const parsedSummaryData = JSON.parse(summaryData);

let that = this;
let lastLevelOnePage = null;
let lastLevelOnePage = undefined;

traverse(parsedSummaryData).forEach(function() {
// tslint:disable-next-line:no-invalid-this
Expand Down Expand Up @@ -782,14 +781,14 @@ export class Application {
// tslint:disable-next-line:no-invalid-this
this.node.id = id;

let lastElementRootTree = null;
let lastElementRootTree = undefined;
finalDepth.forEach(el => {
let elementTree =
lastElementRootTree === null
typeof lastElementRootTree === 'undefined'
? parsedSummaryData
: lastElementRootTree;
if (typeof elementTree.children !== 'undefined') {
elementTree = elementTree['children'][el];
elementTree = elementTree.children[el];
} else {
elementTree = elementTree[el];
}
Expand Down Expand Up @@ -1871,7 +1870,9 @@ at least one config for the 'info' or 'source' tab in --navTabConfig.`);
f.coveragePercent >= Configuration.mainData.coverageMinimumPerFile;
if (overTest && !Configuration.mainData.coverageTestShowOnlyFailed) {
logger.info(
`${f.coveragePercent} % for file ${f.filePath} - over minimum per file`
`${f.coveragePercent} % for file ${f.filePath} - ${
f.name
} - over minimum per file`
);
}
return overTest;
Expand All @@ -1881,7 +1882,9 @@ at least one config for the 'info' or 'source' tab in --navTabConfig.`);
f.coveragePercent < Configuration.mainData.coverageMinimumPerFile;
if (underTest) {
logger.error(
`${f.coveragePercent} % for file ${f.filePath} - under minimum per file`
`${f.coveragePercent} % for file ${f.filePath} - ${
f.name
} - under minimum per file`
);
}
return underTest;
Expand Down Expand Up @@ -2569,8 +2572,12 @@ at least one config for the 'info' or 'source' tab in --navTabConfig.`);
if (Configuration.mainData.customLogo !== '') {
logger.info(`Custom logo supplied`);
fs.copy(
path.resolve(cwd + path.sep + Configuration.mainData.customLogo),
path.resolve(finalOutput + '/images/logo.png'),
path.resolve(
cwd +
path.sep +
Configuration.mainData.customLogo
),
path.resolve(finalOutput + '/images/' + Configuration.mainData.customLogo.split("/").pop()),
errorCopyLogo => {
// tslint:disable-line
if (errorCopyLogo) {
Expand Down Expand Up @@ -2620,7 +2627,7 @@ at least one config for the 'info' or 'source' tab in --navTabConfig.`);
let len = modules.length;
let loop = () => {
if (i <= len - 1) {
logger.info('Process module graph', modules[i].name);
logger.info('Process module graph ', modules[i].name);
let finalPath = Configuration.mainData.output;
if (Configuration.mainData.output.lastIndexOf('/') === -1) {
finalPath += '/';
Expand Down
9 changes: 8 additions & 1 deletion src/app/compiler/angular-dependencies.ts
Expand Up @@ -175,13 +175,14 @@ export class AngularDependencies extends FrameworkDependencies {
* If one thing extends another, merge them, only for internal sources
* - classes
* - components
* - injectables
* for
* - inputs
* - outputs
* - properties
* - methods
*/
deps = ExtendsMerger.merge(deps, Configuration);
deps = ExtendsMerger.merge(deps);

// RouterParserUtil.printModulesRoutes();
// RouterParserUtil.printRoutes();
Expand Down Expand Up @@ -222,6 +223,9 @@ export class AngularDependencies extends FrameworkDependencies {
if (IO.description) {
deps.description = IO.description;
}
if (IO.rawdescription) {
deps.rawdescription = IO.rawdescription;
}
if (IO.methods) {
deps.methods = IO.methods;
}
Expand Down Expand Up @@ -411,6 +415,9 @@ export class AngularDependencies extends FrameworkDependencies {
if (IO.accessors) {
injectableDeps.accessors = IO.accessors;
}
if (IO.extends) {
injectableDeps.extends = IO.extends;
}
deps = injectableDeps;
if (typeof IO.ignore === 'undefined') {
if (_.includes(IO.implements, 'HttpInterceptor')) {
Expand Down
1 change: 1 addition & 0 deletions src/app/compiler/angular/dependencies.interfaces.ts
Expand Up @@ -12,6 +12,7 @@ export interface IInjectableDep extends IDep {
description: string;
sourceCode: string;
exampleUrls?;
extends?;

accessors?: Object;
constructorObj?: Object;
Expand Down
2 changes: 2 additions & 0 deletions src/app/compiler/angular/deps/component-dep.factory.ts
Expand Up @@ -46,6 +46,7 @@ export class ComponentDepFactory {
hostListeners: IO.hostListeners,

description: IO.description,
rawdescription: IO.rawdescription,
type: 'component',
sourceCode: srcFile.getText(),
exampleUrls: this.helper.getComponentExampleUrls(srcFile.getText()),
Expand Down Expand Up @@ -117,6 +118,7 @@ export interface IComponentDep extends IDep {
hostListeners: Array<any>;

description: string;
rawdescription: string;
sourceCode: string;
exampleUrls: Array<string>;

Expand Down
29 changes: 28 additions & 1 deletion src/app/compiler/angular/deps/helpers/class-helper.ts
Expand Up @@ -169,7 +169,26 @@ export class ClassHelper {
)}: <a href="${path}" target="_blank">${arg.type}</a>`;
} else {
if (arg.type) {
return `${arg.name}${this.getOptionalString(arg)}: ${arg.type}`;
let finalStringifiedArgument = '';
let separator = ':';
if (arg.name) {
finalStringifiedArgument += arg.name;
}
if (
arg.kind === SyntaxKind.AsExpression &&
arg.expression &&
arg.expression.text
) {
finalStringifiedArgument += arg.expression.text;
separator = ' as';
}
if (arg.optional) {
finalStringifiedArgument += this.getOptionalString(arg);
}
if (arg.type) {
finalStringifiedArgument += separator + ' ' + this.visitType(arg.type);
}
return finalStringifiedArgument;
} else if (arg.text) {
return `${arg.text}`;
} else {
Expand Down Expand Up @@ -385,8 +404,10 @@ export class ClassHelper {
sourceFile?: ts.SourceFile
): any {
let symbol = this.typeChecker.getSymbolAtLocation(classDeclaration.name);
let rawdescription = '';
let description = '';
if (symbol) {
rawdescription = this.jsdocParserUtil.getMainCommentOfNode(classDeclaration);
description = marked(this.jsdocParserUtil.getMainCommentOfNode(classDeclaration));
if (symbol.valueDeclaration && isIgnore(symbol.valueDeclaration)) {
return [{ ignore: true }];
Expand Down Expand Up @@ -438,6 +459,7 @@ export class ClassHelper {
if (this.isDirectiveDecorator(classDeclaration.decorators[i])) {
return {
description,
rawdescription: rawdescription,
inputs: members.inputs,
outputs: members.outputs,
hostBindings: members.hostBindings,
Expand All @@ -458,6 +480,7 @@ export class ClassHelper {
fileName,
className,
description,
rawdescription: rawdescription,
methods: members.methods,
indexSignatures: members.indexSignatures,
properties: members.properties,
Expand All @@ -475,6 +498,7 @@ export class ClassHelper {
fileName,
className,
description,
rawdescription: rawdescription,
jsdoctags: jsdoctags,
properties: members.properties,
methods: members.methods
Expand All @@ -486,6 +510,7 @@ export class ClassHelper {
fileName,
className,
description,
rawdescription: rawdescription,
jsdoctags: jsdoctags,
methods: members.methods
}
Expand All @@ -494,6 +519,7 @@ export class ClassHelper {
return [
{
description,
rawdescription: rawdescription,
methods: members.methods,
indexSignatures: members.indexSignatures,
properties: members.properties,
Expand All @@ -511,6 +537,7 @@ export class ClassHelper {
return [
{
description,
rawdescription: rawdescription,
inputs: members.inputs,
outputs: members.outputs,
hostBindings: members.hostBindings,
Expand Down

0 comments on commit d75135b

Please sign in to comment.