cube-js / cube-js/cube

Publish Type Only NPM Packages

Open
#11,506 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
20.8k
Forks
2.1k
Avg merge
1d 10h
Merged PRs (30d)
203

Description

**Is your feature request related to a problem? Please describe.**
My team was depending on `@cubejs-backend/server-core` just for the `CreateOptions` + `LoggerFn` types for defining our cube config - but we had to stop doing this because of the massive amount of dependencies that package pulls in with it, as it was flagging a ton of unnecessary duplicate CVEs via our scanners.

**Describe the solution you'd like**
I presume you don't expect people to be depending on this package anymore now that the docker images are the only supported way to run Cube Core, but you still support defining configs in JS, right? With that in mind, would you be open to the idea of publishing types (even just the core server ones - or maybe it'd be more useful generally if it also included client/agnostic types too) as it's own NPM package with no/minimal dependencies?

**Describe alternatives you've considered**
We've currently copied over the minimal types we need for the config we have, but this is brittle because it means the types aren't as likely to stay in sync with changes you make to Cube Core between versions.

**Additional context**
N/A

Contributor guide

Open the contributing guide

Research direction

Start by locating the current @cubejs-backend/server-core exports for CreateOptions and LoggerFn and reviewing the package's dependency graph. Define the smallest supported type-package scope and verify that the published package keeps those types synchronized while avoiding unnecessary runtime dependencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, typescript
Domain
developer-experience, release
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.