Skip to content

Commit fa7e2c6

Browse files
committed
v11.2.0
1 parent c994c9d commit fa7e2c6

File tree

5 files changed

+1033
-5850
lines changed

5 files changed

+1033
-5850
lines changed

app/index.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
'use strict';
2-
32
const Generator = require('yeoman-generator');
43
const path = require('path');
54

@@ -62,7 +61,7 @@ module.exports = class extends Generator {
6261
});
6362
}
6463

65-
return this.prompt(prompts).then(r => {
64+
return this.prompt(prompts).then((r) => {
6665
this.name = r.name || this.name;
6766
this.description = r.description || this.description;
6867
this.version = r.version || this.version;
@@ -128,7 +127,7 @@ module.exports = class extends Generator {
128127
specification: this.specification,
129128
};
130129

131-
files.forEach(f => {
130+
files.forEach((f) => {
132131
this.fs.copyTpl(
133132
this.templatePath(f),
134133
this.destinationPath(`${this.name}/${f}`),
@@ -155,19 +154,19 @@ module.exports = class extends Generator {
155154

156155
install() {
157156
const appDir = path.join(process.cwd(), this.name);
158-
process.chdir(appDir);
159157
if (this.useYarn) {
160-
this.yarnInstall();
158+
this.spawnCommandSync('yarn', ['install'], { cwd: appDir });
161159
} else {
162-
this.npmInstall();
160+
this.spawnCommandSync('npm', ['install'], { cwd: appDir });
163161
}
164162
}
165163

166164
end() {
165+
const appDir = path.join(process.cwd(), this.name);
167166
if (this.useYarn) {
168-
this.spawnCommandSync('yarn', ['lint:fix']);
167+
this.spawnCommandSync('yarn', ['lint:fix'], { cwd: appDir });
169168
} else {
170-
this.spawnCommandSync('npm', ['run', 'lint:fix']);
169+
this.spawnCommandSync('npm', ['run', 'lint:fix'], { cwd: appDir });
171170
}
172171
}
173172
};

app/templates/package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,36 +18,36 @@
1818
"cookie-parser": "^1.4.5",
1919
"dotenv": "^10.0.0",
2020
"express": "^4.17.1",
21-
"pino": "^6.11.3",
2221
<% if (specification === 'openapi_3') { %>
23-
"express-openapi-validator": "^4.12.11"
22+
"express-openapi-validator": "^4.13.3",
2423
<% } else { %>
25-
"swagger-express-middleware": "^4.0.2"
24+
"swagger-express-middleware": "^4.0.2",
2625
<% } %>
26+
"pino": "^7.4.1"
2727
},
2828
"devDependencies": {
29-
"@types/chai": "^4.2.18",
29+
"@types/chai": "^4.2.22",
3030
"@types/cookie-parser": "^1.4.2",
31-
"@types/express": "^4.17.12",
32-
"@types/mocha": "^8.2.2",
33-
"@types/node": "^15.6.1",
34-
"@types/pino": "^6.3.8",
35-
"@types/shelljs": "^0.8.8",
31+
"@types/express": "^4.17.13",
32+
"@types/mocha": "^9.0.0",
33+
"@types/node": "^16.11.10",
34+
"@types/pino": "^7.0.4",
35+
"@types/shelljs": "^0.8.9",
3636
"@types/supertest": "^2.0.11",
37-
"@typescript-eslint/eslint-plugin": "^4.14.0",
38-
"@typescript-eslint/parser": "^4.14.0",
37+
"@typescript-eslint/eslint-plugin": "^5.4.0",
38+
"@typescript-eslint/parser": "^5.4.0",
3939
"chai": "^4.3.4",
40-
"eslint": "^7.27.0",
40+
"eslint": "^8.3.0",
4141
"eslint-config-prettier": "^8.3.0",
42-
"eslint-plugin-prettier": "^3.4.0",
43-
"mocha": "^8.4.0",
44-
"nodemon": "^2.0.7",
45-
"pino-pretty": "^5.0.1",
46-
"prettier": "^2.3.0",
42+
"eslint-plugin-prettier": "^4.0.0",
43+
"mocha": "^9.1.3",
44+
"nodemon": "^2.0.15",
45+
"pino-pretty": "^7.2.0",
46+
"prettier": "^2.5.0",
4747
"shelljs": "^0.8.4",
48-
"supertest": "^6.1.3",
49-
"ts-node": "^10.0.0",
50-
"typescript": "^4.3.2"
48+
"supertest": "^6.1.6",
49+
"ts-node": "^10.4.0",
50+
"typescript": "^4.5.2"
5151
},
5252
"author": "Carmine DiMascio <[email protected]> (https://github.com/cdimascio)"
5353
}

app/templates/tsconfig.json

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
11
{
22
"compileOnSave": false,
33
"compilerOptions": {
4-
"target":"ES2018",
5-
"module": "commonjs",
6-
"lib": ["es2020"],
7-
"declaration": true,
4+
"target": "ES2019",
5+
"lib": ["ES2020"],
86
"strict": true,
9-
"noImplicitAny": true,
7+
"module": "commonjs",
108
"esModuleInterop": true,
9+
"skipLibCheck": true,
10+
"sourceMap": true,
11+
"declaration": true,
1112
"moduleResolution": "node",
12-
"strictNullChecks": true,
13+
"useUnknownInCatchVariables": false,
14+
"noImplicitAny": true,
1315
"noImplicitThis": true,
14-
"alwaysStrict": true,
15-
"noUnusedLocals": false,
16+
"strictNullChecks": true,
1617
"noUnusedParameters": true,
18+
"noUnusedLocals": false,
1719
"noImplicitReturns": true,
1820
"noFallthroughCasesInSwitch": false,
19-
"skipLibCheck": true,
20-
"sourceMap": true,
2121
"strictPropertyInitialization":false,
22-
"resolveJsonModule": true,
22+
"alwaysStrict": true,
2323
"outDir": "dist",
24-
"typeRoots": ["./node_modules/@types"]
24+
"typeRoots": ["node_modules/@types"],
25+
"resolveJsonModule": true,
26+
"baseUrl": "."
27+
2528
},
2629
"include": ["server/**/*.ts"],
2730
"exclude": ["node_modules"]

0 commit comments

Comments
 (0)