arethetypeswrong / arethetypeswrong/arethetypeswrong.github.io
Suppress ignored failures
- Dominant language
- TypeScript
- Stars
- 1.6k
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
I'm running `attw` with `--profile esm-only`. I get a lot of noisy output like
```
@cerbos/core v0.31.0
(ignoring resolutions: 'node10', 'node16-cjs')
(ignored per resolution) π Import failed to resolve to type declarations or JavaScript files. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/NoResolution.md
(ignored per resolution) β οΈ A require call resolved to an ESM JavaScript file, which is an error in Node and some bundlers. CommonJS consumers will need to use a dynamic import. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/CJSResolvesToESM.md
βββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββ
β β "@cerbos/core" β "@cerbos/core/~internal" β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββ€
β node16 (from ESM) β π’ (ESM) β π’ (ESM) β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββ€
β bundler β π’ β π’ β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββ€
β node10 β (ignored) π Resolution failed β (ignored) π Resolution failed β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββ€
β node16 (from CJS) β (ignored) β οΈ ESM (dynamic import only) β (ignored) β οΈ ESM (dynamic import only) β
βββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββ
```
It'd be nice to suppress the output about the ignored resolutions - I've explicitly indicated that the package is ESM-only by specifying `--profile` and so I don't need to know about them.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how attw formats output for ignored resolutions when using --profile esm-only. The change is done when messages about ignored resolutions are suppressed while the relevant non-ignored analysis results and summary remain visible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100