pulumi/tests
Luke Hoban 1181311c4e
[sdk/nodejs] Support top-level default exports in ESM (#8766)
In #7764 and #8655 we added support for ESM entrypoints.  However, ESM "default exports" were handled just as "normal" in Node.js dynamic import of ESM - as a `default` proeprty in the export object.

This is not a particularly useful behaviour for Pulumi program entry points, and doesn't quite match some of the special logic we apply to non-object exports in CommonJS modules (invoking exported functions, and then awaiting exports promises).

Instead, this change adds support for default exports, treating the default export (if present) as the full returned export value.

It is for now an error to have both a default export and named exports, since it is unclear what this should mean.  In the future, we could potentially relax this and define how these two sets of exports are merged.

This is technically a breaking change from the support added in the recent releases, but only in a narrow case, and in that case the Pulumi stack exports were almost certainly not what the user wanted.

Fixes #8725, which includes a motivating example where this is ~necessary.
2022-01-22 18:33:28 -08:00
..
examples Use `provider.MainWithOptions` to reduce boilerplate in integration tests (#7684) 2021-07-30 06:31:17 -07:00
integration [sdk/nodejs] Support top-level default exports in ESM (#8766) 2022-01-22 18:33:28 -08:00
testprovider Replace the use of pipenv with Python's venv (#8548) 2021-12-07 07:59:07 -08:00
README.md Update tests and add integration test 2021-08-24 14:29:27 -07:00
about_test.go Whitespace and grammer 2021-08-30 18:56:02 -07:00
config_test.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
go.mod Update pkg -> sdk dependency (#8758) 2022-01-14 11:27:58 -08:00
go.sum Update pkg -> sdk dependency (#8706) 2022-01-07 15:23:54 -05:00
history_test.go [cli] Removing the deprecated pulumi history command (#6724) 2021-04-14 19:32:18 +01:00
login_test.go fixup linting errors after rebase of master -> feature-3.0 (#6766) 2021-04-14 19:32:18 +01:00
main_test.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
stack_test.go [backend/filestate] Allow preview on locked stack (#8642) 2021-12-29 08:28:15 -08:00

README.md

Integration Tests

This module provides integration tests for the Pulumi CLI.

The tests can be run via:

make test_all