Following the README for type safety prevents/breaks npm's `min-release-age` option

Đang mở
#728 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
javascript, typescript

Hướng nghiên cứu

Start with README lines 498-516 and reproduce the failure using the listed .npmrc setting and npm commands. Inspect how the documented type-support dependency is installed, and consider the issue done when users can retain that type support while npm install and npm clean-install succeed with min-release-age enabled.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Describe the bug

The docs describe in the README that to get type support through JSDoc, you can install a dev dep.

If you turn on npm 11.10's new min-release-age option (used to help against supply chain attacks), you then will not be able to npm install your dependencies, even after a successful npm update.

If you uninstall or don't have the dev dep mentioned in the README, then trying to install it gives that error anyways.

The error looks like:

npm error code 1
npm error git dep preparation failed
npm error command /usr/local/bin/node /usr/local/share/npm-global/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/home/node/.npm --prefer-offline=false --prefer-online=false --offline=false --before=2026-08-16T23:36:27.301Z --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm error Exit prior to config file resolving
npm error cause
npm error --min-release-age cannot be provided when using --before

To Reproduce
Steps to reproduce the behavior:

  1. Add min-release-age=1 to .npmrc
  2. `npm i -D @actions/github-script@github:actions/github-script
  3. npm clean-install
  4. See error above

Expected behavior
I would expect to be able to use npm's min-release-age option when only using types from this package.

Ngôn ngữ chính
TypeScript
Star
5k
Fork
586
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của actions/github-script

Tất cả issue của actions/github-script

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.