Skip to content

Commit ed7b4d4

Browse files
mifiaduh95
andauthored
meta: remove comments from output watcher (#4875)
Co-authored-by: Antoine du Hamel <[email protected]>
1 parent d53171d commit ed7b4d4

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Diff for: .github/workflows/output-watcher.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ permissions:
1212
pull-requests: write
1313
env:
1414
YARN_ENABLE_GLOBAL_CACHE: false
15+
DIFF_BUILDER: true
1516

1617
jobs:
1718
compare_diff:
@@ -72,7 +73,7 @@ jobs:
7273
run: |
7374
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
7475
echo "OUTPUT_DIFF<<$EOF" >> "$GITHUB_OUTPUT"
75-
cd /tmp/uppy && git --no-pager diff >> "$GITHUB_OUTPUT"
76+
cd /tmp/uppy && git --no-pager diff --ignore-blank-lines >> "$GITHUB_OUTPUT"
7677
echo "$EOF" >> "$GITHUB_OUTPUT"
7778
- name: Add/update comment
7879
uses: marocchino/sticky-pull-request-comment@v2

Diff for: bin/build-lib.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,14 @@ async function buildLib () {
116116
const isTSX = file.endsWith('.tsx')
117117
if (isTSX || file.endsWith('.ts')) { plugins.push(['@babel/plugin-transform-typescript', { disallowAmbiguousJSXLike: true, isTSX, jsxPragma: 'h' }]) }
118118

119-
const { code, map } = await babel.transformFileAsync(file, { sourceMaps: true, plugins })
119+
const { code, map } = await babel.transformFileAsync(file, {
120+
sourceMaps: true,
121+
plugins,
122+
// compact and no comments because https://github.com/transloadit/uppy/pull/4868#issuecomment-1897717779
123+
comments: !process.env.DIFF_BUILDER,
124+
compact: !!process.env.DIFF_BUILDER,
125+
retainLines: !!process.env.DIFF_BUILDER,
126+
})
120127
const [{ default: chalk }] = await Promise.all([
121128
import('chalk'),
122129
writeFile(libFile, code),

0 commit comments

Comments
 (0)