Skip to content

Commit

Permalink
Dependencies overhaul
Browse files Browse the repository at this point in the history
 - Update dependencies for all projects (except Mobile-only deps)
 - Remove unused dependencies from all projects (except Mobile-only deps)
 - Fix Storybook failing to import sd/ui style
 - Add Node 21 as not supported due to sass-loader not working on it yet (dart-lang/sdk#53784)
 - Add work-around for new rook version requiring webpack specific global property
 - Fix landing dev not working due to missing default env value on dev
 - Fix some incorrect uses of phosphor-icons non server side icons on server components on landing
 - Fix some incorrect uses of phosphor-icons server side icon on client components on landing
 - Fix landing fail to build on dev due to always required a Github Token to get the latest release
 - Fix new Next.js version not suporting Response.redirect due to immutable Headers
 - Add Gitlab as social link for teams page
 - Update Vítor's team photo
 - Add Vítor's twitter link
 - Fix some warning due to missing useEffect dependencies
 - Formatting
  • Loading branch information
HeavenVolkoff committed Oct 21, 2023
1 parent cc72f54 commit ac40b9d
Show file tree
Hide file tree
Showing 80 changed files with 2,433 additions and 5,202 deletions.
2 changes: 1 addition & 1 deletion .github/actions/publish-artifacts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"@actions/io": "^1.1.3"
},
"devDependencies": {
"@vercel/ncc": "^0.38.0"
"@vercel/ncc": "^0.38.1"
}
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,22 @@
"rust-analyzer.diagnostics.experimental.enable": false,
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"], // cva(....)`...`
["clsx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"], // clsx(....)`...`
"tw\\.[^`]+`([^`]*)`", // tw.xxx`...`
"tw\\(.*?\\).*?`([^`]*)", // tw(....)`...`
"tw`([^`]*)", // tw`...` (mobile)
"twStyle\\(([^)]*)\\)", // twStyle(....) (mobile)
["styled\\([^,)]+,([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"] // styled(....)`...` (mobile)
],
"search.exclude": {
"node_modules": true,
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true,
// Hiding these folders bcs they create a lot of noise in the search results
"**/*.contentlayer": true,
"**/*.next": true,
"**/dist": true,
"apps/mobile/ios/Pods": true,
"apps/mobile/android": true,
"apps/mobile/ios": true
Expand Down
18 changes: 9 additions & 9 deletions apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@
"@sd/client": "workspace:*",
"@sd/interface": "workspace:*",
"@sd/ui": "workspace:*",
"@sentry/vite-plugin": "^2.7.1",
"@t3-oss/env-core": "^0.7.1",
"@tanstack/react-query": "^4.35",
"@tauri-apps/api": "1.5.0",
"@tanstack/react-query": "^4.36.1",
"@tauri-apps/api": "1.5.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "6.9.0",
"react-router-dom": "6.17.0",
"sonner": "^1.0.3"
},
"devDependencies": {
"@sd/config": "workspace:*",
"@tauri-apps/cli": "^1.5.2",
"@types/react": "^18.2.28",
"@types/react-dom": "^18.2.13",
"@sentry/vite-plugin": "^2.8.0",
"@tauri-apps/cli": "^1.5.5",
"@types/react": "^18.2.31",
"@types/react-dom": "^18.2.14",
"@vitejs/plugin-react": "^4.1.0",
"sass": "^1.69.3",
"sass": "^1.69.4",
"typescript": "^5.2.2",
"vite": "^4.4.11",
"vite": "^4.5.0",
"vite-plugin-html": "^3.2.0",
"vite-plugin-svgr": "^3.3.0",
"vite-tsconfig-paths": "^4.2.1"
Expand Down
4 changes: 4 additions & 0 deletions apps/desktop/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Spacedrive</title>
<script>
// Some libs depend on webpack specific stuff
var global = globalThis || window;
</script>
</head>

<body style="overflow: hidden">
Expand Down
52 changes: 22 additions & 30 deletions apps/landing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,61 +10,53 @@
"typecheck": "contentlayer build && tsc -b"
},
"dependencies": {
"@aws-sdk/client-ses": "^3.337.0",
"@octokit/webhooks": "^12.0.3",
"@phosphor-icons/react": "^2.1.3",
"@planetscale/database": "^1.7.0",
"@react-three/drei": "^9.78.1",
"@react-three/fiber": "^8.13.4",
"@phosphor-icons/react": "^2.0.13",
"@react-three/drei": "^9.88.4",
"@react-three/fiber": "^8.14.6",
"@sd/assets": "workspace:*",
"@sd/ui": "workspace:*",
"@t3-oss/env-nextjs": "^0.3.1",
"@vercel/edge-config": "^0.1.11",
"autoprefixer": "^10.4.14",
"clsx": "^1.2.1",
"contentlayer": "^0.3.2",
"dayjs": "^1.11.8",
"framer-motion": "^10.11.5",
"@t3-oss/env-nextjs": "^0.7.1",
"clsx": "^2.0.0",
"contentlayer": "^0.3.4",
"dayjs": "^1.11.10",
"framer-motion": "^10.16.4",
"katex": "^0.16.9",
"markdown-to-jsx": "^7.2.0",
"md5": "^2.3.0",
"mdx-loader": "^3.0.2",
"next": "13.5.4",
"markdown-to-jsx": "^7.3.2",
"next": "13.5.6",
"next-contentlayer": "^0.3.4",
"octokit": "^3.1.1",
"react": "18.2.0",
"react-burger-menu": "^3.0.9",
"react-device-detect": "^2.2.3",
"react-dom": "^18.2.0",
"react-error-boundary": "^3.1.4",
"react-error-boundary": "^4.0.11",
"react-github-btn": "^1.4.0",
"react-hook-form": "^7.47.0",
"react-tsparticles": "^2.9.3",
"react-tsparticles": "^2.12.2",
"reading-time": "^1.5.0",
"rehype-autolink-headings": "^6.1.1",
"rehype-external-links": "^2.1.0",
"rehype-katex": "^6.0.3",
"rehype-prism-plus": "^1.5.1",
"rehype-prism-plus": "^1.6.3",
"rehype-slug": "^5.1.0",
"remark-gfm": "^3.0.1",
"remark-math": "^5.1.1",
"sharp": "^0.32.1",
"tailwind-merge": "^1.14.0",
"three": "^0.153.0",
"tsparticles": "^2.9.3",
"uuid": "^9.0.0",
"three": "^0.157.0",
"tsparticles": "^2.12.0",
"zod": "~3.22.4"
},
"devDependencies": {
"@next/bundle-analyzer": "^13.5.4",
"autoprefixer": "^10.4.16",
"@next/bundle-analyzer": "^13.5.6",
"@octokit/openapi-types": "^19.0.0",
"@sd/config": "workspace:*",
"@svgr/webpack": "^8.1.0",
"@types/node": "~18.17.19",
"@types/react": "^18.2.28",
"@types/react-burger-menu": "^2.8.4",
"@types/react-dom": "^18.2.13",
"@types/three": "^0.152.1",
"@types/react": "^18.2.31",
"@types/react-burger-menu": "^2.8.5",
"@types/react-dom": "^18.2.14",
"@types/three": "^0.157.2",
"mdx-loader": "^3.0.2",
"postcss": "^8.4.31",
"tailwindcss": "^3.3.3",
"typescript": "^5.2.2"
Expand Down
Binary file modified apps/landing/public/images/team/vitor.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions apps/landing/src/app/Downloads.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import { AndroidLogo, Globe, LinuxLogo, WindowsLogo } from '@phosphor-icons/react/dist/ssr';
import { AndroidLogo, Globe, LinuxLogo, WindowsLogo } from '@phosphor-icons/react';
import { Apple, Github } from '@sd/assets/svgs/brands';
import clsx from 'clsx';
import { motion } from 'framer-motion';
Expand Down Expand Up @@ -80,7 +80,7 @@ export function Downloads({ latestVersion }: Props) {
? `${BASE_DL_LINK}/${currentPlatform.os}/${links[0].arch}`
: undefined
}
className={`z-5 plausible-event-name=download relative plausible-event-os=${currentPlatform.name}`}
className={`z-5 plausible-event-name=download plausible-event-os= relative${currentPlatform.name}`}
icon={Icon ? <Icon width="1rem" height="1rem" /> : undefined}
text={`Download for ${currentPlatform.name}`}
onClick={() => setSelectedPlatform(currentPlatform)}
Expand Down
1 change: 1 addition & 0 deletions apps/landing/src/app/HomeCTA.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export function HomeCTA({ className, text, icon, ...props }: Props) {
'home-button-border-gradient relative z-30 flex cursor-pointer items-center gap-2 !rounded-[7px] border-0 !bg-[#2F3152]/30 py-2 text-sm text-white !backdrop-blur-lg hover:brightness-110 md:text-[16px]',
className
)}
target="_blank"
{...props}
>
<>
Expand Down
2 changes: 1 addition & 1 deletion apps/landing/src/app/NavBar/MobileDropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import { Book, Chat, DotsThreeVertical, MapPin, User } from '@phosphor-icons/react/dist/ssr';
import { Book, Chat, DotsThreeVertical, MapPin, User } from '@phosphor-icons/react';
import { Academia, Discord, Github } from '@sd/assets/svgs/brands';
import clsx from 'clsx';
import { AppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime';
Expand Down
12 changes: 7 additions & 5 deletions apps/landing/src/app/api/github/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import { env } from '~/env';
type Release = components['schemas']['release'];

const FETCH_META = {
headers: {
Authorization: `Bearer ${env.GITHUB_PAT}`,
Accept: 'application/vnd.github+json'
}
} as RequestInit;
headers: new Headers({
'Accept': 'application/vnd.github+json',
'X-GitHub-Api-Version': '2022-11-28'
})
};

if (env.GITHUB_PAT) FETCH_META.headers.set('Authorization', `Bearer ${env.GITHUB_PAT}`);

export const RELEASES_PATH = `/repos/${env.GITHUB_ORG}/${env.GITHUB_REPO}/releases`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { redirect } from 'next/navigation';
import { z } from 'zod';
import { getLatestRelease, getRecentReleases, getRelease, githubFetch } from '~/app/api/github';

Expand Down Expand Up @@ -57,5 +58,5 @@ export async function GET(

if (!asset) return Response.json({ error: 'Asset not found' }, { status: 404 });

return Response.redirect(asset.browser_download_url);
return redirect(asset.browser_download_url);
}
2 changes: 1 addition & 1 deletion apps/landing/src/app/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function Page({ params }: Props) {
const MDXContent = useMDXComponent(post.body.code);

return (
<div className="lg:prose-xs prose dark:prose-invert container m-auto mb-20 max-w-4xl p-4 pt-14">
<div className="lg:prose-xs container prose m-auto mb-20 max-w-4xl p-4 pt-14 dark:prose-invert">
<>
<figure>
<Image
Expand Down
2 changes: 1 addition & 1 deletion apps/landing/src/app/blog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const metadata = {

export default function Page() {
return (
<div className="lg:prose-xs prose dark:prose-invert prose-a:no-underline container m-auto mb-20 flex max-w-4xl flex-col p-4 pt-32">
<div className="lg:prose-xs container prose m-auto mb-20 flex max-w-4xl flex-col p-4 pt-32 dark:prose-invert prose-a:no-underline">
<section>
<h1 className="fade-in-heading m-0">Blog</h1>
<p className="fade-in-heading animation-delay-1">Get the latest from Spacedrive.</p>
Expand Down
2 changes: 1 addition & 1 deletion apps/landing/src/app/careers/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const metadata = {

export default function CareersPage() {
return (
<div className="prose prose-invert container relative m-auto mb-20 min-h-screen max-w-4xl p-4 pt-32 text-white">
<div className="container prose prose-invert relative m-auto mb-20 min-h-screen max-w-4xl p-4 pt-32 text-white">
<div
className="bloom subtle egg-bloom-two -top-60 right-[-400px]"
style={{ transform: 'scale(2)' }}
Expand Down
2 changes: 1 addition & 1 deletion apps/landing/src/app/docs/Markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function Markdown(props: PropsWithChildren<MarkdownPageProps>) {
<article
id="content"
className={clsx(
'lg:prose-xs prose prose-h1:text-[3.25em] prose-a:text-primary prose-a:no-underline prose-blockquote:rounded prose-blockquote:bg-gray-600 prose-code:rounded-md prose-code:bg-gray-650 prose-code:p-1 prose-code:font-normal prose-code:text-gray-400 prose-code:before:hidden prose-code:after:hidden prose-table:border-b prose-table:border-gray-500 prose-tr:even:bg-gray-700 prose-th:p-2 prose-td:border-l prose-td:border-gray-500 prose-td:p-2 prose-td:last:border-r prose-img:rounded dark:prose-invert text-[15px] sm:text-[16px]',
'lg:prose-xs prose text-[15px] dark:prose-invert prose-h1:text-[3.25em] prose-a:text-primary prose-a:no-underline prose-blockquote:rounded prose-blockquote:bg-gray-600 prose-code:rounded-md prose-code:bg-gray-650 prose-code:p-1 prose-code:font-normal prose-code:text-gray-400 prose-code:before:hidden prose-code:after:hidden prose-table:border-b prose-table:border-gray-500 prose-tr:even:bg-gray-700 prose-th:p-2 prose-td:border-l prose-td:border-gray-500 prose-td:p-2 prose-td:last:border-r prose-img:rounded sm:text-[16px]',
props.articleClassNames
)}
>
Expand Down
2 changes: 1 addition & 1 deletion apps/landing/src/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import { SmileyXEyes } from '@phosphor-icons/react/dist/ssr';
import { SmileyXEyes } from '@phosphor-icons/react';
import { useRouter } from 'next/navigation';
import { Button } from '@sd/ui';
import Markdown from '~/components/Markdown';
Expand Down
2 changes: 1 addition & 1 deletion apps/landing/src/app/roadmap/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const metadata = {

export default function Page() {
return (
<div className="lg:prose-xs prose dark:prose-invert container m-auto mb-20 flex max-w-4xl flex-col gap-20 p-4 pt-32">
<div className="lg:prose-xs container prose m-auto mb-20 flex max-w-4xl flex-col gap-20 p-4 pt-32 dark:prose-invert">
<section className="flex flex-col items-center">
<h1 className="fade-in-heading mb-0 text-center text-5xl leading-snug">
What's next for Spacedrive?
Expand Down
8 changes: 7 additions & 1 deletion apps/landing/src/app/team/TeamMember.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Dribbble, Github, Twitch, Twitter } from '@sd/assets/svgs/brands';
import { Dribbble, Github, Gitlab, Twitch, Twitter } from '@sd/assets/svgs/brands';
import clsx from 'clsx';
import Image from 'next/image';
import NextLink from 'next/link';
Expand All @@ -19,6 +19,7 @@ export interface TeamMemberProps {
twitter?: string;
twitch?: string;
github?: string;
gitlab?: string;
dribbble?: string;
};

Expand Down Expand Up @@ -81,6 +82,11 @@ export function TeamMember(props: TeamMemberProps) {
<Github className="h-[20px] w-[20px]" />
</Link>
)}
{props.socials?.gitlab && (
<Link href={props.socials.gitlab}>
<Gitlab className="h-[20px] w-[20px]" />
</Link>
)}
{props.socials?.twitch && (
<Link href={props.socials.twitch}>
<Twitch className="h-[20px] w-[20px]" />
Expand Down
4 changes: 3 additions & 1 deletion apps/landing/src/app/team/people.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ export const teamMembers: Array<TeamMemberProps> = [
role: 'React Engineer & Designer',
imageUrl: '/images/team/vitor.jpg',
socials: {
github: 'https://github.com/HeavenVolkoff'
github: 'https://github.com/HeavenVolkoff',
gitlab: 'https://gitlab.com/VitorVasconcellos',
twitter: 'https://x.com/vasvas10'
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion apps/landing/src/components/DocsLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CaretRight, List, X } from '@phosphor-icons/react';
import { CaretRight, List, X } from '@phosphor-icons/react/dist/ssr';
import { PropsWithChildren, useState } from 'react';
import { slide as Menu } from 'react-burger-menu';
import { Button } from '@sd/ui';
Expand Down
2 changes: 1 addition & 1 deletion apps/landing/src/components/DownloadToday.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Download } from '@phosphor-icons/react';
import { Download } from '@phosphor-icons/react/dist/ssr';
import clsx from 'clsx';
import { useInView } from 'framer-motion';
import React, { useRef } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion apps/landing/src/components/HomeCTA.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IconProps } from '@phosphor-icons/react';
import { type IconProps } from '@phosphor-icons/react';
import clsx from 'clsx';
import { Button, LinkButtonProps } from '@sd/ui';

Expand Down
Loading

0 comments on commit ac40b9d

Please sign in to comment.