From cc472c016bead62ffecf18e58fffd9742910ed74 Mon Sep 17 00:00:00 2001 From: lisonge Date: Fri, 1 Dec 2023 11:18:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BD=BF=E7=94=A8=20"=20+=20JSON5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- pnpm-lock.yaml | 8 ++++---- src/components/SearchCard.vue | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index bc62298..f9bdc2b 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "./dist" ], "dependencies": { - "@gkd-kit/selector": "0.0.15", + "@gkd-kit/selector": "0.0.16", "@types/file-saver": "^2.0.5", "@types/fs-extra": "^11.0.1", "@types/node": "^20.5.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6a504f5..034ad45 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,8 +6,8 @@ settings: dependencies: '@gkd-kit/selector': - specifier: 0.0.15 - version: 0.0.15 + specifier: 0.0.16 + version: 0.0.16 '@types/file-saver': specifier: ^2.0.5 version: 2.0.5 @@ -1782,8 +1782,8 @@ packages: dev: false optional: true - /@gkd-kit/selector@0.0.15: - resolution: {integrity: sha512-fWFXWjfLUQ7SS9FUadEQVzq/QW/DDNAJZWJSBMRnTcHuZtS1bb0eMGS9aDa9t6hrp6YAnpoLYEkR10qzciyqTQ==} + /@gkd-kit/selector@0.0.16: + resolution: {integrity: sha512-I2/e2fYfgewaSMbkXDQz0leh35qr0XhwEsOUYjsNOQOwsg6BPnwCGwBuPVoK47TL/VmSj2NsNUCkN4fRZcvwYg==} dev: false /@iconify/types@2.0.0: diff --git a/src/components/SearchCard.vue b/src/components/SearchCard.vue index e885aa0..f5860b2 100644 --- a/src/components/SearchCard.vue +++ b/src/components/SearchCard.vue @@ -22,6 +22,7 @@ import { getNodeLabel } from '@/utils/node'; import { copy } from '@/utils/others'; import { githubJpgStorage, githubZipStorage } from '@/utils/storage'; import { githubUrlToSelfUrl } from '@/utils/url'; +import JSON5 from 'json5' const props = withDefaults( defineProps<{ @@ -126,7 +127,7 @@ const generateRules = errorTry(async (selector: Selector) => { ], }; - copy(JSON.stringify(rule, undefined, 2)); + copy(JSON5.stringify(rule, undefined, 2)); }); const enableSearchBySelector = shallowRef(true); const _1vw = window.innerWidth / 100;