Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task/update-dependencies #345

Merged
merged 21 commits into from
Jan 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
## [Unreleased]

### Added

- [#336](https://github.com/CarbonLDP/carbonldp-js-sdk/issues/336) - Support TypeScript strict mode
- [#345](https://github.com/CarbonLDP/carbonldp-js-sdk/pull/345) - Support for TypeScript 3.2
- [#337](https://github.com/CarbonLDP/carbonldp-js-sdk/issues/337) - Retrieve all properties of a document with additional sub-properties<br>
Example:<br>
```typescript
Expand Down
6 changes: 3 additions & 3 deletions build/docs/docs-generator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export = new Package( "docs-generator",
// Special case for main index
if( doc.id === "index" ) return "carbonldp";

return `carbonldp/${doc.id}`;
return `carbonldp/${ doc.id }`;
},
getOutputPath():void {},
} );
Expand All @@ -84,7 +84,7 @@ export = new Package( "docs-generator",
if( doc.id === "CarbonLDP" ) return doc.id;

const id:string = doc.id.replace( /\//g, "." );
return `CarbonLDP.${id}`;
return `CarbonLDP.${ id }`;
},
getOutputPath():void {},
} );
Expand All @@ -94,7 +94,7 @@ export = new Package( "docs-generator",
docTypes: [ "member" ],
getPath( doc:any ):string {
const access:string = doc.isStatic ? "#" : ".";
return `${doc.containerDoc.path}${access}${doc.name}`;
return `${ doc.containerDoc.path }${ access }${ doc.name }`;
},
getOutputPath():void {},
} );
Expand Down
4 changes: 2 additions & 2 deletions build/docs/docs-generator/local-models/ModuleDoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { TypeAlias } from "./TypeAlias";
export interface ModuleDoc extends SuiteDoc {
interfaces:InterfaceDoc[];
classes:ClassDoc[];
enums: EnumDoc[];
typeAliases: TypeAlias[];
enums:EnumDoc[];
typeAliases:TypeAlias[];

reexports:ReexportDoc[];

Expand Down
6 changes: 3 additions & 3 deletions build/docs/docs-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"version": "1.0.0",
"private": true,
"dependencies": {
"dgeni": "^0.4.10",
"dgeni-packages": "^0.26.12",
"dgeni": "^0.4.11",
"dgeni-packages": "^0.27.0",
"glob": "^7.1.3",
"handlebars": "^4.0.12",
"marked": "^0.5.1",
"swag": "^0.7.0",
"typescript": "~2.7.1"
"typescript": "^3.2.2"
},
"devDependencies": {
"@types/handlebars": "^4.0.39"
Expand Down
4 changes: 2 additions & 2 deletions build/docs/docs-generator/processors/normalizeDocs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export class NormalizeDocs implements Processor {
doc.content = this.tsHost.getContent( doc.symbol.getDeclarations()![ 0 ]! );
break;
default:
this.log.error( `Other declaration merged for ${doc.name}` );
this.log.error( `Other declaration merged for ${ doc.name }` );
break;
}

Expand All @@ -161,7 +161,7 @@ export class NormalizeDocs implements Processor {
}

private _addExportDoc( docs:DocCollection, moduleDoc:ModuleDoc, exportDoc:ExportDoc ):void {
this.log.debug( `>>>> EXPORT: ${exportDoc.name} (${exportDoc.docType}) from ${moduleDoc.id}` );
this.log.debug( `>>>> EXPORT: ${ exportDoc.name } (${ exportDoc.docType }) from ${ moduleDoc.id }` );

moduleDoc.exports.push( exportDoc );
docs.push( exportDoc );
Expand Down
11 changes: 6 additions & 5 deletions build/docs/docs-generator/processors/oldDocsTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { FunctionExportDoc } from "dgeni-packages/typescript/api-doc-types/Funct
import { InterfaceExportDoc } from "dgeni-packages/typescript/api-doc-types/InterfaceExportDoc";
import { MemberDoc } from "dgeni-packages/typescript/api-doc-types/MemberDoc";
import { MethodMemberDoc } from "dgeni-packages/typescript/api-doc-types/MethodMemberDoc";
import { OverloadInfo } from "dgeni-packages/typescript/api-doc-types/OverloadInfo";
import { PropertyMemberDoc } from "dgeni-packages/typescript/api-doc-types/PropertyMemberDoc";
import { TypeAliasExportDoc } from "dgeni-packages/typescript/api-doc-types/TypeAliasExportDoc";

Expand Down Expand Up @@ -150,7 +151,7 @@ export class OldDocsTree implements Processor {
if( indexMember ) properties
.push( this._getPropertyLike( <PropertyMemberDoc>{
...indexMember,
name: `[ ${indexMember.parameters.join()} ]`,
name: `[ ${ indexMember.parameters.join() } ]`,
getAccessor: null,
setAccessor: null,
} ) );
Expand Down Expand Up @@ -323,7 +324,7 @@ export class OldDocsTree implements Processor {
return method;
}

private _getMemberLike( doc:{ isStatic?:boolean, isOptional?:boolean } ):MemberLike {
private _getMemberLike( doc:MemberDoc | ConstExportDoc | FunctionExportDoc | OverloadInfo ):MemberLike {
return {
access: ! ("isStatic" in doc) || doc.isStatic
? "static" : "instance",
Expand All @@ -345,7 +346,7 @@ export class OldDocsTree implements Processor {
const typeArguments:string[] = clause.type.typeArguments
.map( _ => this._getPathFromNode( doc, _ ) );

return `${mainPath}<${typeArguments.join( ", " )}>`;
return `${ mainPath }<${ typeArguments.join( ", " ) }>`;
} );

}
Expand Down Expand Up @@ -396,13 +397,13 @@ export class OldDocsTree implements Processor {
if( ! doc ) return text;

return opts.keepName
? `{@link ${doc.path} ${text}}`
? `{@link ${ doc.path } ${ text }}`
: doc.path;
}

private _getExpandedType( doc:CheckedApiDoc, type:string, opts?:{ keepName?:boolean } ):string {
return type.replace( TYPE_LABELS_REGEX, ( _, before, label ) =>
`${before}${this._getPathFromName( doc, label, opts )}`
`${ before }${ this._getPathFromName( doc, label, opts ) }`
);
}
}
Expand Down
10 changes: 7 additions & 3 deletions build/docs/docs-generator/services/getLinkInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ export interface InvalidLink extends LinkInfo {
export default function getLinkInfo( encodeCodeBlock:Function ):Function {
function getDocFromAlias( url:string, doc:IndexDoc ):ApiDoc | undefined {
return doc.docs.find( _ => {
const inAlias:boolean = _.aliases.some( __ => __ === url );
const inAlias:boolean = _.aliases.some( __ =>
__ === url ||
(url.endsWith( "()" ) ? __ === `${ url.slice( 0, - 2 ) }_0()` : false)
);

if( inAlias ) return inAlias;

return _.path === url;
Expand All @@ -34,15 +38,15 @@ export default function getLinkInfo( encodeCodeBlock:Function ):Function {

const doc:ApiDoc | undefined = getDocFromAlias( url, currentDoc );

if( ! doc ) return <InvalidLink> {
if( ! doc ) return <InvalidLink>{
url: "#",
title: title || url,
valid: false,
errorType: "missing",
error: `Invalid link (does not match any doc): "${ url }"`,
};

return <ValidLink> {
return <ValidLink>{
url: `#${ toURL( doc.path ) }`,
type: "doc",
valid: true,
Expand Down
8 changes: 4 additions & 4 deletions docs/index.html

Large diffs are not rendered by default.

Loading