[FEATURE] Allow satisfies to throw errors
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, node.js
- 領域
- tooling
調査の方向性
Start with functions/satisfies.js and the referenced error location in classes/range.js. Reproduce the invalid range during npm install using the package.json example, then trace how satisfies handles it. Done means the invalid range is distinguishable from an invalid version and produces the requested range error.
索引モデルが issue の本文から書いたものです。
説明
What / Why
It would be nice to have
satisfiesthrow an error so that we may see that the range does not satisfy due to an invalid range as opposed to an invalid version. The range error that we'd like to see is here: https://github.com/npm/node-semver/blob/cb1ca1d5480a6c07c12ac31ba5f2071ed530c4ed/classes/range.js#L41
When
- When verifying engine versions during
npm install - When adding a dependency to package.json during
npm install
Where
- npm/node-semver
How
Current Behavior
Create an empty project with the following package.json:
{
"name": "foo",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"engines": {
"node": ">=6.5.0 !15"
},
"engineStrict": true
}
Run npm install and you get:
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '>=6.5.0 !15' },
npm WARN EBADENGINE current: { node: 'v16.11.1', npm: '8.0.0' }
npm WARN EBADENGINE }
up to date, audited 1 package in 414ms
found 0 vulnerabilities
Expected Behavior
Create an empty project with the following package.json:
{
"name": "foo",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"engines": {
"node": ">=6.5.0 !15"
},
"engineStrict": true
}
Run npm install and ideally get something like:
npm WARN EBADENGINE Invalid SemVer Range: >=6.5.0 !15
up to date, audited 1 package in 414ms
found 0 vulnerabilities
Who
- n/a
References
- n/a
- 主要言語
- JavaScript
- スター
- 5.5k
- フォーク
- 622
- 平均マージ
- 4日 23時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
npm/node-semver のほかの issue
-
[BUG] minVersion returns 0.0.0 when a 0.0.0 prerelease is the true minimum対応中かも @thisisshivamtiwari が 1 日前に担当しました。 オープンBug Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
npm/node-semver#934 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
[BUG] new Range(comparator).test() throws TypeError for a prerelease version対応中かも @Boulea7 が 28 日前に担当しました。 オープンBug Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
npm/node-semver#908 ·
メンテナーはふだん 4 日以内に返信
-
semver:major
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
npm/node-semver#108 · コメント 6 件 ·
メンテナーはふだん 4 日以内に返信
-
[BUG] intersects() still returns true for an empty range against "*" (follow-up to #521)対応中かも @json-open-source が 28 日前に担当しました。 オープンBug Needs Triage
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
npm/node-semver#909 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
[BUG] `* || 1.2.3-alpha` won't match `1.2.3-alpha` (when includePrerelease = false)対応中かも @x0Lazarus が 34 日前に担当しました。 オープンBug Needs Triage
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
npm/node-semver#906 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
npm/node-semver の issue をすべて見る
似ている issue
-
[guide] AGENTS.md claims the coverage gate, e2e and full lint run on every PR after ADR 0011 focused validation対応中かも @hivecommons-hive が今日担当しました。 オープンagent/guide documentation hive/claimed-by-guide stage/040-covered-by-pr
難易度 2/5 1〜3時間 初心者へのやさしさ 81/100
cncf/endusers#2006 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
check:passed feeds:add
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
all-contributors/cli#587 ·
メンテナーはふだん 1 日以内に返信
-
RGAA5
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 8 日以内に返信
-
feedback simulation workshop
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
githubnext/gh-aw-workshop#5157 ·
メンテナーはふだん 1 日以内に返信