Skip to content

Commit 067cb5d

Browse files
committed
feat: add package name to comment for uniqueness
feat: add canary workflow
1 parent 66b4944 commit 067cb5d

File tree

8 files changed

+8829
-3957
lines changed

8 files changed

+8829
-3957
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{ "repo": "hashicorp/nextjs-bundle-analysis" }
6+
],
7+
"commit": false,
8+
"linked": [],
9+
"access": "public",
10+
"baseBranch": "main",
11+
"updateInternalDependencies": "patch",
12+
"ignore": [],
13+
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
14+
"useCalculatedVersionForSnapshots": true,
15+
"onlyUpdatePeerDependentsWhenOutOfRange": true
16+
}
17+
}

.changeset/poor-bats-notice.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'nextjs-bundle-analysis': minor
3+
---
4+
5+
Add app name to comment for uniqueness
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Canary Release
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
- labeled
10+
11+
jobs:
12+
release-canary:
13+
uses: hashicorp/web-platform-packages/.github/workflows/canary-release.yml@8f20ba3ccb4ffe9a9bc0b14060af00929e6655f1
14+
secrets:
15+
PUBLISH_GITHUB_TOKEN: ${{ secrets.CHANGESETS_PAT }}
16+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

compare.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const BUDGET_PERCENT_INCREASE_RED = options.budgetPercentIncreaseRed
1515
const SHOW_DETAILS =
1616
options.showDetails === undefined ? true : options.showDetails
1717
const BUILD_OUTPUT_DIRECTORY = getBuildOutputDirectory(options)
18+
const PACKAGE_NAME = options.name
1819

1920
// import the current and base branch bundle stats
2021
const currentBundle = require(path.join(
@@ -29,7 +30,7 @@ const baseBundle = require(path.join(
2930
))
3031

3132
// kick it off
32-
let output = `## 📦 Next.js Bundle Analysis
33+
let output = `## 📦 Next.js Bundle Analysis for ${PACKAGE_NAME}
3334
3435
This analysis was generated by the [next.js bundle analysis action](https://github.com/hashicorp/nextjs-bundle-analysis) 🤖
3536
@@ -165,7 +166,7 @@ if (!newPages.length && !changedPages.length && !globalBundleChanges) {
165166

166167
// we add this tag so that our action can be able to easily and consistently find the
167168
// right comment to edit as more commits are pushed.
168-
output += '<!-- __NEXTJS_BUNDLE -->'
169+
output += `<!-- __NEXTJS_BUNDLE_${PACKAGE_NAME} -->`
169170

170171
// log the output, mostly for testing and debugging. this will show up in the
171172
// github actions console.

0 commit comments

Comments
 (0)