Skip to content

chore: migrate to pnpm for improved monorepo management - #287

Merged
tibo-openai merged 5 commits into
openai:mainfrom
khossdev:feature/pnpm-migration
Apr 18, 2025
Merged

tibo-openai merged 5 commits into
openai:mainfrom
khossdev:feature/pnpm-migration

Conversation

@khossdev

Copy link
Copy Markdown
Contributor

Migrate to pnpm for improved monorepo management

Summary

This PR migrates the Codex repository from npm to pnpm, providing faster dependency installation, better disk space usage, and improved monorepo management.

Changes

  • Added pnpm-workspace.yaml to define workspace packages
  • Added .npmrc with optimal pnpm configuration
  • Updated root package.json with workspace scripts
  • Moved resolutions and overrides to the root package.json
  • Updated scripts to use pnpm instead of npm
  • Added documentation for the migration
  • Updated GitHub Actions workflow for pnpm

Benefits

  • Faster installations: pnpm is significantly faster than npm
  • Disk space savings: pnpm's content-addressable store avoids duplication
  • Strict dependency management: prevents phantom dependencies
  • Simplified monorepo management: better workspace coordination
  • Preparation for Turborepo: as discussed, this is the first step before adding Turborepo

Testing

  • Verified that pnpm install works correctly
  • Verified that pnpm run build completes successfully
  • Ensured all existing functionality is preserved

Documentation

Added a detailed migration guide in PNPM_MIGRATION.md explaining:

  • Why we're migrating to pnpm
  • How to use pnpm with this repository
  • Common commands and workspace-specific commands
  • Monorepo structure and configuration

Next Steps

As discussed, once this change is stable, we can consider adding Turborepo as a follow-up enhancement.

@tibo-openai

Copy link
Copy Markdown
Collaborator

Ty!! However, ci is failing, could you fix and ping when it's ready for review?

@khossdev

Copy link
Copy Markdown
Contributor Author

@tibo-openai It's okay now

@khossdev

Copy link
Copy Markdown
Contributor Author

@tibo-openai Let's discuss it, otherwise there may be further conflicts.

@tibo-openai

Copy link
Copy Markdown
Collaborator

looks good, merging, ty!!

@tibo-openai
tibo-openai merged commit e2fe257 into openai:main Apr 18, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 18, 2025
@khossdev
khossdev deleted the feature/pnpm-migration branch April 19, 2025 14:44
Comment thread .github/workflows/ci.yml
run: pnpm install

- name: Check formatting (codex-cli)
working-directory: codex-cli

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These working-directory args were not ported over and now pnpm run format is not being enforced in the codex-cli folder.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants