-
Notifications
You must be signed in to change notification settings - Fork 61
chore: track bundle sizes in Amplitude #1762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
daniel-graham-amplitude
wants to merge
42
commits into
main
Choose a base branch
from
SDK-14-track-bundle-size-in-amplitude
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+62
−10
Open
Changes from 37 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
c54da24
chore: add size limit gating to Amplitude
daniel-graham-amplitude 35218ab
again
daniel-graham-amplitude cf2a7a1
again
daniel-graham-amplitude ffb4641
again
daniel-graham-amplitude be3b231
again
daniel-graham-amplitude 4942052
again
daniel-graham-amplitude 88b24f2
again
daniel-graham-amplitude bf048cc
again
daniel-graham-amplitude 610cc31
again
daniel-graham-amplitude a0270c6
again
daniel-graham-amplitude 2bd561b
again
daniel-graham-amplitude 638e85b
again
daniel-graham-amplitude e696090
again
daniel-graham-amplitude 6d7c1ef
again
daniel-graham-amplitude 82bac53
again
daniel-graham-amplitude 8540d2d
again
daniel-graham-amplitude 520b6db
again
daniel-graham-amplitude 995f58f
again
daniel-graham-amplitude a059d2c
again
daniel-graham-amplitude ce51924
again
daniel-graham-amplitude 7a7421c
again
daniel-graham-amplitude fb5d4b1
again
daniel-graham-amplitude d28a6bc
again
daniel-graham-amplitude f2fb6a1
again
daniel-graham-amplitude faf2a6a
chore: remove failure allowance on size-limit-action
daniel-graham-amplitude f3b66cd
Revert "chore: remove failure allowance on size-limit-action"
daniel-graham-amplitude 5a4e5a5
chore: remove failure allowance on size-limit-action
daniel-graham-amplitude 1f6f869
again
daniel-graham-amplitude 66d312a
again
daniel-graham-amplitude cef3c5d
again
daniel-graham-amplitude 94a6445
chore: report bundle sizes to amplitude
daniel-graham-amplitude 8079dc1
empty message
daniel-graham-amplitude cac1590
again
daniel-graham-amplitude 6a2628d
again
daniel-graham-amplitude 372c327
again
daniel-graham-amplitude 12a1cc7
again
daniel-graham-amplitude d3d32c3
again
daniel-graham-amplitude 5d0b541
Merge branch 'main' of github.com:amplitude/Amplitude-TypeScript into…
daniel-graham-amplitude 634b36f
again
daniel-graham-amplitude 10014f9
again
daniel-graham-amplitude f4c2a10
again
daniel-graham-amplitude 4d90848
Merge branch 'main' of github.com:amplitude/Amplitude-TypeScript into…
daniel-graham-amplitude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Runs on every push to main (for example after a PR merge). Extend with jobs as needed. | ||
| name: Main branch push | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| cache-builds: | ||
| name: On push to main | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out git repository | ||
| uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 | ||
|
|
||
| - name: Setup Node.js 24 | ||
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | ||
| with: | ||
| node-version: 24 | ||
| cache: 'pnpm' | ||
|
|
||
| - name: Install project dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Restore Nx cache | ||
| uses: actions/cache/restore@d4323d4df104b026a6aa633fdb11d772146be0bf # v4 | ||
| with: | ||
| path: .nx/cache | ||
| key: nx-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml', 'nx.json') }} | ||
| restore-keys: | | ||
| nx-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml', 'nx.json') }} | ||
|
|
||
| - name: Build all packages | ||
| run: pnpm build:nx | ||
|
|
||
| - name: Save Nx cache | ||
| uses: actions/cache/save@d4323d4df104b026a6aa633fdb11d772146be0bf # v4 | ||
| with: | ||
| path: .nx/cache | ||
| key: nx-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml', 'nx.json') }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| const limits = [ | ||
| { | ||
| // analytics-browser bundle | ||
| packageJsonPath: './packages/analytics-browser/package.json', | ||
| path: `./packages/analytics-browser/lib/scripts/amplitude-min.js.gz`, | ||
| name: 'analytics-browser.min.js.gz', | ||
| limit: '65kb', | ||
| brotli: false, | ||
| }, | ||
| { | ||
| // session-replay standalone bundle | ||
| packageJsonPath: './packages/session-replay-browser/package.json', | ||
| path: `./packages/session-replay-browser/lib/scripts/session-replay-browser-min.js.gz`, | ||
| name: 'session-replay-browser.min.js.gz', | ||
| limit: '150kb', | ||
| brotli: false, | ||
| }, | ||
| { | ||
| // unified SDK bundle | ||
| packageJsonPath: './packages/unified/package.json', | ||
| path: `./packages/unified/lib/scripts/amplitude-min.umd.js.gz`, | ||
| name: 'unified.min.umd.js.gz', | ||
| limit: '225kb', | ||
| brotli: false, | ||
| }, | ||
| ] | ||
|
|
||
| module.exports = limits; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.