You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: implement all audit findings with comprehensive improvements
CRITICAL BUG FIX:
- Fix operator precedence bug in checkIfDistFolderExists (engine.ts:195)
* Before: await !fse.pathExists(dir) - error NEVER thrown
* After: !(await fse.pathExists(dir)) - error correctly thrown
- Add regression test proving the bug was fixed
TYPE SAFETY (eliminate ALL 'any' violations):
- Create PublishOptions interface with full gh-pages options
- Fix GHPages.publish signature: any → PublishOptions, Error | null
- Add DryRunOutput interface for CLI test parsing
- Fix WorkspaceProject and BuildTarget with proper types
- Remove 'as any' casts using Partial<BuilderContext>
- Enable noImplicitAny: true in tsconfig.json
- Create type declaration for gh-pages/lib/git module
- Use unknown[] instead of any[] in util.debuglog monkeypatch
TESTING PHILOSOPHY COMPLIANCE:
- Change .toMatch() to .toBe() with exact expected values
- Add justified exception for git remote URL test (protocol varies)
- Remove legacy angular-cli-ghpages.spec.ts (violates philosophy)
- All 188 tests use explicit assertions per CLAUDE.md
NEW FEATURES:
- Warn when only --name OR only --email is set (both required)
- Warn when deprecated --no-silent parameter is used
- Improve error messages in CLI E2E test JSON parsing
DOCUMENTATION:
- Fix file paths in CLAUDE.md (engine/ → parameter-tests/)
- Add clarifying comments to builder-integration.spec.ts
- Document what's REAL vs MOCKED in integration tests
VERIFICATION:
- 188 tests passing (added 5 new warning tests)
- Build passes with noImplicitAny: true
- Zero 'any' types in production code
- Zero testing philosophy violations
describe('prepareOptions - user credentials warnings',()=>{
162
+
it('should warn when only name is set without email',async()=>{
163
+
consttestLogger=newlogging.Logger('test');
164
+
constwarnSpy=jest.spyOn(testLogger,'warn');
165
+
166
+
constoptions={name: 'John Doe'};
167
+
constexpectedWarning='WARNING: Both --name and --email must be set together to configure git user. Only --name is set. Git will use the local or global git config instead.';
it('should warn when only email is set without name',async()=>{
175
+
consttestLogger=newlogging.Logger('test');
176
+
constwarnSpy=jest.spyOn(testLogger,'warn');
177
+
178
+
constoptions={email: 'john@example.com'};
179
+
constexpectedWarning='WARNING: Both --name and --email must be set together to configure git user. Only --email is set. Git will use the local or global git config instead.';
it('should warn when noSilent parameter is used',async()=>{
201
+
consttestLogger=newlogging.Logger('test');
202
+
constwarnSpy=jest.spyOn(testLogger,'warn');
203
+
204
+
constoptions={noSilent: true};
205
+
constexpectedWarning='The --no-silent parameter is deprecated and no longer needed. Verbose logging is now always enabled. This parameter will be ignored.';
0 commit comments