aboutcode-org / aboutcode-org/scancode-toolkit

.mjs.map are JS mapfiles

Đang mở
#3,951 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
2.6k
Fork
791
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
5

Mô tả

In this npm:
- https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-4.2.67.tgz

.. we fail to scan this (large, 5MB) map file:
- pdf.worker.mjs.map

We should treat it as a map file, and hence extract it content in map smaller files

.mjs and .cjs files are JavaScript as explained in https://stackoverflow.com/a/57492606/302521

>
> Node.js's original module system is CommonJs (which uses require and module.exports).
>
> Since Node.js was created, the ECMAScript module system (which uses import and export) has become standard and Node.js has added support for it.
>
> Node.js will treat .cjs files as CommonJS modules and .mjs files as ECMAScript modules. It will treat .js files as whatever the default module system for the project is (which is CommonJS unless package.json says "type": "module",).

See also:
- https://nodejs.org/docs/latest/api/modules.html
- https://nodejs.org/docs/latest/api/esm.html

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

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

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.