feat: Remove pkg from expectedNpmVersionFailures by hacking dtslint #1130
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Aim to remove unneeded packages from
expectedNpmVersionFailures.txt
, by hacking current dtslint implementation to check whether or not target packages will emit"... can be removed from expectedNpmVersionFailures.txt in ..."
warning.Step 1. Add
packages/dtslint/src/check-package-in-expectedVersionFailures.ts
into DT-tools repo, and runpnpm build
. Note: Core logics are copied frompackages/dtslint/src/index.ts
. Hope they are correcly done :)Step 2. Add
update-expectedNpmVersionFailures-by-dtslint.js
into DT repo, and runnode ./update-expectedNpmVersionFailures-by-dtslint.js
. Note: Async network calls firing in length-50 batches may (or may not) be too aggressive. Use it with cautious if you need to.Then packages emitting warning
"... can be removed from expectedNpmVersionFailures.txt in ..."
will be removed fromexpectedNpmVersionFailures.txt
, as the warning suggests.It may be possible to integrate these scripts into DT(-tools), to set up regular job for updating
expectedNpmVersionFailures.txt
in DT-tools, but it will need DT(-tools)'s maintainers' comment on how to properly do so.