You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 in package.json contains an item for scripts/. 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.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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