Skip to content

Commit 4a5bb2e

Browse files
committed
feat: update package.json and tsconfig for improved build process and dependencies
1 parent 1defa76 commit 4a5bb2e

3 files changed

Lines changed: 72 additions & 46 deletions

File tree

‎package.json‎

Lines changed: 46 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,38 @@
11
{
22
"name": "@srcpush/code-push-cli",
3-
"version": "0.0.2",
3+
"version": "0.1.0",
44
"description": "Management CLI for the CodePush service",
5-
"main": "./script/cli.js",
5+
"type": "commonjs",
6+
"main": "./dist/index.js",
7+
"types": "./dist/index.d.ts",
68
"scripts": {
7-
"start": "node ./bin/script/cli.js",
8-
"build": "tsc",
9-
"prettier": "prettier --write \"./**/*.ts\"",
10-
"lint": "npx eslint ./script/**/*.ts",
11-
"lint:fix": "npx eslint ./script/**/*.ts --fix"
9+
"start": "node ./dist/cli.js",
10+
"build": "vite build",
11+
"dev": "vite build --watch",
12+
"test": "vitest run",
13+
"test:watch": "vitest",
14+
"test:coverage": "vitest run --coverage",
15+
"typecheck": "tsc --noEmit -p tsconfig.build.json",
16+
"lint": "eslint src tests",
17+
"lint:fix": "eslint src tests --fix",
18+
"format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
19+
"format:check": "prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"",
20+
"prepublishOnly": "npm run build"
1221
},
1322
"bin": {
14-
"srcpush": "./bin/script/cli.js"
23+
"srcpush": "./dist/cli.js"
1524
},
25+
"files": [
26+
"dist",
27+
"docs"
28+
],
1629
"repository": {
1730
"type": "git",
1831
"url": "https://github.com/srcpush/code-push-cli"
1932
},
33+
"engines": {
34+
"node": ">=18.0.0"
35+
},
2036
"private": false,
2137
"publishConfig": {
2238
"access": "public"
@@ -27,50 +43,46 @@
2743
"Source Push"
2844
],
2945
"dependencies": {
30-
"backslash": "^0.2.0",
46+
"@inquirer/prompts": "^7.5.1",
3147
"chalk": "^4.1.2",
3248
"cli-table": "^0.3.11",
49+
"date-fns": "^4.1.0",
3350
"email-validator": "^2.0.4",
3451
"gradle-to-js": "2.0.1",
3552
"jsonwebtoken": "^9.0.2",
36-
"moment": "^2.29.4",
3753
"opener": "^1.5.2",
3854
"parse-duration": "2.1.6",
55+
"pathe": "^2.0.3",
3956
"plist": "^3.0.6",
4057
"progress": "^2.0.3",
41-
"prompt": "^1.3.0",
4258
"properties": "^1.2.1",
43-
"q": "~1.5.1",
4459
"recursive-fs": "2.1.0",
45-
"rimraf": "^4.0.0",
46-
"semver": "^7.5.3",
60+
"rimraf": "^6.0.1",
61+
"semver": "^7.7.2",
4762
"simctl": "^2.0.3",
48-
"slash": "1.0.0",
49-
"superagent": "^8.0.9",
63+
"superagent": "^10.2.1",
5064
"temp": "^0.9.4",
51-
"which": "^1.2.7",
65+
"which": "^5.0.0",
5266
"wordwrap": "1.0.0",
5367
"xcode": "^3.0.1",
54-
"xml2js": "^0.6.0",
68+
"xml2js": "^0.6.2",
5569
"yargs": "^17.7.2",
56-
"yazl": "^2.5.1"
70+
"yazl": "^3.3.1"
5771
},
5872
"devDependencies": {
59-
"@types/express": "^4.17.17",
60-
"@types/jest": "^29.5.2",
61-
"@types/mocha": "^10.0.1",
62-
"@types/node": "^20.3.1",
63-
"@types/q": "^1.5.5",
64-
"@types/sinon": "^10.0.15",
65-
"@typescript-eslint/eslint-plugin": "^6.0.0",
66-
"@typescript-eslint/parser": "^6.0.0",
67-
"eslint": "^8.45.0",
68-
"express": "^4.19.2",
73+
"@types/node": "^22.15.21",
74+
"@types/xml2js": "^0.4.14",
75+
"@typescript-eslint/eslint-plugin": "^8.32.1",
76+
"@typescript-eslint/parser": "^8.32.1",
77+
"@vitest/coverage-v8": "^3.1.4",
78+
"eslint": "^9.27.0",
79+
"express": "^4.21.2",
6980
"mkdirp": "^3.0.1",
70-
"prettier": "^2.8.8",
71-
"sinon": "15.1.2",
81+
"prettier": "^3.5.3",
7282
"superagent-mock": "^4.0.0",
73-
"typescript": "^5.1.3",
74-
"which": "^3.0.1"
83+
"typescript": "^5.8.3",
84+
"vite": "^6.3.5",
85+
"vite-plugin-dts": "^4.5.4",
86+
"vitest": "^3.1.4"
7587
}
76-
}
88+
}

‎tsconfig.build.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"include": ["src/**/*"],
4+
"exclude": ["dist", "node_modules", "tests"]
5+
}

‎tsconfig.json‎

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
{
2-
"compilerOptions": {
3-
"module": "commonjs",
4-
"noImplicitAny": false,
5-
"target": "ES2022",
6-
"outDir": "./bin",
7-
"skipLibCheck": true,
8-
},
9-
"exclude": [
10-
"./bin",
11-
"./node_modules"
12-
]
13-
}
2+
"compilerOptions": {
3+
"target": "ES2022",
4+
"module": "ESNext",
5+
"moduleResolution": "bundler",
6+
"lib": ["ES2022"],
7+
"strict": true,
8+
"noImplicitAny": true,
9+
"esModuleInterop": true,
10+
"skipLibCheck": true,
11+
"resolveJsonModule": true,
12+
"declaration": true,
13+
"declarationMap": true,
14+
"sourceMap": true,
15+
"baseUrl": ".",
16+
"paths": {
17+
"@/*": ["src/*"]
18+
}
19+
},
20+
"include": ["src/**/*", "tests/**/*", "vite.config.ts", "vitest.config.ts"],
21+
"exclude": ["dist", "node_modules"]
22+
}

0 commit comments

Comments
 (0)