Skip to content

Commit aa0df63

Browse files
sorccuclaude
andauthored
chore: update CLI dependencies (#1294)
* chore(cli): remove unnecessary @types/glob dependency glob@10 ships its own TypeScript types, making @types/glob redundant. Removing it also resolves an upcoming type conflict with newer minimatch versions where @types/glob references removed IOptions/IMinimatch exports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore(cli): remove duplicate simple-git-hooks devDependency simple-git-hooks is configured and used at the monorepo root level. The copy in packages/cli was redundant. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore(create-cli): remove unused config and @types/config devDependencies Neither package is imported anywhere in create-checkly source code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cli): upgrade TypeScript to v6 and update eslint tooling - Upgrade typescript from 5.3.3 to 6.0.3 in both packages - Upgrade @typescript-eslint/typescript-estree from 8.50.0 to 8.59.2 (required for TS 6 peer dependency compatibility) - Upgrade typescript-eslint from 8.30.0 to 8.59.2 Adapt to TypeScript 6 breaking changes: - Change rootDirs to rootDir (TS 6 requires explicit rootDir) - Add types: ["node"] (TS 6 defaults types to [] instead of all @types) - Add skipLibCheck: true (transitive lru-cache types incompatibility) - Include tsconfig.tsbuildinfo in clean scripts (now lives outside dist/) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore(cli): update oclif packages to latest minor versions - @oclif/core 4.8.0 → 4.11.1 - @oclif/plugin-help 6.2.36 → 6.2.46 - @oclif/plugin-not-found 3.2.73 → 3.2.82 - @oclif/plugin-warn-if-update-available 3.1.53 → 3.1.62 - oclif (dev) 4.22.56 → 4.23.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore(cli): update acorn packages - acorn 8.15.0 → 8.16.0 - acorn-walk 8.3.4 → 8.3.5 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore(cli): update uuid 11.1.0 → 11.1.1 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore(cli): update type definition packages - @types/debug 4.1.12 → 4.1.13 - @types/node 22.14.1 → 22.19.17 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore(cli): update dev/testing dependencies - @playwright/test 1.57.0 → 1.59.1 - cross-env 7.0.3 → 10.1.0 (major, drop-in CLI replacement) - nanoid 3.3.11 → 3.3.12 - tar 7.5.7 → 7.5.14 - vitest 3.1.2 → 4.1.5 (major, no config changes needed) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore(cli): update networking dependencies - axios 1.13.5 → 1.16.0 (security fixes for SSRF, header injection) - mqtt 5.14.1 → 5.15.1 (transitive security fixes) - proxy-from-env 1.1.0 → 2.1.0 (major, same API, stricter URL parsing) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: update linting and code quality dependencies - eslint 9.32.0 → 10.0.1 (major, flat config only) - @eslint/js 9.32.0 → 10.0.1 - @stylistic/eslint-plugin 5.2.2 → 5.10.0 - globals 16.0.0 → 17.6.0 (major, AudioWorklet globals split) - @commitlint/cli 17.8.1 → 20.5.3 (major, ESM) - @commitlint/config-conventional 17.8.1 → 20.5.3 - lint-staged 15.5.1 → 15.5.2 - simple-git-hooks 2.12.1 → 2.13.1 Fix new ESLint 10 recommended rule violations: - preserve-caught-error: add { cause } to re-thrown errors - no-useless-assignment: remove dead variable assignments - @stylistic/indent: auto-fixed indentation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore(cli): update remaining compatible dependencies - ci-info 4.3.1 → 4.4.0 - dotenv 16.5.0 → 16.6.1 - giget 3.1.2 → 3.2.0 - jiti 2.6.1 → 2.7.0 - minimatch 9.0.5 → 9.0.9 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore(cli): update @types/archiver 6.0.3 → 7.0.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore(cli): update jwt-decode 3.1.2 → 4.0.0 Migrate from default import to named import per v4 API change. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: fix transitive dependency vulnerabilities via npm audit fix Patches brace-expansion, minimatch, picomatch, yaml, flatted, and ip-address to resolve all 6 known vulnerabilities. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: fix .gitignore pattern for tsbuildinfo files Change `.tsbuildinfo` to `*.tsbuildinfo` to match files like `tsconfig.tsbuildinfo` which TS 6 places at the project root. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(cli): resolve ts-node + TypeScript 6 moduleResolution deprecation ts-node with TypeScript 6 errors on the implicit moduleResolution "node10" default when module is "commonjs". Fix by: - Adding ignoreDeprecations: "6.0" to ts-node compilerOptions in both CLI and create-CLI loaders - Adding ignoreDeprecations to create-cli tsconfig.json (ts-node picks up this tsconfig when running from subdirectories) - Moving ts-node from devDependencies to optional peerDependencies since it's a runtime fallback loader, not a build requirement - Replacing ts-node with jiti in the prepare:ai-context build script Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: remove accidentally added checkly and jiti from root package.json These were added by a local create-checkly run during e2e debugging. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(cli): roll back vitest to v3 due to Windows bug in v4 Vitest 4's Module Runner generates incorrect file URLs on Windows (missing drive letter in createRequire calls), breaking tests that use require() on fixture files. Rolling back to vitest 3.2.4 until the upstream issue is resolved. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(cli): only set ignoreDeprecations when user has TypeScript 6+ The ignoreDeprecations compiler option is only needed for TS 6+ (which deprecated moduleResolution "node10"). Detect the user's TypeScript version at runtime and only set it when appropriate, avoiding "Unknown compiler option" errors on older TS versions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent acfb34e commit aa0df63

25 files changed

Lines changed: 5408 additions & 5615 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ oclif.manifest.json
1515
local
1616
.env*
1717
.eslintcache
18-
.tsbuildinfo
18+
*.tsbuildinfo
1919
**/checkly-github-report.md
2020
**/checkly-summary.md
2121
**/e2e/__tests__/fixtures/empty-project/e2e-test-project-*

package-lock.json

Lines changed: 5268 additions & 5498 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
"packages/*"
1717
],
1818
"devDependencies": {
19-
"@commitlint/cli": "^17.8.1",
20-
"@commitlint/config-conventional": "^17.8.1",
21-
"@eslint/js": "^9.32.0",
22-
"@stylistic/eslint-plugin": "5.2.2",
23-
"eslint": "^9.32.0",
24-
"globals": "16.0.0",
25-
"lint-staged": "^15.5.1",
19+
"@commitlint/cli": "^20.5.3",
20+
"@commitlint/config-conventional": "^20.5.3",
21+
"@eslint/js": "^10.0.1",
22+
"@stylistic/eslint-plugin": "^5.10.0",
23+
"eslint": "^10.0.1",
24+
"globals": "^17.6.0",
25+
"lint-staged": "^15.5.2",
2626
"rimraf": "5.0.10",
27-
"simple-git-hooks": "^2.12.1",
28-
"typescript-eslint": "8.30.0"
27+
"simple-git-hooks": "^2.13.1",
28+
"typescript-eslint": "^8.59.2"
2929
},
3030
"simple-git-hooks": {
3131
"commit-msg": "npx commitlint --edit",
@@ -34,4 +34,4 @@
3434
"lint-staged": {
3535
"*.{ts,js,mjs}": "npm run lint"
3636
}
37-
}
37+
}

packages/cli/package.json

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
"node": "^18.19.0 || >=20.5.0"
1515
},
1616
"scripts": {
17-
"clean:dist": "rimraf ./dist",
17+
"clean:dist": "rimraf ./dist ./tsconfig.tsbuildinfo",
1818
"clean:gen": "rimraf ./gen",
1919
"clean": "npm run clean:dist && npm run clean:gen",
2020
"prepack": "npx oclif manifest",
21-
"prepare:ai-context": "cross-env CHECKLY_SKIP_AUTH=1 CHECKLY_CLI_VERSION=99.0.0 ./bin/run import plan --root gen --debug-import-plan-input-file ./src/ai-context/context.fixtures.json && ts-node ./scripts/prepare-ai-context.ts",
21+
"prepare:ai-context": "cross-env CHECKLY_SKIP_AUTH=1 CHECKLY_CLI_VERSION=99.0.0 ./bin/run import plan --root gen --debug-import-plan-input-file ./src/ai-context/context.fixtures.json && jiti ./scripts/prepare-ai-context.ts",
2222
"prepare:dist": "tsc --build",
2323
"prepare": "npm run clean && npm run prepare:dist && npm run prepare:ai-context",
2424
"test": "npm pack && vitest --run",
@@ -93,71 +93,73 @@
9393
},
9494
"homepage": "https://github.com/checkly/checkly-cli#readme",
9595
"dependencies": {
96-
"@oclif/core": "^4.8.0",
97-
"@oclif/plugin-help": "^6.2.36",
98-
"@oclif/plugin-not-found": "^3.2.73",
99-
"@oclif/plugin-warn-if-update-available": "^3.1.53",
100-
"@typescript-eslint/typescript-estree": "^8.50.0",
101-
"acorn": "^8.15.0",
102-
"acorn-walk": "^8.3.4",
96+
"@oclif/core": "^4.11.1",
97+
"@oclif/plugin-help": "^6.2.46",
98+
"@oclif/plugin-not-found": "^3.2.82",
99+
"@oclif/plugin-warn-if-update-available": "^3.1.62",
100+
"@typescript-eslint/typescript-estree": "^8.59.2",
101+
"acorn": "^8.16.0",
102+
"acorn-walk": "^8.3.5",
103103
"archiver": "7.0.1",
104-
"axios": "^1.13.5",
104+
"axios": "^1.16.0",
105105
"chalk": "^4.1.2",
106-
"ci-info": "^4.3.1",
106+
"ci-info": "^4.4.0",
107107
"conf": "^10.2.0",
108108
"debug": "^4.4.3",
109-
"dotenv": "^16.5.0",
109+
"dotenv": "^16.6.1",
110110
"execa": "^9.6.1",
111111
"git-repo-info": "^2.1.1",
112112
"glob": "^10.5.0",
113113
"indent-string": "^4.0.0",
114114
"json-stream-stringify": "^3.1.6",
115115
"json5": "^2.2.3",
116-
"jwt-decode": "^3.1.2",
116+
"jwt-decode": "^4.0.0",
117117
"log-symbols": "^4.1.0",
118118
"luxon": "^3.7.2",
119-
"minimatch": "^9.0.5",
120-
"mqtt": "^5.14.1",
119+
"minimatch": "^9.0.9",
120+
"mqtt": "^5.15.1",
121121
"open": "^8.4.2",
122122
"p-queue": "^6.6.2",
123123
"prompts": "^2.4.2",
124-
"proxy-from-env": "^1.1.0",
124+
"proxy-from-env": "^2.1.0",
125125
"recast": "^0.23.11",
126126
"semver": "^7.7.3",
127127
"tunnel": "^0.0.6",
128-
"uuid": "^11.1.0"
128+
"uuid": "^11.1.1"
129129
},
130130
"devDependencies": {
131-
"@playwright/test": "^1.57.0",
132-
"@types/archiver": "6.0.3",
131+
"@playwright/test": "^1.59.1",
132+
"@types/archiver": "^7.0.0",
133133
"@types/config": "^3.3.5",
134-
"@types/debug": "^4.1.12",
135-
"@types/glob": "^8.1.0",
134+
"@types/debug": "^4.1.13",
136135
"@types/luxon": "^3.7.1",
137-
"@types/node": "^22.14.1",
136+
"@types/node": "^22.19.17",
138137
"@types/prompts": "^2.4.9",
139138
"@types/semver": "^7.7.1",
140139
"@types/tunnel": "^0.0.7",
141140
"@types/uuid": "^10.0.0",
142141
"@types/ws": "^8.5.5",
143142
"config": "^3.3.12",
144-
"cross-env": "^7.0.3",
145-
"jiti": "^2.6.1",
146-
"nanoid": "^3.3.11",
147-
"oclif": "^4.22.56",
143+
"cross-env": "^10.1.0",
144+
"jiti": "^2.7.0",
145+
"nanoid": "^3.3.12",
146+
"oclif": "^4.23.0",
148147
"rimraf": "^5.0.10",
149-
"simple-git-hooks": "^2.12.1",
150-
"tar": "^7.5.7",
148+
"tar": "^7.5.14",
151149
"ts-node": "^10.9.2",
152-
"typescript": "^5.3.3",
153-
"vitest": "3.1.2"
150+
"typescript": "^6.0.3",
151+
"vitest": "^3.2.4"
154152
},
155153
"peerDependencies": {
156-
"jiti": ">=2"
154+
"jiti": ">=2",
155+
"ts-node": ">=10"
157156
},
158157
"peerDependenciesMeta": {
159158
"jiti": {
160159
"optional": true
160+
},
161+
"ts-node": {
162+
"optional": true
161163
}
162164
}
163165
}

packages/cli/src/auth/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import axios, { type AxiosError } from 'axios'
22
import * as os from 'os'
33
import * as http from 'http'
44
import * as crypto from 'crypto'
5-
import jwtDecode from 'jwt-decode'
5+
import { jwtDecode } from 'jwt-decode'
66
import { getDefaults as getApiDefaults } from '../rest/api'
77
import { assignProxy } from '../services/proxy'
88
import * as fs from 'fs'

packages/cli/src/commands/env/add.ts

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,11 @@ export default class EnvAdd extends AuthCommand {
3939
const { locked, secret } = flags
4040

4141
const envVariableName = args.key
42-
let envValue = ''
43-
// check if env variable exists
44-
if (args.value) {
45-
envValue = args.value
46-
} else {
47-
const response = await prompts({
48-
type: 'password',
49-
name: 'value',
50-
message: `What is the value of ${envVariableName}?`,
51-
})
52-
53-
envValue = response.value
54-
}
42+
const envValue = args.value ?? (await prompts({
43+
type: 'password',
44+
name: 'value',
45+
message: `What is the value of ${envVariableName}?`,
46+
})).value
5547
try {
5648
await api.environmentVariables.add(envVariableName, envValue, locked, secret)
5749
this.style.shortSuccess(secret

packages/cli/src/commands/env/update.ts

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,11 @@ export default class EnvUpdate extends AuthCommand {
4040
const { locked, secret } = flags
4141

4242
const envVariableName = args.key
43-
let envValue = ''
44-
// check if env variable arg exists
45-
if (args.value) {
46-
envValue = args.value
47-
} else {
48-
const response = await prompts({
49-
type: 'password',
50-
name: 'value',
51-
message: `What is the value of ${envVariableName}?`,
52-
})
53-
54-
envValue = response.value
55-
}
43+
const envValue = args.value ?? (await prompts({
44+
type: 'password',
45+
name: 'value',
46+
message: `What is the value of ${envVariableName}?`,
47+
})).value
5648
try {
5749
await api.environmentVariables.update(envVariableName, envValue, locked, secret)
5850
this.style.shortSuccess(secret

packages/cli/src/commands/import/plan.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,7 @@ function parseFilter (spec: string): ImportPlanFilter {
15341534
}
15351535
} catch (err) {
15361536
if (err instanceof InvalidResourceIdentifierError) {
1537-
throw new Error(`Invalid resource specifier '${spec}': ${err.message}`)
1537+
throw new Error(`Invalid resource specifier '${spec}': ${err.message}`, { cause: err })
15381538
}
15391539

15401540
throw err

packages/cli/src/commands/init.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ export default class Init extends BaseCommand {
363363
}
364364
}
365365

366+
// eslint-disable-next-line no-useless-assignment
366367
let nextContext = detectProjectContext(projectDir)
367368

368369
const depsResult = await runDepsInstall(

packages/cli/src/commands/rules.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ export default class Rules extends BaseCommand {
118118
} catch (error) {
119119
throw new Error(
120120
`Failed to read base rules file at ${BASE_RULES_FILE_PATH}: ${error}`,
121+
{ cause: error },
121122
)
122123
}
123124
}

0 commit comments

Comments
 (0)