Merge pull request #2582 from overleaf/ew-hackathon

Code mod to convert logger.warn/error to OError wrapper

GitOrigin-RevId: 0150cc7341d5a6cabe54c657947b135c23349073
This commit is contained in:
Eric Mc Sween
2020-03-05 04:16:54 +00:00
committed by Copybot
parent 2627595040
commit 43d47ee35f
3 changed files with 156 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
# run tranformer
npx jscodeshift \
-t transform/o-error/transform.js \
--ignore-pattern=frontend/js/libraries.js \
--ignore-pattern=frontend/js/vendor \
--ignore-pattern=**/*Controller*js \
$1
# replace blank lines in staged changed with token
git diff --ignore-all-space --ignore-blank-lines | sed 's/^\+$/\+REMOVE_ME_IM_A_BLANK_LINE/g' | git apply --reject --cached --ignore-space-change
# stage changes with token instead of blank line
git checkout .
git add -A
# delete line containing token in staged files
git diff --cached --name-only | xargs sed -i '/^REMOVE_ME_IM_A_BLANK_LINE$/d'
# fix format on modified files
make format_fix