Closed Radiergummi closed 11 months ago
These are used for formatting the output, and for describing input types for TypeScript users.
I think you misunderstood me: I am not advocating to remove prettier or the type stubs. Those packages are absolutely valid, but should be moved from the package dependencies
to devDependencies
, because they are only required when working on your package, but not when installing it as a dependency.
The way it currently is causes problems in other apps.
@Radiergummi prettier is exposed to consuming code, since it is used as part of the output formatting process. Similarly, the @types/...
are needed since the types JSONSchema4
and such are re-exported for use by consuming code.
@Radiergummi prettier is exposed to consuming code, since it is used as part of the output formatting process. Similarly, the
@types/...
are needed since the typesJSONSchema4
and such are re-exported for use by consuming code.
Well. That doesn't help too much if I cannot install the package in the first place; maybe they could somehow be made a peer dependency?
Your package appears to erroneously have some devDependencies in the dependencies array:
I'm pretty confident neither the
@types
stubs, nor prettier itself belong in the dependencies; I'm not sure about the rest, but they look legit.This is causing issues in downstream packages that depend on
json-schema-to-typescript
, where those packages are installed alongside application dependencies -- in my specific case, I'm using prettier 3, but TypeScript insists myConfig
interface has version 2.6, because it resolves the type to the one in@types/prettier
installed from this package:In conclusion: Could you move those dependencies to the devDependencies where they belong? That would be awesome. Thank you!