Skip to content

[Request] Bundling dependencies? #356

@hyperz111

Description

@hyperz111

Is your feature request related to a problem? Please describe.

sisteransi and picocolors add dependency trees.

Describe the solution you'd like

Bundling sisteransi and picocolors in build process.

In @clack/core:

{
  //...
- "dependencies": {
-   "picocolors": "^1.0.0",
-   "sisteransi": "^1.0.5"
- },
  "devDependencies": {
+   "picocolors": "^1.0.0",
+   "sisteransi": "^1.0.5",
    "vitest": "^3.1.1",
    "wrap-ansi": "^8.1.0"
  }
}

In @clack/prompts:

{
  //...
  "dependencies": {
    "@clack/core": "workspace:*",
-   "picocolors": "^1.0.0",
-   "sisteransi": "^1.0.5"
  },
  "devDependencies": {
    "is-unicode-supported": "^1.3.0",
    "memfs": "^4.17.1",
+   "picocolors": "^1.0.0",
+   "sisteransi": "^1.0.5"
    "vitest": "^3.1.1",
    "vitest-ansi-serializer": "^0.1.2"
  }
}

And run build command:

pnpm build

Maybe you have a question.

But sisteransi and picocolors is CommonJS and output is ESM, Is this okay?

Yes, this is okay. Because sisteransi and picocolors doesn't using any module.
For picocolors, this is using global object to do color support checks.

Describe alternatives you've considered

N/A

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions