-
Notifications
You must be signed in to change notification settings - Fork 4.1k
update published npm binaries package #20945
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
Open
RiskyMH
wants to merge
5
commits into
main
Choose a base branch
from
riskymh/npm-publish-upd
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f789da2
update published npm binaries
RiskyMH 09ac293
add test that was removed in #10157
RiskyMH c3258f3
Update README.md
RiskyMH 1922498
Merge branch 'main' into riskymh/npm-publish-upd
Jarred-Sumner 77324cc
Merge branch 'main' into riskymh/npm-publish-upd
Jarred-Sumner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # This workflow tests bun-release's code and the packages to ensure that npm, | ||
| # yarn, and pnpm can install bun on all platforms. This does not test that bun | ||
| # itself works as it hardcodes 1.2.0 as the version to package. | ||
| name: bun-release-test | ||
| concurrency: release-test | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - "packages/bun-release/**" | ||
| - ".github/workflows/bun-release-test.yml" | ||
|
|
||
| jobs: | ||
| test-release-script: | ||
| name: Test Release Script | ||
| strategy: | ||
| matrix: | ||
| # https://docs.github.com/en/actions/how-tos/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job#choosing-github-hosted-runners | ||
| machine: [ | ||
| ubuntu-latest, # linux x64 | ||
| ubuntu-24.04-arm, # linux arm | ||
| macos-13, # macos x64 | ||
| macos-15, # macos arm | ||
| # windows-latest, # windows x64 | ||
| ] | ||
| fail-fast: false | ||
| runs-on: ${{ matrix.machine }} | ||
| permissions: | ||
| contents: read | ||
| defaults: | ||
| run: | ||
| working-directory: packages/bun-release | ||
| timeout-minutes: 5 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Setup Bun | ||
| uses: ./.github/actions/setup-bun | ||
| with: | ||
| bun-version: "1.2.0" | ||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| - name: Install Dependencies | ||
| run: bun install && npm i -g pnpm yarn npm && which node | ||
|
|
||
| - name: Release | ||
| run: bun upload-npm -- 1.2.0 test | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
5 changes: 5 additions & 0 deletions
5
packages/bun-release/npm/@oven/bun-linux-aarch64-musl/README.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Bun | ||
|
|
||
| This is the Linux arm64 binary for Bun, a fast all-in-one JavaScript runtime. https://bun.com | ||
|
|
||
| _Note: "musl" builds are for machines that use [musl](https://musl.libc.org/) instead of [glibc](https://www.gnu.org/software/libc/)._ |
7 changes: 7 additions & 0 deletions
7
packages/bun-release/npm/@oven/bun-linux-x64-musl-baseline/README.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Bun | ||
|
|
||
| This is the Linux x64 binary for Bun, a fast all-in-one JavaScript runtime. https://bun.com | ||
|
|
||
| _Note: "Baseline" builds are for machines that do not support [AVX2](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions) instructions._ | ||
|
|
||
| _Note: "musl" builds are for machines that use [musl](https://musl.libc.org/) instead of [glibc](https://www.gnu.org/software/libc/)._ |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Bun | ||
|
|
||
| This is the Linux x64 binary for Bun, a fast all-in-one JavaScript runtime. https://bun.com | ||
|
|
||
| _Note: "musl" builds are for machines that use [musl](https://musl.libc.org/) instead of [glibc](https://www.gnu.org/software/libc/)._ |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -112,7 +112,7 @@ without *requiring* a postinstall script. | |
| cpu, | ||
| keywords: ["bun", "bun.js", "node", "node.js", "runtime", "bundler", "transpiler", "typescript"], | ||
| homepage: "https://bun.com", | ||
| bugs: "https://github.com/oven-sh/issues", | ||
| bugs: "https://github.com/oven-sh/bun/issues", | ||
| license: "MIT", | ||
| repository: "https://github.com/oven-sh/bun", | ||
| }); | ||
|
|
@@ -123,7 +123,7 @@ without *requiring* a postinstall script. | |
|
|
||
| async function buildModule( | ||
| release: Awaited<ReturnType<typeof getRelease>>, | ||
| { bin, exe, os, arch }: Platform, | ||
| { bin, exe, os, arch, abi }: Platform, | ||
| ): Promise<void> { | ||
| const module = `${owner}/${bin}`; | ||
| log("Building:", `${module}@${version}`); | ||
|
|
@@ -137,17 +137,24 @@ async function buildModule( | |
| mkdirSync(dirname(join(cwd, exe)), { recursive: true }); | ||
| write(join(cwd, exe), await bun.async("arraybuffer")); | ||
| chmod(join(cwd, exe), 0o755); | ||
| const osName = | ||
| { | ||
| darwin: "macOS", | ||
| win32: "windows", | ||
| linux: "linux", | ||
| }[os] || os; | ||
| writeJson(join(cwd, "package.json"), { | ||
| name: module, | ||
| version: version, | ||
| description: "This is the macOS arm64 binary for Bun, a fast all-in-one JavaScript runtime.", | ||
| description: `This is the ${osName} ${arch} binary for Bun, a fast all-in-one JavaScript runtime.`, | ||
| homepage: "https://bun.com", | ||
| bugs: "https://github.com/oven-sh/issues", | ||
| bugs: "https://github.com/oven-sh/bun/issues", | ||
| license: "MIT", | ||
| repository: "https://github.com/oven-sh/bun", | ||
| preferUnplugged: true, | ||
| os: [os], | ||
| cpu: [arch], | ||
| libc: abi ? [abi] : undefined, | ||
| }); | ||
| if (exists(".npmrc")) { | ||
| copy(".npmrc", join(cwd, ".npmrc")); | ||
|
|
@@ -252,7 +259,7 @@ async function test() { | |
| ["npm i", "npm exec"], | ||
| ["yarn set version berry; yarn add", "yarn"], | ||
| ["yarn set version latest; yarn add", "yarn"], | ||
| ["pnpm i", "pnpm"], | ||
| ["pnpm i --dangerously-allow-all-builds", "pnpm"], | ||
| ["bun i", "bun run"], | ||
| ]) { | ||
| rmSync(join(root, "node_modules"), { recursive: true, force: true }); | ||
|
|
@@ -265,7 +272,10 @@ async function test() { | |
| }); | ||
|
|
||
| console.log("Testing", install + " bun"); | ||
| await $`${{ raw: install }} ./bun-${version}.tgz`; | ||
| const nodePath = Bun.which("node")?.replace("/node", "") || ""; | ||
| await $`${{ raw: install }} ./bun-${version}.tgz`.env({ | ||
| PATH: nodePath ? `${nodePath}:${process.env.PATH}` : process.env.PATH, | ||
| }); | ||
|
Comment on lines
-268
to
+278
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have no idea why it throws |
||
|
|
||
| console.log("Running " + exec + " bun"); | ||
|
|
||
|
|
@@ -305,7 +315,7 @@ async function test() { | |
| expect(output[0]).toBe(version); | ||
| expect(output[1]).toBe(process.platform); | ||
| expect(output[2]).toBe(process.arch); | ||
| expect(output[3]).toStartWith(root); | ||
| expect(output[3]).toInclude(root); | ||
| expect(output[3]).toInclude("bun"); | ||
| } | ||
| } | ||
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pnpm seems to also have a postinstall blocking now too