Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: plugin module resolution works unexpectedly (#3089)
In theory, plugin module resolution should work based on where the plugin file is located. Previously it was pulling dependencies from (I think?) the CLI's node_modules. I'm not actually totally sure, but I know it wasn't resolving them based on the actual plugin file location. This change creates a `require` to invoke the plugin, very similar to the way we do it for preflight execution. This change on it's own broke the plugin e2e tests (because that folder did not have a node_modules with `@cdktf/provider-aws` in it), so I also moved them to `examples/tests/valid/plugins`, that way they can use the node_modules from the valid tests. ## Checklist - [x] Title matches [Winglang's style guide](https://docs.winglang.io/contributing/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Monada Contribution License](https://docs.winglang.io/terms-and-policies/contribution-license.html)*.
- Loading branch information