Skip to content

fix: Skip functions that do not use node runtime. Allows mixed runtime projects #197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

vectorjohn
Copy link

I have a project that needs to use some Java functions but the majority is using typescript. Unless I'm missing something, I didn't see a way to do that with this plugin because it attempts to tsc every function and of course fails. It entirely ignores the runtime choice. So I added getNodeFunctions which just returns this.functions and filters based on the runtime (function specific or service.provider.runtime). This is used instead of this.functions in rootFileNames() as well as moveArtifacts.

Moved TypeScriptPlugin class into its own file to not have conflicting export mechanisms. Needed by the new test. There might be a better fix, but the code as written complained in tests that TypeScriptPlugin was not a constructor when I tried importing from index.js, I think it's because the class was exported and also module.exports was replaced.

John Reeves added 2 commits February 3, 2020 14:38
This fixes issues with the mixed types of exports so other code (tests) can import TypeScriptPlugin.
@vectorjohn vectorjohn changed the title Skip functions that do not use node runtime. Allows mixed runtime projects fix: Skip functions that do not use node runtime. Allows mixed runtime projects Feb 3, 2020
@jean343
Copy link

jean343 commented Dec 13, 2021

Can we please merge this. Without this addition, it forces an entire code base to use the same runtime.

@TomoyaOnishi
Copy link

I have the same issue! Please merge this PR! 🙏

@vectorjohn
Copy link
Author

It looks like a version of this was merged by #277 so I'm closing this.

@vectorjohn vectorjohn closed this Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants