Replaces plugin and presets short names with absolute paths

@param {{}|String} options
@param {{}} overrides
@return {*}
979761
function (options, overrides) {
    let resolved = null;

    if (typeof options === 'string') { //we've been give a path to a project dir or babelrc
      let babelrcPath;
      const stats = fs.statSync(options);
      if (stats.isDirectory()) {
        babelrcPath = path.join(options, '.babelrc');
      } else if (stats.isFile()) {
        babelrcPath = options;
      }

      if (babelrcPath) {
        try {
          const babelOptions = JSON.parse(fs.readFileSync(babelrcPath));
          resolved = resolveOptions(babelOptions);
        } catch (e) {
          console.log(e);
        }
      }

    } else if (typeof options === 'object') {
      resolved = resolveOptions(options);
    }

    if (resolved) {
      Object.keys(overrides).forEach(function (key) {
        resolved[key] = overrides[key];
      });
      return resolved;
    }

    return null;
  }
414684
public function getAllOptions(array $overrides = [])
    {
        $options = $this->options;

        foreach ($this->encoders as $encoder) {
            $options += $encoder->getDefaultOptions();
        }

        foreach ($overrides as $name => $value) {
            if (!array_key_exists($name, $options)) {
                throw new InvalidOptionException(sprintf("Invalid encoder option '%s'", $name));
            }

            $options[$name] = $value;
        }

        ksort($options);

        return $options;
    }
589386
function getOverrides (eventType, options) {
  if (eventType === 'KeyboardEvent' && options) {
    return {
      keyCode: options.keyCode || 0,
      key: options.key || 0,
      which: options.which || options.keyCode || 0
    }
  }
}
217473
private OverriddenCucumberOptionsParameters overrideParametersWithCucumberOptions() throws MojoExecutionException {

        try {
            final OverriddenCucumberOptionsParameters overriddenParameters =
                new OverriddenCucumberOptionsParameters()
                    .setTags(tags)
                    .setGlue(glue)
                    .setStrict(strict)
                    .setPlugins(parseFormatAndPlugins(format, plugins == null ? new ArrayList<Plugin>() : plugins))
                    .setMonochrome(monochrome);


            if (cucumberOptions != null && cucumberOptions.length() > 0) {
                final RuntimeOptions options = new RuntimeOptions(cucumberOptions);
                overriddenParameters
                    .overrideTags(options.getFilters())
                    .overrideGlue(options.getGlue())
                    .overridePlugins(parsePlugins(options.getPluginNames()))
                    .overrideStrict(options.isStrict())
                    .overrideMonochrome(options.isMonochrome());
            }

            return overriddenParameters;
        } catch (IllegalArgumentException e) {
            throw new MojoExecutionException(this, "Invalid parameter. ", e.getMessage());
        }
    }
1025846
def _manual_overrides(_cache_date=None):
    
    log = logging.getLogger('ciu')
    request = requests.get("https://raw.githubusercontent.com/brettcannon/"
                           "caniusepython3/master/caniusepython3/overrides.json")
    if request.status_code == 200:
        log.info("Overrides loaded from GitHub and cached")
        overrides = request.json()
    else:
        log.info("Overrides loaded from included package data and cached")
        raw_bytes = pkgutil.get_data(__name__, 'overrides.json')
        overrides = json.loads(raw_bytes.decode('utf-8'))
    return frozenset(map(packaging.utils.canonicalize_name, overrides.keys()))
958064
function resolveDependencyPaths(options) {
  function init(items) {
    // Invalid if not Array
    if (Array.isArray(items)) {
      items.forEach((item, idx, items) => {
        const isArray = Array.isArray(item);
        const id = isArray ? item[0] : item;

        // Ignore already resolved
        if ('string' == typeof id) {
          const filepath = dependencies.find(id);

          if (!filepath) return warn(`unable to load plugin ${strong(id)}`, 1);

          if (isArray) {
            item[0] = require(filepath);
          } else {
            items[idx] = require(filepath);
          }
        }
      });
    }
  }

  if (options.plugins) init(options.plugins);
  if (options.presets) init(options.presets);
}
389251
function buildResolverOptions(options, base) {
  var pathFilter = options.pathFilter;

  options.basedir = base;
  options.pathFilter = function(info, resvPath, relativePath) {
    if (relativePath[0] !== '.') {
      relativePath = './' + relativePath;
    }
    var mappedPath;
    if (pathFilter) {
      mappedPath = pathFilter.apply(this, [info, resvPath, path.normalize(relativePath)]);
    }
    if (mappedPath) {
      return mappedPath;
    }
    return;
  };
  return options;
}
571122
function loadFromOptions(opts) {
  var defCfg = loadDefault()
  var cfg = opts.config ? loadFromFile(opts.config) : loadDefault()

  // Command line config override file loaded config
  for (var k in opts) {
    defCfg.hasOwnProperty(k) && (defCfg[k] !== opts[k] && (cfg[k] = opts[k]))
  }

  return cfg
}
1004703
function processTraceOpts(options, defaults) {
  var opts = {
    // indicate to plugins to output ES modules instead of System.register for Rollup support
    outputESM: true,
    sourceMaps: false,

    // conditional tracing options
    browser: undefined,
    node: undefined,
    production: undefined,
    dev: undefined,
    conditions: {
      '@system-env|default': true,
      '@system-env|~default': false
    },
    inlineConditions: {},
    traceRuntimePlugin: true,

    // package config tracing (used for bundles only)
    tracePackageConfig: false,

    // when set, automatically excludes non-file URLs that don't resolve to canonical names
    // instead of showing the "Unable to calculate canonical name" error
    excludeURLs: true,
    externals: []
  };

  // ensure user environment overrides default environment
  if (typeof options == 'object') {
    if (typeof options.browser == 'boolean' || typeof options.node == 'boolean') {
      // browser true/false -> node is opposite
      if (typeof options.browser == 'boolean' && typeof options.node != 'boolean')
        options.node = !options.browser;
      // node true/false -> browser is opposite
      else if (typeof options.node == 'boolean' && typeof options.browser != 'boolean')
        options.browser = !options.node;
    }

    // development -> dev backwards compat
    if ('development' in options)
      options.dev = options.development;
    if (typeof options.dev == 'boolean' || typeof options.production == 'boolean') {
      if (typeof options.production != 'boolean')
        options.production = !options.dev;
      if (typeof options.dev != 'boolean')
        options.dev = !options.production;
    }
  }

  extend(opts, defaults);
  extend(opts, options);

  // globalDeps are externals
  if (opts.globalDeps)
    opts.externals = opts.externals.concat(Object.keys(opts.globalDeps));

  // conditional tracing defaults
  if (typeof opts.browser == 'boolean') {
    // browser, node   -> browser, ~browser, node, ~node
    // !browser, node  -> ~browser, node
    // browser, !node  -> browser, ~node
    // !browser, !node -> ~browser, ~node
    opts.conditions['@system-env|browser'] = opts.browser;
    opts.conditions['@system-env|~browser'] = opts.browser === true ? opts.node : !opts.browser;
    opts.conditions['@system-env|node'] = opts.node;
    opts.conditions['@system-env|~node'] = opts.node === true ? opts.browser : !opts.node;
  }
  if (typeof opts.production == 'boolean') {
    opts.conditions['@system-env|production'] = opts.production;
    opts.conditions['@system-env|~production'] = opts.dev;
    opts.conditions['@system-env|dev'] = opts.dev;
    opts.conditions['@system-env|~dev'] = opts.production;
  }

  if (typeof opts.inlineConditions == 'object')
    extend(opts.conditions, opts.inlineConditions);
  else if (opts.inlineConditions === true)
    opts.inlineConditions = opts.conditions;
  else
    opts.inlineConditions = {};

  return opts;
}
365651
function(options) {
    if (config.sourcemaps) {
        options = _.defaults(
            options,
            { devtool: '#source-map' }
        );
    }

    if (config.production) {
        var currPlugins = _.isArray(options.plugins) ? options.plugins : [];
        options.plugins = currPlugins.concat([new UglifyJsPlugin({ sourceMap: false })]);
    }

    return options;
}
846914
function overrideLocEnd(toBeOverriddenNode, toOverrideNode) {
    if (options.originalText[locEnd(toOverrideNode)] === ";") {
      return;
    }
    if (options.parser === "flow") {
      toBeOverriddenNode.range = [
        toBeOverriddenNode.range[0],
        toOverrideNode.range[1]
      ];
    } else {
      toBeOverriddenNode.end = toOverrideNode.end;
    }
    toBeOverriddenNode.loc = Object.assign({}, toBeOverriddenNode.loc, {
      end: toBeOverriddenNode.loc.end
    });
  }
10098
function getOverrides() {
  const configPath = path.join(process.cwd(), "crafty.config.js");

  if (fs.existsSync(configPath)) {
    return require(configPath);
  }

  console.log(`No crafty.config.js found in '${process.cwd()}', proceeding...`);
  return {};
}
1180105
function setDefaults ({ headers={}, overrideHeaders=false, ...rest }) {
  return {
    ...DEFAULTS,
    headers: overrideHeaders ? headers : { ...DEFAULT_HEADERS, ...headers },
    ...rest,
  }
}
1142821
public static void addOverrideToPath() throws Exception {
        Client client = new Client("ProfileName", false);

        // Use the fully qualified name for a plugin override.
        client.addMethodToResponseOverride("Test Path", "com.groupon.odo.sample.Common.delay");

        // The third argument is the ordinal - the nth instance of this override added to this path
        // The final arguments count and type are determined by the override. "delay" used in this sample
        // has a single int argument - # of milliseconds delay to simulate
        client.setMethodArguments("Test Path", "com.groupon.odo.sample.Common.delay", 1, "100");
    }
207957
function parseOptions(options) {

  ttl = options.ttl || (3600 * 24); // cache for 1 day by default.
  tmpCacheTTL = options.tmpCacheTTL || 5; // small by default
  decodeFn = options.decodeFn || exports.decodeURL;
  presets  = options.presets || defaultPresets();

  tmpDir   = options.tmpDir || '/tmp/nodethumbnails';

  var rootPath = options.rootPath || '/thumbs';
  if (rootPath[0] === '/') { rootPath = rootPath.substring(1); } // be forgiving to user errors!

  var allowedExtensions = options.allowedExtensions || ['gif', 'png', 'jpg', 'jpeg'];
  for (var i=0; i < allowedExtensions.length; i++) {
    // be forgiving to user errors!
    if (allowedExtensions[i][0] === '.') {
      allowedExtensions[i] = allowedExtensions[i].substring(1);
    }
  }
  var szExtensions = allowedExtensions.join('|');

  // Example: http://example.com/thumbs/small/images/AB23DC16Hash.jpg
  regexp = new RegExp('^\/' + rootPath.replace(/\//ig, '\\/') +
    '\/([A-Za-z0-9_]+)\/images\/([%\.\-A-Za-z0-9_=\+]+)\.(?:' + szExtensions + ')$', 'i');
}
86431
function replacements(src) {
  return src
    .replace(/babel-preset-react-app/g, 'babel-preset-moped')
    .replace(/\.\/polyfills/g, '../lib/config/polyfills.js')
    .replace(/require\(paths\.appPackageJson\)\.homepage/g, 'undefined')
    .replace(/\.\.\/\.eslintrc/g, '../moped-eslint-config/.eslintrc');
}
520355
private static void applyOverrides() {
        // Get the appropriate InputStream to read overrides from, if any.
        InputStream stream = getContentTypesPropertiesStream();
        if (stream == null) {
            return;
        }

        try {
            try {
                // Read the properties file...
                Properties overrides = new Properties();
                overrides.load(stream);
                // And translate its mapping to ours...
                for (Map.Entry<Object, Object> entry : overrides.entrySet()) {
                    String extension = (String) entry.getKey();
                    String mimeType = (String) entry.getValue();
                    add(mimeType, extension);
                }
            } finally {
                stream.close();
            }
        } catch (IOException ignored) {
        }
    }