From b7d332e0e562f2b5c7a4a51b26fa790ec43b9326 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Wed, 22 Jun 2022 12:19:50 +0200 Subject: [PATCH] COMPATIBILITY: everything is transpiled by default now. https://github.com/discourse/discourse/commit/624c684d51d215a7b0969598d94c6c04f7224e22 --- app/views/layouts/wizard.html.erb | 1 + .../javascripts/{legacy => }/ember_jquery.js | 0 assets/javascripts/legacy/discourse-loader.js | 4 +- assets/javascripts/legacy/discourse-shims.js | 2 + .../javascripts/legacy/ember_include.js.erb | 2 + assets/javascripts/legacy/env.js | 2 + .../javascripts/legacy/handlebars.runtime.js | 2 + assets/javascripts/legacy/jquery.js | 2 + assets/javascripts/legacy/popper.js | 2 + .../legacy/set-prototype-polyfill.js | 2 + assets/javascripts/legacy/template_include.js | 2 + assets/javascripts/legacy/virtual-dom-amd.js | 2 + assets/javascripts/legacy/virtual-dom.js | 2 + assets/javascripts/wizard-custom-guest.js | 2 + assets/javascripts/wizard-custom-start.js | 2 + assets/javascripts/wizard-custom.js | 3 +- assets/javascripts/wizard-plugin.js.erb | 2 + .../javascripts/wizard-raw-templates.js.erb | 14 +++--- assets/javascripts/wizard-shims.js | 47 ------------------- assets/javascripts/wizard-vendor.js | 5 +- 20 files changed, 43 insertions(+), 57 deletions(-) rename assets/javascripts/{legacy => }/ember_jquery.js (100%) delete mode 100644 assets/javascripts/wizard-shims.js diff --git a/app/views/layouts/wizard.html.erb b/app/views/layouts/wizard.html.erb index 325a94e8..cab255c3 100644 --- a/app/views/layouts/wizard.html.erb +++ b/app/views/layouts/wizard.html.erb @@ -9,6 +9,7 @@ <%- end %> <%= preload_script "locales/#{I18n.locale}" %> + <%= preload_script "ember_jquery" %> <%= preload_script "wizard-vendor" %> <%= preload_script "wizard-custom" %> <%= preload_script "wizard-raw-templates" %> diff --git a/assets/javascripts/legacy/ember_jquery.js b/assets/javascripts/ember_jquery.js similarity index 100% rename from assets/javascripts/legacy/ember_jquery.js rename to assets/javascripts/ember_jquery.js diff --git a/assets/javascripts/legacy/discourse-loader.js b/assets/javascripts/legacy/discourse-loader.js index edcbf27f..ec77a6d2 100644 --- a/assets/javascripts/legacy/discourse-loader.js +++ b/assets/javascripts/legacy/discourse-loader.js @@ -1,3 +1,5 @@ +// discourse-skip-module + var define, requirejs; (function () { @@ -171,7 +173,7 @@ var define, requirejs; I18n: { // eslint-disable-next-line default: I18n, - }, + } }; } diff --git a/assets/javascripts/legacy/discourse-shims.js b/assets/javascripts/legacy/discourse-shims.js index 7794b099..a6b25771 100644 --- a/assets/javascripts/legacy/discourse-shims.js +++ b/assets/javascripts/legacy/discourse-shims.js @@ -1,3 +1,5 @@ +// discourse-skip-module + define("message-bus-client", ["exports"], function (__exports__) { __exports__.default = window.MessageBus; }); diff --git a/assets/javascripts/legacy/ember_include.js.erb b/assets/javascripts/legacy/ember_include.js.erb index 56883bef..0d6ddf43 100644 --- a/assets/javascripts/legacy/ember_include.js.erb +++ b/assets/javascripts/legacy/ember_include.js.erb @@ -1,3 +1,5 @@ +// discourse-skip-module + <% if @force_ember_debug || Rails.env.development? || Rails.env.test? require_asset("ember.debug.js") diff --git a/assets/javascripts/legacy/env.js b/assets/javascripts/legacy/env.js index 8b897bbe..0ae0e456 100644 --- a/assets/javascripts/legacy/env.js +++ b/assets/javascripts/legacy/env.js @@ -1,3 +1,5 @@ +// discourse-skip-module + window.ENV = {}; window.EmberENV = window.EmberENV || {}; window.EmberENV.FORCE_JQUERY = true; diff --git a/assets/javascripts/legacy/handlebars.runtime.js b/assets/javascripts/legacy/handlebars.runtime.js index da377f0f..145aa7c1 100644 --- a/assets/javascripts/legacy/handlebars.runtime.js +++ b/assets/javascripts/legacy/handlebars.runtime.js @@ -1,3 +1,5 @@ +// discourse-skip-module + /**! @license diff --git a/assets/javascripts/legacy/jquery.js b/assets/javascripts/legacy/jquery.js index de3b2064..956c6699 100644 --- a/assets/javascripts/legacy/jquery.js +++ b/assets/javascripts/legacy/jquery.js @@ -1,3 +1,5 @@ +// discourse-skip-module + /*! * jQuery JavaScript Library v3.5.1 * https://jquery.com/ diff --git a/assets/javascripts/legacy/popper.js b/assets/javascripts/legacy/popper.js index 95d3428c..25298b6d 100644 --- a/assets/javascripts/legacy/popper.js +++ b/assets/javascripts/legacy/popper.js @@ -1,3 +1,5 @@ +// discourse-skip-module + /** * @popperjs/core v2.10.2 - MIT License */ diff --git a/assets/javascripts/legacy/set-prototype-polyfill.js b/assets/javascripts/legacy/set-prototype-polyfill.js index 355fa28e..669b4458 100644 --- a/assets/javascripts/legacy/set-prototype-polyfill.js +++ b/assets/javascripts/legacy/set-prototype-polyfill.js @@ -1,3 +1,5 @@ +// discourse-skip-module + /* eslint-disable */ Object.setPrototypeOf = Object.setPrototypeOf || diff --git a/assets/javascripts/legacy/template_include.js b/assets/javascripts/legacy/template_include.js index 7188ba8e..273eb7a2 100644 --- a/assets/javascripts/legacy/template_include.js +++ b/assets/javascripts/legacy/template_include.js @@ -1,2 +1,4 @@ +// discourse-skip-module + //= require legacy/handlebars.runtime //= require handlebars-shim diff --git a/assets/javascripts/legacy/virtual-dom-amd.js b/assets/javascripts/legacy/virtual-dom-amd.js index 75ee9dcc..d9047402 100644 --- a/assets/javascripts/legacy/virtual-dom-amd.js +++ b/assets/javascripts/legacy/virtual-dom-amd.js @@ -1,3 +1,5 @@ +// discourse-skip-module + // Just a wrapper from the standalone browserified virtual-dom define("virtual-dom", [], function() { return virtualDom; diff --git a/assets/javascripts/legacy/virtual-dom.js b/assets/javascripts/legacy/virtual-dom.js index bece554b..231a7622 100644 --- a/assets/javascripts/legacy/virtual-dom.js +++ b/assets/javascripts/legacy/virtual-dom.js @@ -1,3 +1,5 @@ +// discourse-skip-module + !(function(e){if("object"===typeof exports&&"undefined"!==typeof module){module.exports=e();}else if("function"===typeof define&&define.amd){define([],e);}else{let f;"undefined"!==typeof window?f=window:"undefined"!==typeof global?f=global:"undefined"!==typeof self&&(f=self),f.virtualDom=e();}})(function(){let define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){let a=typeof require==="function"&&require;if(!u&&a){return a(o,!0);}if(i){return i(o,!0);}let f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f;}let l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){let n=t[o][1][e];return s(n?n:e);},l,l.exports,e,t,n,r);}return n[o].exports;}var i=typeof require==="function"&&require;for(let o=0;o