mirror of
https://github.com/openai/codex.git
synced 2026-04-25 07:05:38 +00:00
fix: remove references to corepack (#10138)
Currently, our `npm publish` logic is failing. There were a number of things that were merged recently that seemed to contribute to this situation, though I think we have fixed most of them, but this one stands out: https://github.com/openai/codex/pull/10115 As best I can tell, we tried to fix the pnpm version to a specific hash, but we did not do it consistently (though `shell-tool-mcp/package.json` had it specified twice...), so for this PR, I ran: ``` $ git ls-files | grep package.json codex-cli/package.json codex-rs/responses-api-proxy/npm/package.json package.json sdk/typescript/package.json shell-tool-mcp/package.json ``` and ensured that all of them now have this line: ```json "packageManager": "pnpm@10.28.2+sha512.41872f037ad22f7348e3b1debbaf7e867cfd448f2726d9cf74c08f19507c31d2c8e7a11525b983febc2df640b5438dee6023ebb1f84ed43cc2d654d2bc326264" ``` I also went and deleted all of the `corepack` stuff that was added by https://github.com/openai/codex/pull/10115. If someone can explain why we need it and verify it does not break `npm publish`, then we can bring it back.
This commit is contained in:
9
.github/workflows/shell-tool-mcp-ci.yml
vendored
9
.github/workflows/shell-tool-mcp-ci.yml
vendored
@@ -35,15 +35,6 @@ jobs:
|
|||||||
node-version: ${{ env.NODE_VERSION }}
|
node-version: ${{ env.NODE_VERSION }}
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
|
|
||||||
- name: Enable Corepack
|
|
||||||
run: corepack enable
|
|
||||||
|
|
||||||
- name: Activate pnpm from package.json
|
|
||||||
run: corepack prepare --activate
|
|
||||||
|
|
||||||
- name: Verify pnpm version
|
|
||||||
run: pnpm --version
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
|||||||
18
.github/workflows/shell-tool-mcp.yml
vendored
18
.github/workflows/shell-tool-mcp.yml
vendored
@@ -351,15 +351,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: ${{ env.NODE_VERSION }}
|
node-version: ${{ env.NODE_VERSION }}
|
||||||
|
|
||||||
- name: Enable Corepack
|
|
||||||
run: corepack enable
|
|
||||||
|
|
||||||
- name: Activate pnpm from package.json
|
|
||||||
run: corepack prepare --activate
|
|
||||||
|
|
||||||
- name: Verify pnpm version
|
|
||||||
run: pnpm --version
|
|
||||||
|
|
||||||
- name: Install JavaScript dependencies
|
- name: Install JavaScript dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
@@ -460,15 +451,6 @@ jobs:
|
|||||||
registry-url: https://registry.npmjs.org
|
registry-url: https://registry.npmjs.org
|
||||||
scope: "@openai"
|
scope: "@openai"
|
||||||
|
|
||||||
- name: Enable Corepack
|
|
||||||
run: corepack enable
|
|
||||||
|
|
||||||
- name: Activate pnpm from package.json
|
|
||||||
run: corepack prepare --activate
|
|
||||||
|
|
||||||
- name: Verify pnpm version
|
|
||||||
run: pnpm --version
|
|
||||||
|
|
||||||
- name: Download npm tarball
|
- name: Download npm tarball
|
||||||
uses: actions/download-artifact@v7
|
uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
|
|||||||
70
PNPM.md
70
PNPM.md
@@ -1,70 +0,0 @@
|
|||||||
# Migration to pnpm
|
|
||||||
|
|
||||||
This project has been migrated from npm to pnpm to improve dependency management and developer experience.
|
|
||||||
|
|
||||||
## Why pnpm?
|
|
||||||
|
|
||||||
- **Faster installation**: pnpm is significantly faster than npm and yarn
|
|
||||||
- **Disk space savings**: pnpm uses a content-addressable store to avoid duplication
|
|
||||||
- **Phantom dependency prevention**: pnpm creates a strict node_modules structure
|
|
||||||
- **Native workspaces support**: simplified monorepo management
|
|
||||||
|
|
||||||
## How to use pnpm
|
|
||||||
|
|
||||||
### Installation
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Global installation of pnpm
|
|
||||||
npm install -g pnpm@10.28.2
|
|
||||||
|
|
||||||
# Or with corepack (available with Node.js 22+)
|
|
||||||
corepack enable
|
|
||||||
corepack prepare pnpm@10.8.1 --activate
|
|
||||||
```
|
|
||||||
|
|
||||||
### Common commands
|
|
||||||
|
|
||||||
| npm command | pnpm equivalent |
|
|
||||||
| --------------- | ---------------- |
|
|
||||||
| `npm install` | `pnpm install` |
|
|
||||||
| `npm run build` | `pnpm run build` |
|
|
||||||
| `npm test` | `pnpm test` |
|
|
||||||
| `npm run lint` | `pnpm run lint` |
|
|
||||||
|
|
||||||
### Workspace-specific commands
|
|
||||||
|
|
||||||
| Action | Command |
|
|
||||||
| ------------------------------------------ | ---------------------------------------- |
|
|
||||||
| Run a command in a specific package | `pnpm --filter @openai/codex run build` |
|
|
||||||
| Install a dependency in a specific package | `pnpm --filter @openai/codex add lodash` |
|
|
||||||
| Run a command in all packages | `pnpm -r run test` |
|
|
||||||
|
|
||||||
## Monorepo structure
|
|
||||||
|
|
||||||
```
|
|
||||||
codex/
|
|
||||||
├── pnpm-workspace.yaml # Workspace configuration
|
|
||||||
├── .npmrc # pnpm configuration
|
|
||||||
├── package.json # Root dependencies and scripts
|
|
||||||
├── codex-cli/ # Main package
|
|
||||||
│ └── package.json # codex-cli specific dependencies
|
|
||||||
└── docs/ # Documentation (future package)
|
|
||||||
```
|
|
||||||
|
|
||||||
## Configuration files
|
|
||||||
|
|
||||||
- **pnpm-workspace.yaml**: Defines the packages included in the monorepo
|
|
||||||
- **.npmrc**: Configures pnpm behavior
|
|
||||||
- **Root package.json**: Contains shared scripts and dependencies
|
|
||||||
|
|
||||||
## CI/CD
|
|
||||||
|
|
||||||
CI/CD workflows have been updated to use pnpm instead of npm. Make sure your CI environments use pnpm 10.28.2 or higher.
|
|
||||||
|
|
||||||
## Known issues
|
|
||||||
|
|
||||||
If you encounter issues with pnpm, try the following solutions:
|
|
||||||
|
|
||||||
1. Remove the `node_modules` folder and `pnpm-lock.yaml` file, then run `pnpm install`
|
|
||||||
2. Make sure you're using pnpm 10.28.2 or higher
|
|
||||||
3. Verify that Node.js 22 or higher is installed
|
|
||||||
@@ -17,5 +17,6 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/openai/codex.git",
|
"url": "git+https://github.com/openai/codex.git",
|
||||||
"directory": "codex-cli"
|
"directory": "codex-cli"
|
||||||
}
|
},
|
||||||
|
"packageManager": "pnpm@10.28.2+sha512.41872f037ad22f7348e3b1debbaf7e867cfd448f2726d9cf74c08f19507c31d2c8e7a11525b983febc2df640b5438dee6023ebb1f84ed43cc2d654d2bc326264"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,5 +17,6 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/openai/codex.git",
|
"url": "git+https://github.com/openai/codex.git",
|
||||||
"directory": "codex-rs/responses-api-proxy/npm"
|
"directory": "codex-rs/responses-api-proxy/npm"
|
||||||
}
|
},
|
||||||
|
"packageManager": "pnpm@10.28.2+sha512.41872f037ad22f7348e3b1debbaf7e867cfd448f2726d9cf74c08f19507c31d2c8e7a11525b983febc2df640b5438dee6023ebb1f84ed43cc2d654d2bc326264"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,5 +62,6 @@
|
|||||||
"typescript-eslint": "^8.45.0",
|
"typescript-eslint": "^8.45.0",
|
||||||
"zod": "^3.24.2",
|
"zod": "^3.24.2",
|
||||||
"zod-to-json-schema": "^3.24.6"
|
"zod-to-json-schema": "^3.24.6"
|
||||||
}
|
},
|
||||||
|
"packageManager": "pnpm@10.28.2+sha512.41872f037ad22f7348e3b1debbaf7e867cfd448f2726d9cf74c08f19507c31d2c8e7a11525b983febc2df640b5438dee6023ebb1f84ed43cc2d654d2bc326264"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
"version": "0.0.0-dev",
|
"version": "0.0.0-dev",
|
||||||
"description": "Codex MCP server for the shell tool with patched Bash and exec wrappers.",
|
"description": "Codex MCP server for the shell tool with patched Bash and exec wrappers.",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"packageManager": "pnpm@10.28.2+sha512.41872f037ad22f7348e3b1debbaf7e867cfd448f2726d9cf74c08f19507c31d2c8e7a11525b983febc2df640b5438dee6023ebb1f84ed43cc2d654d2bc326264",
|
|
||||||
"bin": {
|
"bin": {
|
||||||
"codex-shell-tool-mcp": "bin/mcp-server.js"
|
"codex-shell-tool-mcp": "bin/mcp-server.js"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user