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 front end dependencies #29

Merged
merged 8 commits into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ To run Kitesocial, you will need:
- Ruby 2.7.2
- Rails 6.0.3
- Yarn 1.19.1
- Node 16.7.0
- Chrome or Chromium

Once you've cloned the repo, run:
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/components/RelativeDateTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const RelativeDateTime = ({ value }) => {

return (
<time
title={date.toLocaleString(DateTime.DATETIME_SHORT)}
title={date.toLocaleString(DateTime.DATETIME_SHORT, { locale: 'en-AU' })}
dateTime={value}
>
{formatDate(date)}
Expand Down
4 changes: 0 additions & 4 deletions app/javascript/components/__snapshots__/Chirp.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ exports[`Like button sends a like request to the API 1`] = `
@
bob
</a>

</p>
--
<a
Expand Down Expand Up @@ -102,7 +101,6 @@ exports[`Like button sends a like request to the API 2`] = `
@
bob
</a>

</p>
--
<a
Expand Down Expand Up @@ -166,7 +164,6 @@ exports[`Like button sends a like request to the API 3`] = `
@
bob
</a>

</p>
--
<a
Expand Down Expand Up @@ -261,7 +258,6 @@ exports[`mention tracking links to mentioned users 1`] = `
@
bob
</a>

</p>
--
<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`rendering a relative date handles negative values measured in seconds 1`] = `
<time
dateTime="2021-04-22T01:08:45Z"
title="2021-04-21, 6:08 p.m."
title="22/04/2021, 9:08 am"
>
in 35 seconds
</time>
Expand All @@ -12,7 +12,7 @@ exports[`rendering a relative date handles negative values measured in seconds 1
exports[`rendering a relative date handles values greater than a year old 1`] = `
<time
dateTime="2020-04-22T00:01:25Z"
title="2020-04-21, 5:01 p.m."
title="22/04/2020, 8:01 am"
>
1 year ago
</time>
Expand All @@ -21,7 +21,7 @@ exports[`rendering a relative date handles values greater than a year old 1`] =
exports[`rendering a relative date handles values measured in days 1`] = `
<time
dateTime="2021-04-18T22:02:01Z"
title="2021-04-18, 3:02 p.m."
title="19/04/2021, 6:02 am"
>
3 days ago
</time>
Expand All @@ -30,7 +30,7 @@ exports[`rendering a relative date handles values measured in days 1`] = `
exports[`rendering a relative date handles values measured in hours 1`] = `
<time
dateTime="2021-04-21T22:02:01Z"
title="2021-04-21, 3:02 p.m."
title="22/04/2021, 6:02 am"
>
3 hours ago
</time>
Expand All @@ -39,7 +39,7 @@ exports[`rendering a relative date handles values measured in hours 1`] = `
exports[`rendering a relative date handles values measured in minutes 1`] = `
<time
dateTime="2021-04-22T01:02:01Z"
title="2021-04-21, 6:02 p.m."
title="22/04/2021, 9:02 am"
>
6 minutes ago
</time>
Expand All @@ -48,7 +48,7 @@ exports[`rendering a relative date handles values measured in minutes 1`] = `
exports[`rendering a relative date handles values measured in months 1`] = `
<time
dateTime="2021-02-01T22:02:01Z"
title="2021-02-01, 2:02 p.m."
title="02/02/2021, 6:02 am"
>
3 months ago
</time>
Expand All @@ -57,7 +57,7 @@ exports[`rendering a relative date handles values measured in months 1`] = `
exports[`rendering a relative date handles values measured in seconds 1`] = `
<time
dateTime="2021-04-22T01:08:01Z"
title="2021-04-21, 6:08 p.m."
title="22/04/2021, 9:08 am"
>
9 seconds ago
</time>
Expand All @@ -66,7 +66,7 @@ exports[`rendering a relative date handles values measured in seconds 1`] = `
exports[`rendering a relative date handles values measured in weeks 1`] = `
<time
dateTime="2021-04-01T22:02:01Z"
title="2021-04-01, 3:02 p.m."
title="02/04/2021, 6:02 am"
>
3 weeks ago
</time>
Expand All @@ -75,7 +75,7 @@ exports[`rendering a relative date handles values measured in weeks 1`] = `
exports[`rendering a relative date handles values which are less than a second different from the current time 1`] = `
<time
dateTime="2021-04-22T01:08:10Z"
title="2021-04-21, 6:08 p.m."
title="22/04/2021, 9:08 am"
>
just now
</time>
Expand Down
2 changes: 2 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module.exports = function(api) {
isTestEnv && [
'@babel/preset-env',
{
loose: true,
targets: {
node: 'current'
}
Expand All @@ -31,6 +32,7 @@ module.exports = function(api) {
(isProductionEnv || isDevelopmentEnv) && [
'@babel/preset-env',
{
loose: true,
forceAllTransforms: true,
useBuiltIns: 'entry',
corejs: 3,
Expand Down
3 changes: 3 additions & 0 deletions globalSetup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default async() => {
process.env.TZ = 'Australia/Perth';
};
4 changes: 3 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* eslint-env node */

module.exports = {
testMatch: ["<rootDir>/app/**/?(*.)(spec|test).js"]
testMatch: ["<rootDir>/app/**/?(*.)(spec|test).js"],
testEnvironment: 'jsdom',
globalSetup: "<rootDir>/globalSetup.js"
};
45 changes: 26 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,37 @@
"test": "jest"
},
"dependencies": {
"@babel/preset-react": "^7.13.13",
"@rails/actioncable": "^6.0.0",
"@rails/activestorage": "^6.0.0",
"@rails/ujs": "^6.0.0",
"@babel/core": "^7.8.0",
"@babel/preset-react": "^7.18.6",
"@rails/actioncable": "^7.0.3-1",
"@rails/activestorage": "^7.0.3-1",
"@rails/ujs": "^7.0.3-1",
"@rails/webpacker": "^5.0.0",
"global": "^4.4.0",
"luxon": "^1.26.0",
"prop-types": "^15.7.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"turbolinks": "^5.2.0"
"luxon": "^3.0.1",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"turbolinks": "^5.2.0",
"webpack": "^4.0.0"
},
"version": "0.1.0",
"devDependencies": {
"@babel/eslint-parser": "^7.13.14",
"@babel/eslint-plugin": "^7.13.16",
"@babel/preset-env": "^7.13.15",
"babel-jest": "^26.6.3",
"eslint": "^7.24.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-react": "^7.23.2",
"jest": "^26.6.3",
"@babel/eslint-parser": "^7.18.9",
"@babel/eslint-plugin": "^7.18.10",
"@babel/preset-env": "^7.18.10",
"babel-jest": "^28.1.3",
"eslint": "^8.22.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-react": "^7.30.1",
"jest": "^28.1.3",
"jest-environment-jsdom": "^28.1.3",
"jest-fetch-mock": "^3.0.3",
"react-test-renderer": "^17.0.2",
"webpack-dev-server": "^3.10.3"
"react-test-renderer": "^18.2.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.10.0"
},
"resolutions": {
"tough-cookie": "4.0.0"
}
}
Loading