repos / neovimcraft

website that makes it easy to find neovim plugins
git clone https://github.com/neurosnap/neovimcraft.git

commit
1332855
parent
e8ebb9f
author
Eric Bower
date
2021-08-03 11:49:49 +0000 UTC
progress
4 files changed,  +92, -81
M package.json
+6, -6
 1@@ -21,10 +21,10 @@
 2   },
 3   "devDependencies": {
 4     "@sveltejs/adapter-static": "^1.0.0-next.13",
 5-    "@sveltejs/kit": "next",
 6+    "@sveltejs/kit": "^1.0.0-next.139",
 7     "@types/marked": "^2.0.4",
 8-    "@types/node": "^16.3.3",
 9-    "@types/node-fetch": "^2.5.11",
10+    "@types/node": "^16.4.10",
11+    "@types/node-fetch": "^2.5.12",
12     "@types/prettier": "^2.3.2",
13     "@typescript-eslint/eslint-plugin": "^4.19.0",
14     "@typescript-eslint/parser": "^4.19.0",
15@@ -39,10 +39,10 @@
16     "prettier": "~2.2.1",
17     "prettier-plugin-svelte": "^2.2.0",
18     "query-string": "^7.0.1",
19-    "svelte": "^3.34.0",
20-    "svelte-check": "^2.0.0",
21+    "svelte": "3.34.0",
22+    "svelte-check": "2.0.0",
23     "svelte-preprocess": "^4.0.0",
24-    "ts-node": "^10.0.0",
25+    "ts-node": "^10.1.0",
26     "tslib": "^2.0.0",
27     "typescript": "^4.0.0"
28   },
M src/routes/index.svelte
+11, -18
 1@@ -17,7 +17,6 @@
 2 </script>
 3 
 4 <script lang="ts">
 5-  import qs from 'query-string';
 6   import { goto } from '$app/navigation';
 7   import { page } from '$app/stores';
 8   import type { Plugin, Tag, TagMap } from '$lib/types';
 9@@ -37,28 +36,19 @@
10   };
11 
12   function onSearch(curSearch: string) {
13+    if (typeof window === 'undefined') return;
14     if (curSearch) {
15-      const query = qs.parseUrl(window.location.search);
16-      const s = encodeURIComponent(curSearch);
17-      query.query.search = s;
18-      goto(`/${qs.stringifyUrl(query)}`, {
19+      goto(`/?search=${curSearch}`, {
20         replaceState: true,
21-        noscroll: true,
22         keepfocus: true,
23       });
24     } else {
25-      const query = qs.parseUrl(window.location.search);
26-      delete query.query.search;
27-      goto(`/${qs.stringifyUrl(query)}`, { replaceState: true, noscroll: true, keepfocus: true });
28+      goto('/', { replaceState: true, keepfocus: true });
29     }
30   }
31 
32   function clearSearch() {
33-    goto('/', {
34-      replaceState: true,
35-      noscroll: true,
36-      keepfocus: true,
37-    });
38+    goto('/');
39     document.getElementById('search').focus();
40   }
41 
42@@ -80,11 +70,14 @@
43   function getTags(tags: string[]): Tag[] {
44     return tags.map((t) => tagDb[t]).filter(Boolean);
45   }
46-
47-  let search = '';
48-  page.subscribe(({ query }) => {
49+  
50+  // const parsed = qs.parse(typeof window !== 'undefined' ? window.location.search : '?search=');
51+  // let initialSearch = (parsed['search'] as string) || '';
52+  // let search = '' // initialSearch;
53+  $: search = decodeURIComponent($page.query.get('search') || '');
54+  /* page.subscribe(({ query }) => {
55     search = decodeURIComponent(query.get('search') || '');
56-  });
57+  }); */
58 
59   export let plugins: Plugin[] = [];
60   export let tags: Tag[] = [];
M svelte.config.js
+1, -1
1@@ -17,7 +17,7 @@ const config = {
2       fallback: null,
3     }),
4     prerender: {
5-      force: true,
6+      onError: 'continue',
7     },
8   },
9 };
M yarn.lock
+74, -56
  1@@ -80,10 +80,10 @@
  2     "@nodelib/fs.scandir" "2.1.5"
  3     fastq "^1.6.0"
  4 
  5-"@rollup/pluginutils@^4.1.0":
  6-  version "4.1.0"
  7-  resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.1.0.tgz#0dcc61c780e39257554feb7f77207dceca13c838"
  8-  integrity sha512-TrBhfJkFxA+ER+ew2U2/fHbebhLT/l/2pRk0hfj9KusXUuRXd2v0R58AfaZK9VXDQ4TogOSEmICVrQAA3zFnHQ==
  9+"@rollup/pluginutils@^4.1.1":
 10+  version "4.1.1"
 11+  resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.1.1.tgz#1d4da86dd4eded15656a57d933fda2b9a08d47ec"
 12+  integrity sha512-clDjivHqWGXi7u+0d2r2sBi4Ie6VLEAzWMIkvJLnDmxoOhBYOTfzGbOQBA32THHm11/LiJbd01tJUpJsbshSWQ==
 13   dependencies:
 14     estree-walker "^2.0.1"
 15     picomatch "^2.2.2"
 16@@ -93,26 +93,27 @@
 17   resolved "https://registry.yarnpkg.com/@sveltejs/adapter-static/-/adapter-static-1.0.0-next.13.tgz#5cba8f2905a5a7b956c2663d73ac02f7eb6da7c4"
 18   integrity sha512-zaXJlWK9JfrjrE6nG5etB8kf4DSkbE3H8Ql6gmCk3WjdvpY85a60TMYBU9OK2iunkqpHnPYiMUGEnOGYmWlLYA==
 19 
 20-"@sveltejs/kit@next":
 21-  version "1.0.0-next.123"
 22-  resolved "https://registry.yarnpkg.com/@sveltejs/kit/-/kit-1.0.0-next.123.tgz#bd93fc563d205485dbc99bb9a3b8996c204cf8ef"
 23-  integrity sha512-C9UZ5yYdU94hjpmwTPmDpCWphPc9RsSR4TxV67JM+SqDrSCMKx65JI3+goQQzY2ZHARUGukoc1+ijaRxW48AWQ==
 24+"@sveltejs/kit@^1.0.0-next.139":
 25+  version "1.0.0-next.139"
 26+  resolved "https://registry.yarnpkg.com/@sveltejs/kit/-/kit-1.0.0-next.139.tgz#1459cfccfd7058a0a454eb91b183708ca971bc93"
 27+  integrity sha512-V/OG9FIuq8Fzh08x0VZx1ZX5MjCM8lD/vpk/cM/RyGJSky+KKYgch7mWSY6XP28vUsl1HUg+HMuho/rKqmwe9A==
 28   dependencies:
 29-    "@sveltejs/vite-plugin-svelte" "^1.0.0-next.11"
 30+    "@sveltejs/vite-plugin-svelte" "^1.0.0-next.14"
 31     cheap-watch "^1.0.3"
 32     sade "^1.7.4"
 33-    vite "^2.4.1"
 34+    vite "^2.4.3"
 35 
 36-"@sveltejs/vite-plugin-svelte@^1.0.0-next.11":
 37-  version "1.0.0-next.11"
 38-  resolved "https://registry.yarnpkg.com/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.0.0-next.11.tgz#1a415a1c4b1642a452e073438c63a73cfd203b51"
 39-  integrity sha512-EYR1I145k5rflVqhPwk3442m3bkYimTKSHM9uO5KdomXzt+GS9ZSBJQE3/wy1Di9V8OnGa3oKpckI3OZsHkTIA==
 40+"@sveltejs/vite-plugin-svelte@^1.0.0-next.14":
 41+  version "1.0.0-next.15"
 42+  resolved "https://registry.yarnpkg.com/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.0.0-next.15.tgz#12e853677387aa0891b03bf69afcc678fbf8f8e2"
 43+  integrity sha512-8yGX7PxaqtvWw+GHiO2DV7lZ4M7DwIrFq+PgZGZ9X09PuoSeaWszm76GWQXJMKHoPPhdA9084662en9qbv4aRw==
 44   dependencies:
 45-    "@rollup/pluginutils" "^4.1.0"
 46-    chalk "^4.1.1"
 47+    "@rollup/pluginutils" "^4.1.1"
 48     debug "^4.3.2"
 49+    kleur "^4.1.4"
 50+    magic-string "^0.25.7"
 51     require-relative "^0.8.7"
 52-    svelte-hmr "^0.14.4"
 53+    svelte-hmr "^0.14.7"
 54 
 55 "@tsconfig/node10@^1.0.7":
 56   version "1.0.8"
 57@@ -144,10 +145,10 @@
 58   resolved "https://registry.yarnpkg.com/@types/marked/-/marked-2.0.4.tgz#34a0ea548afe6e0c01095229d47b48b2af650613"
 59   integrity sha512-L9VRSe0Id8xbPL99mUo/4aKgD7ZoRwFZqUQScNKHi2pFjF9ZYSMNShUHD6VlMT6J/prQq0T1mxuU25m3R7dFzg==
 60 
 61-"@types/node-fetch@^2.5.11":
 62-  version "2.5.11"
 63-  resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.11.tgz#ce22a2e65fc8999f4dbdb7ddbbcf187d755169e4"
 64-  integrity sha512-2upCKaqVZETDRb8A2VTaRymqFBEgH8u6yr96b/u3+1uQEPDRo3mJLEiPk7vdXBHRtjwkjqzFYMJXrt0Z9QsYjQ==
 65+"@types/node-fetch@^2.5.12":
 66+  version "2.5.12"
 67+  resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.12.tgz#8a6f779b1d4e60b7a57fb6fd48d84fb545b9cc66"
 68+  integrity sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==
 69   dependencies:
 70     "@types/node" "*"
 71     form-data "^3.0.0"
 72@@ -157,10 +158,10 @@
 73   resolved "https://registry.yarnpkg.com/@types/node/-/node-16.3.0.tgz#1836664e4fad13b51b07eb6e882a53925e6543c4"
 74   integrity sha512-OydMCocGMGqw/1BnWbhtK+AtwyWTOigtrQlRe57OQmTNcI3HKlVI5FGlh+c4mSqInMPLynFrTlYjfajPu9O/eQ==
 75 
 76-"@types/node@^16.3.3":
 77-  version "16.3.3"
 78-  resolved "https://registry.yarnpkg.com/@types/node/-/node-16.3.3.tgz#0c30adff37bbbc7a50eb9b58fae2a504d0d88038"
 79-  integrity sha512-8h7k1YgQKxKXWckzFCMfsIwn0Y61UK6tlD6y2lOb3hTOIMlK3t9/QwHOhc81TwU+RMf0As5fj7NPjroERCnejQ==
 80+"@types/node@^16.4.10":
 81+  version "16.4.10"
 82+  resolved "https://registry.yarnpkg.com/@types/node/-/node-16.4.10.tgz#e57e2a54fc6da58da94b3571b1cb456d39f88597"
 83+  integrity sha512-TmVHsm43br64js9BqHWqiDZA+xMtbUpI1MBIA0EyiBmoV9pcEYFOSdj5fr6enZNfh4fChh+AGOLIzGwJnkshyQ==
 84 
 85 "@types/parse-json@^4.0.0":
 86   version "4.0.0"
 87@@ -591,9 +592,9 @@ error-ex@^1.3.1:
 88     is-arrayish "^0.2.1"
 89 
 90 esbuild@^0.12.8:
 91-  version "0.12.15"
 92-  resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.15.tgz#9d99cf39aeb2188265c5983e983e236829f08af0"
 93-  integrity sha512-72V4JNd2+48eOVCXx49xoSWHgC3/cCy96e7mbXKY+WOWghN00cCmlGnwVLRhRHorvv0dgCyuMYBZlM2xDM5OQw==
 94+  version "0.12.17"
 95+  resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.17.tgz#5816f905c2905de0ebbc658860df7b5b48afbcd3"
 96+  integrity sha512-GshKJyVYUnlSXIZj/NheC2O0Kblh42CS7P1wJyTbbIHevTG4jYMS9NNw8EOd8dDWD0dzydYHS01MpZoUcQXB4g==
 97 
 98 escape-string-regexp@^1.0.5:
 99   version "1.0.5"
100@@ -1070,6 +1071,11 @@ just-throttle@^2.3.1:
101   resolved "https://registry.yarnpkg.com/just-throttle/-/just-throttle-2.3.1.tgz#ef4a0710073bb4b0faf7dad1bc4ccabaeec4d0e6"
102   integrity sha512-0H4miIAWZYpnpg7oD/Y/PBb77ISSHAETif5xK9EnwIgYCO6oC8ErkJxDumMUTR44shSOwptRIArRuvNuvN/hOw==
103 
104+kleur@^4.1.4:
105+  version "4.1.4"
106+  resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.4.tgz#8c202987d7e577766d039a8cd461934c01cda04d"
107+  integrity sha512-8QADVssbrFjivHWQU7KkMgptGTl6WAcSdlbBPY4uNF+mWr6DGcKrvY2w4FQJoXch7+fKMjj0dRrL75vk3k23OA==
108+
109 levn@^0.4.1:
110   version "0.4.1"
111   resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade"
112@@ -1157,6 +1163,13 @@ lru-cache@^6.0.0:
113   dependencies:
114     yallist "^4.0.0"
115 
116+magic-string@^0.25.7:
117+  version "0.25.7"
118+  resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051"
119+  integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==
120+  dependencies:
121+    sourcemap-codec "^1.4.4"
122+
123 make-error@^1.1.1:
124   version "1.3.6"
125   resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
126@@ -1338,10 +1351,10 @@ please-upgrade-node@^3.2.0:
127   dependencies:
128     semver-compare "^1.0.0"
129 
130-postcss@^8.3.5:
131-  version "8.3.5"
132-  resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.5.tgz#982216b113412bc20a86289e91eb994952a5b709"
133-  integrity sha512-NxTuJocUhYGsMiMFHDUkmjSKT3EdH4/WbGF6GCi1NDGk+vbcUTun4fpbOqaPtD8IIsztA2ilZm2DhYCuyN58gA==
134+postcss@^8.3.6:
135+  version "8.3.6"
136+  resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.6.tgz#2730dd76a97969f37f53b9a6096197be311cc4ea"
137+  integrity sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==
138   dependencies:
139     colorette "^1.2.2"
140     nanoid "^3.1.23"
141@@ -1443,9 +1456,9 @@ rimraf@^3.0.2:
142     glob "^7.1.3"
143 
144 rollup@^2.38.5:
145-  version "2.53.0"
146-  resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.53.0.tgz#5b6bc7820a03f361d2ae3dcabdc99d269a754709"
147-  integrity sha512-spgrY78Toh+m0+zaOoeaayJKuzFuWy6o1PdFIBMVwRcuxT0xCOX9A5rChyKe+2ruL4lePKWUMImS4mMW1QAkmQ==
148+  version "2.55.1"
149+  resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.55.1.tgz#66a444648e2fb603d8e329e77a61c608a6510fda"
150+  integrity sha512-1P9w5fpb6b4qroePh8vHKGIvPNxwoCQhjJpIqfZGHLKpZ0xcU2/XBmFxFbc9697/6bmHpmFTLk5R1dAQhFSo0g==
151   optionalDependencies:
152     fsevents "~2.3.2"
153 
154@@ -1545,6 +1558,11 @@ source-map@^0.7.3:
155   resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
156   integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==
157 
158+sourcemap-codec@^1.4.4:
159+  version "1.4.8"
160+  resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4"
161+  integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==
162+
163 split-on-first@^1.0.0:
164   version "1.1.0"
165   resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f"
166@@ -1621,10 +1639,10 @@ supports-color@^7.1.0:
167   dependencies:
168     has-flag "^4.0.0"
169 
170-svelte-check@^2.0.0:
171-  version "2.2.2"
172-  resolved "https://registry.yarnpkg.com/svelte-check/-/svelte-check-2.2.2.tgz#1a8f0de4de66bcb1e485586fd948f7f7774a6ea9"
173-  integrity sha512-PQtVt+TcXuwtfCkJl/b0NFFwYNAHERHWqy9ypZ1eevi684wlsjCApmKYh0JZEiR9+Q8Rq+1P0JIdOLsQLEkaXA==
174+svelte-check@2.0.0:
175+  version "2.0.0"
176+  resolved "https://registry.yarnpkg.com/svelte-check/-/svelte-check-2.0.0.tgz#c125bd69c204f5f0bb0b000247001400b7e27037"
177+  integrity sha512-72xHHZG2DUgt1QzKKKvirzvYYDKLfK5L2lJsCCbW87fd383VqZJ08RLKNf6pfEZQJl8yk2rUsTU6krgntB9TXQ==
178   dependencies:
179     chalk "^4.0.0"
180     chokidar "^3.4.1"
181@@ -1636,10 +1654,10 @@ svelte-check@^2.0.0:
182     svelte-preprocess "^4.0.0"
183     typescript "*"
184 
185-svelte-hmr@^0.14.4:
186-  version "0.14.4"
187-  resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.14.4.tgz#b7ef2bfeef23916e0e912828c50645ca572ac355"
188-  integrity sha512-kItFF7vqzStckSigoFmMnxJpTOdB9TWnQAW6Js+yAB4277tLbJIIE5KBlGHNmJNpA7MguqidsPB27Uw5UzQPCA==
189+svelte-hmr@^0.14.7:
190+  version "0.14.7"
191+  resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.14.7.tgz#7fa8261c7b225d9409f0a86f3b9ea5c3ca6f6607"
192+  integrity sha512-pDrzgcWSoMaK6AJkBWkmgIsecW0GChxYZSZieIYfCP0v2oPyx2CYU/zm7TBIcjLVUPP714WxmViE9Thht4etog==
193 
194 svelte-preprocess@^4.0.0:
195   version "4.7.4"
196@@ -1651,10 +1669,10 @@ svelte-preprocess@^4.0.0:
197     detect-indent "^6.0.0"
198     strip-indent "^3.0.0"
199 
200-svelte@^3.34.0:
201-  version "3.38.3"
202-  resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.38.3.tgz#e15a1da98ee4b10162a6c8cb4c80aa86b2b589ed"
203-  integrity sha512-N7bBZJH0iF24wsalFZF+fVYMUOigaAUQMIcEKHO3jstK/iL8VmP9xE+P0/a76+FkNcWt+TDv2Gx1taUoUscrvw==
204+svelte@3.34.0:
205+  version "3.34.0"
206+  resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.34.0.tgz#a0195a0db0305d78df87520711317b99e6fb8a26"
207+  integrity sha512-xWcaQ/J4Yd5k0UWz+ef6i5RW5WP3hNpluEI2qtTTKlMOXERHpVL509O9lIw7sgEn1JjJgTOS+lnnDj99vQ3YqQ==
208 
209 table@^6.0.9:
210   version "6.7.1"
211@@ -1685,10 +1703,10 @@ to-regex-range@^5.0.1:
212   dependencies:
213     is-number "^7.0.0"
214 
215-ts-node@^10.0.0:
216-  version "10.0.0"
217-  resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.0.0.tgz#05f10b9a716b0b624129ad44f0ea05dac84ba3be"
218-  integrity sha512-ROWeOIUvfFbPZkoDis0L/55Fk+6gFQNZwwKPLinacRl6tsxstTF1DbAcLKkovwnpKMVvOMHP1TIbnwXwtLg1gg==
219+ts-node@^10.1.0:
220+  version "10.1.0"
221+  resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.1.0.tgz#e656d8ad3b61106938a867f69c39a8ba6efc966e"
222+  integrity sha512-6szn3+J9WyG2hE+5W8e0ruZrzyk1uFLYye6IGMBadnOzDh8aP7t8CbFpsfCiEx2+wMixAhjFt7lOZC4+l+WbEA==
223   dependencies:
224     "@tsconfig/node10" "^1.0.7"
225     "@tsconfig/node12" "^1.0.7"
226@@ -1752,13 +1770,13 @@ v8-compile-cache@^2.0.3:
227   resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"
228   integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==
229 
230-vite@^2.4.1:
231-  version "2.4.1"
232-  resolved "https://registry.yarnpkg.com/vite/-/vite-2.4.1.tgz#2e48b8dbfc69e4edbf7f4d1c0798d621585cb8da"
233-  integrity sha512-4BpKRis9uxIqPfIEcJ18LTBsamqnDFxTx45CXwagHjNltHa6PFEvf8Pe6OpgIHb0OyWT30OXOSSQvdOaX4OBiQ==
234+vite@^2.4.3:
235+  version "2.4.4"
236+  resolved "https://registry.yarnpkg.com/vite/-/vite-2.4.4.tgz#8c402a07ad45f168f6eb5428bead38f3e4363e47"
237+  integrity sha512-m1wK6pFJKmaYA6AeZIUXyiAgUAAJzVXhIMYCdZUpCaFMGps0v0IlNJtbmPvkUhVEyautalajmnW5X6NboUPsnw==
238   dependencies:
239     esbuild "^0.12.8"
240-    postcss "^8.3.5"
241+    postcss "^8.3.6"
242     resolve "^1.20.0"
243     rollup "^2.38.5"
244   optionalDependencies: