Skip to content

OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security

chore(ci): share the pinned Bun version (#2422)

Michael D'Angelo9e38dd308476
diff --git a/.bun-version b/.bun-version
new file mode 100644
index 000000000..1c99cf0e8
--- /dev/null
+++ b/.bun-version
@@ -0,0 +1 @@
+1.4.4
diff --git a/.devcontainer/install.sh b/.devcontainer/install.sh
index eff90fc15..7c1e87228 100644
--- a/.devcontainer/install.sh
+++ b/.devcontainer/install.sh
@@ -14,8 +14,8 @@ COREPACK_ENABLE_DOWNLOAD_PROMPT=0
export COREPACK_ENABLE_DOWNLOAD_PROMPT
corepack install
-# Keep bun aligned with the version pinned in .github/workflows/node-ci.yml.
-npm install --global [email protected] --no-audit --no-fund
+bun_version=$(tr -d '\r' < .bun-version)
+npm install --global "bun@${bun_version:?empty .bun-version}" --no-audit --no-fund
if ! command -v rg >/dev/null 2>&1; then
# Refresh only the Ubuntu sources. Dev container features add APT sources of
diff --git a/.github/workflows/action-ci.yml b/.github/workflows/action-ci.yml
index 1e0a04a6e..ae52c2445 100644
--- a/.github/workflows/action-ci.yml
+++ b/.github/workflows/action-ci.yml
@@ -65,7 +65,7 @@ jobs:
if: inputs.sdk-contracts
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
- bun-version: "1.4.4"
+ bun-version-file: .bun-version
no-cache: true
- name: Test Action release contracts
if: inputs.sdk-contracts
diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml
index 0c65c9989..32f39fa21 100644
--- a/.github/workflows/node-ci.yml
+++ b/.github/workflows/node-ci.yml
@@ -203,7 +203,7 @@ jobs:
name: Set up Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
- bun-version: "1.4.4"
+ bun-version-file: .bun-version
- *install-dependencies
- &download-package-for-this-commit
name: Download package for this commit
diff --git a/.github/workflows/node-release.yml b/.github/workflows/node-release.yml
index 1bc1ffe7c..fd689ecce 100644
--- a/.github/workflows/node-release.yml
+++ b/.github/workflows/node-release.yml
@@ -84,7 +84,7 @@ jobs:
name: Set up Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
- bun-version: "1.4.4"
+ bun-version-file: .bun-version
no-cache: true
- &setup-release-pnpm
diff --git a/.github/workflows/test-quality.yml b/.github/workflows/test-quality.yml
index 6542fe15b..d960f5dc2 100644
--- a/.github/workflows/test-quality.yml
+++ b/.github/workflows/test-quality.yml
@@ -112,7 +112,7 @@ jobs:
- &set-up-bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
- bun-version: "1.4.4"
+ bun-version-file: .bun-version
- &install-plugin-dependencies
name: Install dependencies
shell: bash
diff --git a/sdk/typescript/TESTING.md b/sdk/typescript/TESTING.md
index 68c2ccaa9..7a60f2de7 100644
--- a/sdk/typescript/TESTING.md
+++ b/sdk/typescript/TESTING.md
@@ -2,7 +2,7 @@
## Install dependencies
-Use [the repository’s pinned pnpm version](../../package.json) and [CI’s Bun version](../../.github/workflows/node-ci.yml). From the repository root, enter the SDK directory and install both packages:
+Use [the repository’s pinned pnpm version](../../package.json) and [CI’s Bun version](../../.bun-version). From the repository root, enter the SDK directory and install both packages:
```sh
cd sdk/typescript
diff --git a/sdk/typescript/tests-ts/skeleton.test.ts b/sdk/typescript/tests-ts/skeleton.test.ts
index 5a50312be..b807e8d0c 100644
--- a/sdk/typescript/tests-ts/skeleton.test.ts
+++ b/sdk/typescript/tests-ts/skeleton.test.ts
@@ -431,10 +431,8 @@ describe("TypeScript package skeleton", () => {
quality.jobs["mutation"]!,
]) {
expect(
- job
- .steps!.filter((step) => step.uses?.startsWith("oven-sh/setup-bun@"))
- .map((step) => step.with?.["bun-version"]),
- ).toEqual(["1.4.4"]);
+ job.steps!.filter(({ uses }) => uses?.startsWith("oven-sh/setup-bun@")),
+ ).toMatchObject([{ with: { "bun-version-file": ".bun-version" } }]);
for (const step of job.steps!) {
expect(step.run ?? "").not.toMatch(
/--(?:parallel|isolate)(?:[=\s]|$)/u,