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

Update the minimum supported nodejs version to v10 and fix bugs #28

Merged
merged 5 commits into from
Jan 19, 2021
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
93 changes: 69 additions & 24 deletions package-lock.json

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

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"keywords": [],
"engines": {
"node": ">15.0.0"
"node": ">10.0.0"
},
"files": [
"bin",
Expand All @@ -53,7 +53,7 @@
"@types/cosmiconfig": "^6.0.0",
"@types/express": "^4.17.9",
"@types/markdown-it": "^12.0.1",
"@types/node": "^14.14.20",
"@types/node": "^10.17.51",
"@types/yargs": "^15.0.12",
"@typescript-eslint/eslint-plugin": "^4.12.0",
"@typescript-eslint/parser": "^4.12.0",
Expand All @@ -67,7 +67,8 @@
"pretty-quick": "^3.1.0",
"standard-version": "^9.1.0",
"ts-node": "^9.1.1",
"typescript": "^4.1.3"
"typescript": "^4.1.3",
"@types/fs-extra": "^9.0.6"
},
"dependencies": {
"colorette": "^1.2.1",
Expand All @@ -77,6 +78,7 @@
"express": "^4.17.1",
"markdown-it": "^12.0.4",
"ts-morph": "^9.1.0",
"yargs": "^16.2.0"
"yargs": "^16.2.0",
"fs-extra": "^9.0.1"
}
}
2 changes: 1 addition & 1 deletion src/builders/build-static.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as fs from 'fs';
import * as fsp from 'fs/promises';
import * as fsp from 'fs-extra';
import * as path from 'path';
import { Tree } from '../model';
import { getConfig } from '../model/config';
Expand Down
2 changes: 1 addition & 1 deletion src/themes/html/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Theme } from '../../model';
import MarkdownIt from 'markdown-it';
import * as fsp from 'fs/promises';
import * as fsp from 'fs-extra';
import * as fs from 'fs';
import * as path from 'path';
import { renderFile } from 'eta';
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"target": "ESNext",
"target": "ES2015",
/* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
"module": "commonjs",
/* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
Expand Down Expand Up @@ -74,8 +74,9 @@
/* Advanced Options */
"skipLibCheck": true,
/* Skip type checking of declaration files. */
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
/* Disallow inconsistently-cased references to the same file. */
"lib": ["ESNext"]
},
"include": ["src"],
"exclude": ["build"]
Expand Down
4 changes: 2 additions & 2 deletions views/partials/class.eta
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const {declaration, md} = it;
<% declaration.properties.forEach((property) => { %>
<a id="<%= declaration.name %>.<%= property.name %>" href="#<%= declaration.name %>.<%= property.name %>">
<h5><code>
<%= property.scope ?? ''%>
<%= property.scope || ''%>
<%= property.isStatic ? 'static' : ''%>
<%= property.isAbstract ? 'abstract' : ''%>
<%= property.isReadonly ? 'readonly' : ''%>
Expand All @@ -58,7 +58,7 @@ const {declaration, md} = it;
<% declaration.methods.forEach((method) => { %>
<a id="<%= declaration.name %>.<%= method.name %>" href="#<%= declaration.name %>.<%= method.name %>">
<h5><code>
<%= method.scope ?? ''%>
<%= method.scope || ''%>
<%= method.isStatic ? 'static' : ''%>
<%= method.isAbstract ? 'abstract' : ''%>
<%= method.isAsync ? 'async' : ''%>
Expand Down
2 changes: 1 addition & 1 deletion views/partials/function.eta
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const {declaration, md} = it

<!-- Return type -->
:
<%= declaration.returnType ?? 'any' %>
<%= declaration.returnType || 'any' %>
</code>
</b>
</p>
Expand Down
2 changes: 1 addition & 1 deletion views/partials/variable.eta
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
:

<!-- Variable type or any -->
<%= declaration.declarations[0]?.type ?? 'any' %>
<%= (declaration.declarations[0] && declaration.declarations[0].type) || 'any' %>
</code>
</b>
</p>
Expand Down