<commit_before>#!/usr/bin/env bash
set -eo pipefail

# shellcheck source=./scripts/helpers/exit-if-fail.sh
source "$(dirname "$0")/helpers/exit-if-fail.sh"

function prepare_version_commit () {
  echo $'\nCommitting version changes. This commit will not be pushed!'
  git config --global user.email "<EMAIL>"
  git config --global user.name "Drone"
  git commit -am "Version commit"
}

# check if there were any changes to packages between current and previous commit
count=$(git diff HEAD~1..HEAD --name-only -- packages | awk '{c++} END {print c}')

if [ -z "$count" ]; then
  echo "No changes in packages, skipping packages publishing"
else
  echo "Changes detected in ${count} packages"
  echo "Starting to release latest canary version"

  echo "//registry.npmjs.org/:_authToken=$${NPM_TOKEN}" >> ~/.npmrc
<commit_msg>npm/canary: Fix typo in publish script (#43020)<commit_after>#!/usr/bin/env bash
set -eo pipefail

# shellcheck source=./scripts/helpers/exit-if-fail.sh
source "$(dirname "$0")/helpers/exit-if-fail.sh"

function prepare_version_commit () {
  echo $'\nCommitting version changes. This commit will not be pushed!'
  git config --global user.email "<EMAIL>"
  git config --global user.name "Drone"
  git commit -am "Version commit"
}

# check if there were any changes to packages between current and previous commit
count=$(git diff HEAD~1..HEAD --name-only -- packages | awk '{c++} END {print c}')

if [ -z "$count" ]; then
  echo "No changes in packages, skipping packages publishing"
else
  echo "Changes detected in ${count} packages"
  echo "Starting to release latest canary version"

  echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc

{'fraction_non_alphanumeric': 0.136986301369863, 'fraction_numerical': 0.005360333531864205, 'mean_word_length': 4.121951219512195, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '2877370', 'n_tokens_mistral': 533, 'n_tokens_neox': 513, 'n_words': 184}