<commit_before>// $FlowFixMe StrictMode isn't typed yet
import React, { StrictMode } from "react";
import Router from "next/router";
import NProgress from "nprogress";
import App, { Container } from "next/app";
import { IntlProvider, addLocaleData } from "react-intl";
import * as Sentry from "@sentry/browser";
import { ThemeProvider } from "styled-components";
import { ApolloProvider } from "react-apollo";
import { MDXProvider } from "@mdx-js/tag";
import GlobalStyles from "../components/GlobalStyles";
import withApolloClient from "../lib/withData";
import { colors } from "../config";
import { version } from "../package.json";
import Document from "../components/layouts/Document";
import Meta from "../components/Meta";
import Paragraph from "../components/Paragraph";
import Error from "./_error";

NProgress.configure({ showSpinner: false });
Router.events.on("routeChangeStart", () => NProgress.start());
Router.events.on("routeChangeComplete", () => NProgress.done());
Router.events.on("routeChangeError", () => NProgress.done());

// Register React Intl's locale data for the user's locale in the browser. This
// locale data was added to the page by `pages/_document.js`. This only happens
// once, on initial page load in the browser.
if (typeof window !== "undefined" && window.ReactIntlLocaleData) {
  Object.keys(window.ReactIntlLocaleData).forEach(lang => {
    addLocaleData(window.ReactIntlLocaleData[lang]);
  });
}

class MyApp extends App {
  constructor(...args) {
    super(...args);
    Sentry.init({
      dsn: process.env.SENTRY,
      release: version,
      environment: process.env.NODE_ENV,
      serverName:
        typeof process.env.NOW !== "undefined" ? "now.sh" : "localhost"
    });
  }

  static getInitialProps = async ({ Component, ctx }) => {
    let pageProps = {};<commit_msg>fixup! update all flow types<commit_after>// $FlowFixMe StrictMode isn't typed yet
import React, { StrictMode } from "react";
import Router from "next/router";
import NProgress from "nprogress";
import App, { Container } from "next/app";
import { IntlProvider, addLocaleData } from "react-intl";
import * as Sentry from "@sentry/browser";
import { ThemeProvider } from "styled-components";
import { ApolloProvider } from "react-apollo";
import { MDXProvider } from "@mdx-js/tag";
import GlobalStyles from "../components/GlobalStyles";
import withApolloClient from "../lib/withData";
import { colors } from "../config";
import { version } from "../package.json";
import Document from "../components/layouts/Document";
import Meta from "../components/Meta";
import Paragraph from "../components/Paragraph";
import Error from "./_error";

NProgress.configure({ showSpinner: false });
Router.events.on("routeChangeStart", () => NProgress.start());
Router.events.on("routeChangeComplete", () => NProgress.done());
Router.events.on("routeChangeError", () => NProgress.done());

// Register React Intl's locale data for the user's locale in the browser. This
// locale data was added to the page by `pages/_document.js`. This only happens
// once, on initial page load in the browser.
if (typeof window !== "undefined" && window.ReactIntlLocaleData) {
  Object.keys(window.ReactIntlLocaleData).forEach(lang => {
    addLocaleData(window.ReactIntlLocaleData[lang]);
  });
}

class MyApp extends App {
  constructor(...args) {
    super(...args);
    Sentry.init({
      dsn: process.env.SENTRY,
      release: version,
      environment: process.env.NODE_ENV,
      serverName: process.env.NOW != null ? "now.sh" : "localhost"
    });
  }

  static getInitialProps = async ({ Component, ctx }) => {
    let pageProps = {};
{'fraction_non_alphanumeric': 0.15016501650165018, 'fraction_numerical': 0.0, 'mean_word_length': 4.286337209302325, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '7409654', 'n_tokens_mistral': 1048, 'n_tokens_neox': 1041, 'n_words': 309}