nsbp-cli 0.2.37 → 0.2.39

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/README.md CHANGED
@@ -147,7 +147,7 @@ node ./bin/nsbp.js --help # Test CLI locally
147
147
 
148
148
  - **Package Name**: `nsbp-cli`
149
149
  - **Bin Command**: `nsbp` (install globally and run `nsbp --help`)
150
- - **Version**: `0.2.37`
150
+ - **Version**: `0.2.39`
151
151
  - **Dependencies**: chalk, commander, fs-extra, inquirer
152
152
  - **Package Manager**: Uses pnpm (also compatible with npm)
153
153
  - **Node Version**: >=16.0.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nsbp-cli",
3
- "version": "0.2.37",
3
+ "version": "0.2.39",
4
4
  "description": "CLI tool for creating NSBP (Node React SSR by Webpack) projects",
5
5
  "main": "index.js",
6
6
  "homepage": "https://nsbp.erishen.cn/",
@@ -29,7 +29,9 @@ module.exports = [
29
29
  'webpack.server.js',
30
30
  '.prettierrc.js',
31
31
  'cli/**',
32
- 'scripts/**'
32
+ 'scripts/**',
33
+ 'jest.setup.*',
34
+ 'jest.config.*'
33
35
  ]
34
36
  },
35
37
  {
@@ -0,0 +1,4 @@
1
+ module.exports = {
2
+ testEnvironment: 'jsdom',
3
+ testMatch: ['**/*.test.{ts,tsx}']
4
+ }
@@ -18,7 +18,7 @@
18
18
  "format": "prettier --write **/*.{js,css,less,scss,ts,tsx}",
19
19
  "lint": "eslint src --ext .ts,.tsx,.js,.jsx",
20
20
  "lint:fix": "eslint src --ext .ts,.tsx,.js,.jsx --fix",
21
- "test": "echo \"Error: no test specified\" && exit 1",
21
+ "test": "jest",
22
22
  "prepare": "husky"
23
23
  },
24
24
  "keywords": [
@@ -63,10 +63,17 @@
63
63
  "@babel/plugin-transform-optional-chaining": "^7.25.0",
64
64
  "@babel/preset-env": "^7.25.0",
65
65
  "@babel/preset-react": "^7.24.0",
66
+ "@babel/preset-typescript": "^7.25.0",
66
67
  "@eslint/js": "^9.39.2",
68
+ "@jest/globals": "^30.2.0",
67
69
  "@loadable/babel-plugin": "^5.13.2",
68
70
  "@loadable/webpack-plugin": "^5.15.0",
71
+ "@playwright/test": "^1.44.0",
72
+ "@testing-library/jest-dom": "^6.4.2",
73
+ "@testing-library/react": "^15.0.0",
74
+ "@testing-library/user-event": "^14.5.2",
69
75
  "@types/express": "^5.0.6",
76
+ "@types/jest": "^30.0.0",
70
77
  "@types/loadable__component": "^5.13.3",
71
78
  "@types/loadable__server": "^5.12.5",
72
79
  "@types/lodash": "^4.17.15",
@@ -95,6 +102,8 @@
95
102
  "globals": "^17.0.0",
96
103
  "html-webpack-plugin": "^5.6.0",
97
104
  "husky": "^9.0.0",
105
+ "jest": "^29.7.0",
106
+ "jest-environment-jsdom": "^29.7.0",
98
107
  "less": "^4.2.0",
99
108
  "less-loader": "^12.0.0",
100
109
  "lint-staged": "^15.0.0",
@@ -109,6 +118,7 @@
109
118
  "sass-loader": "^16.0.0",
110
119
  "style-loader": "^4.0.0",
111
120
  "terser-webpack-plugin": "^5.3.0",
121
+ "ts-jest": "^29.1.2",
112
122
  "ts-loader": "^9.5.0",
113
123
  "typescript": "^5.0.0",
114
124
  "typescript-loadable-components-plugin": "^1.0.2",
@@ -0,0 +1,5 @@
1
+ describe('Simple test', () => {
2
+ it('should work', () => {
3
+ expect(1 + 1).toBe(2)
4
+ })
5
+ })