| 
									
										
										
										
											2020-03-24 15:43:54 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * @license | 
					
						
							| 
									
										
										
										
											2020-05-19 12:08:49 -07:00
										 |  |  |  * Copyright Google LLC All Rights Reserved. | 
					
						
							| 
									
										
										
										
											2020-03-24 15:43:54 +01:00
										 |  |  |  * | 
					
						
							|  |  |  |  * Use of this source code is governed by an MIT-style license that can be | 
					
						
							|  |  |  |  * found in the LICENSE file at https://angular.io/license
 | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const path = require('path'); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | module.exports = { | 
					
						
							|  |  |  |   baseDir: '../', | 
					
						
							| 
									
										
										
										
											2020-04-14 13:37:54 -07:00
										 |  |  |   goldenFile: '../goldens/circular-deps/packages.json', | 
					
						
							| 
									
										
										
										
											2020-09-14 15:48:03 -07:00
										 |  |  |   glob: `./**/*.ts`, | 
					
						
							| 
									
										
										
										
											2020-03-24 15:43:54 +01:00
										 |  |  |   // Command that will be displayed if the golden needs to be updated.
 | 
					
						
							|  |  |  |   approveCommand: 'yarn ts-circular-deps:approve', | 
					
						
							|  |  |  |   resolveModule: resolveModule | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * Custom module resolver that maps specifiers starting with `@angular/` to the | 
					
						
							|  |  |  |  * local packages folder. This ensures that cross package/entry-point dependencies | 
					
						
							|  |  |  |  * can be detected. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | function resolveModule(specifier) { | 
					
						
							|  |  |  |   if (specifier.startsWith('@angular/')) { | 
					
						
							|  |  |  |     return path.join(__dirname, specifier.substr('@angular/'.length)); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  |   return null; | 
					
						
							|  |  |  | } |