<commit_before>import React, { Component } from 'react';
import CodeSandboxer, { replaceImports } from 'react-codesandboxer';
import { Link } from './components';
const user = 'JedWatson';
const branch = 'v2';

const sourceUrl = `https://github.com/${user}/react-select/tree/${branch}`;
const rawUrl = `https://raw.githubusercontent.com/${user}/react-select/${branch}`;
const rawPKGJSON = rawUrl + '/package.json';

const rawDataUrl = rawUrl + '/examples/data.js';
const rawComponentsUrl = rawUrl + '/examples/components.js';

export default class ExampleWrapper extends Component {
  render() {
    const configPromise = Promise.all([
      fetch(rawDataUrl).then(a => a.text()),
      fetch(rawComponentsUrl).then(a => a.text()),
    ]).then(([data, components]) => ({
      providedDeps: { glam: '^5.0.1' },
      providedFiles: {
        'data.js': {
          content: data,
        },
        'components.js': {
          content: components,
        },
      },
    }));

    return (
      <div>
        <h4>
          {this.props.label}
          {' - '}
          <Link href={sourceUrl + this.props.urlPath}>Source</Link>
          {' - '}
          <CodeSandboxer
            skipDeploy
            afterDeploy={console.log}
            example={fetch(rawUrl + this.props.urlPath)
              .then(a => a.text())
              .then(a =>
                replaceImports(a, [
                  ['../../src/*', 'react-select/lib/'],
                  ['../../src', 'react-select'],
                  ['../../data', './data'],
                  ['../../components', './components'],
                ])
              )}
            pkgJSON={fetch(rawPKGJSON).then(a => a.json())}
            config={configPromise}
          >
            <button type="submit">Open in CodeSandbox</button>
          </CodeSandboxer>
        </h4>
        {this.props.children}
      </div>
    );
  }
}<commit_msg>minor corrections<commit_after>import React, { Component } from 'react';
import CodeSandboxer, { replaceImports } from 'react-codesandboxer';
import { Link } from './components';
const user = 'JedWatson';
const branch = 'v2';

const sourceUrl = `https://github.com/${user}/react-select/tree/${branch}`;
const rawUrl = `https://raw.githubusercontent.com/${user}/react-select/${branch}`;
const rawPKGJSON = rawUrl + '/package.json';

const rawDataUrl = rawUrl + '/examples/data.js';
const rawComponentsUrl = rawUrl + '/examples/components.js';

export default class ExampleWrapper extends Component {
  render() {
    const configPromise = Promise.all([
      fetch(rawDataUrl).then(a => a.text()),
      fetch(rawComponentsUrl).then(a => a.text()),
    ]).then(([data, components]) => ({
      providedDeps: { glam: '^5.0.1' },
      providedFiles: {
        'data.js': {
          content: data,
        },
        'components.js': {
          content: components,
        },
      },
    }));

    return (
      <div>
        <h4>
          {this.props.label}
          {' - '}
          <Link href={sourceUrl + this.props.urlPath}>Source</Link>
          {' - '}
          <CodeSandboxer
            // skipDeploy
            // afterDeploy={console.log}
            example={fetch(rawUrl + this.props.urlPath)
              .then(a => a.text())
              .then(a =>
                replaceImports(a, [
                  ['../../../src/*', 'react-select/lib/'],
                  ['../../../src', 'react-select'],
                  ['../../data', './data'],
                  ['../../components', './components'],
                ])
              )}
            pkgJSON={fetch(rawPKGJSON).then(a => a.json())}
            config={configPromise}
          >
            <button type="submit">Open in CodeSandbox</button>
          </CodeSandboxer>
        </h4>
        {this.props.children}
      </div>
    );
  }
}
{'fraction_non_alphanumeric': 0.1801566579634465, 'fraction_numerical': 0.003133159268929504, 'mean_word_length': 1.8127753303964758, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 35, 'https://': 4, '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': '3919372', 'n_tokens_mistral': 1141, 'n_tokens_neox': 1118, 'n_words': 199}