oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.09k stars 2.76k forks source link

Bun version & publish manager #5050

Open FranciscoCaetano88 opened 1 year ago

FranciscoCaetano88 commented 1 year ago

What is the problem this feature would solve?

Add a build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository.

What is the feature you are proposing to solve the problem?

A package versioning & publishing manager that should provide a variety of options to make sure any workflow can be accommodated.

What alternatives have you considered?

Lerna

The-Code-Monkey commented 1 year ago

Yeah this is something I am missing from Bun as i currently use an old version of lerna to publish packages from my Monorepo would be nice to see something similar baked into bun +1

nyxb commented 12 months ago

Yes please I would also like a bun publish command so that I don't have to use npm, pnpm or yarn to publish packages. So I am forced to continue to have node installed in parallel

vxhly commented 11 months ago

Yes please I would also like a bun publish command.

The pnpm command I am using now seems not fully compatible with bun.

Below is the pnpm release process I listed, I hope bun will take this process into consideration.

{
  "scripts": {
    "commit:changelog": "git add CHANGELOG.md && git commit -m \"docs: :memo: update changelog\" && git push",
    "lint": "eslint --ext mjs,js,jsx,ts,tsx,cjs --fix .",
    "release": "pnpm release:check && pnpm release:version && pnpm release:publish",
    "release:changelog": "conventional-changelog -p angular -i CHANGELOG.md -s && npm run commit:changelog",
    "release:check": "pnpm lint",
    "release:publish": "pnpm -r publish --tag latest",
    "release:version": "bumpp package.json packages/*/package.json --execute=\"pnpm release:changelog\" --commit \"build: :package: publish v%s\" --all"
  },
  "devDependencies": {
    "bumpp": "^9.2.0",
    "conventional-changelog-cli": "^4.1.0",
  }
}
vxhly commented 11 months ago

bun seems to be missing functions like pnpm update -r --workspace, and I hope it can be added in the next version.

oalexdoda commented 11 months ago

Has anybody been able to figure out a way to publish a package using bun?

The-Code-Monkey commented 11 months ago

@oalexdoda still using lerna to publish for now.

@Jarred-Sumner could you weigh in on this, as this feature isn't listed in the roadmap?

The-Code-Monkey commented 5 months ago

Any update on this?

salmenf commented 4 months ago

Bun publish/deprecate/unpublish would be great! I was surprised this wasn't part of Bun already, since you can in fact provide login credentials for registries in your bunfig.

The only workaround I know of is to run an external script handling publishing (e.g. https://github.com/morlay/bunpublish). This isn't great since it introduces extra dependencies.

pipinet commented 1 month ago

Any update on this?

StephenHaney commented 2 weeks ago

Edit: I wouldn't advise using this yet until it's officially announced. I tried bun publish last night and it doesn't correctly pack dependencies, so your published package ends up with 0 deps on npm (even if they're listed in package.json). Heads up @dylan-conway in case this is unexpected.


It looks like bun publish is now a thing.

I'm confused by how it maps workspace dependencies (like workspace:*) though – it seems to always lag 2 versions behind what it should use. Still testing to try to narrow down what is happening.

Here's the code for publish for reference.