Skip to content

turbo boundaries considers import { $, which } from 'bun' an import from type-only package, while it's not #11857

@nikelborm

Description

@nikelborm

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://github.com/nikelborm/turborepo-bun-boundaries-repro

Which canary version will you have in your reproduction?

2.8.8-canary.8

Environment information

• turbo 2.8.8-canary.8
CLI:
   Version: 2.8.8-canary.8
   Path to executable: /tmp/tmp.h3VTUsXhPq/my-turborepo/node_modules/.bun/turbo-linux-64@2.8.8-canary.8/node_modules/turbo-linux-64/bin/turbo
   Daemon status: Running
   Package manager: bun

Platform:
   Architecture: x86_64
   Operating system: linux
   WSL: false
   Available memory (MB): 5227
   Available CPU cores: 16

Environment:
   CI: None
   Terminal (TERM): xterm-kitty
   Terminal program (TERM_PROGRAM): unknown
   Terminal program version (TERM_PROGRAM_VERSION): unknown
   Shell (SHELL): /bin/bash
   stdin: false

Expected behavior

import { $, which } from 'bun'

console.log((await $`echo hello world`.quiet()).text());

A file like this doesn't produce errors.

Actual behavior

$ bunx turbo boundaries

• turbo 2.8.8
Checking packages...
  × importing from a type declaration package, but import is not declared as a type-only import
   ╭─[/tmp/tmp.h3VTUsXhPq/my-turborepo/packages/pkg-a/index.ts:1:1]
 1 │ import { $, which } from 'bun'
   · ───────────────┬──────────────
   ·                ╰── package imported here
 2 │ 
   ╰────

Checked 1 files in 1 packages, 1 issue found

To Reproduce

git clone https://github.com/nikelborm/turborepo-bun-boundaries-repro.git
cd turborepo-bun-boundaries-repro
bun i
bunx turbo boundaries

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions