From 7d978aa02d063709223bf357821bf66a611b1870 Mon Sep 17 00:00:00 2001 From: baozouai Date: Fri, 21 Apr 2023 17:09:34 +0800 Subject: [PATCH] chore: vitest ci --- package.json | 62 +++++++++++++++++++++++++++----------------------- pnpm-lock.yaml | 16 +++++++++++++ 2 files changed, 49 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index c1f3f01..ce2cd0d 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,18 @@ { "name": "babel-plugin-enum-to-object", "version": "0.1.0", - "author": "baozouai ", + "packageManager": "pnpm@8.3.1", "description": "transform enum to object for better tree shaking", + "author": "baozouai ", + "license": "MIT", "homepage": "https://github.com/baozouai/babel-plugin-enum-to-object", - "main": "dist/babel-plugin-enum-to-object.js", - "types": "dist/babel-plugin-enum-to-object.d.ts", - "files": [ - "dist/" - ], + "repository": { + "type": "git", + "url": "https://github.com/baozouai/babel-plugin-enum-to-object.git" + }, + "bugs": { + "url": "https://github.com/baozouai/babel-plugin-enum-to-object/issues" + }, "keywords": [ "webpack", "plugin", @@ -17,6 +21,14 @@ "node", "reduce enum" ], + "main": "dist/babel-plugin-enum-to-object.js", + "types": "dist/babel-plugin-enum-to-object.d.ts", + "files": [ + "dist/" + ], + "engines": { + "node": ">=16.14.0" + }, "scripts": { "clean": "rm -rf dist", "lint": "eslint --cache --fix", @@ -25,25 +37,10 @@ "release": "npm run clean && npm run build && npm publish", "prepare": "husky install" }, - "husky": { - "hooks": { - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "./src/**/*.{ts,js}": [ - "npm run lint" - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/baozouai/babel-plugin-enum-to-object.git" - }, - "bugs": { - "url": "https://github.com/baozouai/babel-plugin-enum-to-object/issues" + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-typescript": "^7.21.4" }, - "license": "MIT", "devDependencies": { "@antfu/eslint-config": "^0.36.0", "@babel/core": "^7.21.4", @@ -59,9 +56,17 @@ "eslint": "^8.35.0", "husky": "^8.0.3", "lint-staged": "^13.1.2", + "pnpm": "^8.3.1", + "simple-git-hooks": "^2.8.1", "typescript": "^4.9.5", "vitest": "^0.30.1" }, + "husky": { + "hooks": { + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", + "pre-commit": "lint-staged" + } + }, "publishConfig": { "registry": "https://registry.npmjs.org", "access": "public" @@ -71,11 +76,10 @@ "path": "node_modules/cz-conventional-changelog" } }, - "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-typescript": "^7.21.4" + "simple-git-hooks": { + "pre-commit": "pnpm lint-staged" }, - "engines": { - "node": ">=16.14.0" + "lint-staged": { + "*": "eslint --fix" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2242f99..2762465 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,6 +17,8 @@ specifiers: eslint: ^8.35.0 husky: ^8.0.3 lint-staged: ^13.1.2 + pnpm: ^8.3.1 + simple-git-hooks: ^2.8.1 typescript: ^4.9.5 vitest: ^0.30.1 @@ -39,6 +41,8 @@ devDependencies: eslint: 8.38.0 husky: 8.0.3 lint-staged: 13.2.1 + pnpm: 8.3.1 + simple-git-hooks: 2.8.1 typescript: 4.9.5 vitest: 0.30.1 @@ -4841,6 +4845,12 @@ packages: engines: {node: '>=4'} dev: true + /pnpm/8.3.1: + resolution: {integrity: sha512-0mT2ZAv08J3nz8xUdWhRW88GE89IWgPo/xZhb6acQXK2+aCikl7kT7Bg31ZcnJqOrwYXSed68xjLd/ZoSnBR8w==} + engines: {node: '>=16.14'} + hasBin: true + dev: true + /postcss-selector-parser/6.0.11: resolution: {integrity: sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==} engines: {node: '>=4'} @@ -5158,6 +5168,12 @@ packages: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} dev: true + /simple-git-hooks/2.8.1: + resolution: {integrity: sha512-DYpcVR1AGtSfFUNzlBdHrQGPsOhuuEJ/FkmPOOlFysP60AHd3nsEpkGq/QEOdtUyT1Qhk7w9oLmFoMG+75BDog==} + hasBin: true + requiresBuild: true + dev: true + /slash/3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'}