]> cat aescling's git repositories - mastodon.git/commitdiff
Merge branch 'master' into glitch-soc/merge-upstream
authorClaire <claire.github-309c@sitedethib.com>
Wed, 6 Jan 2021 17:08:06 +0000 (18:08 +0100)
committerClaire <claire.github-309c@sitedethib.com>
Wed, 6 Jan 2021 17:08:06 +0000 (18:08 +0100)
Conflicts:
- `config/webpack/configuration.js`:
  Upstream updated the `js-yaml` dependency, which changed how to call it.
  Those changes conflicted because that code is pretty different in glitch-soc
  which has to deal with its more complex theming system.
  Proceeded to the same compatibility changes in glitch-soc's code.
- `package.json` and `yarn.lock`:
  Not really a conflict, just glitch-soc-specific dependencies textually too
  close to some dependencies updated upstream.

1  2 
Gemfile
Gemfile.lock
app/javascript/styles/mastodon/components.scss
app/services/batched_remove_status_service.rb
app/views/media/player.html.haml
app/views/statuses/_simple_status.html.haml
config/webpack/configuration.js
lib/mastodon/version.rb
package.json
yarn.lock

diff --cc Gemfile
Simple merge
diff --cc Gemfile.lock
Simple merge
index 7369628a4ecf7da7f61a43e89208efae9d88683a,95e37bb22a8b276a70aecff5a0febeb4ad1a5a00..191586248db5e5de5522122a4189f39261ef1072
@@@ -1,16 -1,9 +1,16 @@@
  - content_for :header_tags do
    = render_initial_state
 -  = javascript_pack_tag 'public', crossorigin: 'anonymous'
 +  = javascript_pack_tag "locales", crossorigin: 'anonymous'
 +  - if @theme
 +    - if @theme[:supported_locales].include? I18n.locale.to_s
 +      = javascript_pack_tag "locales/#{@theme[:flavour]}/#{I18n.locale}", crossorigin: 'anonymous'
 +    - elsif @theme[:supported_locales].include? 'en'
 +      = javascript_pack_tag "locales/#{@theme[:flavour]}/en", crossorigin: 'anonymous'
 +  = render partial: 'layouts/theme', object: @core
 +  = render partial: 'layouts/theme', object: @theme
  
  - if @media_attachment.video?
-   = react_component :video, src: @media_attachment.file.url(:original), preview: @media_attachment.thumbnail.present? ? @media_attachment.thumbnail.url : @media_attachment.file.url(:small), blurhash: @media_attachment.blurhash, width: 670, height: 380, editable: true, detailed: true, inline: true, alt: @media_attachment.description do
+   = react_component :video, src: @media_attachment.file.url(:original), preview: @media_attachment.thumbnail.present? ? @media_attachment.thumbnail.url : @media_attachment.file.url(:small), frameRate: @media_attachment.file.meta.dig('original', 'frame_rate'), blurhash: @media_attachment.blurhash, width: 670, height: 380, editable: true, detailed: true, inline: true, alt: @media_attachment.description, media: [ActiveModelSerializers::SerializableResource.new(@media_attachment, serializer: REST::MediaAttachmentSerializer)].as_json do
      %video{ controls: 'controls' }
        %source{ src: @media_attachment.file.url(:original) }
  - elsif @media_attachment.gifv?
index b34ba0e0a6bdca596b884d7c091d3a7f6a870837,25b6b7abd618b3ffa85ed90d624d5c0314e96712..f05c888d5c7526e696d960d33fe9a7ba61596a9b
@@@ -1,61 -1,15 +1,61 @@@
  // Common configuration for webpacker loaded from config/webpacker.yml
  
 -const { resolve } = require('path');
 +const { basename, dirname, extname, join, resolve } = require('path');
  const { env } = require('process');
- const { safeLoad } = require('js-yaml');
+ const { load } = require('js-yaml');
 -const { readFileSync } = require('fs');
 +const { lstatSync, readFileSync } = require('fs');
 +const glob = require('glob');
  
  const configPath = resolve('config', 'webpacker.yml');
- const settings = safeLoad(readFileSync(configPath), 'utf8')[env.RAILS_ENV || env.NODE_ENV];
+ const settings = load(readFileSync(configPath), 'utf8')[env.RAILS_ENV || env.NODE_ENV];
 +const flavourFiles = glob.sync('app/javascript/flavours/*/theme.yml');
 +const skinFiles = glob.sync('app/javascript/skins/*/*');
 +const flavours = {};
  
 -const themePath = resolve('config', 'themes.yml');
 -const themes = load(readFileSync(themePath), 'utf8');
 +const core = function () {
 +  const coreFile = resolve('app', 'javascript', 'core', 'theme.yml');
-   const data = safeLoad(readFileSync(coreFile), 'utf8');
++  const data = load(readFileSync(coreFile), 'utf8');
 +  if (!data.pack_directory) {
 +    data.pack_directory = dirname(coreFile);
 +  }
 +  return data.pack ? data : {};
 +}();
 +
 +for (let i = 0; i < flavourFiles.length; i++) {
 +  const flavourFile = flavourFiles[i];
-   const data = safeLoad(readFileSync(flavourFile), 'utf8');
++  const data = load(readFileSync(flavourFile), 'utf8');
 +  data.name = basename(dirname(flavourFile));
 +  data.skin = {};
 +  if (!data.pack_directory) {
 +    data.pack_directory = dirname(flavourFile);
 +  }
 +  if (data.locales) {
 +    data.locales = join(dirname(flavourFile), data.locales);
 +  }
 +  if (data.pack && typeof data.pack === 'object') {
 +    flavours[data.name] = data;
 +  }
 +}
 +
 +for (let i = 0; i < skinFiles.length; i++) {
 +  const skinFile = skinFiles[i];
 +  let skin = basename(skinFile);
 +  const name = basename(dirname(skinFile));
 +  if (!flavours[name]) {
 +    continue;
 +  }
 +  const data = flavours[name].skin;
 +  if (lstatSync(skinFile).isDirectory()) {
 +    data[skin] = {};
 +    const skinPacks = glob.sync(join(skinFile, '*.{css,scss}'));
 +    for (let j = 0; j < skinPacks.length; j++) {
 +      const pack = skinPacks[j];
 +      data[skin][basename(pack, extname(pack))] = pack;
 +    }
 +  } else if ((skin = skin.match(/^(.*)\.s?css$/i))) {
 +    data[skin[1]] = { common: skinFile };
 +  }
 +}
  
  const output = {
    path: resolve('public', settings.public_output_path),
Simple merge
diff --cc package.json
index 3497f2e0c0d50bc51f980f4b587b2d9457083ab1,30926b651dbec4ea5f6bca6f1487b7af66953932..caf9a99b6fd3988230c14b2addd4294b9df227b7
      "@clusterws/cws": "^3.0.0",
      "@gamestdio/websocket": "^0.3.2",
      "@github/webauthn-json": "^0.5.7",
-     "@rails/ujs": "^6.0.3",
-     "array-includes": "^3.1.1",
+     "@rails/ujs": "^6.1.0",
+     "array-includes": "^3.1.2",
 +    "atrament": "0.2.4",
      "arrow-key-navigation": "^1.2.0",
      "autoprefixer": "^9.8.6",
-     "axios": "^0.21.0",
-     "babel-loader": "^8.2.1",
+     "axios": "^0.21.1",
+     "babel-loader": "^8.2.2",
      "babel-plugin-lodash": "^3.3.4",
      "babel-plugin-preval": "^5.0.0",
      "babel-plugin-react-intl": "^6.2.0",
diff --cc yarn.lock
index 042fbb4b94107b310fbcd08d3ce5341c5398af2f,450363e3046b3c9a6e6d18135b73f592bf882db7..91270c11ca815ced2489434155dd3336fd280f62
+++ b/yarn.lock
@@@ -4574,19 -4623,7 +4628,12 @@@ fast-levenshtein@^2.0.6, fast-levenshte
    resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
    integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
  
- faye-websocket@^0.10.0:
-   version "0.10.0"
-   resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4"
-   integrity sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=
-   dependencies:
-     websocket-driver ">=0.5.1"
- faye-websocket@~0.11.1:
 +favico.js@^0.3.10:
 +  version "0.3.10"
 +  resolved "https://registry.yarnpkg.com/favico.js/-/favico.js-0.3.10.tgz#80586e27a117f24a8d51c18a99bdc714d4339301"
 +  integrity sha1-gFhuJ6EX8kqNUcGKmb3HFNQzkwE=
 +
+ faye-websocket@^0.11.3:
    version "0.11.3"
    resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e"
    integrity sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA==