Update server-side code to be more es6-ey
Review Request #9541 — Created Jan. 26, 2018 and submitted
This change changes the server-side code in Sonar to use ES6 modules and
more idiomatic and consistent syntax. The only thing left that's still
usingmodule.exports
islib/schema
, which manipulates the exports at
runtime (something ES6 modules can't do). A future refactor will address
this.As part of this, I've updated the
aws-sdk
andmemjs
dependencies to
get newer versions which support promises. This allows us to move
entirely over to native promises, eliminating the Q library.
Went through the various functionality of the server and verified that
things work as expected.
Description | From | Last Updated |
---|---|---|
Col: 19 Missing 'new' prefix when invoking a constructor. |
reviewbot | |
Col: 25 Missing 'new' prefix when invoking a constructor. |
reviewbot | |
Col: 19 Missing 'new' prefix when invoking a constructor. |
reviewbot | |
Col: 19 Missing 'new' prefix when invoking a constructor. |
reviewbot | |
Col: 8 'https' is defined but never used. |
reviewbot | |
export default ? Your description says module.exports is only required for lib/schema. (Same below). |
brennie | |
Is this a constructor (I see this.memoize). If so, why not use a class? |
brennie | |
export default ? |
brennie | |
export function init(mongoose) over module.exports ? |
brennie | |
Is this a constructor? Why not use a class here? |
brennie |
- Commit:
-
a48dd5af42e7e0d3139316159d298bce496228dd83151402e920a1d7d3e4b425c6b5be317e0fa0b9
- Diff:
-
Revision 2 (+281 -378)
Checks run (2 succeeded)
- Commit:
-
83151402e920a1d7d3e4b425c6b5be317e0fa0b94d18c729b84daf649b3cd031b7066f8b6a833e27
- Diff:
-
Revision 3 (+286 -383)