Skip to content

Modernize dependencies and replace reflect-metadata#81

Open
breath103 wants to merge 3 commits into
masterfrom
modernize-dependencies
Open

Modernize dependencies and replace reflect-metadata#81
breath103 wants to merge 3 commits into
masterfrom
modernize-dependencies

Conversation

@breath103

Copy link
Copy Markdown
Contributor

Summary

  • Node.js 24, CI actions v4, TypeScript 5.8 (target es2022)
  • AWS SDK v2 → v3: Migrate all DynamoDB operations to @aws-sdk/client-dynamodb + @aws-sdk/lib-dynamodb command pattern
  • ESLint 9 flat config: Replace .eslintrc with eslint.config.mjs, upgrade typescript-eslint to v8
  • Replace reflect-metadata with a compile-time TypeScript transformer (ts-patch) that injects type info into @Attribute() calls — @Attribute() public id!: number still works, no runtime reflection needed
  • Dev dependency updates: faker@faker-js/faker, mocha 11, semantic-release 24, chai 4.5
  • Add scripts/ for build, lint, and typecheck commands

Test plan

  • TypeScript typecheck passes (both main and test configs)
  • ESLint passes with new flat config
  • Transformer correctly injects __type into compiled output
  • Run full test suite against DynamoDB Local
  • Verify DAX connection still compiles (tests are skipped)
  • Smoke test in a consumer project with ts-patch + transformer plugin

🤖 Generated with Claude Code

breath103 and others added 3 commits March 31, 2026 17:18
- Update Node.js to v24, CI actions to v4
- Migrate aws-sdk v2 → @aws-sdk v3 (client-dynamodb, lib-dynamodb)
- Replace .promise() pattern with command pattern (send/Command)
- Update TypeScript to 5.8, target es2022
- Migrate ESLint to v9 flat config (eslint.config.mjs)
- Replace faker with @faker-js/faker
- Update semantic-release, mocha, and other dev deps
- Add scripts/ for build, lint, and typecheck commands

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add TypeScript transformer (transformer/index.js) that injects type
  info into @Attribute() calls at compile time via ts-patch
- Remove dependency on reflect-metadata and emitDecoratorMetadata
- @Attribute() public id!: number still works — the transformer reads
  the type annotation and passes it as __type to the decorator
- Falls back to Reflect.getMetadata for legacy setups
- Export transformer as @serverless-seoul/dynamorm/transformer for
  consumers to use in their own tsconfig plugins
- Update build scripts to use tspc instead of tsc

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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