Skip to content

Conversation

@mandarini
Copy link
Contributor

@mandarini mandarini commented Aug 7, 2025

What kind of change does this PR introduce?

Package Management Cleanup & Webpack Optimization

  • Removes pnpm from this repository to standardize on npm as the sole package manager
  • Removes the outdated process: 'process/browser' webpack polyfill that was causing unnecessary bundle bloat

What is the current behavior?

  • This repository has been using two different package managers (npm and pnpm), which creates inconsistency and potential dependency resolution issues. The CI uses npm while pnpm appears to have been introduced accidentally in a previous PR (fix: Bump up realtime-js #1418)
  • The webpack configuration includes an outdated process: 'process/browser' polyfill that was originally added in PR Add back UMD to npm builds #72 in November 2020 for UMD build compatibility but is no longer necessary with modern webpack

What is the new behavior?

  • Single package manager: Only npm is used throughout the repository, ensuring consistency between development and CI environments
  • Cleaner webpack builds: Removed unnecessary process polyfill, resulting in smaller bundle sizes and simplified build configuration

Additional context

Why removing the webpack polyfill is safe:

  • The codebase only references process.version in one location (src/index.ts) for Node.js deprecation warnings, which only runs in Node.js environments anyway
  • Modern webpack 5 (currently v5.94.0) handles Node.js globals much better than earlier versions
  • This change aligns with current webpack 5 best practices and reduces bundle complexity

Benefits of this cleanup:

  • Smaller bundle sizes: Eliminates unnecessary polyfill code from UMD builds
  • Simplified development: Single package manager reduces confusion and setup complexity
  • Modern tooling: Brings the build configuration up to current standards

The PR also updates documentation in README.md to reflect the npm-only approach and includes various lock file updates that ensure consistent dependency resolution across different environments.

@mandarini mandarini requested a review from grdsdev August 7, 2025 08:26
@mandarini mandarini self-assigned this Aug 7, 2025
@coveralls
Copy link

coveralls commented Aug 7, 2025

Pull Request Test Coverage Report for Build 16800513307

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 74.8%

Totals Coverage Status
Change from base Build 16799791196: 0.0%
Covered Lines: 122
Relevant Lines: 146

💛 - Coveralls

@mandarini mandarini changed the title chore: remove pnpm from repository chore: cleanups in repo - pnpm and webpack polyfill Aug 7, 2025
@mandarini mandarini marked this pull request as ready for review August 7, 2025 08:38
@mandarini mandarini changed the title chore: cleanups in repo - pnpm and webpack polyfill chore: cleanups in repo - pnpm removal - webpack polyfill - ci update Aug 7, 2025
@mandarini mandarini changed the title chore: cleanups in repo - pnpm removal - webpack polyfill - ci update chore: cleanups - pnpm removal - webpack polyfill - ci update Aug 7, 2025
@mandarini mandarini merged commit dd01463 into supabase:master Aug 7, 2025
13 checks passed
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.

3 participants