arethetypeswrong / arethetypeswrong/arethetypeswrong.github.io

Report invalid `module` field in `package.json`

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

描述

Some packages define the top-level `module` field in `package.json`. Although it’s non-standard, bundlers use it. This can lead to differences between usage in the browser and Node.js, but it is not possible to add type definitions for it.

I think it would be useful to report the `module` field if it does not match the `import` condition in the `package.json` `exports` field nor the `main` field.

For example:

- [`monaco-editor`](https://github.com/microsoft/monaco-editor/blob/main/package.json#L34)
- [`vscode-json-languageservice`](https://github.com/microsoft/vscode-json-languageservice/blob/main/package.json#L7)
- [`vscode-uri`](https://github.com/microsoft/vscode-uri/blob/main/package.json#L8)
- [`whatwg-fetch`](https://github.com/JakeChampion/fetch/blob/master/package.json#L6)

贡献指南

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

调研方向

首先追踪 package.json 元数据的分析方式,重点关注这里描述的 module 字段、exports import condition 和 main 字段。完成的标准是报告 module 与这些字段不一致的包,列出的示例包可用于检查行为。

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

评估

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

把新 issue 发到你的邮箱

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