Skip to content

Commit 87df661

Browse files
committed
chore: align prettier with standard github action settings
1 parent 872fe4f commit 87df661

18 files changed

+1055
-988
lines changed

.changeset/clean-donkeys-explode.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@spectrum-tools/gh-action-file-diff": major
3+
---
4+
5+
This update optimizes and abstracts more the approach to comparing compiled assets. The input fields no focus on gathering package sources and more heavily relies on the exports field of the package.json to determine what assets should be compared. At the end of the processing and comparison, the diff assets are generated and a website built to review the updates.

.github/actions/file-diff/README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ A GitHub Action for comparing compiled assets between branches.
88

99
**Required** Path to file or directory for file sizes analysis.
1010

11+
### `package-pattern`
12+
13+
**Required** All packages to include in the comparison. Supports glob syntax. Should point to the package folder which contains a package.json asset. If no package.json asset, this folder will be left off the results.
14+
1115
### `base-path`
1216

1317
**Optional** Path to another directory against which to perform file comparisons.
@@ -16,10 +20,6 @@ A GitHub Action for comparing compiled assets between branches.
1620

1721
**Optional** GitHub token for accessing the GitHub API. Defaults to `${{ github.token }}`.
1822

19-
### `file-glob-pattern`
20-
21-
**Optional** Glob pattern for selecting files to compare. Defaults to `dist/*`.
22-
2323
### `comment`
2424

2525
**Optional** If true, add a comment on the pull request with the results of the comparison. Defaults to `true`.
@@ -44,9 +44,9 @@ Total size of all files for this branch in bytes.
4444
name: Compare compiled output file size
4545
uses: "spectrum-tools/gh-action-file-diff"
4646
with:
47-
head-path: ${{ github.workspace }}/pull-request
48-
base-path: ${{ github.workspace }}/base-branch
49-
file-glob-pattern: |
50-
components/*/dist/*.{css,json}
51-
components/*/dist/themes/*.css
47+
head-path: ${{ github.workspace }}/pull-request
48+
base-path: ${{ github.workspace }}/base-branch
49+
package-pattern: |
50+
components/*/dist/*.{css,json}
51+
components/*/dist/themes/*.css
5252
```

.github/actions/file-diff/action.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ inputs:
1313
description: "GITHUB_TOKEN for the repository."
1414
required: false
1515
default: ${{ github.token }}
16-
file-glob-pattern:
17-
description: "Glob pattern for filtering of the files."
18-
required: false
19-
default: "**/dist/**"
16+
package-pattern:
17+
description: "Glob pattern for the package directories."
18+
required: true
2019
comment:
2120
description: "Whether to comment on the PR."
2221
required: false

0 commit comments

Comments
 (0)