arethetypeswrong / arethetypeswrong/arethetypeswrong.github.io

Suppress ignored failures

未关闭
#280 0 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
1.6k
派生
65
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先跟踪 attw 在使用 --profile esm-only 时如何格式化被忽略的解析结果的输出。当有关被忽略解析结果的消息被抑制,同时相关的未被忽略的分析结果和摘要仍然可见时,此更改即完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
cli
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
68/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。