- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.7k
fix(angular): Use Angular compiler to compile @sentry/angular #4641
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
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            21 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      383509b
              
                build(angular): Use the Angular compiler to compile the @sentry/angul…
              
              
                Lms24 a3db0cb
              
                Flatten directory structure, simplify tsconfig
              
              
                Lms24 fa18a60
              
                remove temporary workspaces, tslint config, unintended dependency cha…
              
              
                Lms24 73876dc
              
                ref(angular): simplify and flatten file structure
              
              
                Lms24 69180c4
              
                ref(angular): re-introduce tsc compile option for "legacy" package
              
              
                Lms24 f8c09a0
              
                ref(angular) move tsconfig option from tsconfig to tsconfig.ngc
              
              
                Lms24 2b62152
              
                ref(angular): fix trailing comma in tsconfig.ts
              
              
                Lms24 ff0b19a
              
                ref(angular): incorporate review suggestions
              
              
                Lms24 337991f
              
                ref(angular): exclude npm scripts from generated `package.json` file
              
              
                Lms24 d2aa012
              
                ref(angular): remove unnecessary devdependencies, minor review changes
              
              
                Lms24 2c5bdc9
              
                ref(angular): remove more unnecessary dev dependencies
              
              
                Lms24 78746fb
              
                ref(angular): bump node version to 10, allow rxjs 6 and 7
              
              
                Lms24 6ce4199
              
                add more strict angular compiler option parameters
              
              
                Lms24 824544e
              
                fix angular dependencies and  yarn.lock after rebase
              
              
                Lms24 e058520
              
                adjust angular build dir and tarball structure to be more similar to …
              
              
                Lms24 447d7ff
              
                fix circular dep check
              
              
                Lms24 f94bac0
              
                fix types path
              
              
                Lms24 7824aea
              
                remove legacy build scripts and tsconfigs
              
              
                Lms24 b438540
              
                Revert "adjust angular build dir and tarball structure to be more sim…
              
              
                Lms24 cfac731
              
                cleanup angular.json
              
              
                Lms24 1cb7459
              
                set `tsconfig.ngc.json` to es2015
              
              
                Lms24 File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      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
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /* To learn more about this file see: https://angular.io/guide/workspace-config */ | ||
| { | ||
| "$schema": "../../node_modules/@angular/cli/lib/config/schema.json", | ||
| "version": 1, // version of angular.json | ||
| "projects": { | ||
| "sentry-angular": { | ||
| "projectType": "library", | ||
| "root": ".", | ||
| "sourceRoot": "src", | ||
| "architect": { | ||
| "build": { | ||
| "builder": "@angular-devkit/build-angular:ng-packagr", | ||
| "options": { | ||
| "tsConfig": "tsconfig.ngc.json", | ||
| "project": "ng-package.json" | ||
| }, | ||
| "configurations": { | ||
| "production": { | ||
| "tsConfig": "tsconfig.ngc.json" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "defaultProject": "sentry-angular" | ||
| } | 
  
    
      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
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "$schema": "node_modules/ng-packagr/ng-package.schema.json", | ||
| "dest": "build", | ||
| "lib": { | ||
| "entryFile": "src/index.ts", | ||
| "umdModuleIds": { | ||
| "@sentry/browser": "Sentry", | ||
| "@sentry/utils": "Sentry.util" | ||
| } | ||
| }, | ||
| "whitelistedNonPeerDependencies": ["@sentry/browser", "@sentry/utils", "@sentry/types", "tslib"], | ||
| "assets": ["README.md", "LICENSE"] | ||
| } | 
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              This file was deleted.
      
      Oops, something went wrong.
      
    
  This file was deleted.
      
      Oops, something went wrong.
      
    
  
  
    
      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
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| /* To learn more about this file see: https://angular.io/config/tsconfig. */ | ||
|         
                  Lms24 marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| // This tsconfig is used when building @sentry/angular with the Angular | ||
| // compiler and `ng-packagr`. It configures a production build conforming | ||
| // to the Angular Package Format (APF). | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "target": "es2015", | ||
| "lib": ["dom", "es2015"], | ||
| "baseUrl": "./" | ||
| }, | ||
| "angularCompilerOptions": { | ||
| "skipTemplateCodegen": true, | ||
| "strictMetadataEmit": true, | ||
| "enableResourceInlining": true, | ||
|         
                  Lms24 marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| "strictInjectionParameters": true, | ||
| "strictInputAccessModifiers": true, | ||
| "strictTemplates": true, | ||
| // As per Angular 10, the recommendation from the library creation guide | ||
| // is to disable compilation for the Ivy rendering engine in production builds | ||
| // to ensure compatibility with Angular 10. | ||
| // For Angular 11-13 applications, ngcc and the Angular linker convert the compiled JS | ||
| // at application compile time into an Ivy-compatible version which is then further used in | ||
| // the build process. This ensures compatibility with newer Angular versions than the one | ||
| // that was used to initially compile the library (Angular 10 in our case). | ||
| "enableIvy": false | ||
| } | ||
| } | ||
This file was deleted.
      
      Oops, something went wrong.
      
    
  
      
      Oops, something went wrong.
        
    
  
  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.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.