diff options
author | Shlee <github@shl.ee> | 2020-03-21 10:14:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-21 03:14:50 +0100 |
commit | 221eda646b09a5d993a999d000af9de6c7f25b50 (patch) | |
tree | bcfe11e8605c908606d77ef871cb355f798b78fd | |
parent | 44292a6952cfa1e87137eaecbd41269b35105a60 (diff) |
Migrate Rails ujs as required for Rails 6 Upgrade. (#13280)
* Update yarn.lock * Update package.json * Update public.js * Update admin.js * Update log_out.js * Update common.js
-rw-r--r-- | app/javascript/mastodon/common.js | 2 | ||||
-rw-r--r-- | app/javascript/mastodon/utils/log_out.js | 2 | ||||
-rw-r--r-- | app/javascript/packs/admin.js | 2 | ||||
-rw-r--r-- | app/javascript/packs/public.js | 2 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | yarn.lock | 10 |
6 files changed, 10 insertions, 10 deletions
diff --git a/app/javascript/mastodon/common.js b/app/javascript/mastodon/common.js index fba21316a..6818aa5d5 100644 --- a/app/javascript/mastodon/common.js +++ b/app/javascript/mastodon/common.js @@ -1,4 +1,4 @@ -import Rails from 'rails-ujs'; +import Rails from '@rails/ujs'; export function start() { require('font-awesome/css/font-awesome.css'); diff --git a/app/javascript/mastodon/utils/log_out.js b/app/javascript/mastodon/utils/log_out.js index b43417f4b..3a4cc8ecb 100644 --- a/app/javascript/mastodon/utils/log_out.js +++ b/app/javascript/mastodon/utils/log_out.js @@ -1,4 +1,4 @@ -import Rails from 'rails-ujs'; +import Rails from '@rails/ujs'; export const logOut = () => { const form = document.createElement('form'); diff --git a/app/javascript/packs/admin.js b/app/javascript/packs/admin.js index b318cadc6..061287f89 100644 --- a/app/javascript/packs/admin.js +++ b/app/javascript/packs/admin.js @@ -1,4 +1,4 @@ -import { delegate } from 'rails-ujs'; +import { delegate } from '@rails/ujs'; import ready from '../mastodon/ready'; const batchCheckboxClassName = '.batch-checkbox input[type="checkbox"]'; diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js index 2fb9cb29d..8ba4f6ee0 100644 --- a/app/javascript/packs/public.js +++ b/app/javascript/packs/public.js @@ -25,7 +25,7 @@ window.addEventListener('message', e => { function main() { const IntlMessageFormat = require('intl-messageformat').default; const { timeAgoString } = require('../mastodon/components/relative_timestamp'); - const { delegate } = require('rails-ujs'); + const { delegate } = require('@rails/ujs'); const emojify = require('../mastodon/features/emoji/emoji').default; const { getLocale } = require('../mastodon/locales'); const { messages } = getLocale(); diff --git a/package.json b/package.json index 09002b6b2..8ad05c64d 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "promise.prototype.finally": "^3.1.2", "prop-types": "^15.5.10", "punycode": "^2.1.0", - "rails-ujs": "^5.2.4", + "@rails/ujs": "^6.0.2", "react": "^16.12.0", "react-dom": "^16.13.0", "react-hotkeys": "^1.1.4", diff --git a/yarn.lock b/yarn.lock index b4c3c5f03..ed0eef8d4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1164,6 +1164,11 @@ "@types/yargs" "^15.0.0" chalk "^3.0.0" +"@rails/ujs@^6.0.2": + version "6.0.2" + resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-6.0.2.tgz#8d32452d51c5e115374a218fb5475803dc17f4c0" + integrity sha512-KSQjJG8yzSWC1IT+UtFQglefABU37hpJ7uAz39K1/iWtoaJaI9ydGIaxxpJBT/PmYv4kS6lCSjXq13DELeJocw== + "@types/babel__core@^7.1.0", "@types/babel__core@^7.1.2": version "7.1.3" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.3.tgz#e441ea7df63cd080dfcd02ab199e6d16a735fc30" @@ -8766,11 +8771,6 @@ railroad-diagrams@^1.0.0: resolved "https://registry.yarnpkg.com/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz#eb7e6267548ddedfb899c1b90e57374559cddb7e" integrity sha1-635iZ1SN3t+4mcG5Dlc3RVnN234= -rails-ujs@^5.2.4: - version "5.2.4" - resolved "https://registry.yarnpkg.com/rails-ujs/-/rails-ujs-5.2.4.tgz#31056ccd62d868f7d044395f31d77a4440550ceb" - integrity sha512-Mzu6bnTBKn4IuJvP7BDJRy4lzvR1zMWVDeTdPwDubXBfxpFEKqwOi5Nb6tfE2SYtTd+bb3PRETf40I94jgKw3w== - randexp@0.4.6: version "0.4.6" resolved "https://registry.yarnpkg.com/randexp/-/randexp-0.4.6.tgz#e986ad5e5e31dae13ddd6f7b3019aa7c87f60ca3" |