Commit Graph

4 Commits

Author SHA1 Message Date
Justin Van Patten cf1189bf2c [sdk/nodejs] Support loading package.json from parent dir
This commit changes how the Node SDK resolves package.json to recursively look up the directory tree for the file when it's not present in the cwd. The previous behavior was to only look in the current directory, and fallback to an empty object when the file could not be found.
2023-06-29 07:57:43 -07:00
Robbie McKinstry c500b3b997
Revert package.json lookup fix. 2023-05-15 14:14:57 -04:00
Robbie McKinstry c3e5e483ca
Update four tests to reflected the standardized "main" behavior.
The `main` field in package.json is standardized by Node to refer
to a file relative to package.json. The previous commits in this
PR used `main` relative to the Pulumi main directory, which was
incorrect. This commit upgrades two tests, and introduces two more,
to verify the correctness of this behavior and the PR in general.
2023-05-10 18:04:59 -04:00
Robbie McKinstry e15fd85696
Test ESM module with package.json located in parent folder
This commit adds a test to assert Pulumi programs written as ESM
modules can be executed when their package.json file is located
in the parent directory.
2023-05-10 15:39:19 -04:00