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

Update libs #1514

Merged
merged 28 commits into from
May 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6690c6a
Update array-includes 3.1.4 > 3.1.5
Gnito May 17, 2022
596d403
Update final-form 4.20.4 > 4.20.7
Gnito May 17, 2022
24549bc
Update react-final-form 6.5.7 > 6.5.9
Gnito May 17, 2022
4230473
Update inquirer 8.2.0 > 8.2.4
Gnito May 17, 2022
aec2686
Update moment 2.29.2 > 2.29.3
Gnito May 17, 2022
cc3fd72
Update nodemon 2.9.15 > 2.0.16
Gnito May 17, 2022
c16881c
Update path-to-regexp 6.2.0 > 6.2.1
Gnito May 17, 2022
44570c4
Update react-helmet-async 1.1.2 > 1.3.0
Gnito May 17, 2022
3cfc833
Update react-intl 5.22.0 > 5.25.1
Gnito May 17, 2022
ccba08b
Update query-string 7.0.1 > 7.1.1
Gnito May 17, 2022
d11a855
Update body-parser 1.19.0 > 1.20.0
Gnito May 17, 2022
3b2521f
Update array.prototype.find 2.1.2 > 2.2.0
Gnito May 17, 2022
f3f6dde
Update prop-types 15.7.2 > 15.8.1
Gnito May 17, 2022
e89826d
Update express 4.17.1 > 4.18.1
Gnito May 17, 2022
7759b9e
Update passport 0.5.0 > 0.5.3
Gnito May 17, 2022
44131c5
Update core-js 3.19.2 > 3.22.5
Gnito May 17, 2022
5517609
Update sentry libs 6.15.0 > 6.19.7
Gnito May 17, 2022
dfb2613
Update concurrently 6.4.0 > 7.2.0
Gnito May 17, 2022
83cf559
canuse-lite db was outdated
Gnito May 17, 2022
375898c
Update @babel/runtime 7.16.3 > 7.17.9
Gnito May 17, 2022
298bcab
Update jose 3.11.4 > 3.20.3
Gnito May 17, 2022
6661e10
Update jose 3.20.3 > 4.8.1
Gnito May 17, 2022
13e539a
Update node env in CI for concurrently lib
Gnito May 17, 2022
1d0b4e5
Update react-router-dom 5.2.0 > 5.3.2
Gnito May 18, 2022
b5ce4ea
Update react-redux 7.2.6 > 7.2.8
Gnito May 18, 2022
5df20e2
Remove @formatjs/intl-relativetimeformat since browser support has im…
Gnito May 18, 2022
4d7c28e
Remove @formatjs/intl-pluralrules since browser support has improved
Gnito May 18, 2022
d5ba34c
Update changelog
Gnito May 18, 2022
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
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
format:
docker:
- image: circleci/node:12.19
- image: circleci/node:12.20
steps:
- checkout
- restore_cache:
Expand All @@ -25,7 +25,7 @@ jobs:
command: yarn run format-ci
test:
docker:
- image: circleci/node:12.19
- image: circleci/node:12.20
steps:
- checkout
- restore_cache:
Expand All @@ -48,7 +48,7 @@ jobs:
command: yarn run test-ci
build:
docker:
- image: circleci/node:12.19
- image: circleci/node:12.20
steps:
- checkout
- restore_cache:
Expand All @@ -71,7 +71,7 @@ jobs:
command: yarn run build
audit:
docker:
- image: circleci/node:12.19
- image: circleci/node:12.20
steps:
- checkout
- restore_cache:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ way to update this template, but currently, we follow a pattern:

## Upcoming version 2022-XX-XX

- [change] Update some outdated dependencies.
[#1514](https://github.com/sharetribe/ftw-daily/pull/1514)

## [v8.5.0] 2022-05-16

- [add] Add support for hosted translations.
Expand Down
48 changes: 23 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,55 @@
"private": true,
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.16.3",
"@formatjs/intl-relativetimeformat": "^9.3.2",
"@babel/runtime": "^7.17.9",
"@loadable/component": "^5.14.1",
"@loadable/server": "^5.14.2",
"@mapbox/polyline": "^1.1.1",
"@sentry/browser": "^6.15.0",
"@sentry/node": "^6.15.0",
"array-includes": "^3.1.4",
"array.prototype.find": "^2.1.2",
"@sentry/browser": "^6.19.7",
"@sentry/node": "^6.19.7",
"array-includes": "^3.1.5",
"array.prototype.find": "^2.2.0",
"autosize": "^5.0.1",
"basic-auth": "^2.0.1",
"body-parser": "^1.18.3",
"body-parser": "^1.20.0",
"classnames": "^2.3.1",
"compression": "^1.7.4",
"cookie-parser": "^1.4.6",
"core-js": "^3.19.2",
"core-js": "^3.22.5",
"cors": "^2.8.5",
"decimal.js": "^10.3.1",
"dotenv": "8.2.0",
"dotenv-expand": "5.1.0",
"express": "^4.16.4",
"express": "^4.18.1",
"express-enforces-ssl": "^1.1.0",
"express-sitemap": "^1.8.0",
"final-form": "^4.20.4",
"final-form": "^4.20.7",
"final-form-arrays": "^3.0.2",
"full-icu": "^1.4.0",
"helmet": "^4.6.0",
"intl-pluralrules": "^1.3.1",
"jose": "3.11.4",
"jose": "4.8.1",
"lodash": "^4.17.21",
"mapbox-gl-multitouch": "^1.0.3",
"moment": "^2.29.2",
"moment": "^2.29.3",
"object.entries": "^1.1.5",
"object.values": "^1.1.5",
"passport": "^0.5.0",
"passport": "^0.5.3",
"passport-facebook": "^3.0.0",
"passport-google-oauth": "^2.0.0",
"path-to-regexp": "^6.2.0",
"prop-types": "^15.7.2",
"query-string": "^7.0.1",
"path-to-regexp": "^6.2.1",
"prop-types": "^15.8.1",
"query-string": "^7.1.1",
"raf": "^3.4.0",
"react": "^16.13.1",
"react-dates": "^21.8.0",
"react-dom": "^16.13.1",
"react-final-form": "^6.5.7",
"react-final-form": "^6.5.9",
"react-final-form-arrays": "^3.1.3",
"react-helmet-async": "^1.1.2",
"react-intl": "^5.22.0",
"react-helmet-async": "^1.3.0",
"react-intl": "^5.25.1",
"react-moment-proptypes": "^1.8.1",
"react-redux": "^7.2.6",
"react-router-dom": "^5.2.0",
"react-redux": "^7.2.8",
"react-router-dom": "^5.3.2",
"react-with-direction": "^1.4.0",
"redux": "^4.1.2",
"redux-thunk": "^2.4.1",
Expand All @@ -68,12 +66,12 @@
"devDependencies": {
"bfj": "^7.0.2",
"chalk": "^v4.1.2",
"concurrently": "^6.4.0",
"concurrently": "^7.2.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.6",
"enzyme-to-json": "^3.6.2",
"inquirer": "^8.2.0",
"nodemon": "^2.0.15",
"inquirer": "^8.2.4",
"nodemon": "^2.0.16",
"prettier": "^1.18.2"
},
"resolutions": {
Expand Down
7 changes: 3 additions & 4 deletions server/api-util/idToken.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const crypto = require('crypto');
const { default: fromKeyLike } = require('jose/jwk/from_key_like');
const { default: SignJWT } = require('jose/jwt/sign');
const jose = require('jose');

const radix = 10;
const PORT = parseInt(process.env.REACT_APP_DEV_API_SERVER_PORT, radix);
Expand Down Expand Up @@ -50,7 +49,7 @@ exports.createIdToken = (idpClientId, user, options) => {

const { userId, firstName, lastName, email, emailVerified } = user;

const jwt = new SignJWT({
const jwt = new jose.SignJWT({
given_name: firstName,
family_name: lastName,
email: email,
Expand Down Expand Up @@ -89,7 +88,7 @@ exports.openIdConfiguration = (req, res) => {
*/
exports.jwksUri = keys => (req, res) => {
const jwkKeys = keys.map(key => {
return fromKeyLike(crypto.createPublicKey(key.rsaPublicKey)).then(res => {
return jose.exportJWK(crypto.createPublicKey(key.rsaPublicKey)).then(res => {
return { alg: key.alg, kid: key.keyId, ...res };
});
});
Expand Down
3 changes: 2 additions & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ import defaultMessages from './translations/en.json';
// 1) Change the language in the config.js file!
// 2) Import correct locale rules for Moment library
// 3) Use the `messagesInLocale` import to add the correct translation file.
// 4) To support older browsers we need add the correct locale for intl-relativetimeformat to `util/polyfills.js`
// 4) (optionally) To support older browsers you need add the intl-relativetimeformat npm packages
// and take it into use in `util/polyfills.js`

// Note that there is also translations in './translations/countryCodes.js' file
// This file contains ISO 3166-1 alpha-2 country codes, country names and their translations in our default languages
Expand Down
33 changes: 19 additions & 14 deletions src/util/polyfills.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,23 @@ if (typeof Number.isNaN === 'undefined') {
Number.isNaN = value => value !== value;
}

// To support browsers that do not have Intl.PluralRules (e.g IE11 & Safari 12-), include this polyfill in your build.

if (!Intl.PluralRules) {
require('intl-pluralrules');
}

// To support browsers that do not have Intl.RelativeTimeFormat (e.g IE11, Edge, Safari 12-), include this polyfill in your build along with individual CLDR data for each locale you support.
if (!Intl.RelativeTimeFormat) {
require('@formatjs/intl-relativetimeformat/polyfill');
require('@formatjs/intl-relativetimeformat/locale-data/en');
// To support browsers that do not have Intl.PluralRules (e.g IE11 & Safari 12-),
// - add npm packaged to package.json: "intl-pluralrules": "^1.3.1",
// - include this polyfill in your build:
//
// if (!Intl.PluralRules) {
// require('intl-pluralrules');
// }

// By default, this library comes with en data. To load additional locale, you need include them on demand.
// e.g.
// require('@formatjs/intl-relativetimeformat/dist/locale-data/fr');
}
// To support browsers that do not have Intl.RelativeTimeFormat (e.g IE11, Edge, Safari 12-),
// - add npm packaged to package.json: "@formatjs/intl-relativetimeformat": "^9.3.2",
// - include this polyfill in your build along with individual CLDR data for each locale you support:
//
// if (!Intl.RelativeTimeFormat) {
// require('@formatjs/intl-relativetimeformat/polyfill');
// require('@formatjs/intl-relativetimeformat/locale-data/en');

// // By default, this library comes with en data. To load additional locale, you need include them on demand.
// // e.g.
// // require('@formatjs/intl-relativetimeformat/dist/locale-data/fr');
// }
Loading