Skip to content

Commit 529b37f

Browse files
committed
chore: meta tweaks
1 parent 6d74537 commit 529b37f

File tree

5 files changed

+17
-20
lines changed

5 files changed

+17
-20
lines changed

package.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"src/cli.ts"
4747
],
4848
"clean": true,
49-
"minify": true,
49+
"minify": false,
5050
"splitting": true,
5151
"dts": {
5252
"entry": "src/index.ts",
@@ -67,32 +67,32 @@
6767
]
6868
},
6969
"devDependencies": {
70-
"@commitlint/cli": "17.6.7",
71-
"@commitlint/config-conventional": "17.6.7",
72-
"@types/adm-zip": "0.5.0",
70+
"@commitlint/cli": "17.7.1",
71+
"@commitlint/config-conventional": "17.7.0",
72+
"@types/adm-zip": "0.5.1",
7373
"@types/ini": "1.3.31",
74-
"@types/lodash": "4.14.196",
75-
"@types/node": "20.4.5",
76-
"@types/semver": "7.5.0",
74+
"@types/lodash": "4.14.198",
75+
"@types/node": "20.6.3",
76+
"@types/semver": "7.5.2",
7777
"@types/validate-npm-package-name": "4.0.0",
7878
"adm-zip": "0.5.10",
7979
"cac": "6.7.14",
8080
"env-paths": "3.0.0",
8181
"fast-glob": "3.3.1",
8282
"husky": "8.0.3",
8383
"ini": "4.1.1",
84-
"lint-staged": "13.2.3",
84+
"lint-staged": "14.0.1",
8585
"lodash": "4.17.21",
8686
"node-fetch": "3.3.2",
87-
"ora": "6.3.1",
87+
"ora": "7.0.1",
8888
"prompts": "2.4.2",
8989
"semver": "7.5.4",
90-
"socks-proxy-agent": "8.0.1",
90+
"socks-proxy-agent": "8.0.2",
9191
"ts-standard": "12.0.2",
92-
"tsup": "7.1.0",
93-
"typescript": "5.1.6",
92+
"tsup": "7.2.0",
93+
"typescript": "5.2.2",
9494
"validate-npm-package-name": "5.0.0",
95-
"vitest": "0.33.0"
95+
"vitest": "0.34.4"
9696
},
9797
"engines": {
9898
"node": ">=16"

src/complete.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ test('unit:complete:string', async () => {
3838
})
3939

4040
test('unit:complete:callback', async () => {
41-
const callback = vi.fn<(ctx: Context) => string | Promise<string> | Promise<void>>()
41+
const callback = vi.fn<[ctx: Context], string | Promise<string> | Promise<void>>()
4242
const ctx = context({}, { complete: callback })
4343
await complete(ctx)
4444
expect(callback.mock.calls[0][0]).toBe(ctx)
4545
})
4646

4747
test('unit:complete:callback-return', async () => {
4848
// eslint-disable-next-line @typescript-eslint/no-extra-parens
49-
const callback = vi.fn<(ctx: Context) => string | Promise<string> | Promise<void>>(() => 'completed')
49+
const callback = vi.fn<[ctx: Context], string | Promise<string> | Promise<void>>(() => 'completed')
5050
const ctx = context({}, { complete: callback })
5151
await complete(ctx)
5252
expect(callback).toHaveBeenCalled()
@@ -55,7 +55,7 @@ test('unit:complete:callback-return', async () => {
5555

5656
test('unit:complete:callback-promise', async () => {
5757
// eslint-disable-next-line @typescript-eslint/no-extra-parens
58-
const callback = vi.fn<(ctx: Context) => string | Promise<string> | Promise<void>>(async () => 'completed')
58+
const callback = vi.fn<[ctx: Context], string | Promise<string> | Promise<void>>(async () => 'completed')
5959
const ctx = context({}, { complete: callback })
6060
await complete(ctx)
6161
expect(callback).toHaveBeenCalled()

src/core/config.ts

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ const config = parseIni(path.join(os.homedir(), `.${name}rc`)) ?? {}
3434
// env proxy config
3535
const envProxy = process.env.http_proxy ?? process.env.HTTP_PROXY ?? process.env.https_proxy ?? process.env.HTTPS_PROXY ?? process.env.ALL_PROXY
3636
config.proxy = envProxy ?? config.proxy
37-
3837
if (process.env.no_proxy != null || process.env.NO_PROXY != null) {
3938
delete config.proxy // disable proxy
4039
}

src/prepare.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ test('unit:prepare:custom', async () => {
4242
})
4343

4444
test('unit:prepare:hook', async () => {
45-
const callback = vi.fn<(ctx: Context) => Promise<void>>()
45+
const callback = vi.fn<[ctx: Context], Promise<void>>()
4646
const ctx = context({}, { prepare: callback })
4747
await prepare(ctx)
4848
expect(callback.mock.calls[0][0]).toBe(ctx)

tsconfig.json

-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
{
22
"compilerOptions": {
33
"target": "esnext",
4-
"module": "esnext",
54
"moduleResolution": "node",
65
"esModuleInterop": true,
7-
"allowJs": true,
86
"strict": true
97
}
108
}

0 commit comments

Comments
 (0)