Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding noEmit: true is a breaking change and should be a major release version #29

Closed
adamdehaven opened this issue Jan 8, 2024 · 6 comments

Comments

@adamdehaven
Copy link

adamdehaven commented Jan 8, 2024

Adding noEmit: true in #26 should be considered a breaking change and bump the major version.

The comment added with the change, shown below, makes too many assumptions on when the tsconfig is extended and the behavior of the host application.

// Most non-library projects don't need to emit declarations.
// So we add this option by default to make the config more friendly to most users.

Even in the component libraries where we extend @vue/tsconfig/tsconfig.json, we have our own settings for exporting/generating types, etc. via flags that should not be overridden by this extendable configuration.

IMO this change should be reverted as it is too opinionated.

@adamdehaven
Copy link
Author

@sodatea can I get your thoughts on this?

@rijenkii
Copy link

Technically this library is still zerover, so any minor version bump could be breaking.

@adamdehaven
Copy link
Author

It's been 0.x for 3 years now, so I'd assume it would be considered stable; regardless of whether the version was actually ever bumped to 1.x

@sodatea
Copy link
Member

sodatea commented Jan 12, 2024

In practice, 0.4.0 -> 0.5.0 is considered a major release that can contain breaking changes.
https://github.com/npm/node-semver#caret-ranges-123-025-004

@sodatea
Copy link
Member

sodatea commented Jan 12, 2024

Agree that it is opinionated.

we have our own settings for exporting/generating types,

IMO that's the point of the defaults.
Those who are able to write their own settings would know how to deal with that option.
But many users don't care or don't know what each options do, and we need to provide a good-enough default for them.

@adamdehaven
Copy link
Author

This wasn't flagged as a major release, based on the commit message:

feat: turn on noEmit by default and add tsconfig.lib.json

I think the issue is that this change makes the assumption that the developer's use-case is a "non-library project."

This change makes it confusing for any developer that is new to Vue, using the standard configuration provided, to create a Vue component library without having to understand why their package isn't emitting the proper type declarations.

We can close the issue (and I really appreciate you taking a look).

Can I suggest the README be updated to explain the default noEmit option and the scenario in which a developer would want to override it?

@adamdehaven adamdehaven closed this as not planned Won't fix, can't repro, duplicate, stale Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants