@@ -2,6 +2,8 @@ import * as fs from 'fs';
2
2
import * as path from 'path' ;
3
3
import * as cxschema from '@aws-cdk/cloud-assembly-schema' ;
4
4
import * as cxapi from '@aws-cdk/cx-api' ;
5
+ import { Annotations } from './annotations' ;
6
+ import { App } from './app' ;
5
7
import { Arn , ArnComponents } from './arn' ;
6
8
import { DockerImageAssetLocation , DockerImageAssetSource , FileAssetLocation , FileAssetSource } from './assets' ;
7
9
import { CfnElement } from './cfn-element' ;
@@ -201,7 +203,7 @@ export class Stack extends Construct implements ITaggable {
201
203
* value is an unresolved token (`Token.isUnresolved(stack.region)` returns
202
204
* `true`), this implies that the user wishes that this stack will synthesize
203
205
* into a **region-agnostic template**. In this case, your code should either
204
- * fail (throw an error, emit a synth error using `node. addError`) or
206
+ * fail (throw an error, emit a synth error using `Annotations.of(construct). addError() `) or
205
207
* implement some other region-agnostic behavior.
206
208
*/
207
209
public readonly region : string ;
@@ -223,7 +225,7 @@ export class Stack extends Construct implements ITaggable {
223
225
* value is an unresolved token (`Token.isUnresolved(stack.account)` returns
224
226
* `true`), this implies that the user wishes that this stack will synthesize
225
227
* into a **account-agnostic template**. In this case, your code should either
226
- * fail (throw an error, emit a synth error using `node. addError`) or
228
+ * fail (throw an error, emit a synth error using `Annotations.of(construct). addError() `) or
227
229
* implement some other region-agnostic behavior.
228
230
*/
229
231
public readonly account : string ;
@@ -800,7 +802,7 @@ export class Stack extends Construct implements ITaggable {
800
802
801
803
if ( this . templateOptions . transform ) {
802
804
// eslint-disable-next-line max-len
803
- this . construct . addWarning ( 'This stack is using the deprecated `templateOptions.transform` property. Consider switching to `addTransform()`.' ) ;
805
+ Annotations . of ( this ) . addWarning ( 'This stack is using the deprecated `templateOptions.transform` property. Consider switching to `addTransform()`.' ) ;
804
806
this . addTransform ( this . templateOptions . transform ) ;
805
807
}
806
808
@@ -1094,7 +1096,6 @@ import { Stage } from './stage';
1094
1096
import { ITaggable , TagManager } from './tag-manager' ;
1095
1097
import { Token } from './token' ;
1096
1098
import { FileSystem } from './fs' ;
1097
- import { App } from './app' ;
1098
1099
1099
1100
interface StackDependency {
1100
1101
stack : Stack ;
0 commit comments