Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update dependencies and run biome fix #253

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.0.0/schema.json",
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
Expand Down
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ If you wish to contribute to the codebase or documentation, feel free to fork th
To get ready to work on the codebase, please do the following:

- Fork & clone the repository, and make sure you're on the main branch
- Run bun install -r
- Run bun install
- Code your heart out!
- Run bun run test to run Biome and ensure any JSDoc changes are valid
- Submit a pull request (Make sure you follow the conventional commit format)
Expand Down
28 changes: 24 additions & 4 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>sapphiredev/readme:sapphire-renovate"],
"schedule": ["every month"]
}
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>sapphiredev/.github:sapphire-renovate"],
"bun": {
"rangeStrategy": "bump",
"packageRules": [
{
"matchUpdateTypes": ["patch"],
"matchCurrentVersion": "/^0\\./",
"automerge": true,
"platformAutomerge": true
},
{
"matchUpdateTypes": ["minor", "patch"],
"matchCurrentVersion": ">=1.0.0",
"automerge": true,
"platformAutomerge": true
},
{
"matchDepTypes": ["engines"],
"enabled": false
}
]
}
}
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
paths:
- "packages/**"
- "apps/**"
- "services/**"
- "typedoc.json"
pull_request:

Expand All @@ -15,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1

- name: Install dependencies
Expand Down
24 changes: 9 additions & 15 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v3
with:
token: ${{ secrets.API_TOKEN_GITHUB }}
uses: actions/checkout@v4

- name: Install PNPM
uses: pnpm/action-setup@6e1964dde3397a825e79e4607ad57f3f7ca2c7cb
with:
version: 8.6.3

- name: Set up Node v18
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "18"
registry-url: " https://registry.npmjs.org"

- uses: oven-sh/setup-bun@v1

- name: Install dependencies
run: pnpm install -r
run: bun install

- name: Install turbo globally
run: pnpm install -g turbo
run: bun install -g turbo

- name: Build packages
run: mv bun.lockb bun.inert && pnpm turbo run build ; mv bun.inert bun.lockb
run: bun turbo run build

- name: Apply version changes to packages
run: pnpm run changeset:version
run: bun run changeset:version

- name: Commit package.json changes
uses: EndBug/add-and-commit@v9
Expand All @@ -44,7 +38,7 @@ jobs:
push: true

- name: Release
run: pnpm recursive publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1

- name: Install dependencies
Expand All @@ -26,7 +26,7 @@ jobs:
run: bun run docs

- name: Commit the Docs
uses: cpina/github-action-push-to-another-repository@main
uses: cpina/github-action-push-to-another-repository@v1
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
Expand Down
22 changes: 8 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
./packages/api/preserve/**
node_modules/
dist/
types/
coverage/
.nyc_output/
packages/api/preserve/**
.turbo
coverage/
.vscode/
./docs/
.turbo/
types/
.idea/
dist/

pnpm-lock.yaml
*.tsbuildinfo
*.log
*.env
*.db

.vscode/
.idea/
*.env
docs/
!apps/docs
!apps/docs/src/pages/docs
!apps/docs/next-end.d.ts
package-lock.json
CHANGELOG.md
4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

2 changes: 2 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bun run check
bun test
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ client.login();

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

We make use of [PNPM](https://pnpm.io/) and [Changeset](https://github.com/changesets/changesets) to manage our monorepo. It's recommended that if you plan on contributing, you use these tools.
We make use of [Bun](https://bun.sh/) and [Changeset](https://github.com/changesets/changesets) to manage our monorepo. It's recommended that if you plan on contributing, you use these tools.

Please run `pnpm install -r` in your local environment to properly locally symlink all the packages that depend on each other.
Please run `bun install` in your local environment to properly locally symlink all the packages that depend on each other.

Please ensure your commits pass the test, lint, and build scripts.

Expand Down
10 changes: 6 additions & 4 deletions apps/docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/node_modules
/.pnp
.pnp.js
output.json
.yarn/install-state.gz

# testing
/coverage
Expand All @@ -24,14 +24,16 @@ output.json
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local
# env files (can opt-in for commiting if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

# documentation output
output.json
20 changes: 13 additions & 7 deletions apps/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/pages/api-reference/create-next-app).

## Getting Started

Expand All @@ -8,27 +8,33 @@ First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
[API routes](https://nextjs.org/docs/pages/building-your-application/routing/api-routes) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/pages/building-your-application/routing/api-routes) instead of React pages.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
This project uses [`next/font`](https://nextjs.org/docs/pages/building-your-application/optimizing/fonts) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn-pages-router) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/pages/building-your-application/deploying) for more details.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";

const HoverableLink = ({ link, children }: { children: React.ReactNode[] | React.ReactNode; link: string }) => (
<a className="hover:underline" href={link}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";
import { Breadcrumb } from "./Breadcrumb";
import { Footer } from "./Footer";
import { Navbar } from "./Navbar";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useState } from "react";

const topBars = {
Docs: "/docs",
Guide: "/guide",
Guide: "https://guilded-js.gitbook.io/api-docs",
Github: "https://github.com/zaida04/guilded.js",
"Support Server": "https://guilded.gg/guildedjs",
"Legacy Docs": "https://guildedjs.github.io/",
Expand Down
File renamed without changes.
33 changes: 33 additions & 0 deletions apps/docs/components/entity/EntityCard.tsx.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import type { IconDefinition } from "@fortawesome/free-solid-svg-icons";
import { faICursor, faAtom, faBox } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import type { EntityType } from "../../lib/types";
import Link from "next/link";

const entityTypeToIcon: Record<string, IconDefinition> = {
classes: faBox,
functions: faAtom,
types: faICursor,
};
export const EntityChildCard = ({
entity,
entityChild,
libName,
}: {
entity: string;
entityChild: EntityType;
libName: string;
}) => {
return (
<Link href={`/docs/${libName}/${entityChild.name}`}>
<div className="md:min-w-[20rem] md:max-w-6xl border-[1px] border-white p-4 md:p-8 hover:cursor-pointer" id={entityChild.name}>
<span className="text-md md:text-3xl text-guilded ">
<FontAwesomeIcon icon={entityTypeToIcon[entity]} />
<h1 className="inline pl-2">{entityChild.name}</h1>
</span>
{entityChild.comment?.summary.length && <p className="text-sm md:text-xl text-white">{entityChild.comment.summary[0].text}</p>}
<p className="text-guilded md:text-md">Click to see properties, methods, and more </p>
</div>
</Link>
);
};
19 changes: 19 additions & 0 deletions apps/docs/components/entity/EntityList.tsx.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { EntityType } from "../../lib/types";
import { capitalize } from "../../lib/util";

export const EntityList = ({ name, entities }: { entities: EntityType[]; name: string }) => {
if (!Object.keys(entities).length) return null;

return (
<div className="md:ml-20">
<h1 className="text-guilded text-4xl font-bold pb-6 underline underline-offset-8">{capitalize(name)}</h1>
<div className="grid grid-rows-[auto] grid-cols-1 md:grid-cols-3 gap-x-[1rem]">
{entities.map((entity) => (
<a className="text-md md:text-xl hover:text-guilded text-white" href={`#${entity.name}`} key={entity.name}>
{entity.name}
</a>
))}
</div>
</div>
);
};
19 changes: 19 additions & 0 deletions apps/docs/components/quality/Qualities.tsx.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { DeclarationReflection } from "typedoc";
import { capitalize } from "../../lib/util";

export const Qualities = ({ qualities, name }: { name: string; qualities: DeclarationReflection[] }) => {
if (!qualities.length) return null;

return (
<div className="md: ml-20">
<h1 className="text-guilded text-4xl font-bold pb-6 underline underline-offset-8">{capitalize(name)}</h1>
<div className="grid grid-rows-[auto] grid-cols-1 md:grid-cols-3 gap-x-[1rem]">
{qualities.map((quality) => (
<a className="text-md md:text-xl hover:text-guilded text-white" href={`#${quality.name}`} key={quality.name}>
{quality.name}
</a>
))}
</div>
</div>
);
};
16 changes: 16 additions & 0 deletions apps/docs/components/quality/QualityCard.tsx.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { DeclarationReflection } from "typedoc";
import { QualityDisplay } from "./QualityDisplay";
import { Signature } from "./Signature";

export const QualityCard = ({ quality, lib }: { lib: string; quality: DeclarationReflection }) => {
const signature = quality.signatures?.[0].comment?.summary;

if (["#", "_"].some((x) => quality.name.startsWith(x))) return null;
return (
<div className="min-w-[20rem] md:max-w-6xl border-[1px] border-white p-4 md:p-8" id={quality.name}>
<Signature lib={lib} quality={quality} />
<QualityDisplay lib={lib} quality={quality} />
{signature?.length && !quality.name.startsWith("_") && <p className="text-sm md:text-xl text-white">{signature[0].text}</p>}
</div>
);
};
Loading
Loading