Skip to content

Conversation

@rene84
Copy link
Member

@rene84 rene84 commented Jan 16, 2026

Fixes the 1000+ TypeScript build errors by upgrading from TypeScript 4.4 to 5.3.

Problem

AWS SDK v3.970.0 uses modern TypeScript features (type import modifiers) that require TypeScript 4.5+, causing syntax errors with the project's TypeScript 4.4.

Solution

  • Upgraded TypeScript from 4.4.4 to 5.3.3
  • Replaced ttypescript with tsc-alias for path mapping
  • Upgraded ESLint tooling (6.8.0 → 8.57.1, @typescript-eslint v4 → v6)
  • Fixed 6 ESLint errors (unused imports, unnecessary type constraints)

Results

✅ Build: Clean compilation with no errors
✅ Tests: All 830 unit tests passing
✅ Linter: 0 errors, 38 warnings (style-related only)

The project now builds successfully locally and is compatible with modern AWS SDK versions.

Changes

  • package.json: Updated dependencies and build script
  • tsconfig.json: Removed transformer plugin configuration
  • jest.config.js: Added moduleNameMapper for path aliases
  • Fixed ESLint errors in 6 files (removed unused imports, simplified generic types)

Upgrades TypeScript from 4.4 to 5.3 to fix 1000+ type errors caused by
incompatibility with AWS SDK v3.970.0, which uses modern TypeScript
features (type import modifiers) that require TypeScript 4.5+.

Changes:
- Upgraded TypeScript from 4.4.4 to 5.3.3
- Replaced ttypescript with tsc-alias for path mapping
- Upgraded ESLint from 6.8.0 to 8.57.1
- Upgraded @typescript-eslint packages from v4 to v6.21.0
- Updated build script to use tsc && tsc-alias
- Removed @zerollup/ts-transform-paths (no longer needed)
- Added Jest moduleNameMapper for path aliases
- Fixed 6 ESLint errors (unused imports, unnecessary type constraints)

Results:
- Build: Clean compilation with no errors
- Tests: All 830 unit tests passing
- Linter: 0 errors, 38 warnings (style-related only)

The project now builds successfully locally and is compatible with
modern AWS SDK versions.
@github-actions
Copy link

File Coverage
All files 50%
src/aws-provider/aws-account-access.ts 27%
src/aws-provider/aws-events.ts 68%
src/aws-provider/aws-organization-reader.ts 11%
src/aws-provider/aws-organization-writer.ts 3%
src/aws-provider/aws-organization.ts 56%
src/aws-provider/util.ts 16%
src/build-tasks/build-configuration.ts 60%
src/build-tasks/build-runner.ts 14%
src/build-tasks/build-task-provider.ts 49%
src/build-tasks/tasks/annotate-organization-task.ts 21%
src/build-tasks/tasks/annotate-organization.ts 28%
src/build-tasks/tasks/include-task.ts 51%
src/build-tasks/tasks/update-organization-task.ts 62%
src/build-tasks/tasks/update-stacks-task.ts 67%
src/cfn-binder/cfn-binder.ts 74%
src/cfn-binder/cfn-sub-expression.ts 78%
src/cfn-binder/cfn-task-provider.ts 9%
src/cfn-binder/cfn-task-runner.ts 49%
src/cfn-binder/cfn-template.ts 85%
src/cfn-binder/cfn-validate-task-provider.ts 26%
src/change-set/change-set-provider.ts 55%
src/commands/base-command.ts 33%
src/commands/create-organization-changeset.ts 50%
src/commands/delete-stacks.ts 41%
src/commands/describe-stacks.ts 95%
src/commands/init-organization-pipeline.ts 56%
src/commands/init-organization.ts 68%
src/commands/perform-tasks.ts 52%
src/commands/print-changeset.ts 42%
src/commands/print-org.ts 64%
src/commands/print-stacks.ts 49%
src/commands/print-tasks.ts 53%
src/commands/remove.ts 49%
src/commands/update-organization.ts 65%
src/commands/update-stacks.ts 59%
src/commands/validate-organization.ts 26%
src/commands/validate-stacks.ts 82%
src/commands/validate-tasks.ts 53%
src/core/cfn-expression-resolver.ts 70%
src/core/default-task-runner.ts 65%
src/core/generic-task-runner.ts 80%
src/core/cfn-functions/cfn-cmd.ts 33%
src/core/cfn-functions/cfn-find-in-map.ts 43%
src/core/cfn-functions/cfn-functions.ts 94%
src/core/cfn-functions/cfn-join.ts 40%
src/core/cfn-functions/cfn-md5.ts 44%
src/core/cfn-functions/cfn-merge.ts 20%
src/core/cfn-functions/cfn-read-file.ts 58%
src/core/cfn-functions/cfn-select.ts 15%
src/core/cfn-functions/cfn-sub.ts 33%
src/org-binder/org-binder.ts 48%
src/org-binder/org-task-runner.ts 40%
src/org-binder/org-tasks-provider.ts 17%
src/parser/parser.ts 83%
src/parser/validator.ts 73%
src/parser/model/account-resource.ts 76%
src/parser/model/cloudformation-resource.ts 89%
src/parser/model/master-account-resource.ts 68%
src/parser/model/organization-bindings-section.ts 95%
src/parser/model/organization-root-resource.ts 80%
src/parser/model/organization-section.ts 92%
src/parser/model/password-policy-resource.ts 92%
src/parser/model/resource.ts 96%
src/parser/model/resources-section.ts 90%
src/plugin/plugin-binder.ts 70%
src/plugin/plugin-command.ts 85%
src/plugin/plugin-task.ts 14%
src/plugin/plugin-util.ts 42%
src/plugin/impl/cdk-build-task-plugin.ts 52%
src/plugin/impl/rp-build-task-plugin.ts 25%
src/plugin/impl/s3-copy-build-task-plugin.ts 20%
src/plugin/impl/sls-build-task-plugin.ts 49%
src/plugin/impl/tf-apply-task-plugin.ts 14%
src/state/persisted-state.ts 65%
src/state/storage-provider.ts 18%
src/util/aws-util.ts 14%
src/util/child-process-util.ts 16%
src/util/console-util.ts 54%
src/util/credentials-provider-partition.ts 22%
src/util/file-util.ts 39%
src/util/global-state.ts 27%
src/util/initial-commit-util.ts 25%
src/util/md5-util.ts 17%
src/util/resource-util.ts 93%
src/writer/default-template-writer.ts 73%
src/yaml-cfn/index.ts 55%
src/yaml-cfn/nunjucks-parse-includes.ts 67%

Minimum allowed coverage is 40%

Generated by 🐒 cobertura-action against ff0b6ed

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.

2 participants