<commit_before>#!/usr/bin/env node
/*
 * Copyright 2018 The Closure Compiler Authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * @fileoverview Custom lerna cli which adds a publication command to bypass checks for a
 * clean working directory.
 *
 * Taken directly from the lerna publication command and lerna cli packages.
 */

'use strict';
const cli = require('@lerna/cli');
const addCmd = require('@lerna/add/command');
const bootstrapCmd = require('@lerna/bootstrap/command');
const changedCmd = require('@lerna/changed/command');
const cleanCmd = require('@lerna/clean/command');
const createCmd = require('@lerna/create/command');
const diffCmd = require('@lerna/diff/command');
const execCmd = require('@lerna/exec/command');
const importCmd = require('@lerna/import/command');
const initCmd = require('@lerna/init/command');
const linkCmd = require('@lerna/link/command');
const listCmd = require('@lerna/list/command');
const publishCmd = require('@lerna/publish/command');
const runCmd = require('@lerna/run/command');
const versionCmd = require('@lerna/version/command');
const pkg = require('lerna/package.json');
const { PublishCommand } = require('@lerna/publish');
const getCurrentTags = require('@lerna/publish/lib/get-current-tags');

function factory(argv) {
  return new PublishWithoutCleanCheckCommand(argv);
}

/** Override methods in the main publication command class to bypass clean working directory checks */
class PublishWithoutCleanCheckCommand extends PublishCommand {
  verifyWorkingTreeClean() {
    return describeRef(this.execOpts);
  }

  detectFromGit() {
    let chain = Promise.resolve();

    chain = chain.then(() => getCurrentTags(this.execOpts));
    chain = chain.then(taggedPackageNames => {
      if (!taggedPackageNames.length) {
        this.logger.notice("from-git", "No tagged release found");

        return [];
      }

      if (this.project.isIndependent()) {<commit_msg>Add missing import<commit_after>#!/usr/bin/env node
/*
 * Copyright 2018 The Closure Compiler Authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * @fileoverview Custom lerna cli which adds a publication command to bypass checks for a
 * clean working directory.
 *
 * Taken directly from the lerna publication command and lerna cli packages.
 */

'use strict';
const cli = require('@lerna/cli');
const addCmd = require('@lerna/add/command');
const bootstrapCmd = require('@lerna/bootstrap/command');
const changedCmd = require('@lerna/changed/command');
const cleanCmd = require('@lerna/clean/command');
const createCmd = require('@lerna/create/command');
const diffCmd = require('@lerna/diff/command');
const execCmd = require('@lerna/exec/command');
const importCmd = require('@lerna/import/command');
const initCmd = require('@lerna/init/command');
const linkCmd = require('@lerna/link/command');
const listCmd = require('@lerna/list/command');
const publishCmd = require('@lerna/publish/command');
const runCmd = require('@lerna/run/command');
const versionCmd = require('@lerna/version/command');
const pkg = require('lerna/package.json');
const { PublishCommand } = require('@lerna/publish');
const getCurrentTags = require('@lerna/publish/lib/get-current-tags');
const fs = require('fs');
const path = require('path');

function factory(argv) {
  return new PublishWithoutCleanCheckCommand(argv);
}

/** Override methods in the main publication command class to bypass clean working directory checks */
class PublishWithoutCleanCheckCommand extends PublishCommand {
  verifyWorkingTreeClean() {
    return describeRef(this.execOpts);
  }

  detectFromGit() {
    let chain = Promise.resolve();

    chain = chain.then(() => getCurrentTags(this.execOpts));
    chain = chain.then(taggedPackageNames => {
      if (!taggedPackageNames.length) {
        this.logger.notice("from-git", "No tagged release found");

        return [];
      }

      if (this.project.isIndependent()) {
{'fraction_non_alphanumeric': 0.12447129909365559, 'fraction_numerical': 0.0032225579053373615, 'mean_word_length': 4.649601820250284, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3687891', 'n_tokens_mistral': 1387, 'n_tokens_neox': 1352, 'n_words': 438}