<commit_before>const mongoose = require('mongoose');
const P = require('bluebird');

mongoose.Promise = P;

function mongooseConnect() {
  return new P((resolve, reject) => {
    mongoose.connect(
      'mongodb://localhost:27017/forest-test',
      { useNewUrlParser: true, useUnifiedTopology: true },
    );

    const db = mongoose.connection;<commit_msg>refactor: deprecation warning on `model.findAndModify()` (console flood) (#575)<commit_after>const mongoose = require('mongoose');
const P = require('bluebird');

mongoose.Promise = P;

function mongooseConnect() {
  return new P((resolve, reject) => {
    mongoose.connect(
      'mongodb://localhost:27017/forest-test',
      { useNewUrlParser: true, useUnifiedTopology: true, useFindAndModify: false },
    );

    const db = mongoose.connection;
{'fraction_non_alphanumeric': 0.14002478314745972, 'fraction_numerical': 0.0161090458488228, 'mean_word_length': 4.496598639455782, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5605251', 'n_tokens_mistral': 263, 'n_tokens_neox': 255, 'n_words': 54}