From 3596c8811ec24e189b228c33dcc45d4f67ed0927 Mon Sep 17 00:00:00 2001 From: MadCcc <1075746765@qq.com> Date: Mon, 11 Sep 2023 16:10:25 +0800 Subject: [PATCH] chore: ts script (#44761) * chore: ts script * chore: fix lint --- package.json | 2 +- scripts/{pre-publish-notice.js => pre-publish-notice.ts} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename scripts/{pre-publish-notice.js => pre-publish-notice.ts} (64%) diff --git a/package.json b/package.json index 0bbc4cf421..e293e28638 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "lint:md": "remark . -f -q", "lint:style": "tsx scripts/check-cssinjs.ts", "lint:script": "npm run component-changelog && eslint . --ext .js,.jsx,.ts,.tsx --cache", - "pre-publish": "npm run test-all -- --skip-build && node ./scripts/pre-publish-notice.js", + "pre-publish": "npm run test-all -- --skip-build && tsx ./scripts/pre-publish-notice.ts", "prettier": "prettier -c --write **/* --cache", "pub": "npm run version && npm run collect-token-statistic && npm run token-meta && antd-tools run pub", "biome:format": "biome format --write .", diff --git a/scripts/pre-publish-notice.js b/scripts/pre-publish-notice.ts similarity index 64% rename from scripts/pre-publish-notice.js rename to scripts/pre-publish-notice.ts index c40ab7cebc..8f113e12d9 100644 --- a/scripts/pre-publish-notice.js +++ b/scripts/pre-publish-notice.ts @@ -1,6 +1,6 @@ -const { Notification } = require('node-notifier'); +const { Notification: Notifier } = require('node-notifier'); -new Notification().notify({ +new Notifier().notify({ title: '✅ 准备发布到 npm', message: '测试用例执行完毕,快回来输入 npm 校验码了!', sound: 'Crystal',