- 
                Notifications
    You must be signed in to change notification settings 
- Fork 820
feat: cumulative codegen structure #14296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
            iliapolo
  merged 16 commits into
  aws-amplify:gen2-migration
from
dgandhi62:gen2-migration
  
      
      
   
  Oct 28, 2025 
      
    
                
     Merged
            
            feat: cumulative codegen structure #14296
                    iliapolo
  merged 16 commits into
  aws-amplify:gen2-migration
from
dgandhi62:gen2-migration
  
      
      
   
  Oct 28, 2025 
              
            Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    …tion - add auth generator file to generate typescript asts - add preliminary unit tests for the auth generator - integrate the rest of the old migration tool to maintain dependencies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
…degen - Add dual build process: main project with strict:true, gen2-migration with strict:false - Update build script to compile both tsconfigs sequentially - Exclude gen2-migration directory from main tsconfig to prevent double compilation - Create separate Jest config for gen2-migration tests with relaxed TypeScript settings - Update test script to run both Jest configurations - Add gen2-migration lib directory to .gitignore to exclude compiled artifacts - Configure gen2-migration tsconfig with strict:false, skipLibCheck, and proper paths This allows the gen2-migration codegen to build and test with relaxed TypeScript settings while maintaining strict type checking for the main codebase.
              
                    iliapolo
  
              
              approved these changes
              
                  
                    Oct 28, 2025 
                  
              
              
            
            
    
  iankhou 
      pushed a commit
      that referenced
      this pull request
    
      Oct 28, 2025 
    
    
      
  
    
      
    
  
* feat: add codegen auth v1 * chore: add a new tsconfig file for codegen tool * chore: added codegen tsconfig reference in base tsconfig * chore: add build artifacts * feat: add comprehensive codegen tool for amplify gen 1 to gen 2 migration - add auth generator file to generate typescript asts - add preliminary unit tests for the auth generator - integrate the rest of the old migration tool to maintain dependencies * chore: updated dependencies * chore: update dependencies * fix: add proper exclusions for codegen tsconfig * feat: configure separate TypeScript compilation for gen2-migration codegen - Add dual build process: main project with strict:true, gen2-migration with strict:false - Update build script to compile both tsconfigs sequentially - Exclude gen2-migration directory from main tsconfig to prevent double compilation - Create separate Jest config for gen2-migration tests with relaxed TypeScript settings - Update test script to run both Jest configurations - Add gen2-migration lib directory to .gitignore to exclude compiled artifacts - Configure gen2-migration tsconfig with strict:false, skipLibCheck, and proper paths This allows the gen2-migration codegen to build and test with relaxed TypeScript settings while maintaining strict type checking for the main codebase. * chore: change auth generator to the original tool * chore: update jest.config.js * chore: update jest.config.js * feat: auth generator update v1 * chore: add separate command for running codegen tests * fix: revert tsconfig and package.json changes and set strict:false for amplify-cli * chore: update auth generator to original tool's code
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
This PR creates a code generation system that transforms Amplify Gen 1 authentication configurations into Gen 2 TypeScript code. The added code files are copies of the old tool to maintain dependencies. They would be updated individually in future prs.
Currently, strict:false has been set for packages/amplify-cli/tsconfig.json. This is because this setting is required for codegen. The following issue would need to be resolved in future prs:
A separate typescript compilation would need to be configured for codegen. That is, a separate tsconfig file and jest config would be added. To accomodate the new tsconfig settings, the build script would be changed to compile and test codegen separately. If any changes to codegen name or placement would be made, the following points of change would be required:
packages/amplify-cli/package.json
Build script: tsc -p src/commands/../gen2-migration/NEW_NAME/tsconfig.json
Test script: jest --config src/commands/../gen2-migration/NEW_NAME/jest.config.js
testIgnorePathPatterns
packages/amplify-cli/tsconfig.json
Exclude pattern: "src/commands/gen2-migration/NEW_NAME"
.gitignore
packages/amplify-cli/src/commands/gen2-migration/NEW_NAME/lib
yarn testpassesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.