pulumi/pkg/codegen/testing/test/testdata/output-funcs/nodejs-extras
Anton Tayanovskyy 9597386a89
[codegen/node] Implement support for lazy-loaded Node modules (#10538)
* First experiment: export a type directly, but still use require.

* WIP: Add lazy-loading to utils, build export list.

* Untested: add submodule export generation with lazy-loading

* WIP: Syntactically valid submodule export

* Add tests, finish submodExportList generation

* Clean up comments

* Fix compilation error

* WIP

* Lazy-load class modules and re-export them

* Revert original approach

* Handle the class-with-method case eagerly

* Accept codegen

* Fix typo in method namespace condition

* Fix lazyLoadProperty to call require() in source context

* Support lazy-loading function modules

* Revert useles diff, PR feedback

* Remove extra ws diff

* Remove unused

* Accept codegen output

* Function-only files still need utilites import

* Optimize for not loading enums all the time

* Improve further

* Accept codegen

* Implement flags to control lazy-loading

* Accept codegen tests

* Illustrate on azure-native-nested-types

* Test lazy-loaded functions on output-funcs

* Start factoring out

* More cases

* More unit tests

* Reduce flag surface

* Separate fileInfo structs into its own module

* Merge lazyloads

* Accept codegen changes

* CHANGELOG

* Lint

* Revert caching require()

* Accept codegen

Co-authored-by: Robbie McKinstry <robbiemckinstry@Robbies-MacBook-Pro.local>
Co-authored-by: Robbie McKinstry <robbiemckinstry@macbook-pro.mynetworksettings.com>
2022-09-01 18:42:44 -04:00
..
tests [codegen/node] Implement support for lazy-loaded Node modules (#10538) 2022-09-01 18:42:44 -04:00