feat: add java-to-typescript skill#1
Conversation
…es LSP + TS18003)
…om parsing
Task 8 of the java-to-typescript plan. The skill must run air-gapped, so
the pom parser cannot fetch from npm at runtime. Vendor the runtime files
under scripts/lib/fast-xml-parser/ as an ESM-importable bundle.
Upstream entry is CommonJS (require/module.exports). The outer skill
package is "type": "module". The vendored layout reconciles this with:
- An ESM index.js shim that uses createRequire to load the CJS entry and
re-exports XMLParser/XMLValidator/XMLBuilder as ESM named exports.
- Nested src/package.json and vendor/package.json that pin those
subtrees to "type": "commonjs" so Node loads them correctly.
- Local patch in src/xmlparser/OrderedObjParser.js replacing the bare
require("strnum") with a relative require of the vendored strnum copy.
Includes the transitive strnum 1.1.2 (MIT) dependency under vendor/.
Omits the v5 experimental tree, cli binary, and upstream changelog.
Consumers import via:
import { XMLParser } from './lib/fast-xml-parser/index.js';
Verified by `node -e "import('./scripts/lib/fast-xml-parser/index.js')
.then(m => console.log(typeof m.XMLParser))"` AFTER `npm uninstall
fast-xml-parser` -- prints "function" and parses a sample pom shape
without any node_modules lookup. `tsc --noEmit` clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replay recorded HTTP fixtures against the TS service, comparing status, headers (one-way: expected subset of actual), and bodies via the allowlist-aware json-diff lib. Emits a markdown summary plus a machine-readable JSON report. Loopback-only baseUrl enforced.
…hard gate) + --runs variance harness
…, --runs/--plan/--ts-repo flags
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: skills/java-to-typescript | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node 20 | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
| cache-dependency-path: skills/java-to-typescript/package-lock.json | ||
|
|
||
| - name: Install dev deps | ||
| run: npm ci | ||
|
|
||
| - name: Typecheck | ||
| run: npm run typecheck | ||
|
|
||
| - name: Unit tests (scripts/lib + scripts) | ||
| run: npx vitest run scripts/ | ||
|
|
||
| - name: E1 (analyze accuracy) eval | ||
| run: npx vitest run evals/__tests__/runner.test.ts |
…f, add platform-adaptation guide
… vitest (sample has its own deps)
Summary
java-to-typescriptunderskills/java-to-typescript/for migrating Java services (Spring Boot, Quarkus, Micronaut, Spring MVC) to TypeScript across four phased gates (Analyze → Plan → Port → Verify).SKILL.md), four deterministic companion scripts (pom-to-workspace,record-fixtures,replay-fixtures+lib/), a 20-entry library registry, 13 reference docs, and a complete eval harness (E1 deterministic + E2/E3 mock-mode LLM-judged + E4 manual smoke).0.0.0so the auto-publish workflow patch-bumps to0.0.1as the first Maven Central release.What's in here
44/44Vitest unit tests,tsc --noEmitclean understrict+noUncheckedIndexedAccess+exactOptionalPropertyTypeslibrary-map.yaml— 20 entries + 18default_picks(Express + tsyringe + zod + drizzle + pino + decimal.js + temporal-polyfill + vitest)spring-boot-users— Maven multi-module +expected/artifacts +sample/reference inputs (plan.md + tsc-clean+vitest-green TS port)fast-xml-parser 4.5.0(MIT) for air-gap pom parsing.github/workflows/eval.ymlruns typecheck + unit + E1 on PRs touching this skilljava-to-typescript-0.0.0-bin.zip~82 KB, 96 files (no tests, nonode_modules, no fixture targets)Constraints upheld (per design spec)
context7is not called at runtime; unmapped libs escalate to the user viaAskUserQuestion.npm install.Release behavior
Per
publish.yml, merging this PR tomainwill:skills/java-to-typescript/**changed.0.0.0→0.0.1.io.github.randomcodespace.ai:java-to-typescript:0.0.1to Maven Central via the Central Portal.java-to-typescript-v0.0.1with the bundle as an attached zip.mainwith[skip ci].gitlab-helper:0.1.5is untouched.Test plan
evalworkflow runs and passes (typecheck + 44/44 unit tests + E1 deterministic eval).cd skills/java-to-typescript && npx tsc --noEmit && npx vitest run— should be clean + 44/44.npx tsx evals/runner.ts --eval all— E1 PASS, E2/E3 produce mock scores.mvn -pl skills/java-to-typescript package -DskipTestsbuilds the bundle with 96 files (no tests, no node_modules).publish.ymlsucceeds,io.github.randomcodespace.ai:java-to-typescript:0.0.1appears on Maven Central, GitHub releasejava-to-typescript-v0.0.1is created.Follow-ups (M1 — separate plan)
quarkus-orders,micronaut-products).ANTHROPIC_API_KEYsecret).🤖 Generated with Claude Code