<commit_before>import {remote} from 'electron';
import {connect as reduxConnect} from 'react-redux';

// we expose these two deps to component decorators
import React from 'react';
import Component from '../component';
import Notification from '../components/notification';
import notify from './notify';

const Module = require('module'); // eslint-disable-line import/newline-after-import
const originalLoad = Module._load;
Module._load = function (path) {
  switch (path) {
    case 'react':
      return React;
    case 'hyper/component':
      return Component;
    case 'hyper/notify':
      return notify;
    case 'hyper/Notification':
      return Notification;
    default:
      return originalLoad.apply(this, arguments);
  }
};

// remote interface to `../plugins`
const plugins = remote.require('./plugins');
<commit_msg>Expose decorate to plugins (#1261)<commit_after>import {remote} from 'electron';
import {connect as reduxConnect} from 'react-redux';

// we expose these two deps to component decorators
import React from 'react';
import Component from '../component';
import Notification from '../components/notification';
import notify from './notify';

const Module = require('module'); // eslint-disable-line import/newline-after-import
const originalLoad = Module._load;
Module._load = function (path) {
  switch (path) {
    case 'react':
      return React;
    case 'hyper/component':
      return Component;
    case 'hyper/notify':
      return notify;
    case 'hyper/Notification':
      return Notification;
    case 'hyper/decorate':
      return decorate;
    default:
      return originalLoad.apply(this, arguments);
  }
};

// remote interface to `../plugins`
const plugins = remote.require('./plugins');

{'fraction_non_alphanumeric': 0.12521539345203905, 'fraction_numerical': 0.0022975301550832855, 'mean_word_length': 3.708108108108108, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5590210', 'n_tokens_mistral': 468, 'n_tokens_neox': 457, 'n_words': 156}