Skip to content
Permalink
Browse files

Bump webpacker from 3.5.5 to 4.0.2 (#10277)

Bumps [webpacker](https://github.com/rails/webpacker) from 3.5.5 to 4.0.2.
- [Release notes](https://github.com/rails/webpacker/releases)
- [Changelog](https://github.com/rails/webpacker/blob/master/CHANGELOG.md)
- [Commits](rails/webpacker@v3.5.5...v4.0.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
  • Loading branch information...
ykzts authored and Gargron committed Mar 15, 2019
1 parent 5a9978f commit 8347479f5d801b6b9756e804b62e04e517fed196
Showing with 1,694 additions and 1,690 deletions.
  1. +1 −1 Gemfile
  2. +3 −3 Gemfile.lock
  3. +1 −1 app/serializers/rest/instance_serializer.rb
  4. +1 −1 app/serializers/rss/account_serializer.rb
  5. +1 −1 app/serializers/rss/tag_serializer.rb
  6. +2 −2 app/views/about/more.html.haml
  7. +2 −2 app/views/about/show.html.haml
  8. +1 −1 app/views/application/_sidebar.html.haml
  9. +1 −1 app/views/home/index.html.haml
  10. +1 −1 app/views/layouts/admin.html.haml
  11. +1 −1 app/views/layouts/auth.html.haml
  12. +2 −2 app/views/layouts/mailer.html.haml
  13. +1 −1 app/views/layouts/public.html.haml
  14. +1 −1 app/views/notification_mailer/favourite.html.haml
  15. +1 −1 app/views/notification_mailer/follow.html.haml
  16. +1 −1 app/views/notification_mailer/follow_request.html.haml
  17. +1 −1 app/views/notification_mailer/mention.html.haml
  18. +1 −1 app/views/notification_mailer/reblog.html.haml
  19. +1 −1 app/views/shared/_og.html.haml
  20. +1 −1 app/views/user_mailer/backup_ready.html.haml
  21. +1 −1 app/views/user_mailer/confirmation_instructions.html.haml
  22. +1 −1 app/views/user_mailer/email_changed.html.haml
  23. +1 −1 app/views/user_mailer/password_change.html.haml
  24. +1 −1 app/views/user_mailer/reconfirmation_instructions.html.haml
  25. +1 −1 app/views/user_mailer/reset_password_instructions.html.haml
  26. +1 −1 app/views/user_mailer/warning.html.haml
  27. +1 −1 app/views/user_mailer/welcome.html.haml
  28. +5 −1 bin/webpack
  29. +5 −1 bin/webpack-dev-server
  30. +1 −3 config/webpack/configuration.js
  31. +28 −12 config/webpack/development.js
  32. +0 −12 config/webpack/loaders/assets.js
  33. +0 −12 config/webpack/loaders/babel.js
  34. +0 −21 config/webpack/loaders/babel_external.js
  35. +12 −16 config/webpack/production.js
  36. +21 −0 config/webpack/rules/babel.js
  37. +8 −1 config/webpack/{loaders/sass.js → rules/css.js}
  38. +20 −0 config/webpack/rules/file.js
  39. +14 −0 config/webpack/rules/index.js
  40. 0 config/webpack/{loaders → rules}/mark.js
  41. +26 −0 config/webpack/rules/node_modules.js
  42. +11 −6 config/webpack/shared.js
  43. +41 −4 config/webpacker.yml
  44. +0 −29 jest.config.js
  45. +53 −27 package.json
  46. +1,417 −1,513 yarn.lock
@@ -86,7 +86,7 @@ gem 'tty-command', '~> 0.8', require: false
gem 'tty-prompt', '~> 0.18', require: false
gem 'twitter-text', '~> 1.14'
gem 'tzinfo-data', '~> 1.2018'
gem 'webpacker', '~> 3.5'
gem 'webpacker', '~> 4.0'
gem 'webpush'

gem 'json-ld', '~> 3.0'
@@ -433,7 +433,7 @@ GEM
rack-cors (1.0.2)
rack-protection (2.0.5)
rack
rack-proxy (0.6.4)
rack-proxy (0.6.5)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
@@ -640,7 +640,7 @@ GEM
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
webpacker (3.5.5)
webpacker (4.0.2)
activesupport (>= 4.2)
rack-proxy (>= 0.6.1)
railties (>= 4.2)
@@ -772,7 +772,7 @@ DEPENDENCIES
twitter-text (~> 1.14)
tzinfo-data (~> 1.2018)
webmock (~> 3.5)
webpacker (~> 3.5)
webpacker (~> 4.0)
webpush

RUBY VERSION
@@ -32,7 +32,7 @@ def version
end

def thumbnail
instance_presenter.thumbnail ? full_asset_url(instance_presenter.thumbnail.file.url) : full_pack_url('preview.jpg')
instance_presenter.thumbnail ? full_asset_url(instance_presenter.thumbnail.file.url) : full_pack_url('media/images/preview.jpg')
end

def stats
@@ -11,7 +11,7 @@ def render(account, statuses)
builder.title("#{display_name(account)} (@#{account.local_username_and_domain})")
.description(account_description(account))
.link(TagManager.instance.url_for(account))
.logo(full_asset_url(asset_pack_path('logo.svg')))
.logo(full_pack_url('media/images/logo.svg'))
.accent_color('2b90d9')

builder.image(full_asset_url(account.avatar.url(:original))) if account.avatar?
@@ -12,7 +12,7 @@ def render(tag, statuses)
builder.title("##{tag.name}")
.description(strip_tags(I18n.t('about.about_hashtag_html', hashtag: tag.name)))
.link(tag_url(tag))
.logo(full_asset_url(asset_pack_path('logo.svg')))
.logo(full_pack_url('media/images/logo.svg'))
.accent_color('2b90d9')

statuses.each do |status|
@@ -9,7 +9,7 @@
.column-0
.public-account-header.public-account-header--no-bar
.public-account-header__image
= image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('preview.jpg'), alt: @instance_presenter.site_title, class: 'parallax'
= image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('media/images/preview.jpg'), alt: @instance_presenter.site_title, class: 'parallax'

.column-1
.landing-page__call-to-action{ dir: 'ltr' }
@@ -25,7 +25,7 @@
%span= t 'about.status_count_after', count: @instance_presenter.status_count
.row__mascot
.landing-page__mascot
= image_tag @instance_presenter.mascot&.file&.url || asset_pack_path('elephant_ui_plane.svg'), alt: ''
= image_tag @instance_presenter.mascot&.file&.url || asset_pack_path('media/images/elephant_ui_plane.svg'), alt: ''

.column-2
.landing-page__information.contact-widget
@@ -8,7 +8,7 @@
.landing
.landing__brand
= link_to root_url, class: 'brand' do
= image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon'
= image_pack_tag 'logo_full.svg', alt: 'Mastodon'
%span.brand__tagline=t 'about.tagline'

.landing__grid
@@ -48,7 +48,7 @@

.hero-widget
.hero-widget__img
= image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('preview.jpg'), alt: @instance_presenter.site_title
= image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('media/images/preview.jpg'), alt: @instance_presenter.site_title

- if @instance_presenter.site_short_description.present?
.hero-widget__text
@@ -1,6 +1,6 @@
.hero-widget
.hero-widget__img
= image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('preview.jpg'), alt: @instance_presenter.site_title
= image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('media/images/preview.jpg'), alt: @instance_presenter.site_title

.hero-widget__text
%p= @instance_presenter.site_short_description.html_safe.presence || @instance_presenter.site_description.html_safe.presence || t('about.generic_description', domain: site_hostname)
@@ -11,7 +11,7 @@

.app-holder#mastodon{ data: { props: Oj.dump(default_props) } }
%noscript
= image_tag asset_pack_path('logo.svg'), alt: 'Mastodon'
= image_pack_tag 'logo.svg', alt: 'Mastodon'

%div
= t('errors.noscript_html', apps_path: 'https://joinmastodon.org/apps')
@@ -6,7 +6,7 @@
.sidebar-wrapper
.sidebar
= link_to root_path do
= image_tag asset_pack_path('logo.svg'), class: 'logo', alt: 'Mastodon'
= image_pack_tag 'logo.svg', class: 'logo', alt: 'Mastodon'

= render_navigation
.content-wrapper
@@ -6,7 +6,7 @@
.logo-container
%h1
= link_to root_path do
= image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon'
= image_pack_tag 'logo_full.svg', alt: 'Mastodon'

.form-container
= render 'flashes'
@@ -24,7 +24,7 @@
%tr
%td.column-cell
= link_to root_url do
= image_tag full_pack_url('logo_full.png'), alt: 'Mastodon', height: 34, class: 'logo'
= image_tag full_pack_url('media/images/mailer/logo_full.png'), alt: 'Mastodon', height: 34, class: 'logo'

= yield

@@ -49,4 +49,4 @@
%p= link_to t('application_mailer.notification_preferences'), settings_notifications_url
%td.column-cell.text-right
= link_to root_url do
= image_tag full_pack_url('logo_transparent.png'), alt: 'Mastodon', height: 24
= image_tag full_pack_url('media/images/mailer/logo_transparent.png'), alt: 'Mastodon', height: 24
@@ -8,7 +8,7 @@
%nav.header
.nav-left
= link_to root_url, class: 'brand' do
= image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon'
= image_pack_tag 'logo_full.svg', alt: 'Mastodon'

= link_to t('directories.directory'), explore_path, class: 'nav-link optional' if Setting.profile_directory
= link_to t('about.about_this'), about_more_path, class: 'nav-link optional'
@@ -17,7 +17,7 @@
%tbody
%tr
%td
= image_tag full_pack_url('icon_grade.png'), alt:''
= image_tag full_pack_url('media/images/mailer/icon_grade.png'), alt:''

%h1= t 'notification_mailer.favourite.title'
%p.lead= t('notification_mailer.favourite.body', name: @account.acct)
@@ -17,7 +17,7 @@
%tbody
%tr
%td
= image_tag full_pack_url('icon_person_add.png'), alt: ''
= image_tag full_pack_url('media/images/mailer/icon_person_add.png'), alt: ''

%h1= t 'notification_mailer.follow.title'
%p.lead= t('notification_mailer.follow.body', name: @account.acct)
@@ -17,7 +17,7 @@
%tbody
%tr
%td
= image_tag full_pack_url('icon_person_add.png'), alt: ''
= image_tag full_pack_url('media/images/mailer/icon_person_add.png'), alt: ''

%h1= t 'notification_mailer.follow_request.title'
%p.lead= t('notification_mailer.follow_request.body', name: @account.acct)
@@ -17,7 +17,7 @@
%tbody
%tr
%td
= image_tag full_pack_url('icon_reply.png'), alt: ''
= image_tag full_pack_url('media/images/mailer/icon_reply.png'), alt: ''

%h1= t 'notification_mailer.mention.title'
%p.lead= t('notification_mailer.mention.body', name: @status.account.acct)
@@ -17,7 +17,7 @@
%tbody
%tr
%td
= image_tag full_pack_url('icon_cached.png'), alt: ''
= image_tag full_pack_url('media/images/mailer/icon_cached.png'), alt: ''

%h1= t 'notification_mailer.reblog.title'
%p.lead= t('notification_mailer.reblog.body', name: @account.acct)
@@ -8,7 +8,7 @@
= opengraph 'og:type', 'website'
= opengraph 'og:title', @instance_presenter.site_title
= opengraph 'og:description', description
= opengraph 'og:image', full_asset_url(thumbnail&.file&.url || asset_pack_path('preview.jpg', protocol: :request))
= opengraph 'og:image', full_asset_url(thumbnail&.file&.url || asset_pack_path('media/images/preview.jpg', protocol: :request))
= opengraph 'og:image:width', thumbnail ? thumbnail.meta['width'] : '1200'
= opengraph 'og:image:height', thumbnail ? thumbnail.meta['height'] : '630'
= opengraph 'twitter:card', 'summary_large_image'
@@ -17,7 +17,7 @@
%tbody
%tr
%td
= image_tag full_pack_url('icon_file_download.png'), alt: ''
= image_tag full_pack_url('media/images/mailer/icon_file_download.png'), alt: ''

%h1= t 'user_mailer.backup_ready.title'

@@ -17,7 +17,7 @@
%tbody
%tr
%td
= image_tag full_pack_url('icon_email.png'), alt: ''
= image_tag full_pack_url('media/images/mailer/icon_email.png'), alt: ''

%h1= t 'devise.mailer.confirmation_instructions.title'

@@ -17,7 +17,7 @@
%tbody
%tr
%td
= image_tag full_pack_url('icon_email.png'), alt: ''
= image_tag full_pack_url('media/images/mailer/icon_email.png'), alt: ''

%h1= t 'devise.mailer.email_changed.title'
%p.lead= t 'devise.mailer.email_changed.explanation'
@@ -17,7 +17,7 @@
%tbody
%tr
%td
= image_tag full_pack_url('icon_lock_open.png'), alt: ''
= image_tag full_pack_url('media/images/mailer/icon_lock_open.png'), alt: ''

%h1= t 'devise.mailer.password_change.title'
%p.lead= t 'devise.mailer.password_change.explanation'
@@ -17,7 +17,7 @@
%tbody
%tr
%td
= image_tag full_pack_url('icon_email.png'), alt: ''
= image_tag full_pack_url('media/images/mailer/icon_email.png'), alt: ''

%h1= t 'devise.mailer.reconfirmation_instructions.title'
%p.lead= t 'devise.mailer.reconfirmation_instructions.explanation'
@@ -17,7 +17,7 @@
%tbody
%tr
%td
= image_tag full_pack_url('icon_lock_open.png'), alt: ''
= image_tag full_pack_url('media/images/mailer/icon_lock_open.png'), alt: ''

%h1= t 'devise.mailer.reset_password_instructions.title'
%p.lead= t 'devise.mailer.reset_password_instructions.explanation'
@@ -17,7 +17,7 @@
%tbody
%tr
%td
= image_tag full_pack_url('icon_warning.png'), alt: ''
= image_tag full_pack_url('media/images/mailer/icon_warning.png'), alt: ''

%h1= t "user_mailer.warning.title.#{@warning.action}"

@@ -17,7 +17,7 @@
%tbody
%tr
%td
= image_tag full_pack_url('icon_done.png'), alt: ''
= image_tag full_pack_url('media/images/mailer/icon_done.png'), alt: ''

%h1= t 'user_mailer.welcome.title', name: @resource.account.username
%p.lead= t 'user_mailer.welcome.explanation'
@@ -12,4 +12,8 @@ require "bundler/setup"

require "webpacker"
require "webpacker/webpack_runner"
Webpacker::WebpackRunner.run(ARGV)

APP_ROOT = File.expand_path("..", __dir__)
Dir.chdir(APP_ROOT) do
Webpacker::WebpackRunner.run(ARGV)
end
@@ -12,4 +12,8 @@ require "bundler/setup"

require "webpacker"
require "webpacker/dev_server_runner"
Webpacker::DevServerRunner.run(ARGV)

APP_ROOT = File.expand_path("..", __dir__)
Dir.chdir(APP_ROOT) do
Webpacker::DevServerRunner.run(ARGV)
end
@@ -1,12 +1,11 @@
// Common configuration for webpacker loaded from config/webpacker.yml

const { join, resolve } = require('path');
const { resolve } = require('path');
const { env } = require('process');
const { safeLoad } = require('js-yaml');
const { readFileSync } = require('fs');

const configPath = resolve('config', 'webpacker.yml');
const loadersDir = join(__dirname, 'loaders');
const settings = safeLoad(readFileSync(configPath), 'utf8')[env.RAILS_ENV || env.NODE_ENV];

const themePath = resolve('config', 'themes.yml');
@@ -37,6 +36,5 @@ module.exports = {
CDN_HOST: env.CDN_HOST,
NODE_ENV: env.NODE_ENV,
},
loadersDir,
output,
};
@@ -1,12 +1,10 @@
// Note: You must restart bin/webpack-dev-server for changes to take effect

const merge = require('webpack-merge');
const sharedConfig = require('./shared.js');
const { settings, output } = require('./configuration.js');
const sharedConfig = require('./shared');
const { settings, output } = require('./configuration');

const watchOptions = {
ignored: /node_modules/,
};
const watchOptions = {};

if (process.env.VAGRANT) {
// If we are in Vagrant, we can't rely on inotify to update us with changed
@@ -17,7 +15,7 @@ if (process.env.VAGRANT) {

module.exports = merge(sharedConfig, {
mode: 'development',

cache: true,
devtool: 'cheap-module-eval-source-map',

stats: {
@@ -30,15 +28,33 @@ module.exports = merge(sharedConfig, {

devServer: {
clientLogLevel: 'none',
https: settings.dev_server.https,
compress: settings.dev_server.compress,
quiet: settings.dev_server.quiet,
disableHostCheck: settings.dev_server.disable_host_check,
host: settings.dev_server.host,
port: settings.dev_server.port,
https: settings.dev_server.https,
hot: settings.dev_server.hmr,
contentBase: output.path,
inline: settings.dev_server.inline,
useLocalIp: settings.dev_server.use_local_ip,
public: settings.dev_server.public,
publicPath: output.publicPath,
compress: true,
headers: { 'Access-Control-Allow-Origin': '*' },
historyApiFallback: true,
disableHostCheck: true,
watchOptions: watchOptions,
historyApiFallback: {
disableDotRule: true,
},
headers: settings.dev_server.headers,
overlay: settings.dev_server.overlay,
stats: {
entrypoints: false,
errorDetails: false,
modules: false,
moduleTrace: false,
},
watchOptions: Object.assign(
{},
settings.dev_server.watch_options,
watchOptions
),
},
});
Oops, something went wrong.

0 comments on commit 8347479

Please sign in to comment.
You can’t perform that action at this time.