Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[ENHANCEMENT] Allow * prerelease versions for * version ranges.

オープン
#736 コメント 1 件 リアクション 3 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
javascript, node.js
領域
tooling

調査の方向性

Start by reviewing the semver parser behavior described in issue #510 and the npm RFC #397 context. Decide which wildcard prerelease semantics are intended for ranges such as 1..-*, then add focused coverage for parsing and matching; done means the behavior is specified and consistently tested.

索引モデルが issue の本文から書いたものです。

説明

Bug Needs Triage
Is there an existing issue for this?
  • I have searched the existing issues
Current Behavior

I came across the behaviour described in this issue: https://github.com/npm/node-semver/issues/510

The behaviour is that 1.x.x-whatever ranges as parsed, but the prerelease version is just ignored. I agree with the comment on that issue that something like 1.0.*-rc doesn't really make much sense and isn't terribly useful. Presumably the resolution to this problem is one of the following:

  • Fail to parse these ranges
  • Allow these ranges, and ONLY match versions with the exact prerelease
  • Allow these ranges and allow 1.x.x OR versions with the exact prerelease

However I do think that something like 1.*.*-* could serve a genuine purpose. Currently this version range does not parse.

Expected Behavior

For context, I was trying to find work-arounds for https://github.com/npm/rfcs/pull/397. This is an RFC to update NPM behaviour to make development of peer dependencies more convenient, so that we can satisfy a peer dependency range with a prerelease version if the host app explicitly specifies one.

In lieu of a happy resolution to the RFC, it would be useful to allow a peer dependency to signal that it is intended to accept pre-releases at the discretion of the importing package. And a 1.*.*-* style version range could satisfy this purpose.

Steps To Reproduce
  1. In this environment...
  2. With this config...
  3. Run '...'
  4. See error...
Environment
  • npm:
  • Node:
  • OS:
  • platform:
主要言語
JavaScript
スター
5.5k
フォーク
617
平均マージ
4日 23時間
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

npm/node-semver のほかの issue

npm/node-semver の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。