From 697aa699adb9f807ca7356d4831eccd1d2ed5932 Mon Sep 17 00:00:00 2001 From: Phan Shi Yu Date: Fri, 10 May 2024 14:48:43 +0800 Subject: [PATCH] fix: only generate json fixtures when fixtures.ts changes --- .lintstagedrc | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.lintstagedrc b/.lintstagedrc index 365b0b26..b794d936 100644 --- a/.lintstagedrc +++ b/.lintstagedrc @@ -1,4 +1,5 @@ { "src/4.0/types.ts": ["npm run generate-v4-json-schemas", "git add src/4.0/jsonSchemas/__generated__"], + "src/4.0/fixtures.ts": ["npm run generate-v4-fixtures", "git add test/fixtures/v4/__generated__"], "*.{js,ts}": "eslint --fix" } \ No newline at end of file diff --git a/package.json b/package.json index 64b16469..7766d925 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "generate-v4-fixtures": "npx ts-node scripts/generateV4JsonFixtures.ts", "generate-v4-json-schemas": "npx ts-node scripts/generateV4JsonSchemas.ts", "publish:schema": "./scripts/publishSchema.sh", - "postinstall": "node scripts/postInstall; npm run generate-v4-fixtures", + "postinstall": "node scripts/postInstall;", "prebuild": "node scripts/preBuild", "prepare": "husky install" },