Skip to content
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

fix: Add config file options to bundle-analyzer cli, export types #174

Merged
merged 5 commits into from
Sep 13, 2024

Conversation

suejung-sentry
Copy link
Contributor

@suejung-sentry suejung-sentry commented Sep 12, 2024

Fix up a couple things:

  • Couple cleanup items around names, readme text
  • Fix exporting types from bundle-analyzer package so they can be used by externally. Convert the ES Modules example to Typescript demonstrating this usage.
  • Update CLI to accept a config file that has expanded options - the config json expects an object that matches the shape of the bundle-analyzer-core Options object
  • Simplify/fix __dirname resolution which had a bug in the previous implementation
  • Adjust where Output.write can optionally emit error instead of swallowing so that the CLI/library can throw this error back to user

@suejung-sentry suejung-sentry changed the base branch from main to prerelease September 12, 2024 22:37
@codecov-staging
Copy link

codecov-staging bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Components Coverage Δ
Plugin core 96.70% <100.00%> (+<0.01%) ⬆️
Rollup plugin 10.81% <ø> (ø)
Vite plugin 11.02% <ø> (ø)
Webpack plugin 49.88% <ø> (ø)

📢 Thoughts on this report? Let us know!

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.98%. Comparing base (8bdad73) to head (6b0a882).
Report is 1 commits behind head on prerelease.

✅ All tests successful. No failed tests found.

Additional details and impacted files
Components Coverage Δ
Plugin core 96.70% <100.00%> (+<0.01%) ⬆️
Rollup plugin 10.81% <ø> (ø)
Vite plugin 11.02% <ø> (ø)
Webpack plugin 49.88% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@suejung-sentry suejung-sentry marked this pull request as ready for review September 13, 2024 08:48
@suejung-sentry suejung-sentry changed the title fix: Add options to bundle-analyzer cli, export types fix: Add config file options to bundle-analyzer cli, export types Sep 13, 2024
Copy link

codecov bot commented Sep 13, 2024

Bundle Report

Changes will decrease total bundle size by 749 bytes (-0.01%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
@codecov/bundler-plugin-core-cjs 46.63kB 33 bytes ⬆️
@codecov/bundler-plugin-core-esm 12.29kB 19 bytes ⬆️
@codecov/example-sveltekit-app-client-esm 714.98kB 2 bytes ⬆️
@codecov/example-sveltekit-app-server-esm 974.85kB 1 bytes ⬆️
@codecov/bundle-analyzer-cjs 4.33kB 192 bytes ⬇️
@codecov/example-bundle-analyzer-cli 511 bytes 732 bytes ⬇️
@codecov/bundle-analyzer-esm 3.11kB 120 bytes ⬆️

@suejung-sentry suejung-sentry merged commit 7ca5777 into prerelease Sep 13, 2024
60 checks passed
@suejung-sentry suejung-sentry deleted the sshin/fix/bundle-analyzer-add-options branch September 13, 2024 19:24
}

const argv = yargs(hideBin(process.argv))
const cliArgs = yargs(hideBin(process.argv))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kinda annoying this yargs doesn't provide any type validation 😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants