diff --git a/.eslintignore b/.eslintignore index 54bd9d41efd..1806ae7c090 100644 --- a/.eslintignore +++ b/.eslintignore @@ -6,9 +6,6 @@ app/assets/javascripts/ember-addons/ app/assets/javascripts/discourse/lib/autosize.js.es6 lib/javascripts/locale/ lib/javascripts/messageformat.js -lib/javascripts/moment.js -lib/javascripts/moment-timezone-with-data.js -lib/javascripts/moment_locale/ lib/highlight_js/ plugins/**/lib/javascripts/locale public/javascripts/ diff --git a/lib/discourse_plugin_registry.rb b/lib/discourse_plugin_registry.rb index f7db213ee04..ab0db1a0927 100644 --- a/lib/discourse_plugin_registry.rb +++ b/lib/discourse_plugin_registry.rb @@ -204,8 +204,8 @@ class DiscoursePluginRegistry end VENDORED_CORE_PRETTY_TEXT_MAP = { - "moment.js" => "lib/javascripts/moment.js", - "moment-timezone.js" => "lib/javascripts/moment-timezone-with-data.js" + "moment.js" => "vendor/assets/javascripts/moment.js", + "moment-timezone.js" => "vendor/assets/javascripts/moment-timezone-with-data.js" } def self.core_asset_for_name(name) asset = VENDORED_CORE_PRETTY_TEXT_MAP[name] diff --git a/lib/js_locale_helper.rb b/lib/js_locale_helper.rb index be3fa39b99d..4e0cbc4b8d9 100644 --- a/lib/js_locale_helper.rb +++ b/lib/js_locale_helper.rb @@ -153,8 +153,8 @@ module JsLocaleHelper result << "I18n.pluralizationRules.#{locale_str} = MessageFormat.locale.#{mf_locale};\n" if mf_locale != "en" # moment - result << File.read("#{Rails.root}/lib/javascripts/moment.js") - result << File.read("#{Rails.root}/lib/javascripts/moment-timezone-with-data.js") + result << File.read("#{Rails.root}/vendor/assets/javascripts/moment.js") + result << File.read("#{Rails.root}/vendor/assets/javascripts/moment-timezone-with-data.js") result << moment_locale(locale_str) result << moment_formats @@ -162,7 +162,7 @@ module JsLocaleHelper end def self.find_moment_locale(locale_chain) - path = "#{Rails.root}/lib/javascripts/moment_locale" + path = "#{Rails.root}/vendor/assets/javascripts/moment-locale" # moment.js uses a different naming scheme for locale files locale_chain = locale_chain.map { |l| l.tr('_', '-').downcase } diff --git a/lib/tasks/javascript.rake b/lib/tasks/javascript.rake index c34c4152dc2..2a06412b1e0 100644 --- a/lib/tasks/javascript.rake +++ b/lib/tasks/javascript.rake @@ -66,6 +66,13 @@ task 'javascript:update' do source: 'markdown-it/dist/markdown-it.js' }, { source: 'mousetrap/mousetrap.js' + }, { + source: 'moment/moment.js' + }, { + source: 'moment/locale', + destination: 'moment-locale', + }, { + source: 'moment-timezone/builds/moment-timezone-with-data.js' }, { source: 'resumablejs/resumable.js' }, { diff --git a/package.json b/package.json index 66f9c0de2cb..3e213533f2b 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,8 @@ "jquery.cookie": "1.4.1", "magnific-popup": "1.1.0", "markdown-it": "8.4.1", + "moment": "2.22.1", + "moment-timezone": "0.5.14", "mousetrap": "https://github.com/discourse/mousetrap#firefox-alt-key", "pikaday": "1.7.0", "resumablejs": "1.1.0", diff --git a/spec/components/plugin/instance_spec.rb b/spec/components/plugin/instance_spec.rb index 48cdc6ac6eb..936f99b2eea 100644 --- a/spec/components/plugin/instance_spec.rb +++ b/spec/components/plugin/instance_spec.rb @@ -102,7 +102,7 @@ describe Plugin::Instance do plugin.send :register_assets! - expect(DiscoursePluginRegistry.vendored_core_pretty_text.first).to eq("lib/javascripts/moment.js") + expect(DiscoursePluginRegistry.vendored_core_pretty_text.first).to eq("vendor/assets/javascripts/moment.js") end end @@ -390,7 +390,7 @@ describe Plugin::Instance do expect(locale[:fallbackLocale]).to eq("es") expect(locale[:message_format]).to eq(["es", "#{Rails.root}/lib/javascripts/locale/es.js"]) - expect(locale[:moment_js]).to eq(["es", "#{Rails.root}/lib/javascripts/moment_locale/es.js"]) + expect(locale[:moment_js]).to eq(["es", "#{Rails.root}/vendor/assets/javascripts/moment-locale/es.js"]) expect(locale[:plural]).to be_nil expect(Rails.configuration.assets.precompile).to include("locales/es_MX.js") @@ -404,7 +404,7 @@ describe Plugin::Instance do expect(locale[:fallbackLocale]).to be_nil expect(locale[:message_format]).to eq(["tlh", "#{plugin_path}/lib/javascripts/locale/message_format/tlh.js"]) - expect(locale[:moment_js]).to eq(["tlh", "#{Rails.root}/lib/javascripts/moment_locale/tlh.js"]) + expect(locale[:moment_js]).to eq(["tlh", "#{Rails.root}/vendor/assets/javascripts/moment-locale/tlh.js"]) expect(locale[:plural]).to eq(plural.with_indifferent_access) expect(Rails.configuration.assets.precompile).to include("locales/tlh.js") diff --git a/lib/javascripts/moment_locale/af.js b/vendor/assets/javascripts/moment-locale/af.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/af.js rename to vendor/assets/javascripts/moment-locale/af.js diff --git a/lib/javascripts/moment_locale/ar-dz.js b/vendor/assets/javascripts/moment-locale/ar-dz.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ar-dz.js rename to vendor/assets/javascripts/moment-locale/ar-dz.js diff --git a/lib/javascripts/moment_locale/ar-kw.js b/vendor/assets/javascripts/moment-locale/ar-kw.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ar-kw.js rename to vendor/assets/javascripts/moment-locale/ar-kw.js diff --git a/lib/javascripts/moment_locale/ar-ly.js b/vendor/assets/javascripts/moment-locale/ar-ly.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ar-ly.js rename to vendor/assets/javascripts/moment-locale/ar-ly.js diff --git a/lib/javascripts/moment_locale/ar-ma.js b/vendor/assets/javascripts/moment-locale/ar-ma.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ar-ma.js rename to vendor/assets/javascripts/moment-locale/ar-ma.js diff --git a/lib/javascripts/moment_locale/ar-sa.js b/vendor/assets/javascripts/moment-locale/ar-sa.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ar-sa.js rename to vendor/assets/javascripts/moment-locale/ar-sa.js diff --git a/lib/javascripts/moment_locale/ar-tn.js b/vendor/assets/javascripts/moment-locale/ar-tn.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ar-tn.js rename to vendor/assets/javascripts/moment-locale/ar-tn.js diff --git a/lib/javascripts/moment_locale/ar.js b/vendor/assets/javascripts/moment-locale/ar.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ar.js rename to vendor/assets/javascripts/moment-locale/ar.js diff --git a/lib/javascripts/moment_locale/az.js b/vendor/assets/javascripts/moment-locale/az.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/az.js rename to vendor/assets/javascripts/moment-locale/az.js diff --git a/lib/javascripts/moment_locale/be.js b/vendor/assets/javascripts/moment-locale/be.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/be.js rename to vendor/assets/javascripts/moment-locale/be.js diff --git a/lib/javascripts/moment_locale/bg.js b/vendor/assets/javascripts/moment-locale/bg.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/bg.js rename to vendor/assets/javascripts/moment-locale/bg.js diff --git a/lib/javascripts/moment_locale/bm.js b/vendor/assets/javascripts/moment-locale/bm.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/bm.js rename to vendor/assets/javascripts/moment-locale/bm.js diff --git a/lib/javascripts/moment_locale/bn.js b/vendor/assets/javascripts/moment-locale/bn.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/bn.js rename to vendor/assets/javascripts/moment-locale/bn.js diff --git a/lib/javascripts/moment_locale/bo.js b/vendor/assets/javascripts/moment-locale/bo.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/bo.js rename to vendor/assets/javascripts/moment-locale/bo.js diff --git a/lib/javascripts/moment_locale/br.js b/vendor/assets/javascripts/moment-locale/br.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/br.js rename to vendor/assets/javascripts/moment-locale/br.js diff --git a/lib/javascripts/moment_locale/bs.js b/vendor/assets/javascripts/moment-locale/bs.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/bs.js rename to vendor/assets/javascripts/moment-locale/bs.js diff --git a/lib/javascripts/moment_locale/ca.js b/vendor/assets/javascripts/moment-locale/ca.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ca.js rename to vendor/assets/javascripts/moment-locale/ca.js diff --git a/lib/javascripts/moment_locale/cs.js b/vendor/assets/javascripts/moment-locale/cs.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/cs.js rename to vendor/assets/javascripts/moment-locale/cs.js diff --git a/lib/javascripts/moment_locale/cv.js b/vendor/assets/javascripts/moment-locale/cv.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/cv.js rename to vendor/assets/javascripts/moment-locale/cv.js diff --git a/lib/javascripts/moment_locale/cy.js b/vendor/assets/javascripts/moment-locale/cy.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/cy.js rename to vendor/assets/javascripts/moment-locale/cy.js diff --git a/lib/javascripts/moment_locale/da.js b/vendor/assets/javascripts/moment-locale/da.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/da.js rename to vendor/assets/javascripts/moment-locale/da.js diff --git a/lib/javascripts/moment_locale/de-at.js b/vendor/assets/javascripts/moment-locale/de-at.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/de-at.js rename to vendor/assets/javascripts/moment-locale/de-at.js diff --git a/lib/javascripts/moment_locale/de-ch.js b/vendor/assets/javascripts/moment-locale/de-ch.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/de-ch.js rename to vendor/assets/javascripts/moment-locale/de-ch.js diff --git a/lib/javascripts/moment_locale/de.js b/vendor/assets/javascripts/moment-locale/de.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/de.js rename to vendor/assets/javascripts/moment-locale/de.js diff --git a/lib/javascripts/moment_locale/dv.js b/vendor/assets/javascripts/moment-locale/dv.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/dv.js rename to vendor/assets/javascripts/moment-locale/dv.js diff --git a/lib/javascripts/moment_locale/el.js b/vendor/assets/javascripts/moment-locale/el.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/el.js rename to vendor/assets/javascripts/moment-locale/el.js diff --git a/lib/javascripts/moment_locale/en-au.js b/vendor/assets/javascripts/moment-locale/en-au.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/en-au.js rename to vendor/assets/javascripts/moment-locale/en-au.js diff --git a/lib/javascripts/moment_locale/en-ca.js b/vendor/assets/javascripts/moment-locale/en-ca.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/en-ca.js rename to vendor/assets/javascripts/moment-locale/en-ca.js diff --git a/lib/javascripts/moment_locale/en-gb.js b/vendor/assets/javascripts/moment-locale/en-gb.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/en-gb.js rename to vendor/assets/javascripts/moment-locale/en-gb.js diff --git a/lib/javascripts/moment_locale/en-ie.js b/vendor/assets/javascripts/moment-locale/en-ie.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/en-ie.js rename to vendor/assets/javascripts/moment-locale/en-ie.js diff --git a/lib/javascripts/moment_locale/en-il.js b/vendor/assets/javascripts/moment-locale/en-il.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/en-il.js rename to vendor/assets/javascripts/moment-locale/en-il.js diff --git a/lib/javascripts/moment_locale/en-nz.js b/vendor/assets/javascripts/moment-locale/en-nz.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/en-nz.js rename to vendor/assets/javascripts/moment-locale/en-nz.js diff --git a/lib/javascripts/moment_locale/eo.js b/vendor/assets/javascripts/moment-locale/eo.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/eo.js rename to vendor/assets/javascripts/moment-locale/eo.js diff --git a/lib/javascripts/moment_locale/es-do.js b/vendor/assets/javascripts/moment-locale/es-do.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/es-do.js rename to vendor/assets/javascripts/moment-locale/es-do.js diff --git a/lib/javascripts/moment_locale/es-us.js b/vendor/assets/javascripts/moment-locale/es-us.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/es-us.js rename to vendor/assets/javascripts/moment-locale/es-us.js diff --git a/lib/javascripts/moment_locale/es.js b/vendor/assets/javascripts/moment-locale/es.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/es.js rename to vendor/assets/javascripts/moment-locale/es.js diff --git a/lib/javascripts/moment_locale/et.js b/vendor/assets/javascripts/moment-locale/et.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/et.js rename to vendor/assets/javascripts/moment-locale/et.js diff --git a/lib/javascripts/moment_locale/eu.js b/vendor/assets/javascripts/moment-locale/eu.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/eu.js rename to vendor/assets/javascripts/moment-locale/eu.js diff --git a/lib/javascripts/moment_locale/fa.js b/vendor/assets/javascripts/moment-locale/fa.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/fa.js rename to vendor/assets/javascripts/moment-locale/fa.js diff --git a/lib/javascripts/moment_locale/fi.js b/vendor/assets/javascripts/moment-locale/fi.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/fi.js rename to vendor/assets/javascripts/moment-locale/fi.js diff --git a/lib/javascripts/moment_locale/fo.js b/vendor/assets/javascripts/moment-locale/fo.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/fo.js rename to vendor/assets/javascripts/moment-locale/fo.js diff --git a/lib/javascripts/moment_locale/fr-ca.js b/vendor/assets/javascripts/moment-locale/fr-ca.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/fr-ca.js rename to vendor/assets/javascripts/moment-locale/fr-ca.js diff --git a/lib/javascripts/moment_locale/fr-ch.js b/vendor/assets/javascripts/moment-locale/fr-ch.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/fr-ch.js rename to vendor/assets/javascripts/moment-locale/fr-ch.js diff --git a/lib/javascripts/moment_locale/fr.js b/vendor/assets/javascripts/moment-locale/fr.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/fr.js rename to vendor/assets/javascripts/moment-locale/fr.js diff --git a/lib/javascripts/moment_locale/fy.js b/vendor/assets/javascripts/moment-locale/fy.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/fy.js rename to vendor/assets/javascripts/moment-locale/fy.js diff --git a/lib/javascripts/moment_locale/gd.js b/vendor/assets/javascripts/moment-locale/gd.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/gd.js rename to vendor/assets/javascripts/moment-locale/gd.js diff --git a/lib/javascripts/moment_locale/gl.js b/vendor/assets/javascripts/moment-locale/gl.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/gl.js rename to vendor/assets/javascripts/moment-locale/gl.js diff --git a/lib/javascripts/moment_locale/gom-latn.js b/vendor/assets/javascripts/moment-locale/gom-latn.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/gom-latn.js rename to vendor/assets/javascripts/moment-locale/gom-latn.js diff --git a/lib/javascripts/moment_locale/gu.js b/vendor/assets/javascripts/moment-locale/gu.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/gu.js rename to vendor/assets/javascripts/moment-locale/gu.js diff --git a/lib/javascripts/moment_locale/he.js b/vendor/assets/javascripts/moment-locale/he.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/he.js rename to vendor/assets/javascripts/moment-locale/he.js diff --git a/lib/javascripts/moment_locale/hi.js b/vendor/assets/javascripts/moment-locale/hi.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/hi.js rename to vendor/assets/javascripts/moment-locale/hi.js diff --git a/lib/javascripts/moment_locale/hr.js b/vendor/assets/javascripts/moment-locale/hr.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/hr.js rename to vendor/assets/javascripts/moment-locale/hr.js diff --git a/lib/javascripts/moment_locale/hu.js b/vendor/assets/javascripts/moment-locale/hu.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/hu.js rename to vendor/assets/javascripts/moment-locale/hu.js diff --git a/lib/javascripts/moment_locale/hy-am.js b/vendor/assets/javascripts/moment-locale/hy-am.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/hy-am.js rename to vendor/assets/javascripts/moment-locale/hy-am.js diff --git a/lib/javascripts/moment_locale/id.js b/vendor/assets/javascripts/moment-locale/id.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/id.js rename to vendor/assets/javascripts/moment-locale/id.js diff --git a/lib/javascripts/moment_locale/is.js b/vendor/assets/javascripts/moment-locale/is.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/is.js rename to vendor/assets/javascripts/moment-locale/is.js diff --git a/lib/javascripts/moment_locale/it.js b/vendor/assets/javascripts/moment-locale/it.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/it.js rename to vendor/assets/javascripts/moment-locale/it.js diff --git a/lib/javascripts/moment_locale/ja.js b/vendor/assets/javascripts/moment-locale/ja.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ja.js rename to vendor/assets/javascripts/moment-locale/ja.js diff --git a/lib/javascripts/moment_locale/jv.js b/vendor/assets/javascripts/moment-locale/jv.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/jv.js rename to vendor/assets/javascripts/moment-locale/jv.js diff --git a/lib/javascripts/moment_locale/ka.js b/vendor/assets/javascripts/moment-locale/ka.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ka.js rename to vendor/assets/javascripts/moment-locale/ka.js diff --git a/lib/javascripts/moment_locale/kk.js b/vendor/assets/javascripts/moment-locale/kk.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/kk.js rename to vendor/assets/javascripts/moment-locale/kk.js diff --git a/lib/javascripts/moment_locale/km.js b/vendor/assets/javascripts/moment-locale/km.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/km.js rename to vendor/assets/javascripts/moment-locale/km.js diff --git a/lib/javascripts/moment_locale/kn.js b/vendor/assets/javascripts/moment-locale/kn.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/kn.js rename to vendor/assets/javascripts/moment-locale/kn.js diff --git a/lib/javascripts/moment_locale/ko.js b/vendor/assets/javascripts/moment-locale/ko.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ko.js rename to vendor/assets/javascripts/moment-locale/ko.js diff --git a/lib/javascripts/moment_locale/ky.js b/vendor/assets/javascripts/moment-locale/ky.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ky.js rename to vendor/assets/javascripts/moment-locale/ky.js diff --git a/lib/javascripts/moment_locale/lb.js b/vendor/assets/javascripts/moment-locale/lb.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/lb.js rename to vendor/assets/javascripts/moment-locale/lb.js diff --git a/lib/javascripts/moment_locale/lo.js b/vendor/assets/javascripts/moment-locale/lo.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/lo.js rename to vendor/assets/javascripts/moment-locale/lo.js diff --git a/lib/javascripts/moment_locale/lt.js b/vendor/assets/javascripts/moment-locale/lt.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/lt.js rename to vendor/assets/javascripts/moment-locale/lt.js diff --git a/lib/javascripts/moment_locale/lv.js b/vendor/assets/javascripts/moment-locale/lv.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/lv.js rename to vendor/assets/javascripts/moment-locale/lv.js diff --git a/lib/javascripts/moment_locale/me.js b/vendor/assets/javascripts/moment-locale/me.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/me.js rename to vendor/assets/javascripts/moment-locale/me.js diff --git a/lib/javascripts/moment_locale/mi.js b/vendor/assets/javascripts/moment-locale/mi.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/mi.js rename to vendor/assets/javascripts/moment-locale/mi.js diff --git a/lib/javascripts/moment_locale/mk.js b/vendor/assets/javascripts/moment-locale/mk.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/mk.js rename to vendor/assets/javascripts/moment-locale/mk.js diff --git a/lib/javascripts/moment_locale/ml.js b/vendor/assets/javascripts/moment-locale/ml.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ml.js rename to vendor/assets/javascripts/moment-locale/ml.js diff --git a/lib/javascripts/moment_locale/mn.js b/vendor/assets/javascripts/moment-locale/mn.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/mn.js rename to vendor/assets/javascripts/moment-locale/mn.js diff --git a/lib/javascripts/moment_locale/mr.js b/vendor/assets/javascripts/moment-locale/mr.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/mr.js rename to vendor/assets/javascripts/moment-locale/mr.js diff --git a/lib/javascripts/moment_locale/ms-my.js b/vendor/assets/javascripts/moment-locale/ms-my.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ms-my.js rename to vendor/assets/javascripts/moment-locale/ms-my.js diff --git a/lib/javascripts/moment_locale/ms.js b/vendor/assets/javascripts/moment-locale/ms.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ms.js rename to vendor/assets/javascripts/moment-locale/ms.js diff --git a/lib/javascripts/moment_locale/mt.js b/vendor/assets/javascripts/moment-locale/mt.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/mt.js rename to vendor/assets/javascripts/moment-locale/mt.js diff --git a/lib/javascripts/moment_locale/my.js b/vendor/assets/javascripts/moment-locale/my.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/my.js rename to vendor/assets/javascripts/moment-locale/my.js diff --git a/lib/javascripts/moment_locale/nb.js b/vendor/assets/javascripts/moment-locale/nb.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/nb.js rename to vendor/assets/javascripts/moment-locale/nb.js diff --git a/lib/javascripts/moment_locale/ne.js b/vendor/assets/javascripts/moment-locale/ne.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ne.js rename to vendor/assets/javascripts/moment-locale/ne.js diff --git a/lib/javascripts/moment_locale/nl-be.js b/vendor/assets/javascripts/moment-locale/nl-be.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/nl-be.js rename to vendor/assets/javascripts/moment-locale/nl-be.js diff --git a/lib/javascripts/moment_locale/nl.js b/vendor/assets/javascripts/moment-locale/nl.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/nl.js rename to vendor/assets/javascripts/moment-locale/nl.js diff --git a/lib/javascripts/moment_locale/nn.js b/vendor/assets/javascripts/moment-locale/nn.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/nn.js rename to vendor/assets/javascripts/moment-locale/nn.js diff --git a/lib/javascripts/moment_locale/pa-in.js b/vendor/assets/javascripts/moment-locale/pa-in.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/pa-in.js rename to vendor/assets/javascripts/moment-locale/pa-in.js diff --git a/lib/javascripts/moment_locale/pl.js b/vendor/assets/javascripts/moment-locale/pl.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/pl.js rename to vendor/assets/javascripts/moment-locale/pl.js diff --git a/lib/javascripts/moment_locale/pt-br.js b/vendor/assets/javascripts/moment-locale/pt-br.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/pt-br.js rename to vendor/assets/javascripts/moment-locale/pt-br.js diff --git a/lib/javascripts/moment_locale/pt.js b/vendor/assets/javascripts/moment-locale/pt.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/pt.js rename to vendor/assets/javascripts/moment-locale/pt.js diff --git a/lib/javascripts/moment_locale/ro.js b/vendor/assets/javascripts/moment-locale/ro.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ro.js rename to vendor/assets/javascripts/moment-locale/ro.js diff --git a/lib/javascripts/moment_locale/ru.js b/vendor/assets/javascripts/moment-locale/ru.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ru.js rename to vendor/assets/javascripts/moment-locale/ru.js diff --git a/lib/javascripts/moment_locale/sd.js b/vendor/assets/javascripts/moment-locale/sd.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/sd.js rename to vendor/assets/javascripts/moment-locale/sd.js diff --git a/lib/javascripts/moment_locale/se.js b/vendor/assets/javascripts/moment-locale/se.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/se.js rename to vendor/assets/javascripts/moment-locale/se.js diff --git a/lib/javascripts/moment_locale/si.js b/vendor/assets/javascripts/moment-locale/si.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/si.js rename to vendor/assets/javascripts/moment-locale/si.js diff --git a/lib/javascripts/moment_locale/sk.js b/vendor/assets/javascripts/moment-locale/sk.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/sk.js rename to vendor/assets/javascripts/moment-locale/sk.js diff --git a/lib/javascripts/moment_locale/sl.js b/vendor/assets/javascripts/moment-locale/sl.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/sl.js rename to vendor/assets/javascripts/moment-locale/sl.js diff --git a/lib/javascripts/moment_locale/sq.js b/vendor/assets/javascripts/moment-locale/sq.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/sq.js rename to vendor/assets/javascripts/moment-locale/sq.js diff --git a/lib/javascripts/moment_locale/sr-cyrl.js b/vendor/assets/javascripts/moment-locale/sr-cyrl.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/sr-cyrl.js rename to vendor/assets/javascripts/moment-locale/sr-cyrl.js diff --git a/lib/javascripts/moment_locale/sr.js b/vendor/assets/javascripts/moment-locale/sr.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/sr.js rename to vendor/assets/javascripts/moment-locale/sr.js diff --git a/lib/javascripts/moment_locale/ss.js b/vendor/assets/javascripts/moment-locale/ss.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ss.js rename to vendor/assets/javascripts/moment-locale/ss.js diff --git a/lib/javascripts/moment_locale/sv.js b/vendor/assets/javascripts/moment-locale/sv.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/sv.js rename to vendor/assets/javascripts/moment-locale/sv.js diff --git a/lib/javascripts/moment_locale/sw.js b/vendor/assets/javascripts/moment-locale/sw.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/sw.js rename to vendor/assets/javascripts/moment-locale/sw.js diff --git a/lib/javascripts/moment_locale/ta.js b/vendor/assets/javascripts/moment-locale/ta.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ta.js rename to vendor/assets/javascripts/moment-locale/ta.js diff --git a/lib/javascripts/moment_locale/te.js b/vendor/assets/javascripts/moment-locale/te.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/te.js rename to vendor/assets/javascripts/moment-locale/te.js diff --git a/lib/javascripts/moment_locale/tet.js b/vendor/assets/javascripts/moment-locale/tet.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/tet.js rename to vendor/assets/javascripts/moment-locale/tet.js diff --git a/lib/javascripts/moment_locale/tg.js b/vendor/assets/javascripts/moment-locale/tg.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/tg.js rename to vendor/assets/javascripts/moment-locale/tg.js diff --git a/lib/javascripts/moment_locale/th.js b/vendor/assets/javascripts/moment-locale/th.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/th.js rename to vendor/assets/javascripts/moment-locale/th.js diff --git a/lib/javascripts/moment_locale/tl-ph.js b/vendor/assets/javascripts/moment-locale/tl-ph.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/tl-ph.js rename to vendor/assets/javascripts/moment-locale/tl-ph.js diff --git a/lib/javascripts/moment_locale/tlh.js b/vendor/assets/javascripts/moment-locale/tlh.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/tlh.js rename to vendor/assets/javascripts/moment-locale/tlh.js diff --git a/lib/javascripts/moment_locale/tr.js b/vendor/assets/javascripts/moment-locale/tr.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/tr.js rename to vendor/assets/javascripts/moment-locale/tr.js diff --git a/lib/javascripts/moment_locale/tzl.js b/vendor/assets/javascripts/moment-locale/tzl.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/tzl.js rename to vendor/assets/javascripts/moment-locale/tzl.js diff --git a/lib/javascripts/moment_locale/tzm-latn.js b/vendor/assets/javascripts/moment-locale/tzm-latn.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/tzm-latn.js rename to vendor/assets/javascripts/moment-locale/tzm-latn.js diff --git a/lib/javascripts/moment_locale/tzm.js b/vendor/assets/javascripts/moment-locale/tzm.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/tzm.js rename to vendor/assets/javascripts/moment-locale/tzm.js diff --git a/lib/javascripts/moment_locale/ug-cn.js b/vendor/assets/javascripts/moment-locale/ug-cn.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ug-cn.js rename to vendor/assets/javascripts/moment-locale/ug-cn.js diff --git a/lib/javascripts/moment_locale/uk.js b/vendor/assets/javascripts/moment-locale/uk.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/uk.js rename to vendor/assets/javascripts/moment-locale/uk.js diff --git a/lib/javascripts/moment_locale/ur.js b/vendor/assets/javascripts/moment-locale/ur.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/ur.js rename to vendor/assets/javascripts/moment-locale/ur.js diff --git a/lib/javascripts/moment_locale/uz-latn.js b/vendor/assets/javascripts/moment-locale/uz-latn.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/uz-latn.js rename to vendor/assets/javascripts/moment-locale/uz-latn.js diff --git a/lib/javascripts/moment_locale/uz.js b/vendor/assets/javascripts/moment-locale/uz.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/uz.js rename to vendor/assets/javascripts/moment-locale/uz.js diff --git a/lib/javascripts/moment_locale/vi.js b/vendor/assets/javascripts/moment-locale/vi.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/vi.js rename to vendor/assets/javascripts/moment-locale/vi.js diff --git a/lib/javascripts/moment_locale/x-pseudo.js b/vendor/assets/javascripts/moment-locale/x-pseudo.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/x-pseudo.js rename to vendor/assets/javascripts/moment-locale/x-pseudo.js diff --git a/lib/javascripts/moment_locale/yo.js b/vendor/assets/javascripts/moment-locale/yo.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/yo.js rename to vendor/assets/javascripts/moment-locale/yo.js diff --git a/lib/javascripts/moment_locale/zh-cn.js b/vendor/assets/javascripts/moment-locale/zh-cn.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/zh-cn.js rename to vendor/assets/javascripts/moment-locale/zh-cn.js diff --git a/lib/javascripts/moment_locale/zh-hk.js b/vendor/assets/javascripts/moment-locale/zh-hk.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/zh-hk.js rename to vendor/assets/javascripts/moment-locale/zh-hk.js diff --git a/lib/javascripts/moment_locale/zh-tw.js b/vendor/assets/javascripts/moment-locale/zh-tw.js old mode 100755 new mode 100644 similarity index 100% rename from lib/javascripts/moment_locale/zh-tw.js rename to vendor/assets/javascripts/moment-locale/zh-tw.js diff --git a/lib/javascripts/moment-timezone-with-data.js b/vendor/assets/javascripts/moment-timezone-with-data.js similarity index 100% rename from lib/javascripts/moment-timezone-with-data.js rename to vendor/assets/javascripts/moment-timezone-with-data.js diff --git a/lib/javascripts/moment.js b/vendor/assets/javascripts/moment.js similarity index 99% rename from lib/javascripts/moment.js rename to vendor/assets/javascripts/moment.js index 96dce94b108..d2e7e66d981 100644 --- a/lib/javascripts/moment.js +++ b/vendor/assets/javascripts/moment.js @@ -1,8 +1,4 @@ //! moment.js -//! version : 2.22.1 -//! Copyright (c) JS Foundation and other contributors -//! license : MIT -//! github.com/moment/moment ;(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : diff --git a/yarn.lock b/yarn.lock index 3d9470c5474..1a9416c727a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1611,11 +1611,28 @@ mkdirp@0.5.1, mkdirp@^0.5.1: dependencies: minimist "0.0.8" +moment-timezone@0.5.14: + version "0.5.14" + resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.14.tgz#4eb38ff9538b80108ba467a458f3ed4268ccfcb1" + integrity sha1-TrOP+VOLgBCLpGekWPPtQmjM/LE= + dependencies: + moment ">= 2.9.0" + +moment@2.22.1: + version "2.22.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.1.tgz#529a2e9bf973f259c9643d237fda84de3a26e8ad" + integrity sha512-shJkRTSebXvsVqk56I+lkb2latjBs8I+pc2TzWc545y2iFnSjm7Wg0QMh+ZWcdSLQyGEau5jI8ocnmkyTgr9YQ== + moment@2.x, moment@^2.10.2: version "2.22.2" resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66" integrity sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y= +"moment@>= 2.9.0": + version "2.24.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" + integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== + "mousetrap@https://github.com/discourse/mousetrap#firefox-alt-key": version "1.6.2" resolved "https://github.com/discourse/mousetrap#51613787a7cb8be79435f039ba2ba3a43efe797d"