Skip to content
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

Upgrade dependencies #284

Merged
merged 54 commits into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
823171b
Upgrade React-Geosuggest
JeffreyATW Feb 6, 2023
e1f1f88
Upgrade lint-staged
JeffreyATW Feb 6, 2023
0515651
Upgrade React Autosuggest
JeffreyATW Feb 6, 2023
8caf7e9
Upgrade Husky
JeffreyATW Feb 6, 2023
1527fed
Upgrade react-flip-move
JeffreyATW Feb 6, 2023
9111f39
Upgrade a bunch of React libraries
JeffreyATW Feb 6, 2023
b58868a
Upgrade Honeybadger
JeffreyATW Feb 6, 2023
b8763e2
Upgrade passport
JeffreyATW Feb 6, 2023
880ebd8
Remove editorconfig
JeffreyATW Feb 6, 2023
4df85f0
Remove eslint-loader
JeffreyATW Feb 7, 2023
555aaf8
Upgrade and hide more of Browsersync
JeffreyATW Feb 7, 2023
939945c
Upgrade Workbox
JeffreyATW Feb 7, 2023
2693bb7
Upgrade react-dev-utils
JeffreyATW Feb 7, 2023
74ac96c
Remove request
JeffreyATW Feb 7, 2023
0355f14
Upgrade pg
JeffreyATW Feb 7, 2023
d1775a4
Upgrade bcrypt
JeffreyATW Feb 7, 2023
4490c7e
Upgrade webpack loaders
JeffreyATW Feb 7, 2023
a981884
Upgrade node and webpack
JeffreyATW Feb 7, 2023
7e2538b
Pass Google Maps loader to components that need it
JeffreyATW Feb 9, 2023
32274da
Upgrade to react-flip-toolkit and upgrade react-scroll
JeffreyATW Feb 9, 2023
791257f
Upgrade Bootstrap
JeffreyATW Feb 10, 2023
9912e17
Fix capitalization
JeffreyATW Feb 10, 2023
0ac579f
Upgrade sass-related libraries
JeffreyATW Feb 10, 2023
2e91373
Upgrade eslint
JeffreyATW Feb 10, 2023
abf18fb
Lower required Node version a bit
JeffreyATW Feb 11, 2023
5774b0d
Upgrade Mocha
JeffreyATW Feb 13, 2023
fdbe3a9
Fix some vulnerabilities, convert Moment to Dayjs
JeffreyATW Feb 13, 2023
3ae6b1f
Fix cypress tests
JeffreyATW Feb 13, 2023
daa2c41
Upgrade Sequelize
JeffreyATW Feb 13, 2023
4e25f5f
Upgrade open-cli
JeffreyATW Feb 13, 2023
7d5c1e5
Fix migrations
JeffreyATW Feb 13, 2023
945231e
Upgrade fbjs
JeffreyATW Feb 13, 2023
2c2dfdd
More migration fixes
JeffreyATW Feb 13, 2023
8e3ab6b
Upgrade pretty-error
JeffreyATW Feb 13, 2023
8592d34
Fix qs vulnerability
JeffreyATW Feb 13, 2023
75c9985
Remove resolve-url-loader
JeffreyATW Feb 13, 2023
e019db4
Fix bootstrap bug
JeffreyATW Feb 13, 2023
e52d367
Revert "Upgrade Sequelize"
JeffreyATW Feb 14, 2023
03d1fc8
Upgrade Sequelize again
JeffreyATW Feb 14, 2023
fd476c3
Upgrade postcss-loader
JeffreyATW Feb 14, 2023
55d99f5
Upgrade postcss-nested
JeffreyATW Feb 14, 2023
4bd9ac1
Remove unused postcss plugins
JeffreyATW Feb 14, 2023
3858a03
Upgrade nyc
JeffreyATW Feb 14, 2023
e59efb9
Upgrade fetch-mock
JeffreyATW Feb 14, 2023
e9e1fb9
Upgrade node-fetch
JeffreyATW Feb 14, 2023
d01e7bd
Upgrade express-jwt
JeffreyATW Feb 14, 2023
3fc3657
Upgrade babel-plugin-istanbul
JeffreyATW Feb 15, 2023
eb10124
Upgrade morgan
JeffreyATW Feb 15, 2023
aa87cf3
Upgrade express-ws
JeffreyATW Feb 15, 2023
0a555e6
Upgrade serialize-javascript
JeffreyATW Feb 15, 2023
bb56f80
Upgrade isomorphic-fetch
JeffreyATW Feb 15, 2023
ebc5c77
Upgrade supertest
JeffreyATW Feb 15, 2023
ebc103a
Remove extend
JeffreyATW Feb 15, 2023
2bc38a2
Fix vulnerabilities in lockfile
JeffreyATW Feb 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
test:
docker:
# image for running tests
- image: cypress/browsers:node16.14.0-chrome99-ff97
- image: cypress/browsers:node18.12.0-chrome103-ff107
environment:
- DB_NAME=lunch_test
- DB_USER=lunch_test
Expand Down
20 changes: 0 additions & 20 deletions .editorconfig

This file was deleted.

2 changes: 1 addition & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SUPERUSER_EMAIL=
# Credentials for your Google Developer app
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_CLIENT_APIKEY= # optional
GOOGLE_CLIENT_APIKEY=
GOOGLE_SERVER_APIKEY=

# Google Analytics ID
Expand Down
10 changes: 9 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// ESLint configuration
// http://eslint.org/docs/user-guide/configuring
module.exports = {
parser: 'babel-eslint',
parser: '@babel/eslint-parser',

extends: [
'airbnb',
Expand Down Expand Up @@ -77,6 +77,7 @@ module.exports = {
'key-spacing': 0,
'no-confusing-arrow': 0,
'react/jsx-quotes': 0,
'react/jsx-props-no-spreading': 0,
'max-len': 0,
'jsx-quotes': [
2,
Expand All @@ -88,6 +89,13 @@ module.exports = {

'react/forbid-prop-types': 'off',
'react/destructuring-assignment': 'off',
'react/function-component-definition': ['error', {
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function'
}],
'react/static-property-placement': 'off',
'import/no-relative-packages': 'off',
'import/no-import-module-exports': 'off'
},

settings: {
Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm test && npx lint-staged
5 changes: 5 additions & 0 deletions .mocharc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
require: ['@babel/register', './test/setup'],
exit: true,
file: './test/mocha-setup',
};
14 changes: 7 additions & 7 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
* LICENSE.txt file in the root directory of this source tree.
*/

const lowerKebabCase = /^[a-z][a-zA-Z0-9]+$/;

// stylelint configuration
// https://stylelint.io/user-guide/configuration/
module.exports = {

// The standard config based on a handful of CSS style guides
// https://github.com/stylelint/stylelint-config-standard
extends: 'stylelint-config-standard',
extends: 'stylelint-config-standard-scss',

plugins: [
// stylelint plugin to sort CSS rules content with specified order
Expand All @@ -22,13 +24,10 @@ module.exports = {
],

rules: {
'at-rule-no-unknown': [
true,
{
ignoreAtRules: ['include', 'mixin'],
},
],
'at-rule-no-unknown': null,
'scss/at-rule-no-unknown': true,
'declaration-empty-line-before': null,
'keyframes-name-pattern': lowerKebabCase,
'number-leading-zero': 'never',
'property-no-unknown': [true, {
ignoreProperties: [
Expand All @@ -38,6 +37,7 @@ module.exports = {
'overflow-anchor'
],
}],
'selector-class-pattern': lowerKebabCase,

'selector-pseudo-class-no-unknown': [
true,
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.17.0
FROM node:18.14.0

# Set a working directory
WORKDIR /usr/src/app
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.17.0
FROM node:18.14.0

# Set a working directory
WORKDIR /app
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/helpers/addRestaurant.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ export default () => {
const lat = 37.7955703;
const lng = -122.39332079999997;
const name = 'Ferry Building Marketplace';
const place_id = 'ChIJWTGPjmaAhYARxz6l1hOj92w';
const placeId = 'ChIJWTGPjmaAhYARxz6l1hOj92w';
cy.request('POST', `${Cypress.env('subdomain')}api/restaurants`, {
name,
place_id,
placeId,
address,
lat,
lng
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/helpers/deleteRestaurant.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
export default () => {
cy.visit('/');
cy.get('button.RestaurantDropdown-toggle').click();
cy.get('ul.RestaurantDropdown-menu li').contains('Delete').should('be.visible').click();
cy.get('.RestaurantDropdown-menu a').contains('Delete').should('be.visible').click();
cy.get('body').should('have.attr', 'class', 'modal-open');
cy.get('.modal-footer .btn-primary').contains('Delete').click();
};
10 changes: 4 additions & 6 deletions db/migrations/20160303171210-AddGoogleParamsToRestaurants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const Promise = require('bluebird');

exports.up = (queryInterface, Sequelize) => Promise.all(
exports.up = (queryInterface, Sequelize) => Promise.all([
queryInterface.addColumn('restaurants', 'place_id', {
type: Sequelize.STRING,
unique: true
Expand All @@ -11,10 +9,10 @@ exports.up = (queryInterface, Sequelize) => Promise.all(
queryInterface.addColumn('restaurants', 'lng', {
type: Sequelize.FLOAT
})
);
]);

exports.down = queryInterface => Promise.all(
exports.down = queryInterface => Promise.all([
queryInterface.removeColumn('restaurants', 'place_id'),
queryInterface.removeColumn('restaurants', 'lat'),
queryInterface.removeColumn('restaurants', 'lng')
);
]);
10 changes: 4 additions & 6 deletions db/migrations/20160308134329-AddTimestampsToRestaurants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const Promise = require('bluebird');

exports.up = (queryInterface, Sequelize) => Promise.all(
exports.up = (queryInterface, Sequelize) => Promise.all([
queryInterface.addColumn('restaurants', 'created_at', {
type: Sequelize.DATE,
allowNull: false
Expand All @@ -9,9 +7,9 @@ exports.up = (queryInterface, Sequelize) => Promise.all(
type: Sequelize.DATE,
allowNull: false
})
);
]);

exports.down = queryInterface => Promise.all(
exports.down = queryInterface => Promise.all([
queryInterface.removeColumn('restaurants', 'created_at'),
queryInterface.removeColumn('restaurants', 'updated_at')
);
]);
10 changes: 4 additions & 6 deletions db/migrations/20160308134819-AddTimestampsToVotes.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const Promise = require('bluebird');

exports.up = (queryInterface, Sequelize) => Promise.all(
exports.up = (queryInterface, Sequelize) => Promise.all([
queryInterface.addColumn('votes', 'created_at', {
type: Sequelize.DATE,
allowNull: false
Expand All @@ -9,9 +7,9 @@ exports.up = (queryInterface, Sequelize) => Promise.all(
type: Sequelize.DATE,
allowNull: false
})
);
]);

exports.down = queryInterface => Promise.all(
exports.down = queryInterface => Promise.all([
queryInterface.removeColumn('votes', 'created_at'),
queryInterface.removeColumn('votes', 'updated_at')
);
]);
10 changes: 4 additions & 6 deletions db/migrations/20160308134835-AddTimestampsToUsers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const Promise = require('bluebird');

exports.up = (queryInterface, Sequelize) => Promise.all(
exports.up = (queryInterface, Sequelize) => Promise.all([
queryInterface.addColumn('users', 'created_at', {
type: Sequelize.DATE,
allowNull: false
Expand All @@ -9,9 +7,9 @@ exports.up = (queryInterface, Sequelize) => Promise.all(
type: Sequelize.DATE,
allowNull: false
})
);
]);

exports.down = queryInterface => Promise.all(
exports.down = queryInterface => Promise.all([
queryInterface.removeColumn('users', 'created_at'),
queryInterface.removeColumn('users', 'updated_at')
);
]);
4 changes: 1 addition & 3 deletions db/migrations/20170309225630-CreateTeams.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
const db = require('../../src/models/db');

exports.up = (queryInterface, Sequelize) => {
const Team = db.sequelize.define('team', {
const Team = queryInterface.sequelize.define('team', {
name: Sequelize.STRING,
}, {
underscored: true
Expand Down
4 changes: 1 addition & 3 deletions db/migrations/20170309230545-AddTeamIdToRestaurants.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
const db = require('../../src/models/db');

exports.up = (queryInterface, Sequelize) => {
const Team = db.sequelize.define('team', {
const Team = queryInterface.sequelize.define('team', {
name: Sequelize.STRING,
}, {
underscored: true
Expand Down
4 changes: 1 addition & 3 deletions db/migrations/20170309232003-AddTeamIdToTags.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
const db = require('../../src/models/db');

exports.up = (queryInterface, Sequelize) => {
const Team = db.sequelize.define('team', {
const Team = queryInterface.sequelize.define('team', {
name: Sequelize.STRING,
}, {
underscored: true
Expand Down
4 changes: 1 addition & 3 deletions db/migrations/20170309233227-ChangeTagNameUniqueness.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
const db = require('../../src/models/db');

exports.up = (queryInterface, Sequelize) => queryInterface.changeColumn('tags', 'name', {
type: Sequelize.STRING,
allowNull: false,
unique: false
}).then(() => db.sequelize.query('ALTER TABLE tags DROP CONSTRAINT IF EXISTS tags_name_key;'));
}).then(() => queryInterface.sequelize.query('ALTER TABLE tags DROP CONSTRAINT IF EXISTS tags_name_key;'));

exports.down = (queryInterface, Sequelize) => queryInterface.changeColumn('tags', 'name', {
type: Sequelize.STRING,
Expand Down
6 changes: 2 additions & 4 deletions db/migrations/20170310215129-ChangeUserGoogleIdNull.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
const db = require('../../src/models/db');

exports.up = (queryInterface, Sequelize) => queryInterface.changeColumn('users', 'google_id', {
type: Sequelize.STRING
});

exports.down = (queryInterface, Sequelize) => {
const User = db.sequelize.define('user', {
const User = queryInterface.sequelize.define('user', {
google_id: Sequelize.STRING,
}, {
underscored: true
});

User.destroy({ where: { google_id: null } }).then(() => queryInterface.changeColumn('users', 'google_id', {
return User.destroy({ where: { google_id: null } }).then(() => queryInterface.changeColumn('users', 'google_id', {
type: Sequelize.STRING,
allowNull: false
}));
Expand Down
10 changes: 4 additions & 6 deletions db/migrations/20170310220402-CreateRoles.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
const db = require('../../src/models/db');

exports.up = (queryInterface, Sequelize) => {
const User = db.sequelize.define('user', {
const User = queryInterface.sequelize.define('user', {
google_id: Sequelize.STRING,
name: Sequelize.STRING,
email: Sequelize.STRING
}, {
underscored: true
});

const Team = db.sequelize.define('team', {
const Team = queryInterface.sequelize.define('team', {
name: Sequelize.STRING,
}, {
underscored: true
Expand Down Expand Up @@ -61,7 +59,7 @@ exports.up = (queryInterface, Sequelize) => {
})
.then(() => User.findAll())
.then((users) => Team.findOne({ where: { name: 'Lab Zero' } }).then(team => {
const Role = db.sequelize.define('role', {
const Role = queryInterface.sequelize.define('role', {
type: {
allowNull: false,
type: Sequelize.ENUM('guest', 'member', 'owner'),
Expand Down Expand Up @@ -101,4 +99,4 @@ exports.up = (queryInterface, Sequelize) => {
}));
};

exports.down = queryInterface => queryInterface.dropTable('roles').then(() => db.sequelize.query('DROP TYPE enum_roles_type'));
exports.down = queryInterface => queryInterface.dropTable('roles').then(() => queryInterface.sequelize.query('DROP TYPE enum_roles_type'));
4 changes: 1 addition & 3 deletions db/migrations/20170310221346-AddSuperuserToUsers.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
const db = require('../../src/models/db');

exports.up = (queryInterface, Sequelize) => queryInterface.addColumn('users', 'superuser', {
allowNull: false,
type: Sequelize.BOOLEAN,
defaultValue: false
}).then(() => {
const User = db.sequelize.define('user', {
const User = queryInterface.sequelize.define('user', {
google_id: Sequelize.STRING,
name: Sequelize.STRING,
email: Sequelize.STRING,
Expand Down
4 changes: 1 addition & 3 deletions db/migrations/20170317163119-AddTeamIdToDecisions.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
const db = require('../../src/models/db');

exports.up = (queryInterface, Sequelize) => {
const Team = db.sequelize.define('team', {
const Team = queryInterface.sequelize.define('team', {
name: Sequelize.STRING,
slug: Sequelize.STRING(63)
}, {
Expand Down
4 changes: 1 addition & 3 deletions db/migrations/20170317172934-ChangeTeamSlugAllowNull.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
const db = require('../../src/models/db');

exports.up = (queryInterface, Sequelize) => {
const Team = db.sequelize.define('team', {
const Team = queryInterface.sequelize.define('team', {
name: Sequelize.STRING,
slug: Sequelize.STRING(63)
}, {
Expand Down
10 changes: 4 additions & 6 deletions db/migrations/20170328222012-AddLatLngAndAddressToTeams.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const Promise = require('bluebird');

exports.up = (queryInterface, Sequelize) => Promise.all(
exports.up = (queryInterface, Sequelize) => Promise.all([
queryInterface.addColumn('teams', 'lat', {
type: Sequelize.DOUBLE
}),
Expand All @@ -10,10 +8,10 @@ exports.up = (queryInterface, Sequelize) => Promise.all(
queryInterface.addColumn('teams', 'address', {
type: Sequelize.STRING
})
);
]);

exports.down = queryInterface => Promise.all(
exports.down = queryInterface => Promise.all([
queryInterface.removeColumn('teams', 'lat'),
queryInterface.removeColumn('teams', 'lng'),
queryInterface.removeColumn('teams', 'address')
);
]);
Loading