Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,11 @@ jobs:
BUNGIE_API_KEY: ${{ secrets.API_KEY }}
- run: npm run lint
- run: npm run test:ci
- run: npx ng build --configuration production
- name: Production build
run: npx ng build --configuration production 2>&1 | tee /tmp/build-output.txt
- name: Report bundle size
run: |
echo '### Bundle Size' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
grep -E '^\S|Initial' /tmp/build-output.txt >> $GITHUB_STEP_SUMMARY || true
echo '```' >> $GITHUB_STEP_SUMMARY
4 changes: 2 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"budgets": [
{
"type": "initial",
"maximumWarning": "2.75mb",
"maximumError": "3.25mb"
"maximumWarning": "3.1mb",
"maximumError": "3.5mb"
},
{
"type": "anyComponentStyle",
Expand Down
25 changes: 14 additions & 11 deletions docs/modernization-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

Tracking document for incremental improvements to the d2-checklist codebase. Work is ordered by priority and dependency — later phases build on earlier ones.

**Current state (as of 2026-03-27):**
**Current state (as of 2026-04-04):**
- Angular 18.2.14, TypeScript 5.4.5, RxJS 7.8.2
- 185 unit tests across 6 spec files, 7 of 7 TypeScript strict flags enabled, `strictTemplates` enabled, `no-explicit-any` warning
- `parse.service.ts` split into 6 files (was 4,385 lines)
- Bundle size budgets enforced
- CI modernized: rsync deploys, Node 20.x, npm audit
- Bundle size budgets enforced (warn 3.1 MB, error 3.5 MB)
- CI modernized: rsync deploys, Node 22.x, npm audit, bundle size reporting
- Git LFS replaced with build-time Bungie manifest fetch (`tools/manifest/`), InventoryItem sharded into 8 parallel loads

---

Expand Down Expand Up @@ -57,9 +58,9 @@ Split the 4,385-line monolith into domain-specific parsers.
- `history-parser.service.ts` (236 lines) — aggregated history stats
- [x] Keep `parse.service.ts` as a facade that delegates to the new parsers (1729 lines)
- [x] Move shared parsing utilities into `parse-utils.ts` (268 lines)
- [ ] Verify existing functionality still works (manual smoke test)
- [x] Verify existing functionality still works (manual smoke test)

**Done when:** Smoke test passes. Note: `parse.service.ts` retains ~1700 lines as the player-parsing orchestrator — further splitting would require breaking up the 640-line `parsePlayer` method.
**Done.** `parse.service.ts` retains ~1700 lines as the player-parsing orchestrator — further splitting would require breaking up the 640-line `parsePlayer` method.

---

Expand Down Expand Up @@ -87,11 +88,13 @@ Bring the pipeline up to date and add safety checks.
- [x] Replace `scp-action` with rsync deploys (single SSH connection, no UFW spam)
- [x] Add `workflow_dispatch` trigger for manual deploys
- [x] Add `npm audit --audit-level=moderate` step
- [x] Upgrade Node from 18.x to 20.x
- [x] Upgrade Node from 18.x to 22.x
- [x] Add unit test step (from Phase 2)
- [ ] Add bundle size reporting step (from Phase 4)
- [x] Add bundle size reporting step (from Phase 4)
- [x] Replace git LFS with build-time manifest fetch (`tools/manifest/`)
- [x] Add GitHub Actions cache for manifest data

**Done when:** Both deploy.yml and beta-deploy.yml run tests and report bundle sizes.
**Done.** All workflows run tests, fetch manifest, and report bundle sizes.

---

Expand Down Expand Up @@ -140,10 +143,10 @@ Angular migrations must go one major version at a time:
1. ~~Phase 5: CI/CD Hardening~~ — Done
2. ~~Phase 6: Standardize Service Providers~~ — Done
3. ~~Phase 1: TypeScript Strictness~~ — Done
4. **Phase 3: Break Up parse.service.ts**In progress (extracted, needs smoke test).
5. **Phase 2: Unit Tests**After the split, each parser file is small enough to test meaningfully.
4. ~~Phase 3: Break Up parse.service.ts~~Done
5. ~~Phase 2: Unit Tests~~Done
6. ~~Phase 4: Bundle Budgets~~ — Done
7. ~~Phase 7: Angular 18 Migration~~ — Done (14 → 18)
7. ~~Phase 7: Angular 18 Migration~~ — Done (14 → 18, post-migration 7c is optional follow-up)

## Notes

Expand Down
8 changes: 4 additions & 4 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ module.exports = function (config) {
],
check: {
global: {
statements: 10,
branches: 7,
functions: 12,
lines: 10
statements: 12,
branches: 9,
functions: 14,
lines: 12
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "d2-checklist",
"version": "29.0.1",
"version": "29.0.2",
"manifest": "242999.26.03.25.2000-1-bnet.64463",
"license": "MIT",
"scripts": {
Expand Down
29 changes: 0 additions & 29 deletions src/app/service/gear-parser.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
BoostInfo,
BUCKETS_ARMOR,
BUCKETS_WEAPON,
ClanInfo,
ClassAllowed,
Const,
DamageType,
Expand Down Expand Up @@ -977,32 +976,4 @@ export class GearParserService {
}
}

public async parseClanInfo(j: any): Promise<ClanInfo> {

const c: ClanInfo = new ClanInfo();
c.groupId = j.groupId;
c.about = j.about;
c.name = j.name;
c.creationDate = j.creationDate;
c.memberCount = j.memberCount;
c.avatarPath = j.avatarPath;
c.bannerPath = j.bannerPath;
const progs: Progression[] = [];
if (j.clanInfo != null && j.clanInfo.d2ClanProgressions != null) {
for (const key of Object.keys(j.clanInfo.d2ClanProgressions)) {
const p: PrivProgression = j.clanInfo.d2ClanProgressions[key];
const pDesc = await this.destinyCacheService.getProgression(p.progressionHash);
const prog: Progression = parseProgression(p, pDesc);
if (prog != null) {
if (key === '584850370') {
c.primaryProgression = prog;
}
progs.push(prog);
}
}

}
c.progressions = progs;
return c;
}
}
Loading