Separation of concern for npm package maintenance #4217
oxbqkwwxfrqccwtg
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm assuming one is building a JSII project (without projen).
For package maintenance, there are multiple scripts located under the
scripts/
directory (e.g.clean.ts
,test.ts
, etc.). The scripts each have a (yargs
) CLI frontend, which's dependencies (yargs
,@types/yargs
) are maintained insidedevDependencies
.The scripts should be fully disregarded by JSII, whereas the
$.jsii.excludeTypescript
inpackage.json
contains an item forscripts/
. This however doesn't pan out, as JSII will still treat the@types/yargs
dependency as part of the JSII project itself, causing compiler errors.Typescript scripts (under
scripts/
) are being used as to have a cross-platform compatible build environment. Using PowerShell, or POSIX shell scripts, or other tools like GNU Makefile would definetly not cause these issues, however, as indicated, this would require a more complex setup of a build environment.Of course, bundling the dependencies resolves the tsc compiler issues, however from a package maintenance standpoint, this isn't ideal, since yargs isn't supposed to be part of the JSII project itself and just serves for support functionality of the npm package (repository).
We are interested in the view of an author of JSII on what idea regarding the separation of concerns for the described was originally. For now, we resorted to PowerShell scripts as this gives us a domain seperate from the JSII environment. We're not planning on using
projen
as a wrapper for package maintenance, we've evaluated the project and are not content with it.Beta Was this translation helpful? Give feedback.
All reactions