pulumi/sdk/nodejs/tests/runtime/langhost/cases/015.runtime_sxs
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
..
index.js Stop using Get/SetRootResource in nodejs (#9680) 2022-06-30 11:04:49 +01:00