Skip to content

Fix floating dependencies CI by replacing meta-updater #1754

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

Merged
merged 1 commit into from
May 31, 2025

Conversation

wycats
Copy link
Contributor

@wycats wycats commented May 31, 2025

Summary

  • Fixes floating dependencies CI failures by replacing @pnpm/meta-updater with custom TypeScript implementation
  • Eliminates @pnpm/* peer dependency conflicts that were causing installation failures

Changes Made

  • Removed: @pnpm/meta-updater and @pnpm/workspace.find-packages dependencies
  • Added: Custom TypeScript package updater using standard Node.js libraries (globby, read-pkg, write-pkg, handlebars, deepmerge)
  • Preserved: 100% identical package convention behavior
  • Improved: Better error handling, type safety, and maintainability

Technical Details

The new implementation maintains all existing functionality:

  • Package classification (published, built, private, root)
  • Repository URL handling with directory paths
  • PublishConfig exports generation (including @glimmer/vm-babel-plugins special case)
  • Script management (prepack, test:publint, test:lint)
  • DevDependency synchronization from catalog
  • Rollup config generation/removal logic

Test Plan

  • Verified behavioral equivalence through comprehensive analysis
  • Tested package transformations for different package types
  • Confirmed floating dependencies CI test resolution
  • Validated idempotent operation (safe to run multiple times)

Copy link
Contributor

github-actions bot commented May 31, 2025

This PRmain
Dev
588K └─┬ .
169K   ├── runtime
160K   ├── syntax
100K   ├── compiler
 58K   ├── opcode-compiler
 27K   ├── manager
 24K   ├── validator
 11K   ├── program
8.9K   ├── reference
7.2K   ├── destroyable
6.3K   ├── util
4.3K   ├── node
3.4K   ├── global-context
2.5K   ├── wire-format
1.0K   ├── vm
969B   ├── encoder
844B   ├── vm-babel-plugins
606B   └── owner
588K └─┬ .
169K   ├── runtime
160K   ├── syntax
100K   ├── compiler
 58K   ├── opcode-compiler
 27K   ├── manager
 24K   ├── validator
 11K   ├── program
8.9K   ├── reference
7.2K   ├── destroyable
6.3K   ├── util
4.3K   ├── node
3.4K   ├── global-context
2.5K   ├── wire-format
1.0K   ├── vm
969B   ├── encoder
844B   ├── vm-babel-plugins
606B   └── owner
Prod
231K └─┬ .
 70K   ├── syntax
 63K   ├── runtime
 48K   ├── compiler
 18K   ├── opcode-compiler
7.9K   ├── manager
5.1K   ├── validator
4.8K   ├── program
3.6K   ├── reference
2.4K   ├── util
2.1K   ├── node
1.6K   ├── wire-format
1.5K   ├── destroyable
737B   ├── vm
594B   ├── global-context
516B   ├── encoder
469B   ├── vm-babel-plugins
155B   └── owner
231K └─┬ .
 70K   ├── syntax
 63K   ├── runtime
 48K   ├── compiler
 18K   ├── opcode-compiler
7.9K   ├── manager
5.1K   ├── validator
4.8K   ├── program
3.6K   ├── reference
2.4K   ├── util
2.1K   ├── node
1.6K   ├── wire-format
1.5K   ├── destroyable
737B   ├── vm
594B   ├── global-context
516B   ├── encoder
469B   ├── vm-babel-plugins
155B   └── owner

@wycats wycats force-pushed the fix/replace-meta-updater branch 3 times, most recently from 9d812b3 to 5aaa297 Compare May 31, 2025 06:26
The floating dependencies CI was failing due to peer dependency conflicts
between @pnpm/meta-updater and @pnpm/* packages (version mismatches between
1000.x.x and 1001.x.x series). Instead of working around these conflicts,
we've replaced the meta-updater entirely with a custom solution.

The new implementation uses standard building blocks (globby, read-pkg,
write-pkg, handlebars, deepmerge) and runs with Node's --experimental-strip-types
flag. It provides identical functionality to the original meta-updater while
being more maintainable and eliminating the problematic peer dependencies.

Key changes:
- Remove .meta-updater/ configuration and @pnpm/meta-updater dependency
- Add repo-metadata/lib/package-updater.ts with equivalent functionality
- Update package scripts to use the new TypeScript implementation
- Configure ESLint to properly handle TypeScript CLI scripts

This resolves the floating dependencies test failures while maintaining
all existing package convention behaviors.
@wycats wycats force-pushed the fix/replace-meta-updater branch from 5aaa297 to ce43c00 Compare May 31, 2025 06:30
@wycats wycats enabled auto-merge May 31, 2025 06:31
@wycats wycats merged commit db73010 into main May 31, 2025
9 checks passed
@wycats wycats deleted the fix/replace-meta-updater branch May 31, 2025 06:33
@github-actions github-actions bot mentioned this pull request May 28, 2025
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.

1 participant