From de1a73a6d6fa30bc71a352f9cb0529c90be04392 Mon Sep 17 00:00:00 2001 From: lijianan <574980606@qq.com> Date: Fri, 28 Apr 2023 15:26:09 +0800 Subject: [PATCH] chore: Migrate CJS to ESM (#42055) --- AUTHORS.txt | 46 ++++++++++++++++++- package.json | 2 +- ...enerate-authors.js => generate-authors.ts} | 8 ++-- 3 files changed, 49 insertions(+), 7 deletions(-) rename scripts/{generate-authors.js => generate-authors.ts} (85%) diff --git a/AUTHORS.txt b/AUTHORS.txt index 7552b7e26f..999f650620 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -45,6 +45,7 @@ Alfred Qiu Ali Zhdanov AliRezaBeigy Aliaksandr +Alina Andrieieva Alireza Alvin Abia Aminul Islam @@ -56,6 +57,7 @@ Anas Tawfeek Andre Perunicic Andre Zyczkowski Andrea Blanco +Andrew Blakey Andrew Horn Andrew Murray Andrew Shearer @@ -63,6 +65,7 @@ Andrey G Andrzej Dybionka André Andrés +AndyJin Ankit Babbar Antee Aobo Yang @@ -144,6 +147,7 @@ Cheng Liu Chenjia Chiciuc Nicușor Chikara Chan +Chinnawat Chimdee Chris Frisina Chris Kelly Chris Young @@ -152,6 +156,7 @@ Christian Fleschhut Christian Vadalà Christophe Hurpeau Christopher Deutsch +ChuTao Zhang Chuang Yu Chuck Chuns Chen @@ -199,6 +204,7 @@ Debiancc DengYun Denis Dennis Chen +Denys Halenok Derrick Di Wu DiamondYuan @@ -209,6 +215,7 @@ Dimitri Mitropoulos Dmitriy Dmitriy Mironov Dmitry Bolotin +Dmitry Cherendieiev Dmitry Gladkikh Dmitry Guryev Dmitry Manannikov @@ -222,6 +229,7 @@ Douglas Mason Dreamcreative Dunqing Dunqing <1247748612@qq.com> +Duy Pham Dzmitry Yarmoshkin Eager <1226393396@qq.com> Eber Rodrigues @@ -418,6 +426,7 @@ Jiawei Huang Jichao Zhong Jiehui Jieraaa <842533841@qq.com> +Jimmy <1064425721@qq.com> Jin ZHANG JinXin Jing Ma @@ -495,6 +504,7 @@ Kimmo Saari KingxBeta Kirill Alexander Khalitov Kirill Stiopin +Kiyan Knacktus Knut Olav Bøhmer Kodai Nakamura @@ -502,6 +512,7 @@ Kol Chen <857137918@qq.com> Konrad Machlowski Krishna Dubagunta Krishna Singh +KuangPengfei <1633397286@qq.com> Kuitos Kurt Furbush Kyle Kelley @@ -527,6 +538,7 @@ LiPinghai LilyWakana <873435892@qq.com> Liming Jin Liming Jin +Lioness100 Liron Lavy Liu Bowen Liu Ya @@ -569,6 +581,7 @@ Marcus Stenbeck Marius Ileana Mars Wong Marshall Chen +Martijn Martin Cermak Martin Litvaj Martin Novák @@ -631,6 +644,7 @@ Mr.jiangzhiguo Ms. Wang <767074895@qq.com> MuYu Muhammad Sameer +Muhammad Sohaib Raza Mykyta Velykanov Mário Gonçalves Nariman Movaffaghi @@ -694,6 +708,7 @@ Peter Berg Peter Gassner Phanupong Janthapoon Philip Oliver +PhosphorusP <1309396166@qq.com> Phyllis Picsong <312465087@qq.com> Pierre @@ -716,7 +731,9 @@ QingLance Qingrong Ke QoVoQ <674263588@qq.com> Radomir Skrzepij +Rafael Carvalho Rafael Cosman +Rafael Martins Rahul Gurung Rain120 <1085131904@qq.com> Rainy @@ -738,11 +755,14 @@ Ricardo Morais Ricardo Raphael Joson Richard D. Worth Rick Zhou +Ritesh Makan +Riyad Elberkawy Robert Wilkinson Robin Pokorny Rodrigo Ehlers Rohan Bagchi Rohan Malhotra +Roman Soroka <40a90@mail.ru> Ron Šmeral Rongjian Zhang Rrrandom @@ -800,6 +820,7 @@ Simo Aleksandrov Simon Simon Altschuler Simon Knott +Simón Posada Fishman Siou Sivaraj SkyAo @@ -813,6 +834,7 @@ South <1275093225@qq.com> Spencer Stanley Thijssen Stanley Thijssen +Star Stef Schenkelaars Stephen Esser Stevche Radevski @@ -825,6 +847,7 @@ Sunny Luo Sven Efftinge Svyatoslav SyMind +Sylvain Boulade SylvanasGone <397009765@qq.com> TTC <345866517@qq.com> TangLL @@ -839,6 +862,7 @@ Teng YANG Teng YANG Tengjiao Cai Terence +The 1975 The Rock Themi Tsiotas von Pfaler Theo Satloff <1golfball@gmail.com> @@ -947,6 +971,7 @@ YuChao Liang YuTao Yuan <1076849402@qq.com> Yuhang Liu <644186735@qq.com> +Yuiai01 Yuki Zhang Yulia Maximova Yunfly <120562638@qq.com> @@ -954,6 +979,7 @@ Yunhwan Logan Na Yunus EŞ Yunwoo Ji Yuri Pirola +Yurii Brusentsov Yury Kozyrev Yusuke Ito Yuwei Ba @@ -981,10 +1007,12 @@ Zhongjan ZhouZhen <503633021@qq.com> Zhuo Chen Ziluo +ZivHe Zohaib Ijaz Zzzen <843968788@qq.com> _XiaoTian aLIEzsss4 <15624958088@163.com> +aaarichter aashutoshrathi acfasj adam @@ -1120,6 +1148,7 @@ hebingchang hehe hehe hello-chinese <841030329@qq.com> +helloqian12138 henryv0 hi-caicai hicrystal <295247343@qq.com> @@ -1138,6 +1167,7 @@ ibrahim velinov imosapatryk int2d iojichervo +iola1999 ioldfish iorikingdom isaced @@ -1185,6 +1215,7 @@ kristof0425 kuang kun sam lalalazero +lamvananh leadream <857098475@qq.com> lehug leijingdao @@ -1221,9 +1252,11 @@ luyiming lvren lxnxbnq lyhper +lyn <76365499@qq.com> lyon.han mArker <252133226@qq.com> maks +maomao <1714487678@qq.com> maximest-pierre melchior voidwolf memoryza @@ -1269,6 +1302,7 @@ pizn plainnany popomore prettyboyweiwei <523141385@qq.com> +puxiao qianbin <1797661770@qq.com> qiaojie <1454763497@qq.com> qiqiboy @@ -1339,7 +1373,8 @@ undefined unknown unknown ustccjw <317713370@qq.com> -vagusX +vaakian X +vagusx valleykid vaytsel veveue @@ -1364,6 +1399,7 @@ wangxingkang wangxueliang wanli warmhug +weited wendellhu wenhong whinc @@ -1384,6 +1420,7 @@ xiaoxintang <15707971810@163.com> xiejiahe xilihuasi <2857818553@qq.com> xinhui.zxh +xliez xrkffgg xuqiang xyb <576420147@qq.com> @@ -1412,6 +1449,7 @@ yui <1151815317@qq.com> yykoypj <601924094@qq.com> z zack +zahgboat <583077757@qq.com> zefeng zelongc zerob4wl @@ -1487,6 +1525,7 @@ zz <2418184580@qq.com> 尾宿君 山客 崔宏森 <948346354@qq.com> +左耳咚 <1004714132@qq.com> 广彬-梁 <326741518@qq.com> 庄天翼 廖应龙 @@ -1524,6 +1563,7 @@ zz <2418184580@qq.com> 竹尔 米老朱 精武陈真 <546369005@qq.com> +红果汁 约修亚 <510448079@qq.com> 翁润雨 <593110501@qq.com> 臧甲彬 fadeaway <498497303@qq.com> @@ -1536,6 +1576,7 @@ zz <2418184580@qq.com> 蔡伦 薛定谔的猫 薛定谔的猫 +藤原托漆 <18826255448@163.com> 行冥 <571748236@qq.com> 诸岳 诸岳 @@ -1547,6 +1588,7 @@ zz <2418184580@qq.com> 迷渡 郑国庆 郑旭 <332171564@qq.com> +野迂迂 闲耘™ 陆离 陈帅 @@ -1567,4 +1609,4 @@ zz <2418184580@qq.com> 黄斌 黑雨 龙风 <455947455@qq.com> -龚方闻 +龚方闻 \ No newline at end of file diff --git a/package.json b/package.json index ba9cea893a..f540af6373 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "scripts": { "prepare": "husky install", "api-collection": "antd-tools run api-collection", - "authors": "node ./scripts/generate-authors", + "authors": "ts-node --esm --project tsconfig.node.json scripts/generate-authors.ts", "build": "npm run compile && NODE_OPTIONS='--max-old-space-size=4096' npm run dist", "size-limit": "size-limit", "check-commit": "node ./scripts/check-commit", diff --git a/scripts/generate-authors.js b/scripts/generate-authors.ts similarity index 85% rename from scripts/generate-authors.js rename to scripts/generate-authors.ts index 382dcc7b51..6cd602f524 100644 --- a/scripts/generate-authors.js +++ b/scripts/generate-authors.ts @@ -1,7 +1,7 @@ -const path = require('path'); -const fs = require('fs'); -const simpleGit = require('simple-git'); -const _ = require('lodash'); +import fs from 'fs'; +import _ from 'lodash'; +import path from 'path'; +import simpleGit from 'simple-git'; const cwd = process.cwd(); const git = simpleGit(cwd);