Repository navigation
Conversation
fouad-openai
approved these changes
May 13, 2025
bolinfest
force-pushed
the
pr909
branch
4 times, most recently
from
May 13, 2025 04:08
f6f1df6 to
a741d32
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note the high-level motivation behind this change is to avoid the need to make temporary changes in the source tree in order to cut a release build since that runs the risk of leaving things in an inconsistent state in the event of a failure. The existing code:
did not work as intended because, as written, ESBuild would bake the contents of the local
package.jsoninto the release build at build time whereas we want it to read the contents at runtime so we can use thepackage.jsonin the tree to build the code and later inject a modified version into the release package with a timestamped build version.Changes:
CLI_VERSIONout ofsrc/utils/session.tsand intosrc/version.tsso../package.jsonis a correct relative path both fromsrc/version.tsin the source tree and also in the finaldist/cli.jsbuild outputasserttowithinimport pkgas apparentlywithbecame standard in Node 22"../package.json"as external inbuild.mjsso the version is not baked into the.jsat build timeAfter using
pnpm stage-releaseto build a release version, if I use Node 22.0 to run Codex, I see the following printed to stderr at startup:Note it is a warning and does not prevent Codex from running.
In Node 22.12, the warning goes away, but the warning still appears in Node 22.11. For Node 22, 22.15.0 is the current LTS version, so LTS users will not see this.
Also, something about moving the definition of
CLI_VERSIONcaused a problem with the mocks incheck-updates.test.ts. I asked Codex to fix it, and it came up with the change to the test configs. I don't know enough about vitest to understand what it did, but the tests seem healthy again, so I'm going with it.