Closed Xyaren closed 2 years ago
Curious, what is the value proposition for enforcing this in CI?
I'd accept a PR for this though, not sure whether --check
or --dry=fail
is preferable; the former makes more sense from an API perspective but it also results in an implicit --dry
. 🤔
This basically enforces the type definitions to be present at all times within the package.json.
Scenario: One developer forgets to "typesync" after adding a new dependency, pushes.
The next developer pulls the changes, and then executes npm install & typesync
.
The expectation would be, that he does not have any outstanding files, that he has to commit.
Adding a step to the CI, could enforce a typesynced-package.json at all times
Great idea! The npm-check-updates
package has a similar feature called -e, --errorLevel <n>
. Being able to run typesync in a CI environment is very useful.
@jeffijoe We proposed a PR for the --dry=fail
approach. 👍
Released in 0.9 👍
Thank you @jeffijoe 👍
As the title says. I would like to add this to a ci "linting" pipeline, therefore setting the rturn code to something other than 0 if there should be new typings added or removed would be nice.
I would suggest something like
typesync --check
which behaves like--dry
but alters the return code. or you paramerize the dry parameter liketypesync --dry=fail
Thank you!