Revert "PERF: Update ember-auto-import (#15814)" (#15854)

This reverts commit f4c6a61855 and a8325c9016

This update of ember-auto-import and webpack causes significantly higher memory use during rebuilds. This made ember-cli totally unusable on 1GB RAM / 2GB swap environments. We don't have a specific need for this upgrade right now, so reverting for now.
This commit is contained in:
David Taylor 2022-02-07 22:41:07 +00:00 committed by GitHub
parent d602c60e7d
commit 4cceb55621
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 121 additions and 1738 deletions

View File

@ -15,11 +15,10 @@
"start": "ember serve"
},
"dependencies": {
"ember-auto-import": "^2.2.4",
"ember-auto-import": "^1.5.3",
"ember-cli-babel": "^7.13.0",
"ember-cli-htmlbars": "^4.2.0",
"xss": "^1.0.8",
"webpack": "^5.67.0"
"xss": "^1.0.8"
},
"devDependencies": {
"@ember/optional-features": "^1.1.0",

View File

@ -15,18 +15,17 @@
"start": "ember serve"
},
"dependencies": {
"ember-cli-babel": "^7.13.0",
"ember-cli-htmlbars": "^4.2.0",
"ember-auto-import": "^1.5.3",
"handlebars": "^4.7.0",
"truth-helpers": "^1.0.0",
"@uppy/aws-s3": "^2.0.4",
"@uppy/aws-s3-multipart": "^2.1.0",
"@uppy/core": "^2.1.0",
"@uppy/drop-target": "^1.1.0",
"@uppy/utils": "^4.0.3",
"@uppy/xhr-upload": "^2.0.4",
"ember-auto-import": "^2.2.4",
"ember-cli-babel": "^7.13.0",
"ember-cli-htmlbars": "^4.2.0",
"handlebars": "^4.7.0",
"truth-helpers": "^1.0.0",
"webpack": "^5.67.0"
"@uppy/xhr-upload": "^2.0.4"
},
"devDependencies": {
"@ember/optional-features": "^1.1.0",

View File

@ -15,10 +15,9 @@
"start": "ember serve"
},
"dependencies": {
"ember-auto-import": "^2.2.4",
"ember-auto-import": "^1.5.3",
"ember-cli-babel": "^7.13.0",
"ember-cli-htmlbars": "^4.2.0",
"webpack": "^5.67.0"
"ember-cli-htmlbars": "^4.2.0"
},
"devDependencies": {
"@ember/optional-features": "^1.1.0",

View File

@ -15,10 +15,9 @@
"start": "ember serve"
},
"dependencies": {
"ember-auto-import": "^2.2.4",
"ember-auto-import": "^1.5.3",
"ember-cli-babel": "^7.13.0",
"ember-cli-htmlbars": "^4.2.0",
"webpack": "^5.67.0"
"ember-cli-htmlbars": "^4.2.0"
},
"devDependencies": {
"@ember/optional-features": "^1.1.0",

View File

@ -34,7 +34,7 @@
"discourse-common": "^1.0.0",
"discourse-hbr": "^1.0.0",
"discourse-widget-hbs": "^1.0.0",
"ember-auto-import": "^2.2.4",
"ember-auto-import": "^1.12.0",
"ember-buffered-proxy": "^2.0.0-beta.0",
"ember-cli": "~3.25.3",
"ember-cli-app-version": "^4.0.0",
@ -44,7 +44,7 @@
"ember-cli-inject-live-reload": "^2.0.1",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.1",
"ember-exam": "^7.0.1",
"ember-exam": "6.1.0",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.1",
"ember-maybe-import-regenerator": "^0.1.6",
@ -67,8 +67,7 @@
"sass": "^1.32.8",
"select-kit": "^1.0.0",
"sinon": "^9.2.0",
"virtual-dom": "^2.1.1",
"webpack": "^5.67.0"
"virtual-dom": "^2.1.1"
},
"engines": {
"node": "12.* || 14.* || >= 16",
@ -85,6 +84,6 @@
]
},
"devDependencies": {
"ember-exam": "^7.0.1"
"ember-exam": "6.1.0"
}
}

View File

@ -15,11 +15,10 @@
"start": "ember serve"
},
"dependencies": {
"ember-auto-import": "^2.2.4",
"ember-auto-import": "^1.5.3",
"ember-cli-babel": "^7.13.0",
"ember-cli-htmlbars": "^4.2.0",
"xss": "^1.0.8",
"webpack": "^5.67.0"
"xss": "^1.0.8"
},
"devDependencies": {
"@ember/optional-features": "^1.1.0",

View File

@ -17,8 +17,7 @@
"dependencies": {
"ember-cli-babel": "^7.13.0",
"ember-cli-htmlbars": "^4.2.0",
"ember-auto-import": "^2.2.4",
"webpack": "^5.67.0"
"ember-auto-import": "^1.5.3"
},
"devDependencies": {
"@ember/optional-features": "^1.1.0",

View File

@ -15,10 +15,9 @@
"start": "ember serve"
},
"dependencies": {
"ember-auto-import": "^2.2.4",
"ember-auto-import": "^1.5.3",
"ember-cli-babel": "^7.13.0",
"ember-cli-htmlbars": "^4.2.0",
"webpack": "^5.67.0"
"ember-cli-htmlbars": "^4.2.0"
},
"devDependencies": {
"@ember/optional-features": "^1.1.0",

File diff suppressed because it is too large Load Diff

View File

@ -135,22 +135,6 @@ module ApplicationHelper
path
end
def preload_vendor_scripts
scripts = ["vendor"]
if ENV["EMBER_CLI_PROD_ASSETS"] == "1"
@@vendor_chunks ||= begin
all_assets = ActionController::Base.helpers.assets_manifest.assets
all_assets.keys.filter_map { |name| name[/\A(chunk\..*)\.js\z/, 1] }
end
scripts.push(*@@vendor_chunks)
end
scripts.map do |name|
preload_script(name)
end.join("\n").html_safe
end
def preload_script(script)
path = script_asset_path(script)
preload_script_url(path)

View File

@ -4,7 +4,7 @@ module QunitHelper
def vendor_theme_tests
return preload_script("vendor-theme-tests") if @legacy_ember
preload_vendor_scripts
preload_script("vendor")
end
def support_bundles

View File

@ -29,7 +29,7 @@
<%- if ExtraLocalesController.client_overrides_exist? %>
<%= preload_script_url ExtraLocalesController.url('overrides') %>
<%- end %>
<%= preload_vendor_scripts %>
<%= preload_script "vendor" %>
<%= preload_script "application" %>
<%- Discourse.find_plugin_js_assets(include_official: allow_plugins?, include_unofficial: allow_third_party_plugins?, request: request).each do |file| %>
<%= preload_script file %>

View File

@ -6,7 +6,7 @@
<%= discourse_stylesheet_link_tag(:desktop, theme_id: nil) %>
<%= discourse_stylesheet_link_tag(:test_helper, theme_id: nil) %>
<%= preload_script "locales/#{I18n.locale}" %>
<%= preload_vendor_scripts %>
<%= preload_script "vendor" %>
<%= preload_script "application" %>
<%= preload_script "admin" %>
<%= preload_script "discourse/tests/test-support-rails" %>

View File

@ -10,7 +10,7 @@
</div>
<%- content_for(:no_ember_head) do %>
<%= preload_vendor_scripts %>
<%= preload_script "vendor" %>
<%= render_google_universal_analytics_code %>
<%= tag.meta id: 'data-activate-account', data: { path: path('/session/hp') } %>
<%- end %>