Skip to content

feat: initial TypeScript package — SKR03/SKR04 + MCC mapper v0.1.0#1

Merged
scka-de merged 9 commits into
mainfrom
initial
Apr 3, 2026
Merged

feat: initial TypeScript package — SKR03/SKR04 + MCC mapper v0.1.0#1
scka-de merged 9 commits into
mainfrom
initial

Conversation

@scka-de
Copy link
Copy Markdown
Owner

@scka-de scka-de commented Apr 3, 2026

Adds the complete v0.1.0 implementation: enriched SKR03 (289 accounts) and SKR04 (254 accounts) data files, MCC-to-SKR mapping (230 codes including digital goods 5815–5818 and hotel range 3351–3500), and a TypeScript package with SKR03/SKR04 singletons and suggestAccount(). MCC range entries (airlines, hotels, car rentals) are expanded at load time for O(1) lookup. Includes 53 Vitest tests, JSON Schema validation, GitHub Actions CI across Node 18/20/22, and a contribution PR template for new MCC mappings.

scka-de added 9 commits April 3, 2026 16:13
- skr03.json: 289 accounts (expanded Klasse 7 + granularity in 0/1/8)
- skr04.json: 254 accounts derived from SKR03 cross-references
- mcc_skr_mapping.json: 230 mappings incl. digital goods MCCs 5815-5818,
  hotel range 3351-3500, coworking (7299), commercial clothing (5137/5139)
- TypeScript package: Kontenrahmen + MCCMapper with MCC range expansion,
  SKR03/SKR04 singletons, suggestAccount() returning undefined for unmapped
- 53 Vitest tests across kontenrahmen, mcc, and data_integrity suites
- JSON Schema validation for skr03.json and mcc_skr_mapping.json
- GitHub Actions CI: test on Node 18/20/22 + schema validation job
- MCC contribution PR template
- Move src/data/ to .gitignore (generated by prebuild from root JSON files)
- Add prebuild/pretest scripts to auto-copy root JSON → src/data/
- Remove german-accounting-spec.md and TODOS.md (internal planning docs)
- Fix CI schema validation to point at root-level JSON files
- Rewrite README with cleaner API docs, data schema examples, contribution guide
- Add MIT LICENSE
Move JSON files from project root into src/data/ — one location, no copies,
no copy scripts. Remove prebuild/pretest hacks from package.json.
tsup loader:copy caused ERR_IMPORT_ASSERTION_TYPE_MISSING on Node 20 ESM.
Removing the custom loader lets tsup inline the JSON directly into the JS
bundle — no separate JSON files in dist/, no import attribute issues.
suggestAccount('3175') was returning mcc: '3000-3350' (the range key).
Now returns the actual queried code. Also fix CI branch trigger to include
'initial' and correct stale steuerschluessel comment in README.
JSON Schema validation was failing: skr03.json meta missing 'last_updated'
and klassen entries using 'id' instead of required 'klasse' field.
@scka-de scka-de merged commit 46c63db into main Apr 3, 2026
8 checks passed
scka-de added a commit that referenced this pull request Apr 3, 2026
* chore: add gstack skill routing rules to CLAUDE.md

* feat: add TypeScript package with SKR03/SKR04 + MCC mapper (v0.1.0)

- skr03.json: 289 accounts (expanded Klasse 7 + granularity in 0/1/8)
- skr04.json: 254 accounts derived from SKR03 cross-references
- mcc_skr_mapping.json: 230 mappings incl. digital goods MCCs 5815-5818,
  hotel range 3351-3500, coworking (7299), commercial clothing (5137/5139)
- TypeScript package: Kontenrahmen + MCCMapper with MCC range expansion,
  SKR03/SKR04 singletons, suggestAccount() returning undefined for unmapped
- 53 Vitest tests across kontenrahmen, mcc, and data_integrity suites
- JSON Schema validation for skr03.json and mcc_skr_mapping.json
- GitHub Actions CI: test on Node 18/20/22 + schema validation job
- MCC contribution PR template

* chore: clean up repo structure and add LICENSE

- Move src/data/ to .gitignore (generated by prebuild from root JSON files)
- Add prebuild/pretest scripts to auto-copy root JSON → src/data/
- Remove german-accounting-spec.md and TODOS.md (internal planning docs)
- Fix CI schema validation to point at root-level JSON files
- Rewrite README with cleaner API docs, data schema examples, contribution guide
- Add MIT LICENSE

* refactor: single source of truth for data files in src/data/

Move JSON files from project root into src/data/ — one location, no copies,
no copy scripts. Remove prebuild/pretest hacks from package.json.

* fix: inline JSON data into bundle instead of copying as separate files

tsup loader:copy caused ERR_IMPORT_ASSERTION_TYPE_MISSING on Node 20 ESM.
Removing the custom loader lets tsup inline the JSON directly into the JS
bundle — no separate JSON files in dist/, no import attribute issues.

* chore: remove sourcemaps from published package

* chore: add npm package metadata (repository, homepage, bugs, engines, author)

* fix: return queried MCC code in suggestion instead of raw range string

suggestAccount('3175') was returning mcc: '3000-3350' (the range key).
Now returns the actual queried code. Also fix CI branch trigger to include
'initial' and correct stale steuerschluessel comment in README.

* fix: add last_updated to meta and rename id→klasse in klassen array

JSON Schema validation was failing: skr03.json meta missing 'last_updated'
and klassen entries using 'id' instead of required 'klasse' field.
@scka-de scka-de deleted the initial branch April 3, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant