Skip to content

Commit 08df2fb

Browse files
committed
fix: audit remediation - monkeypatch cleanup and code quality
Key changes: - Add cleanupMonkeypatch() to restore util.debuglog after tests - Add guard to prevent double-patching in setupMonkeypatch() - Use null coalescing for CI env vars (avoids 'undefined' in URLs) - Add comments explaining design decisions (internal APIs, token exposure) - Remove double cast in actions.ts - Fix lazy assertions in test-prerequisites.spec.ts - Add type guards to catch blocks in engine.ts - Clarify schema.json boolean descriptions - Delete TEST_COVERAGE_PLAN.md (stale) - Add no-test-counts rule to CLAUDE.md - Add cleanup to all test files that use prepareOptions
1 parent 81f3f14 commit 08df2fb

16 files changed

+145
-384
lines changed

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ The engine appends CI metadata to commit messages when running on:
209209
- Uses Jest (`npm test`), tests in `*.spec.ts` files
210210
- Requires git clone with `origin` remote (see `test-prerequisites.spec.ts`)
211211
- All tests preserve/restore `process.env` using `originalEnv` pattern
212+
- **No test counts in documentation** - they become stale quickly and are bragging
212213

213214
### Testing Rules
214215

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,7 @@ This can be very useful because it outputs what would happen without doing anyth
428428

429429
To avoid all these command-line cmd options, you can write down your configuration in the `angular.json` file in the `options` attribute of your deploy project's architect. Just change the kebab-case to lower camel case. Commonly used options in lower camel case (see `src/deploy/schema.json` for the complete list including deprecated options):
430430

431+
<!-- deprecated options (browserTarget, noSilent) hidden per deprecation policy -->
431432
- baseHref
432433
- buildTarget
433434
- prerenderTarget

TEST_COVERAGE_PLAN.md

Lines changed: 0 additions & 336 deletions
This file was deleted.

src/deploy/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,6 @@ export default async function deploy(
8989
await engine.run(
9090
dir,
9191
options,
92-
(context.logger as unknown) as logging.LoggerApi
92+
context.logger
9393
);
9494
}

src/deploy/schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
},
6161
"noDotfiles": {
6262
"type": "boolean",
63-
"description": "Includes dotfiles by default. Execute with --no-dotfiles to ignore files starting with `.`.",
63+
"description": "Exclude dotfiles (files starting with `.`) from deployment.",
6464
"default": false
6565
},
6666
"noNotfound": {
@@ -70,7 +70,7 @@
7070
},
7171
"noNojekyll": {
7272
"type": "boolean",
73-
"description": "By default a .nojekyll file is created, because we assume you don't want to compile the build again with Jekyll.",
73+
"description": "Skip creating the .nojekyll file.",
7474
"default": false
7575
},
7676
"cname": {

0 commit comments

Comments
 (0)