-
Notifications
You must be signed in to change notification settings - Fork 497
[ECMAScript6BestPractices] fix common-serve.js
#2773
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
base: main
Are you sure you want to change the base?
[ECMAScript6BestPractices] fix common-serve.js
#2773
Conversation
lib/src/main/resources/com/diffplug/spotless/npm/common-serve.js
Outdated
Show resolved
Hide resolved
lib/src/main/resources/com/diffplug/spotless/npm/common-serve.js
Outdated
Show resolved
Hide resolved
lib/src/main/resources/com/diffplug/spotless/npm/common-serve.js
Outdated
Show resolved
Hide resolved
1f6404a to
b5775ec
Compare
ca950be to
8533f98
Compare
| var format_data = req.body; | ||
| tsfmt.processString("spotless-format-string.ts", format_data.file_content, format_data.config_options).then(resultMap => { | ||
| /* | ||
| export interface ResultMap { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need this?
8533f98 to
78a5764
Compare
Signed-off-by: Vincent Potucek <[email protected]>
78a5764 to
cd3f993
Compare
Signed-off-by: Vincent Potucek <[email protected]>
Signed-off-by: Vincent Potucek <[email protected]>
Signed-off-by: Vincent Potucek <[email protected]>
Signed-off-by: Vincent Potucek <[email protected]>
Signed-off-by: Vincent Potucek <[email protected]>
|
|
||
| app.post("/shutdown", (req, res) => { | ||
| res.status(200).send("Shutting down"); | ||
| setTimeout(async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assuming if we fail here we still would have send out 200 before.
| console.error("Error during shutdown:", err); | ||
| } | ||
| }, 200); | ||
| res.ok().send("Graceful shutdown."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be safe to make this the last call. The only potential issue is if a third-party tool relies on the current log parsing, but that’s unlikely. We’re updating it to present tense for consistency with standard logging.
Signed-off-by: Vincent Potucek <[email protected]>
Signed-off-by: Vincent Potucek <[email protected]>
…-common-serve' into fix-ECMAScript6BestPractices-fix-common-serve # Conflicts: # lib/src/main/resources/com/diffplug/spotless/npm/common-serve.js
| 'ReturnValueIgnored', // We don`t want to use ErrorProne's annotations. | ||
| ) | ||
| error( | ||
| 'ReturnValueIgnored', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover.
enabler for:
ECMAScript6BestPractices#2768related to:
ECMAScript6BestPracticesendless comment copy bug. openrewrite/rewrite#6330