]> cat aescling's git repositories - mastodon.git/commitdiff
Merge branch 'master' into glitch-soc/merge-upstream
authorThibaut Girka <thib@sitedethib.com>
Tue, 1 Sep 2020 14:52:37 +0000 (16:52 +0200)
committerThibaut Girka <thib@sitedethib.com>
Tue, 1 Sep 2020 15:02:18 +0000 (17:02 +0200)
Conflicts:
- `config/webpack/shared.js`:
  Upstream has changed how Tesseract.js gets included and dropped a dependency.
  The conflict is caused by glitch-soc having different code due to its
  theming system.
  Ported upstream changes.
- `lib/mastodon/version.rb`:
  Upstream refactor/code style change in a place we replaced upstream's
  repo URL with ours.
  Ported upstram changes, keeping our repo URL.
- `yarn.lock`:
  Upstream dropped dependencies, one of which was textually too close to
  a glitch-soc-specific dependency. Not a real conflict.

12 files changed:
1  2 
Gemfile
Gemfile.lock
app/helpers/application_helper.rb
app/javascript/styles/mastodon/components.scss
app/lib/feed_manager.rb
app/lib/formatter.rb
app/models/user.rb
app/services/fan_out_on_write_service.rb
config/webpack/shared.js
lib/mastodon/version.rb
package.json
yarn.lock

diff --cc Gemfile
Simple merge
diff --cc Gemfile.lock
Simple merge
Simple merge
Simple merge
index 051f274082d8bd0bd2e4134e8ffba923409da0bf,7f217ae9f688a6b024fb8fdd2457cc5eb30c188f..c0f7866bf56cbdca99a0a16acc3aedf910eee5b6
@@@ -252,8 -190,9 +253,9 @@@ class Formatte
  
      html
    end
+   # rubocop:enable Metrics/BlockNesting
  
 -  def rewrite(text, entities)
 +  def rewrite(text, entities, keep_html = false)
      text = text.to_s
  
      # Sort by start index
Simple merge
index 36b5a459ed006cdb50595b569fe346b83bec352e,6676528090b4825d65054dd3a7fc78f4c2c24fbd..11c321c58b1a912baa8b387c11631a263303ffb3
@@@ -5,57 -5,33 +5,56 @@@ const { basename, dirname, join, relati
  const { sync } = require('glob');
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
  const AssetsManifestPlugin = require('webpack-assets-manifest');
- const CopyPlugin = require('copy-webpack-plugin');
 -const extname = require('path-complete-extname');
 -const { env, settings, themes, output } = require('./configuration');
 +const { env, settings, core, flavours, output } = require('./configuration.js');
  const rules = require('./rules');
 -const localePackPaths = require('./generateLocalePacks');
 +const localePacks = require('./generateLocalePacks');
 +
 +function reducePacks (data, into = {}) {
 +  if (!data.pack) {
 +    return into;
 +  }
 +  Object.keys(data.pack).reduce((map, entry) => {
 +    const pack = data.pack[entry];
 +    if (!pack) {
 +      return map;
 +    }
 +    const packFile = typeof pack === 'string' ? pack : pack.filename;
 +    if (packFile) {
 +      map[data.name ? `flavours/${data.name}/${entry}` : `core/${entry}`] = resolve(data.pack_directory, packFile);
 +    }
 +    return map;
 +  }, into);
 +  if (data.name) {
 +    Object.keys(data.skin).reduce((map, entry) => {
 +      const skin = data.skin[entry];
 +      const skinName = entry;
 +      if (!skin) {
 +        return map;
 +      }
 +      Object.keys(skin).reduce((map, entry) => {
 +        const packFile = skin[entry];
 +        if (!packFile) {
 +          return map;
 +        }
 +        map[`skins/${data.name}/${skinName}/${entry}`] = resolve(packFile);
 +        return map;
 +      }, into);
 +      return map;
 +    }, into);
 +  }
 +  return into;
 +}
 +
 +const entries = Object.assign(
 +  { locales: resolve('app', 'javascript', 'locales') },
 +  localePacks,
 +  reducePacks(core),
 +  Object.keys(flavours).reduce((map, entry) => reducePacks(flavours[entry], map), {})
 +);
  
 -const extensionGlob = `**/*{${settings.extensions.join(',')}}*`;
 -const entryPath = join(settings.source_path, settings.source_entry_path);
 -const packPaths = sync(join(entryPath, extensionGlob));
  
  module.exports = {
 -  entry: Object.assign(
 -    packPaths.reduce((map, entry) => {
 -      const localMap = map;
 -      const namespace = relative(join(entryPath), dirname(entry));
 -      localMap[join(namespace, basename(entry, extname(entry)))] = resolve(entry);
 -      return localMap;
 -    }, {}),
 -    localePackPaths.reduce((map, entry) => {
 -      const localMap = map;
 -      localMap[basename(entry, extname(entry, extname(entry)))] = resolve(entry);
 -      return localMap;
 -    }, {}),
 -    Object.keys(themes).reduce((themePaths, name) => {
 -      themePaths[name] = resolve(join(settings.source_path, themes[name]));
 -      return themePaths;
 -    }, {}),
 -  ),
 +  entry: entries,
  
    output: {
      filename: 'js/[name]-[chunkhash].js',
index 1cff2298351562b0f0647a3e083e1f3337f881e9,7b940d1f86e22a19f42b55f3b74de1289b35b9b6..429bcb8a5cd0c482ba5e863a4859ff5c003d3274
@@@ -33,7 -33,7 +33,7 @@@ module Mastodo
      end
  
      def repository
-       ENV.fetch('GITHUB_REPOSITORY') { 'glitch-soc/mastodon' }
 -      ENV.fetch('GITHUB_REPOSITORY', 'tootsuite/mastodon')
++      ENV.fetch('GITHUB_REPOSITORY', 'glitch-soc/mastodon')
      end
  
      def source_base_url
diff --cc package.json
Simple merge
diff --cc yarn.lock
index bc58b51caa00648e3475b42a0ed946b62b9b9ca6,2591d416272820d4755c78d3d2c636256d80d96e..b0d8622dcaa8ca47ac93d3419677d262cf759e90
+++ b/yarn.lock
@@@ -4598,18 -4534,6 +4539,11 @@@ 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=
  
- fastq@^1.6.0:
-   version "1.8.0"
-   resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.8.0.tgz#550e1f9f59bbc65fe185cb6a9b4d95357107f481"
-   integrity sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q==
-   dependencies:
-     reusify "^1.0.4"
 +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.10.0:
    version "0.10.0"
    resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4"