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

Preserve whitespaces in single-quote literal fallback #5775

Merged
merged 2 commits into from Feb 3, 2019

Conversation

Projects
4 participants
@exoego
Copy link
Contributor

exoego commented Feb 2, 2019

What did you implement:

Closes #5398

How did you implement it:

In #5594, cleanVariable does not clean whitespaces if variable is double-quote string literal.

Atter this PR, it also does not clean whitespace if variable is single-quote string literal.

How can we verify it:

  1. npm install -g exoego/serverless#single-quote-fallback
  2. sls deploy below and confirm it completes successfully.
service: aws-nodejs

provider:
  name: aws
  runtime: nodejs8.10

functions:
  hello:
    handler: handler.hello
    events:
      - schedule: ${env:SCHEDULE, 'rate(2 hours)'}
      - schedule: ${env:SCHEDULE, "rate(3 hours)"}

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

@pmuens

pmuens approved these changes Feb 3, 2019

Copy link
Member

pmuens left a comment

Great! Thanks for fixing @exoego 👍

LGTM :shipit:

@pmuens pmuens added this to In progress in Serverless via automation Feb 3, 2019

@pmuens pmuens added the pr/in-review label Feb 3, 2019

@pmuens pmuens merged commit 398a92a into serverless:master Feb 3, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

Serverless automation moved this from In progress to Done Feb 3, 2019

@exoego exoego deleted the exoego:single-quote-fallback branch Feb 3, 2019

@dschep dschep added this to the 1.37.0 milestone Feb 5, 2019

@shortjared shortjared added the bug label Feb 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment