From 8a06db0e8d2a4918816ec3e086b0641588b873d9 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Thu, 20 Oct 2022 10:30:32 +0900 Subject: [PATCH 1/3] feat: add clean-pkg-json --- .github/workflows/release.yml | 5 ++++- package.json | 4 +++- pnpm-lock.yaml | 7 +++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 98c654a..eb49602 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,10 @@ jobs: version: 7 run_install: true - - name: Test (pretest produces build) + - name: Build + run: pnpm build + + - name: Test run: pnpm test - name: Release diff --git a/package.json b/package.json index 2f1f185..646c69c 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,8 @@ "type-check": "tsc --noEmit", "test": "tsx tests", "test:dts": "tsd -f tests/cleye.test-d.ts", - "dev": "tsx watch --conditions=development tests" + "dev": "tsx watch --conditions=development tests", + "prepack": "pnpm build && clean-pkg-json" }, "simple-git-hooks": { "pre-commit": "pnpm lint-staged && pnpm test" @@ -58,6 +59,7 @@ "devDependencies": { "@pvtnbr/eslint-config": "^0.30.2", "@types/node": "^18.11.0", + "clean-pkg-json": "^1.2.0", "eslint": "^8.25.0", "kolorist": "^1.6.0", "lint-staged": "^13.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2665687..e0d8405 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3,6 +3,7 @@ lockfileVersion: 5.4 specifiers: '@pvtnbr/eslint-config': ^0.30.2 '@types/node': ^18.11.0 + clean-pkg-json: ^1.2.0 eslint: ^8.25.0 kolorist: ^1.6.0 lint-staged: ^13.0.3 @@ -23,6 +24,7 @@ dependencies: devDependencies: '@pvtnbr/eslint-config': 0.30.2_z4bbprzjrhnsfa24uvmcbu7f5q '@types/node': 18.11.0 + clean-pkg-json: 1.2.0 eslint: 8.25.0 kolorist: 1.6.0 lint-staged: 13.0.3 @@ -778,6 +780,11 @@ packages: resolution: {integrity: sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==} dev: true + /clean-pkg-json/1.2.0: + resolution: {integrity: sha512-QHBWWOtpSCv5nfMFKwyxn4WMvkYE0msxj5xiqejYGqYepWVrK7O/om1Vn6nSl/WPtYn8ge9YmSCbTi1Hp8k+Hg==} + hasBin: true + dev: true + /clean-regexp/1.0.0: resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} engines: {node: '>=4'} From f1b80b2db1f29e5dcc93f3ee343805cbed232993 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Thu, 20 Oct 2022 10:31:20 +0900 Subject: [PATCH 2/3] feat: add clean-pkg-json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 646c69c..1193b6b 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "prepack": "pnpm build && clean-pkg-json" }, "simple-git-hooks": { - "pre-commit": "pnpm lint-staged && pnpm test" + "pre-commit": "pnpm lint-staged && pnpm test --conditions=development" }, "lint-staged": { "*.ts": "pnpm lint" From 9cd8934e708fb9016a575936018a1b8696144a32 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Thu, 20 Oct 2022 10:32:22 +0900 Subject: [PATCH 3/3] feat: add clean-pkg-json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1193b6b..982df55 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "prepack": "pnpm build && clean-pkg-json" }, "simple-git-hooks": { - "pre-commit": "pnpm lint-staged && pnpm test --conditions=development" + "pre-commit": "pnpm lint-staged" }, "lint-staged": { "*.ts": "pnpm lint"