Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

@typescript/ata JSR registry support

Đang mở
#3,202 3 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ó
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
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
tooling

Hướng nghiên cứu

Bắt đầu bằng cách xem xét @typescript/ata và cách hiện tại nó phân giải các import thông qua jsdelivr. So sánh API metadata của JSR với các tarball tương thích của npm, sử dụng các ví dụ import của Deno và Node trong issue làm yêu cầu. Được xem là hoàn tất khi đã thống nhất và triển khai một cách tiếp cận rõ ràng cho việc import JSR và phân giải tệp cho Monaco.

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

Mô tả

I understand this is not a critical issue. I've already tried to make some changes and open a PR but I think the issue might need some more thought put in.

I was trying to figure out a way to be able to allow imports of JSR packages in the monaco editor.

@typescript/ata relies on jsdelivr so the JSR packages aren't available there.

Issues I've encountered
1. Not clear how imports should work. In Deno it's possible to do it like this:
import { something } from 'jsr:@scope/package';

For Node, (https://jsr.io/docs/npm-compatibility), it's necessary to add a new registry https://npm.jsr.io/ and the name of the package gets transformed to

import {} from '@jsr/scope__package'

or packages.json can be updated like this:

 // package.json
 {
   "type": "module",
   "dependencies": {
-    "@jsr/luca__cases": "1"
+    "@luca/cases": "npm:@jsr/luca__cases@1"
   }
 }
2. Where to import the files from

Initially I tried querying jsr.io directly: https://jsr.io/@luca/flag/meta.json
based on https://jsr.io/docs/api

Then I figured it'd be better to use the npm compatibility layer so I get well formed ESM instead of Typescript.
I've used things like https://npm.jsr.io/@jsr/tscu__dependent

The issue now is that I don't get access to specific files, but to a tarball of a specific version.


At this point it's not clear what solution should be correct.
I figured maybe I'll open a discussion on this.

Ngôn ngữ chính
TypeScript
Star
2.6k
Fork
1.5k
Merge trung bình
2 ngày 12 giờ
Pull request đã merge (30 ngày)
8

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 microsoft/TypeScript-Website

Tất cả issue của microsoft/TypeScript-Website

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.