[ENHANCEMENT] Publish package as standard JS modules
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, node.js
- Lĩnh vực
- tooling
Hướng nghiên cứu
Read the existing issue discussion and the related node-semver issue #498 before investigating the package's current CommonJS publication setup. Verify the chosen migration or dual-mode approach by testing the issue's browser import scenario; done means import semver from 'semver' works through a suitable import map without a build step.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
This package is currently published as CommonJS modules only. This makes it impossible to use in browsers and other environments that don't support Common JS, without a build step.
Expected Behavior
This should just work with a suitable import map:
import semver from 'semver';
This could be done as part of a migration to standard JS modules only, or a dual-mode package, possibly as part of https://github.com/npm/node-semver/issues/498
Steps To Reproduce
- In a browser
- With dev server that can rewrite bare module specifiers to URLs (such as
@web/dev-serverwith the--node-resolveflag) - Load a module script with
import semver from 'semver'; - See error...
Environment
- npm:
- Node:
- OS:
- platform: All browsers, Cloudflare Workers, more...
- Ngôn ngữ chính
- JavaScript
- Star
- 5.5k
- Fork
- 598
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
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 npm/node-semver
-
Bug Needs Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
npm/node-semver#908 ·
-
semver:major
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
npm/node-semver#108 · 6 bình luận ·
-
Bug Needs Triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 64/100
npm/node-semver#909 ·
-
Bug Needs Triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
npm/node-semver#906 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
npm/node-semver#904 ·
Tất cả issue của npm/node-semver
Issue tương tự
-
Mend: dependency security vulnerability untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
opensearch-project/security-dashboards-plugin#2543 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[quality] refresh-radar-reports.yml runs on ubuntu-latest while every other job pins ubuntu-24.04Đang mởagent/quality hive/hosted-available-lke648397-260827-5n31 quality testing
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
godotengine/godot-website#1432 ·
-
Add: Mooz RetroĐang mởchannels:add check:passed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày