Skip to content

Releases: nix-community/bun2nix

2.0.5

04 Dec 16:50
6d259a3

Choose a tag to compare

What's Changed

  • Make sure generated bun.nix files follow nixfmt conventions
  • Add a flag for overriding the path to copy workspace packages from

Full Changelog: 2.0.4...2.0.5

2.0.4

01 Dec 09:53
f791ae9

Choose a tag to compare

What's Changed

  • Add a bunRoot handling mechanism for changing the root of the bun project
  • Allow auto patching of elfs downloaded in npm packages (opt-in)
  • Add template for development with phoenix (elixir)

Full Changelog: 2.0.3...2.0.4

2.0.3

26 Nov 18:23
8a911f3

Choose a tag to compare

What's Changed

  • Fix default bunBuildFlags overriding provided bunBuildFlags value by @baileyluTCD in #54

Full Changelog: 2.0.2...2.0.3

2.0.2

26 Nov 17:02
49b52c4

Choose a tag to compare

  • Properly strips file: from file dependencies
  • Adds section on isolated installs troubleshooting to docs

2.0.1

21 Nov 13:21
21f2aed

Choose a tag to compare

  • Move repository to nix-community
  • Move to nix community CI
  • Fix now revealed issues with template builds on darwin machines
  • Update all javascript deps
  • Add a warning when an unlocked dependency is found in a bun lockfile

2.0.0

20 Nov 19:05

Choose a tag to compare

V2 Release Guide

bun2nix V2 comes with many improvements, including:

  • Guaranteed correct bun installs via building the bun cache instead of creating the node_modules/ directory manually
  • Faster incremental builds via better caching
  • Rewritten nix API designed to be both more idiomatic and flexible
  • New NPM packaged web assembly CLI - run the bun2nix CLI with nothing but bunx bun2nix - see the NPM page.
  • Now supports more of bun's dependency types, including:
    • Files and symlinks
    • Tarballs
    • Git Dependencies

This work was done under Fleek. Please, check us out, especially if you are interested in Nix!

Updating

Below is a guide to all the breaking changes:

mkBunDerivation

  • mkBunDerivation has been renamed and moved from inputs.bun2nix.${system}.mkBunDerivation to inputs.bun2nix.packages.${system}.default.mkDerivation (or more simply bun2nix.mkDerivation)
  • The index attribute has been renamed to module to be inline with how it's defined in packages.json.
  • Instead of specifying bunNix directly, specify bunDeps using fetchBunDeps instead.
  • See mkDerivation for other new features and examples

mkBunNodeModules

  • mkBunNodeModules has been removed entirely in favor of fetchBunDeps to build a bun compatible cache.
  • Still need to add node_modules/ to an arbitrary derivation? Have a look at the new bun2nix hook, which provides a much nicer API.

writeBunScriptBin

  • This has been moved from inputs.bun2nix.lib.${system}.writeBunScriptBin to inputs.bun2nix.packages.${system}.default.writeBunScriptBin

New bun.nix schema

  • Now consumable by pkgs.callPackage and bun2nix.fetchBunDeps.
  • Don't forget to rewrite your bun.nix file by running bun2nix -o bun.nix before use!

1.5.2

17 Sep 11:22
72c0475

Choose a tag to compare

What's Changed

  • fix(nix): make nativeBuildInputs extend from arg by @25huizengek1 in #37
  • chore(nix)!: use lib.extendMkDerivation by @25huizengek1 in #38
  • Patch local script shebangs before build by @baileyluTCD in #39

New Contributors

Full Changelog: 1.5.1...1.5.2

1.5.1

23 Jun 12:37
85d692d

Choose a tag to compare

Breaking Change

This release contains a breaking change to 'mkBunNodeModules'. See #35 for more.

What's Changed

  • Better document the use of the bytecode flag by @baileyluTCD in #33
  • Add dontPatchShebangs option to mkBunNodeModules by @rome-user in #35

New Contributors

Full Changelog: 1.5.0...1.5.1

1.5.0

06 Jun 19:19
19721a5

Choose a tag to compare

What's Changed

  • fix: bun2nix fails in bun workspace by @mahmoudajawad in #10
  • Prevent creating urls for workspace references by @louisdutton in #25
  • Revert "fix: prevent generating urls for workspace references" by @louisdutton in #26
  • Infer pkg json info by @baileyluTCD in #27
  • Use flake self-reference in package.nix to improve Nix evaluation per… by @conneroisu in #28
  • Evaluate template packages in nix flake check by @baileyluTCD in #29
  • Add a bun script builder function by @baileyluTCD in #30

New Contributors

Full Changelog: 1.4.2...1.5.0

1.4.2

28 Apr 20:52
de4b7ca

Choose a tag to compare

What's Changed

  • fix(template): add nix build result to gitignore in nix templates by @gytic in #11
  • Add a check to keep template tag versions up to date automatically by @baileyluTCD in #13
  • Fix index.ts not resolving dependencies properly for templates by @baileyluTCD in #14
  • Force template auto-update on download by @baileyluTCD in #16
  • feat(template): add shell hook to sync bun dependencies by @gytic in #19
  • Prepare 1.4.2 release by @baileyluTCD in #18

New Contributors

  • @gytic made their first contribution in #11

Full Changelog: 1.4.1...1.4.2