Skip to content

Commit 31385b4

Browse files
alexanmtzalexandremagnodependabot[bot]
authored
Update libraries (#949)
* lint fixes * lint fixes * lint fixes * lint fixes * lint fixes * lint fixes * lint fixes * Bump moment-timezone from 0.5.14 to 0.5.40 (#948) Bumps [moment-timezone](https://github.com/moment/moment-timezone) from 0.5.14 to 0.5.40. - [Release notes](https://github.com/moment/moment-timezone/releases) - [Changelog](https://github.com/moment/moment-timezone/blob/develop/changelog.md) - [Commits](moment/moment-timezone@0.5.14...0.5.40) --- updated-dependencies: - dependency-name: moment-timezone dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: alexandremagno <[email protected]> * Bump minimatch and sequelize-cli (#947) Bumps [minimatch](https://github.com/isaacs/minimatch) to 3.0.8 and updates ancestor dependency [sequelize-cli](https://github.com/sequelize/cli). These dependencies need to be updated together. Updates `minimatch` from 3.0.4 to 3.0.8 - [Release notes](https://github.com/isaacs/minimatch/releases) - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v3.0.4...v3.0.8) Updates `sequelize-cli` from 2.8.0 to 6.6.0 - [Release notes](https://github.com/sequelize/cli/releases) - [Changelog](https://github.com/sequelize/cli/blob/main/CHANGELOG.md) - [Commits](sequelize/cli@v2.8.0...v6.6.0) --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect - dependency-name: sequelize-cli dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: alexandremagno <[email protected]> * Bump ua-parser-js from 0.7.32 to 0.7.33 (#946) Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.32 to 0.7.33. - [Release notes](https://github.com/faisalman/ua-parser-js/releases) - [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/changelog.md) - [Commits](faisalman/ua-parser-js@0.7.32...0.7.33) --- updated-dependencies: - dependency-name: ua-parser-js dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump json5, babel-core, loader-utils and karma-webpack (#945) Bumps [json5](https://github.com/json5/json5) to 2.2.3 and updates ancestor dependencies [json5](https://github.com/json5/json5), [babel-core](https://github.com/babel/babel), [loader-utils](https://github.com/webpack/loader-utils) and [karma-webpack](https://github.com/webpack-contrib/karma-webpack). These dependencies need to be updated together. Updates `json5` from 1.0.1 to 2.2.3 - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](json5/json5@v1.0.1...v2.2.3) Updates `babel-core` from 6.26.3 to 7.0.0-bridge.0 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits) Updates `loader-utils` from 1.1.0 to 1.4.2 - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md) - [Commits](webpack/loader-utils@v1.1.0...v1.4.2) Updates `karma-webpack` from 2.0.6 to 2.0.13 - [Release notes](https://github.com/webpack-contrib/karma-webpack/releases) - [Changelog](https://github.com/ryanclark/karma-webpack/blob/master/CHANGELOG.md) - [Commits](codymikol/karma-webpack@v2.0.6...v2.0.13) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect - dependency-name: babel-core dependency-type: indirect - dependency-name: loader-utils dependency-type: indirect - dependency-name: karma-webpack dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: alexandremagno <[email protected]> * Bump decode-uri-component from 0.2.0 to 0.2.2 in /frontend (#923) Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. - [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases) - [Commits](SamVerschueren/decode-uri-component@v0.2.0...v0.2.2) --- updated-dependencies: - dependency-name: decode-uri-component dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump loader-utils from 1.4.0 to 1.4.2 in /frontend (#916) Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.2. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md) - [Commits](webpack/loader-utils@v1.4.0...v1.4.2) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump terser from 4.6.11 to 4.8.1 (#907) Bumps [terser](https://github.com/terser/terser) from 4.6.11 to 4.8.1. - [Release notes](https://github.com/terser/terser/releases) - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](terser/terser@v4.6.11...v4.8.1) --- updated-dependencies: - dependency-name: terser dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump passport from 0.3.2 to 0.6.0 (#905) Bumps [passport](https://github.com/jaredhanson/passport) from 0.3.2 to 0.6.0. - [Release notes](https://github.com/jaredhanson/passport/releases) - [Changelog](https://github.com/jaredhanson/passport/blob/master/CHANGELOG.md) - [Commits](jaredhanson/passport@v0.3.2...v0.6.0) --- updated-dependencies: - dependency-name: passport dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump jszip from 3.1.5 to 3.10.1 (#904) Bumps [jszip](https://github.com/Stuk/jszip) from 3.1.5 to 3.10.1. - [Release notes](https://github.com/Stuk/jszip/releases) - [Changelog](https://github.com/Stuk/jszip/blob/main/CHANGES.md) - [Commits](Stuk/jszip@v3.1.5...v3.10.1) --- updated-dependencies: - dependency-name: jszip dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump terser from 4.8.0 to 4.8.1 in /frontend (#902) Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1. - [Release notes](https://github.com/terser/terser/releases) - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/commits) --- updated-dependencies: - dependency-name: terser dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump pathval from 1.1.0 to 1.1.1 (#879) Bumps [pathval](https://github.com/chaijs/pathval) from 1.1.0 to 1.1.1. - [Release notes](https://github.com/chaijs/pathval/releases) - [Changelog](https://github.com/chaijs/pathval/blob/master/CHANGELOG.md) - [Commits](chaijs/pathval@v1.1.0...v1.1.1) --- updated-dependencies: - dependency-name: pathval dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump got, nodemon and tslint (#952) Removes [got](https://github.com/sindresorhus/got). It's no longer used after updating ancestor dependencies [got](https://github.com/sindresorhus/got), [nodemon](https://github.com/remy/nodemon) and [tslint](https://github.com/palantir/tslint). These dependencies need to be updated together. Removes `got` Updates `nodemon` from 1.19.4 to 2.0.20 - [Release notes](https://github.com/remy/nodemon/releases) - [Commits](remy/nodemon@v1.19.4...v2.0.20) Updates `tslint` from 4.5.1 to 6.1.3 - [Release notes](https://github.com/palantir/tslint/releases) - [Changelog](https://github.com/palantir/tslint/blob/master/CHANGELOG.md) - [Commits](palantir/tslint@4.5.1...6.1.3) --- updated-dependencies: - dependency-name: got dependency-type: indirect - dependency-name: nodemon dependency-type: direct:development - dependency-name: tslint dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump jsdom, jest and jest-cli in /frontend (#955) Removes [jsdom](https://github.com/jsdom/jsdom). It's no longer used after updating ancestor dependencies [jsdom](https://github.com/jsdom/jsdom), [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) and [jest-cli](https://github.com/facebook/jest/tree/HEAD/packages/jest-cli). These dependencies need to be updated together. Removes `jsdom` Updates `jest` from 23.6.0 to 29.4.1 - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v29.4.1/packages/jest) Updates `jest-cli` from 23.6.0 to 29.4.1 - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v29.4.1/packages/jest-cli) --- updated-dependencies: - dependency-name: jsdom dependency-type: indirect - dependency-name: jest dependency-type: direct:development - dependency-name: jest-cli dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump d3-color and recharts in /frontend (#954) Bumps [d3-color](https://github.com/d3/d3-color) to 3.1.0 and updates ancestor dependency [recharts](https://github.com/recharts/recharts). These dependencies need to be updated together. Updates `d3-color` from 1.4.1 to 3.1.0 - [Release notes](https://github.com/d3/d3-color/releases) - [Commits](d3/d3-color@v1.4.1...v3.1.0) Updates `recharts` from 1.8.5 to 2.3.2 - [Release notes](https://github.com/recharts/recharts/releases) - [Changelog](https://github.com/recharts/recharts/blob/master/CHANGELOG.md) - [Commits](recharts/recharts@v1.8.5...v2.3.2) --- updated-dependencies: - dependency-name: d3-color dependency-type: indirect - dependency-name: recharts dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: alexandremagno <[email protected]> * Bump postcss and css-loader in /frontend (#953) Bumps [postcss](https://github.com/postcss/postcss) to 8.4.21 and updates ancestor dependency [css-loader](https://github.com/webpack-contrib/css-loader). These dependencies need to be updated together. Updates `postcss` from 5.2.18 to 8.4.21 - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/commits/8.4.21) Updates `css-loader` from 0.28.11 to 6.7.3 - [Release notes](https://github.com/webpack-contrib/css-loader/releases) - [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md) - [Commits](webpack/css-loader@v0.28.11...v6.7.3) --- updated-dependencies: - dependency-name: postcss dependency-type: indirect - dependency-name: css-loader dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: alexandremagno <[email protected]> * Bump sequelize from 3.35.1 to 6.1.0 (#951) Bumps [sequelize](https://github.com/sequelize/sequelize) from 3.35.1 to 6.1.0. - [Release notes](https://github.com/sequelize/sequelize/releases) - [Commits](sequelize/sequelize@v3.35.1...v6.1.0) --- updated-dependencies: - dependency-name: sequelize dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: alexandremagno <[email protected]> * Bump marked from 0.3.19 to 4.0.10 in /frontend (#874) Bumps [marked](https://github.com/markedjs/marked) from 0.3.19 to 4.0.10. - [Release notes](https://github.com/markedjs/marked/releases) - [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json) - [Commits](markedjs/marked@v0.3.19...v4.0.10) --- updated-dependencies: - dependency-name: marked dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump axios from 0.16.2 to 0.21.2 in /frontend (#857) Bumps [axios](https://github.com/axios/axios) from 0.16.2 to 0.21.2. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md) - [Commits](axios/axios@v0.16.2...v0.21.2) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * updating webpack and many libraries * making the platform run with all the new libriaries, now needs to solve login first * fixed github login strategy * local user login * fixing signup issues --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: alexandremagno <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 585e8fa commit 31385b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+36260
-18400
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ SECRET_PHRASE=123
2828
STRIPE_KEY=
2929
STRIPE_PUBKEY=
3030

31+
GOOGLE_RECAPTCHA_SITE_KEY=
32+
3133
## Docker compose - local environment settings.
3234
POSTGRES_PASSWORD=postgres
3335
POSTGRES_DB=gitpay_dev

config/passport.js

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const googleStrategy = require('passport-google-oauth20').Strategy
1111
const gitHubStrategy = require('passport-github2').Strategy
1212
const bitbucketStrategy = require('passport-bitbucket-oauth20').Strategy
1313
const facebookStrategy = require('passport-facebook').Strategy
14-
const LocalStrategy = require('passport-local').Strategy
14+
const LocalStrategy = require('passport-local')
1515
const requestPromise = require('request-promise')
1616
const passportJWT = require('passport-jwt')
1717
const ExtractJWT = passportJWT.ExtractJwt
@@ -388,34 +388,28 @@ passport.use(
388388

389389
passport.use(
390390
new LocalStrategy(
391-
{
392-
usernameField: 'email',
393-
passwordField: 'password'
394-
},
395-
(email, password, done) => {
396-
process.nextTick(_ => {
397-
const userAttributes = {
398-
email: email
391+
async function verify (username, password, done) {
392+
const userAttributes = {
393+
email: username
394+
}
395+
try {
396+
const user = await userExist(userAttributes)
397+
if (!user) done(null, false)
398+
if (user.verifyPassword(password, user.password)) {
399+
const token = jwt.sign(
400+
{ email: user.email },
401+
process.env.SECRET_PHRASE
402+
)
403+
user.token = token
404+
return done(null, user)
399405
}
400-
userExist(userAttributes)
401-
.then(user => {
402-
if (!user) return done(null, false)
403-
if (user.verifyPassword(password, user.password)) {
404-
const token = jwt.sign(
405-
{ email: user.email },
406-
process.env.SECRET_PHRASE
407-
)
408-
user.token = token
409-
return done(null, user)
410-
}
411-
return done(null, false)
412-
})
413-
.catch(error => {
414-
return done(error)
415-
})
416-
})
417-
}
418-
)
406+
return done(null, false)
407+
}
408+
catch (err) {
409+
console.log('err', err)
410+
return done(err)
411+
};
412+
})
419413
)
420414

421415
passport.use(new JWTStrategy({

frontend/.babelrc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"presets": [
3-
"es2015",
4-
"react"
3+
"@babel/preset-env",
4+
"@babel/preset-react"
55
],
66
"plugins": [
77
["transform-imports", {
@@ -12,8 +12,9 @@
1212
}
1313
],
1414
"add-react-displayname",
15-
"transform-object-rest-spread",
16-
"transform-class-properties",
15+
"@babel/plugin-proposal-object-rest-spread",
16+
"@babel/plugin-proposal-class-properties",
17+
"babel-plugin-styled-components",
1718
["react-intl", {
1819
"messagesDir": "./build/messages/",
1920
"removeDefaultMessage": true,

0 commit comments

Comments
 (0)