nodejs-quickstart-structure 1.8.0 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.8.2] - 2026-02-22
|
|
9
|
+
### Fixed
|
|
10
|
+
- Hotfix: Changed `cpx2` command to its actual executable binary `cpx` in the build script. This resolves `sh: cpx2: not found` failures when running `npm run build` or `docker-compose up --build`.
|
|
11
|
+
|
|
12
|
+
## [1.8.1] - 2026-02-22
|
|
13
|
+
### Security
|
|
14
|
+
- Resolved all high-severity npm vulnerabilities (0 vulnerabilities detected on install).
|
|
15
|
+
- Upgraded ESLint to v9 and `typescript-eslint` to v8, migrating generated templates from `.eslintrc.json` to Flat Config (`eslint.config.mjs`) to eliminate deprecated `eslint@8` transitive dependencies.
|
|
16
|
+
- Upgraded `supertest` to v7, `rimraf` to v6, and `ejs` to v3.1.10.
|
|
17
|
+
- Replaced vulnerable `copyfiles` dependency with `cpx2` for view template orchestration.
|
|
18
|
+
- Configured npm `overrides` for `minimatch@^10.2.1` to patch outdated `jest` sub-dependencies without breaking the test runner.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
- Fixed `npm install` crashing due to `husky install` expecting an initialized `.git` directory by adding a graceful fallback wrapper.
|
|
22
|
+
|
|
8
23
|
## [1.8.0] - 2026-02-18
|
|
9
24
|
### Added
|
|
10
25
|
- Introduced **GitLab CI/CD pipeline support**:
|
|
@@ -60,9 +60,9 @@ export const renderDockerfile = async (templatesDir, targetDir, config) => {
|
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
export const renderProfessionalConfig = async (templatesDir, targetDir, language) => {
|
|
63
|
-
const eslintTemplate = await fs.readFile(path.join(templatesDir, 'common', '.
|
|
63
|
+
const eslintTemplate = await fs.readFile(path.join(templatesDir, 'common', 'eslint.config.mjs.ejs'), 'utf-8');
|
|
64
64
|
const eslintContent = ejs.render(eslintTemplate, { language });
|
|
65
|
-
await fs.writeFile(path.join(targetDir, '.
|
|
65
|
+
await fs.writeFile(path.join(targetDir, 'eslint.config.mjs'), eslintContent);
|
|
66
66
|
|
|
67
67
|
await fs.copy(path.join(templatesDir, 'common', '.prettierrc'), path.join(targetDir, '.prettierrc'));
|
|
68
68
|
await fs.copy(path.join(templatesDir, 'common', '.lintstagedrc'), path.join(targetDir, '.lintstagedrc'));
|
package/package.json
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import eslint from '@eslint/js';
|
|
2
|
+
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
3
|
+
import globals from 'globals';
|
|
4
|
+
<% if (language === 'TypeScript') { %>import tseslint from 'typescript-eslint';
|
|
5
|
+
|
|
6
|
+
export default tseslint.config(
|
|
7
|
+
eslint.configs.recommended,
|
|
8
|
+
...tseslint.configs.recommended,
|
|
9
|
+
eslintConfigPrettier,
|
|
10
|
+
{
|
|
11
|
+
languageOptions: {
|
|
12
|
+
globals: {
|
|
13
|
+
...globals.node,
|
|
14
|
+
...globals.jest,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
rules: {
|
|
18
|
+
"no-console": "warn",
|
|
19
|
+
"no-unused-vars": "off",
|
|
20
|
+
"@typescript-eslint/no-unused-vars": "warn"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
);<% } else { %>
|
|
24
|
+
export default [
|
|
25
|
+
eslint.configs.recommended,
|
|
26
|
+
eslintConfigPrettier,
|
|
27
|
+
{
|
|
28
|
+
languageOptions: {
|
|
29
|
+
ecmaVersion: 'latest',
|
|
30
|
+
sourceType: 'module',
|
|
31
|
+
globals: {
|
|
32
|
+
...globals.node,
|
|
33
|
+
...globals.jest,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
rules: {
|
|
37
|
+
"no-console": "warn",
|
|
38
|
+
"no-unused-vars": "warn"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
];<% } %>
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "<% if (language === 'TypeScript') { %>node dist/index.js<% } else { %>node src/index.js<% } %>",
|
|
8
8
|
"dev": "<% if (language === 'TypeScript') { %>nodemon --exec ts-node -r tsconfig-paths/register src/index.ts<% } else { %>nodemon src/index.js<% } %>"<% if (language === 'TypeScript') { %>,
|
|
9
|
-
"build": "rimraf dist && tsc && tsc-alias<% if (viewEngine && viewEngine !== 'None') { %> &&
|
|
10
|
-
"lint": "eslint .
|
|
11
|
-
"lint:fix": "eslint . --
|
|
9
|
+
"build": "rimraf dist && tsc && tsc-alias<% if (viewEngine && viewEngine !== 'None') { %> && cpx \"src/views/**/*\" dist/views<% } %>"<% } %>,
|
|
10
|
+
"lint": "eslint .",
|
|
11
|
+
"lint:fix": "eslint . --fix",
|
|
12
12
|
"format": "prettier --write .",
|
|
13
|
-
"prepare": "husky install",
|
|
13
|
+
"prepare": "node -e \"try { require('child_process').execSync('husky install'); } catch (e) { console.log('Not a git repository, skipping husky install'); }\"",
|
|
14
14
|
"test": "jest",
|
|
15
15
|
"test:watch": "jest --watch",
|
|
16
16
|
"test:coverage": "jest --coverage"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<% } -%>
|
|
35
35
|
<% if (caching === 'Redis') { %> "ioredis": "^5.3.2",
|
|
36
36
|
<% } -%>
|
|
37
|
-
<% if (viewEngine === 'EJS') { %> "ejs": "^3.1.
|
|
37
|
+
<% if (viewEngine === 'EJS') { %> "ejs": "^3.1.10",
|
|
38
38
|
<% } -%>
|
|
39
39
|
<% if (viewEngine === 'Pug') { %> "pug": "^3.0.2",
|
|
40
40
|
<% } -%>
|
|
@@ -55,7 +55,6 @@
|
|
|
55
55
|
"@types/node": "^20.10.5",
|
|
56
56
|
"@types/express": "^4.17.21",
|
|
57
57
|
"@types/cors": "^2.8.17",
|
|
58
|
-
"@types/dotenv": "^8.2.0",
|
|
59
58
|
"@types/hpp": "^0.2.3",
|
|
60
59
|
<% if (caching === 'Redis') { %> "@types/ioredis": "^5.0.0",
|
|
61
60
|
<% } -%>
|
|
@@ -65,26 +64,30 @@
|
|
|
65
64
|
"@types/sequelize": "^4.28.19",
|
|
66
65
|
<%_ } -%>
|
|
67
66
|
"@types/morgan": "^1.9.9",
|
|
68
|
-
"rimraf": "^
|
|
69
|
-
"
|
|
70
|
-
"eslint": "^
|
|
71
|
-
"
|
|
72
|
-
"
|
|
67
|
+
"rimraf": "^6.0.1"<% if (viewEngine && viewEngine !== 'None') { %>,
|
|
68
|
+
"cpx2": "^8.0.0"<% } %><% } %>,
|
|
69
|
+
"eslint": "^9.20.1",
|
|
70
|
+
"@eslint/js": "^9.20.0",
|
|
71
|
+
"globals": "^15.14.0",
|
|
72
|
+
"prettier": "^3.5.1",
|
|
73
|
+
"eslint-config-prettier": "^10.0.1",
|
|
73
74
|
"husky": "^8.0.3",
|
|
74
|
-
"lint-staged": "^15.
|
|
75
|
-
"
|
|
76
|
-
"@typescript-eslint/parser": "^6.18.1",
|
|
75
|
+
"lint-staged": "^15.4.3"<% if (language === 'TypeScript') { %>,
|
|
76
|
+
"typescript-eslint": "^8.24.1",
|
|
77
77
|
<% if (communication === 'REST APIs') { %> "@types/swagger-ui-express": "^4.1.6",
|
|
78
78
|
"@types/swagger-jsdoc": "^6.0.4",<% } -%>
|
|
79
79
|
"jest": "^29.7.0",
|
|
80
|
-
"ts-jest": "^29.
|
|
81
|
-
"@types/jest": "^29.5.
|
|
82
|
-
"supertest": "^
|
|
80
|
+
"ts-jest": "^29.2.5",
|
|
81
|
+
"@types/jest": "^29.5.14",
|
|
82
|
+
"supertest": "^7.1.3",
|
|
83
83
|
"tsconfig-paths": "^4.2.0",
|
|
84
|
-
"tsc-alias": "^1.8.
|
|
84
|
+
"tsc-alias": "^1.8.10",
|
|
85
85
|
"@types/supertest": "^6.0.2"<% } else { %>,
|
|
86
86
|
"jest": "^29.7.0",
|
|
87
|
-
"supertest": "^
|
|
87
|
+
"supertest": "^7.1.3"<% } %>
|
|
88
|
+
},
|
|
89
|
+
"overrides": {
|
|
90
|
+
"minimatch": "^10.2.1"
|
|
88
91
|
},
|
|
89
92
|
"lint-staged": {
|
|
90
93
|
"*.{js,ts}": [
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"node": true,
|
|
4
|
-
"es2021": true,
|
|
5
|
-
"jest": true
|
|
6
|
-
},
|
|
7
|
-
"extends": [
|
|
8
|
-
"eslint:recommended",
|
|
9
|
-
"prettier"<% if (language === 'TypeScript') { %>,
|
|
10
|
-
"plugin:@typescript-eslint/recommended"<% } %>
|
|
11
|
-
],
|
|
12
|
-
"parserOptions": {
|
|
13
|
-
"ecmaVersion": "latest",
|
|
14
|
-
"sourceType": "module"
|
|
15
|
-
}<% if (language === 'TypeScript') { %>,
|
|
16
|
-
"parser": "@typescript-eslint/parser",
|
|
17
|
-
"plugins": ["@typescript-eslint"]<% } %>,
|
|
18
|
-
"rules": {
|
|
19
|
-
"no-console": "warn",
|
|
20
|
-
<% if (language === 'TypeScript') { %>
|
|
21
|
-
"no-unused-vars": "off",
|
|
22
|
-
"@typescript-eslint/no-unused-vars": "warn"
|
|
23
|
-
<% } else { %>
|
|
24
|
-
"no-unused-vars": "warn"<% } %>
|
|
25
|
-
}
|
|
26
|
-
}
|