Upgrade nanoid and openid-client
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, node.js
- Lĩnh vực
- backend
Hướng nghiên cứu
Bắt đầu với app/lib/authn-oidc.js và kiểm tra cách openid-client được tải, sau đó xem xét các phiên bản dependency bằng npm list. Xác định liệu có thể nâng cấp cả hai dependency trong khi dịch vụ vẫn là CommonJS hay cần các phương án thay thế phù hợp. Được xem là hoàn tất khi các phiên bản được chọn hoạt động mà không có ERR_REQUIRE_ESM và vẫn giữ nguyên hành vi xác thực hiện tại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The latest releases of these two dependencies default to ECMAScript syntax rather than CommonJS. We're not using a transpiler like Babel to handle converting between different JS flavors, and ideally we shouldn't have to until we're ready for a TS migration.
Figure out a way to upgrade these dependencies while still using CommonJS, or find suitable alternatives. nanoid specifies a solution for CommonJS (link below). I'm not sure about openid-client.
NanoID
After version 3, CommonJS support is mostly dropped in favor of ESM:
https://github.com/ai/nanoid?tab=readme-ov-file#commonjs
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/ssica/Development/attack/workbench/attack-workbench-rest-api/node_modules/openid-client/build/index.js from /Users/ssica/Development/attack/workbench/attack-workbench-rest-api/app/lib/authn-oidc.js not supported.
Instead change the require of index.js in /Users/ssica/Development/attack/workbench/attack-workbench-rest-api/app/lib/authn-oidc.js to a dynamic import() which is available in all CommonJS modules.
For now, downgraded back to 3x:
❯ npm list | grep nanoid
├── [email protected]
❯ npm install nanoid@3
changed 1 package, and audited 654 packages in 667ms
89 packages are looking for funding
run `npm fund` for details
3 vulnerabilities (2 low, 1 high)
To address all issues, run:
npm audit fix
Run `npm audit` for details.
❯ npm list | grep nanoid
├── [email protected]
OpenID-Client
Same thing with openid-client -- v6 moves to ESM:
Downgraded:
❯ npm list | grep openid
├── [email protected]
❯ npm install openid-client@5
added 2 packages, removed 2 packages, changed 1 package, and audited 654 packages in 968ms
87 packages are looking for funding
run `npm fund` for details
3 vulnerabilities (2 low, 1 high)
To address all issues, run:
npm audit fix
Run `npm audit` for details.
❯ npm list | grep openid
├── [email protected]
- Ngôn ngữ chính
- JavaScript
- Star
- 56
- Fork
- 18
- Merge trung bình
- 21 giờ 30 phút
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mitre-attack/attack-workbench-rest-api
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
Add ADM validation bypass for server-controlled fields on non-compliant objectsCó thể đã có người làm @seansica đã nhận 8 ngày trước. Đang mở
mitre-attack/attack-workbench-rest-api#517 · 1 người được giao ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
mitre-attack/attack-workbench-rest-api#512 · 1 bình luận ·
Tất cả issue của mitre-attack/attack-workbench-rest-api
Issue tương tự
-
[Bug]: fileUploadMatrix.test.ts URL case does a real DNS lookup and fails offlineCó thể đã có người làm @r2jaff đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ComposioHQ/composio#5054 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
W3cĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
web-platform-tests/wpt#64017 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
routine:ci-review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
harlan-zw/unlighthouse#456 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
beginner enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
philaconvalley/website#217 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] xiaohongshu search_input_not_available on accounts with new AI-search layout (gray rollout)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày