This repository was archived by the owner on Dec 28, 2021. It is now read-only.
fix: only process function if runtime is NodeJS#1
Merged
KingDarBoja merged 7 commits intomasterfrom Feb 23, 2020
Merged
Conversation
- This change fixes an issue where serverless-plugin-typescript would try to process functions that used different runtimes. - Typescript functions will only run on node runtimes so it makes sense to exclude functions on other runtimes from processing
This fixes issues with the mixed types of exports so other code (tests) can import TypeScriptPlugin.
- Merge in the changes that vectorjohn made in a parallel PR (filtering functions at the plugin level) - Use lodash's pickBy to simplify some logic - Fix an issue with mixed export syntax (export vs module.exports) - Removed redundant tests Fixes #198
- Turns out `export default` is not the same as `modules.export = xyz` - The actual equivilant is `export = xyz` with `esModuleInterop` enabled - This is a better form than `modules.export = xyz` because we are able to use the type system - See: https://stackoverflow.com/questions/40294870/module-exports-vs-export-default-in-node-js-and-es6 and https://www.typescriptlang.org/docs/handbook/migrating-from-javascript.html#weeding-out-errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This bugfix comes from two contributors which made two PRs at source repo: 196 and 197.
The former merged the changes from the later, making it easier to merge those PRs on this fork.