From 945d7f09d7d6aff319b4700d57b5751517fa6d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Thu, 1 Sep 2022 10:57:45 +0200 Subject: [PATCH] Add any types for getContext data --- package.json | 6 +- pnpm-lock.yaml | 58 +++++++++---------- src/components/molecules/Switcher.svelte | 2 +- .../organisms/InteractiveGlobe.svelte | 2 +- .../organisms/InteractiveGlobe2.svelte | 2 +- src/components/organisms/Locations.svelte | 2 +- src/components/organisms/PostersGrid.svelte | 2 +- src/components/organisms/ShopHeader.svelte | 2 +- src/components/organisms/ShopModule.svelte | 2 +- src/routes/about/+page.svelte | 2 +- src/routes/shop/+error.svelte | 2 +- src/routes/shop/+page.svelte | 4 +- src/routes/shop/[type]-[name]/+page.svelte | 2 +- 13 files changed, 44 insertions(+), 44 deletions(-) diff --git a/package.json b/package.json index 128da4e..ec00b4c 100644 --- a/package.json +++ b/package.json @@ -25,10 +25,10 @@ "tweakpane": "^3.1.0" }, "devDependencies": { - "@sveltejs/adapter-auto": "^1.0.0-next.70", + "@sveltejs/adapter-auto": "^1.0.0-next.71", "@sveltejs/adapter-node": "^1.0.0-next.88", "@sveltejs/adapter-vercel": "^1.0.0-next.72", - "@sveltejs/kit": "^1.0.0-next.457", + "@sveltejs/kit": "^1.0.0-next.460", "@typescript-eslint/eslint-plugin": "^5.36.1", "@typescript-eslint/parser": "^5.36.1", "browserslist": "^4.21.3", @@ -40,7 +40,7 @@ "postcss-normalize": "^10.0.1", "postcss-preset-env": "^7.8.0", "postcss-sort-media-queries": "^4.2.1", - "sass": "^1.54.7", + "sass": "^1.54.8", "svelte": "^3.49.0", "svelte-check": "^2.9.0", "svelte-preprocess": "^4.10.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e9356c7..e10a44a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2,10 +2,10 @@ lockfileVersion: 5.4 specifiers: '@studio-freight/lenis': ^0.1.18 - '@sveltejs/adapter-auto': ^1.0.0-next.70 + '@sveltejs/adapter-auto': ^1.0.0-next.71 '@sveltejs/adapter-node': ^1.0.0-next.88 '@sveltejs/adapter-vercel': ^1.0.0-next.72 - '@sveltejs/kit': ^1.0.0-next.457 + '@sveltejs/kit': ^1.0.0-next.460 '@typescript-eslint/eslint-plugin': ^5.36.1 '@typescript-eslint/parser': ^5.36.1 browserslist: ^4.21.3 @@ -23,7 +23,7 @@ specifiers: postcss-preset-env: ^7.8.0 postcss-sort-media-queries: ^4.2.1 sanitize.css: ^13.0.0 - sass: ^1.54.7 + sass: ^1.54.8 svelte: ^3.49.0 svelte-check: ^2.9.0 svelte-preprocess: ^4.10.7 @@ -44,10 +44,10 @@ dependencies: tweakpane: 3.1.0 devDependencies: - '@sveltejs/adapter-auto': 1.0.0-next.70 + '@sveltejs/adapter-auto': 1.0.0-next.71 '@sveltejs/adapter-node': 1.0.0-next.88 '@sveltejs/adapter-vercel': 1.0.0-next.72 - '@sveltejs/kit': 1.0.0-next.457_fhgkwirxvgjw2igda6zmhiisma + '@sveltejs/kit': 1.0.0-next.460_fhgkwirxvgjw2igda6zmhiisma '@typescript-eslint/eslint-plugin': 5.36.1_lbwfnm54o3pmr3ypeqp3btnera '@typescript-eslint/parser': 5.36.1_yqf6kl63nyoq5megxukfnom5rm browserslist: 4.21.3 @@ -59,14 +59,14 @@ devDependencies: postcss-normalize: 10.0.1_mu2kzpkteq3ketk6piffleamkq postcss-preset-env: 7.8.0_postcss@8.4.16 postcss-sort-media-queries: 4.2.1_postcss@8.4.16 - sass: 1.54.7 + sass: 1.54.8 svelte: 3.49.0 - svelte-check: 2.9.0_c6x723yp7pdz7iha3ksnylcgzy - svelte-preprocess: 4.10.7_2lciotjd6bilkiadfxmz6rz2jm + svelte-check: 2.9.0_f5urgkboyys3wbiivxj4sltznu + svelte-preprocess: 4.10.7_pxxiereockejw5abpwoddd4ivy swell-node: 4.0.10 tslib: 2.4.0 typescript: 4.8.2 - vite: 3.1.0-beta.1_sass@1.54.7 + vite: 3.1.0-beta.1_sass@1.54.8 packages: @@ -422,11 +422,11 @@ packages: virtual-scroll: 2.2.1 dev: false - /@sveltejs/adapter-auto/1.0.0-next.70: - resolution: {integrity: sha512-FJlDO6oUqbuFJjQoguGb4gdBj3iCSM3evFXkBpQ7hvwu3y2gKbcdzsxdn9tZ5LzkHh79CeJcwiszXFQ8usKk/A==} + /@sveltejs/adapter-auto/1.0.0-next.71: + resolution: {integrity: sha512-Qsl82HcehWJbZztXgmU/nTPDeeIaB4jrOQpSvy3Pi8octs+rEf/CO87Wk06EP+M/zUzEHDNENMOx0DgWuHpj7Q==} dependencies: '@sveltejs/adapter-cloudflare': 1.0.0-next.32 - '@sveltejs/adapter-netlify': 1.0.0-next.75 + '@sveltejs/adapter-netlify': 1.0.0-next.76 '@sveltejs/adapter-vercel': 1.0.0-next.72 transitivePeerDependencies: - encoding @@ -441,8 +441,8 @@ packages: worktop: 0.8.0-next.14 dev: true - /@sveltejs/adapter-netlify/1.0.0-next.75: - resolution: {integrity: sha512-1zTR/U/ceEAyqIGJ74v54G+JbIR+fSmTN9qfqGOM0gBwVoBVRUujGm4tDFJQNYzvuGzVnC7br/rhYMLZd2JluQ==} + /@sveltejs/adapter-netlify/1.0.0-next.76: + resolution: {integrity: sha512-XC33i13N+zkDP1rKrssQ55TPzt4DkLjKux6g1xW2MB+5KxnC9PP2rIkocKxFw/pK2XU8cUIgmOJ1y5PQrHaiKg==} dependencies: '@iarna/toml': 2.2.5 esbuild: 0.14.54 @@ -466,8 +466,8 @@ packages: - supports-color dev: true - /@sveltejs/kit/1.0.0-next.457_fhgkwirxvgjw2igda6zmhiisma: - resolution: {integrity: sha512-4cVVSKj6r70iifUkqQNK0aTkgoY6O8evi9SazECeLXTCFBM4TvproLQhgXys+kkXmyvdS48NK0JBD8hJnD7A7Q==} + /@sveltejs/kit/1.0.0-next.460_fhgkwirxvgjw2igda6zmhiisma: + resolution: {integrity: sha512-bwDkwzEN72+1K5FXqBQGrYOwyA6V5sSSec/A6qXMTfh4uycFTiIQh/e2ki3pxfG0SwijrUo43FEbdKLyBiuDgQ==} engines: {node: '>=16.14'} hasBin: true requiresBuild: true @@ -488,7 +488,7 @@ packages: svelte: 3.49.0 tiny-glob: 0.2.9 undici: 5.10.0 - vite: 3.1.0-beta.1_sass@1.54.7 + vite: 3.1.0-beta.1_sass@1.54.8 transitivePeerDependencies: - diff-match-patch - supports-color @@ -512,7 +512,7 @@ packages: magic-string: 0.26.3 svelte: 3.49.0 svelte-hmr: 0.14.12_svelte@3.49.0 - vite: 3.1.0-beta.1_sass@1.54.7 + vite: 3.1.0-beta.1_sass@1.54.8 transitivePeerDependencies: - supports-color dev: true @@ -823,7 +823,7 @@ packages: hasBin: true dependencies: caniuse-lite: 1.0.30001387 - electron-to-chromium: 1.4.237 + electron-to-chromium: 1.4.239 node-releases: 2.0.6 update-browserslist-db: 1.0.5_browserslist@4.21.3 dev: true @@ -1154,8 +1154,8 @@ packages: domhandler: 4.3.1 dev: true - /electron-to-chromium/1.4.237: - resolution: {integrity: sha512-vxVyGJcsgArNOVUJcXm+7iY3PJAfmSapEszQD1HbyPLl0qoCmNQ1o/EX3RI7Et5/88In9oLxX3SGF8J3orkUgA==} + /electron-to-chromium/1.4.239: + resolution: {integrity: sha512-XbhfzxPIFzMjJm17T7yUGZEyYh5XuUjrA/FQ7JUy2bEd4qQ7MvFTaKpZ6zXZog1cfVttESo2Lx0ctnf7eQOaAQ==} dev: true /embla-carousel/7.0.2: @@ -2955,8 +2955,8 @@ packages: /sanitize.css/13.0.0: resolution: {integrity: sha512-ZRwKbh/eQ6w9vmTjkuG0Ioi3HBwPFce0O+v//ve+aOq1oeCy7jMV2qzzAlpsNuqpqCBjjriM1lbtZbF/Q8jVyA==} - /sass/1.54.7: - resolution: {integrity: sha512-3q7MQz7sCpVG6TLhUfZwGOcd2/sm2ghYN2JEdRjNiW04ILdvahdo9GuAs+bxsxZ3hDCKv+wUT5w0iFWGU0CxlA==} + /sass/1.54.8: + resolution: {integrity: sha512-ib4JhLRRgbg6QVy6bsv5uJxnJMTS2soVcCp9Y88Extyy13A8vV0G1fAwujOzmNkFQbR3LvedudAMbtuNRPbQww==} engines: {node: '>=12.0.0'} hasBin: true dependencies: @@ -3107,7 +3107,7 @@ packages: engines: {node: '>= 0.4'} dev: true - /svelte-check/2.9.0_c6x723yp7pdz7iha3ksnylcgzy: + /svelte-check/2.9.0_f5urgkboyys3wbiivxj4sltznu: resolution: {integrity: sha512-9AVrtP7WbfDgCdqTZNPdj5CCCy1OrYMxFVWAWzNw7fl93c9klFJFtqzVXa6fovfQ050CcpUyJE2dPFL9TFAREw==} hasBin: true peerDependencies: @@ -3120,7 +3120,7 @@ packages: picocolors: 1.0.0 sade: 1.8.1 svelte: 3.49.0 - svelte-preprocess: 4.10.7_2lciotjd6bilkiadfxmz6rz2jm + svelte-preprocess: 4.10.7_pxxiereockejw5abpwoddd4ivy typescript: 4.8.2 transitivePeerDependencies: - '@babel/core' @@ -3144,7 +3144,7 @@ packages: svelte: 3.49.0 dev: true - /svelte-preprocess/4.10.7_2lciotjd6bilkiadfxmz6rz2jm: + /svelte-preprocess/4.10.7_pxxiereockejw5abpwoddd4ivy: resolution: {integrity: sha512-sNPBnqYD6FnmdBrUmBCaqS00RyCsCpj2BG58A1JBswNF7b0OKviwxqVrOL/CKyJrLSClrSeqQv5BXNg2RUbPOw==} engines: {node: '>= 9.11.2'} requiresBuild: true @@ -3190,7 +3190,7 @@ packages: detect-indent: 6.1.0 magic-string: 0.25.9 postcss: 8.4.16 - sass: 1.54.7 + sass: 1.54.8 sorcery: 0.10.0 strip-indent: 3.0.0 svelte: 3.49.0 @@ -3335,7 +3335,7 @@ packages: tiny-emitter: 2.1.0 dev: false - /vite/3.1.0-beta.1_sass@1.54.7: + /vite/3.1.0-beta.1_sass@1.54.8: resolution: {integrity: sha512-JGEnWSC0hfarcduTCQr6wnRjPLbT62iLCK59HBJXYt9oyWSUMtrvcnDqzvLFC+lHV6KGFQkmWlZucyIQmgUnLA==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -3358,7 +3358,7 @@ packages: postcss: 8.4.16 resolve: 1.22.1 rollup: 2.78.1 - sass: 1.54.7 + sass: 1.54.8 optionalDependencies: fsevents: 2.3.2 dev: true diff --git a/src/components/molecules/Switcher.svelte b/src/components/molecules/Switcher.svelte index d38cab9..3a20484 100644 --- a/src/components/molecules/Switcher.svelte +++ b/src/components/molecules/Switcher.svelte @@ -11,7 +11,7 @@ export let isOver: boolean = false - const { settings: { switcher_links } } = getContext('global') + const { settings: { switcher_links }}: any = getContext('global') let switcherEl: HTMLElement let isOpen = false diff --git a/src/components/organisms/InteractiveGlobe.svelte b/src/components/organisms/InteractiveGlobe.svelte index bc017f1..6d6676b 100644 --- a/src/components/organisms/InteractiveGlobe.svelte +++ b/src/components/organisms/InteractiveGlobe.svelte @@ -22,7 +22,7 @@ $: globeResolution = innerWidth > 1440 && window.devicePixelRatio > 1 ? '4k' : '2k' - const { continents, locations } = getContext('global') + const { continents, locations }: any = getContext('global') const randomContinent: any = getRandomItem(continents.filter((cont: any) => cont.countries)) const markers = locations.map(({ name, slug, country, globe_close: isClose, coordinates: { coordinates }}: any) => ({ name, diff --git a/src/components/organisms/InteractiveGlobe2.svelte b/src/components/organisms/InteractiveGlobe2.svelte index 36c6aa3..9756d85 100644 --- a/src/components/organisms/InteractiveGlobe2.svelte +++ b/src/components/organisms/InteractiveGlobe2.svelte @@ -27,7 +27,7 @@ $: globeResolution = innerWidth > 1440 && window.devicePixelRatio > 1 ? '4k' : '2k' - const { continents, locations } = getContext('global') + const { continents, locations }: any = getContext('global') const randomContinent: any = getRandomItem(continents) const markers = locations.map(({ name, slug, country, coordinates: { coordinates }}): Marker => ({ name, diff --git a/src/components/organisms/Locations.svelte b/src/components/organisms/Locations.svelte index 60e1650..ea0abd8 100644 --- a/src/components/organisms/Locations.svelte +++ b/src/components/organisms/Locations.svelte @@ -16,7 +16,7 @@ export let locations: any[] - const { continents, settings: { explore_list }} = getContext('global') + const { continents, settings: { explore_list }}: any = getContext('global') // Continents filtering logic let currentContinent: string = undefined diff --git a/src/components/organisms/PostersGrid.svelte b/src/components/organisms/PostersGrid.svelte index 350e98c..733de7c 100644 --- a/src/components/organisms/PostersGrid.svelte +++ b/src/components/organisms/PostersGrid.svelte @@ -18,7 +18,7 @@ let currentSlide = 0 let carouselDots = [] - const { shopProducts } = getContext('shop') + const { shopProducts }: any = getContext('shop') /** Navigate to specific slide */ diff --git a/src/components/organisms/ShopHeader.svelte b/src/components/organisms/ShopHeader.svelte index 56a6565..424dffe 100644 --- a/src/components/organisms/ShopHeader.svelte +++ b/src/components/organisms/ShopHeader.svelte @@ -17,7 +17,7 @@ export let product: any = undefined - const { shop, shopLocations } = getContext('shop') + const { shop, shopLocations }: any = getContext('shop') let navObserver: IntersectionObserver let introEl: HTMLElement diff --git a/src/components/organisms/ShopModule.svelte b/src/components/organisms/ShopModule.svelte index ce1c9dc..a82fb88 100644 --- a/src/components/organisms/ShopModule.svelte +++ b/src/components/organisms/ShopModule.svelte @@ -8,7 +8,7 @@ import Button from '$components/atoms/Button.svelte' import Image from '$components/atoms/Image.svelte' - const { locations, shop } = getContext('global') + const { locations, shop }: any = getContext('global') const locationsWithPoster = locations // Filter locations with posters only .filter((loc: Location) => loc.has_poster) diff --git a/src/routes/about/+page.svelte b/src/routes/about/+page.svelte index 97ccfed..9455f0c 100644 --- a/src/routes/about/+page.svelte +++ b/src/routes/about/+page.svelte @@ -6,7 +6,7 @@ import { navigating } from '$app/stores' import { onMount, afterUpdate } from 'svelte' import type { PageData } from './$types' - import { scroll, animate, inView, type ScrollOptions, timeline, stagger } from 'motion' + import { scroll, animate, inView, type ScrollOptions, timeline } from 'motion' import { map } from '$utils/functions' import { getAssetUrlKey } from '$utils/api' import { DELAY } from '$utils/contants' diff --git a/src/routes/shop/+error.svelte b/src/routes/shop/+error.svelte index 20740c0..ab83f70 100644 --- a/src/routes/shop/+error.svelte +++ b/src/routes/shop/+error.svelte @@ -7,7 +7,7 @@ import ShopHeader from '$components/organisms/ShopHeader.svelte' import PostersGrid from '$components/organisms/PostersGrid.svelte' - const { posters } = getContext('shop') + const { posters }: any = getContext('shop') const errors = { 404: { title: 'Product not found', diff --git a/src/routes/shop/+page.svelte b/src/routes/shop/+page.svelte index c549f66..21fe5ac 100644 --- a/src/routes/shop/+page.svelte +++ b/src/routes/shop/+page.svelte @@ -11,8 +11,8 @@ export let data: PageData - const { product, shopProduct } = data - const { posters } = getContext('shop') + const { product, shopProduct }: { product: any, shopProduct: any } = data + const { posters }: any = getContext('shop') // Update current random product slug $shopCurrentProductSlug = product.location.slug diff --git a/src/routes/shop/[type]-[name]/+page.svelte b/src/routes/shop/[type]-[name]/+page.svelte index 9ad2382..fb2a6e1 100644 --- a/src/routes/shop/[type]-[name]/+page.svelte +++ b/src/routes/shop/[type]-[name]/+page.svelte @@ -12,7 +12,7 @@ export let data: PageData - const { posters } = getContext('shop') + const { posters }: any = getContext('shop') $shopCurrentProductSlug = data.product.location.slug