pulumi/sdk/nodejs/runtime
Fraser Waters 0d0144bca2
Stop using Get/SetRootResource in nodejs (#9680)
* Stop using Get/SetRootResource in nodejs

Just use globalThis to make the stack resource a global rather than a module variable. This ensures that even if we end up with multiple Pulumi modules they can all grab the stack object and read URN off it.

We'll keep calling SetRootResource so old modules SxS continue to pickup the stack URN, at some point (4.0 probably) we can clean all this up.

Note that we also need the stack resource to be global for stack transformations, the roundtripping of the URN via the engine didn't preserve those.

* Update CHANGELOG

* Try to resovle circular module imports

* Remove comment

* Readd comment, remove unneeed await

* Fix comments

* Get rid of getRootResource, just pass parent down explictly

* Fix stack parents

* Add stack transform test
2022-06-30 11:04:49 +01:00
..
closure Tidy Nodejs SDK imports (#9658) 2022-05-30 09:31:28 +01:00
asyncIterableUtil.ts Use ESlint instead of TSlint (#7719) 2021-08-10 11:31:59 -07:00
config.ts [sdk/nodejs] Warn when a secret config is read as a non-secret (#6896) 2021-05-18 09:48:08 -07:00
debuggable.ts remove erroneous global promise rejection handler (#6864) 2021-04-26 08:27:41 -07:00
index.ts Refactor Mock newResource and call to accept property bag rather than individual args (#6672) 2021-04-14 19:32:18 +01:00
invoke.ts Tidy Nodejs SDK imports (#9658) 2022-05-30 09:31:28 +01:00
mocks.ts [sdk/{nodejs,python}] Fix errors when testing remote components with mocks (#8053) 2021-09-24 06:08:13 -07:00
resource.ts Stop using Get/SetRootResource in nodejs (#9680) 2022-06-30 11:04:49 +01:00
rpc.ts Detect cycles in child resources in nodejs (#9683) 2022-05-30 19:37:15 +01:00
settings.ts Stop using Get/SetRootResource in nodejs (#9680) 2022-06-30 11:04:49 +01:00
stack.ts Stop using Get/SetRootResource in nodejs (#9680) 2022-06-30 11:04:49 +01:00