Skip to content

Commit

Permalink
chore: update dependencies and run biome fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xhayper committed May 11, 2024
1 parent 32a01d6 commit 24353f1
Show file tree
Hide file tree
Showing 54 changed files with 173 additions and 180 deletions.
2 changes: 1 addition & 1 deletion .changeset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ We have a quick list of common questions to get you started engaging with this p
The release steps follows this:

- "bun run prerelease"
- "bun install -r"
- "bun install"
- "bun run publish"
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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
22 changes: 9 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.API_TOKEN_GITHUB }}

- 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 +40,7 @@ jobs:
push: true

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

Expand Down
2 changes: 1 addition & 1 deletion .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 Down
5 changes: 1 addition & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

bun run check:fix
bun test
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,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
63 changes: 35 additions & 28 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,37 @@
{
"name": "@guildedjs/docs",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"devDependencies": {
"@types/node": "18.16.12",
"@types/react": "18.2.6",
"@types/react-dom": "18.2.4",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.23",
"tailwindcss": "^3.3.2",
"typedoc": "0.23.24",
"typescript": "5.0.4"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.4.0",
"@fortawesome/free-solid-svg-icons": "^6.4.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"@next/font": "^13.4.2",
"next": "13.4.2",
"react": "18.2.0",
"react-code-blocks": "0.0.9-0",
"react-dom": "18.2.0"
}
"name": "@guildedjs/docs",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"devDependencies": {
"@types/node": "18.19.33",
"@types/react": "18.3.1",
"@types/react-dom": "18.3.0",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.23",
"tailwindcss": "^3.3.2",
"typedoc": "0.25.13",
"typescript": "5.4.5"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.4.0",
"@fortawesome/free-solid-svg-icons": "^6.4.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"next": "14.2.3",
"react": "18.3.1",
"react-code-blocks": "0.1.6",
"react-dom": "18.3.1"
},
"trustedDependencies": [
"@biomejs/biome",
"@fortawesome/fontawesome-common-types",
"@fortawesome/fontawesome-svg-core",
"@fortawesome/free-solid-svg-icons",
"core-js",
"es5-ext"
]
}
2 changes: 1 addition & 1 deletion apps/docs/src/components/Footer.tsx
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
2 changes: 1 addition & 1 deletion apps/docs/src/components/LayoutWrapper.tsx
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
2 changes: 1 addition & 1 deletion apps/docs/src/components/Navbar.tsx
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
2 changes: 1 addition & 1 deletion apps/docs/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "@fortawesome/fontawesome-svg-core/styles.css";
import localFont from "@next/font/local";
import type { AppProps } from "next/app";
import localFont from "next/font/local";
import "../styles/globals.css";

const Mono = localFont({
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function Home({ buildDate }: InferGetStaticPropsType<typeof getSt
</h1>
</div>
<div className="grid place-items-center md:flex md:justify-center">
{["npm install guilded.js", "yarn add guilded.js", "pnpm add guilded.js"].map((click) => (
{["npm install guilded.js", "yarn add guilded.js", "pnpm add guilded.js", "bun add guilded.js"].map((click) => (
<Copiable key={click} text={click} />
))}
</div>
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/1.4.1/schema.json",
"$schema": "https://biomejs.dev/schemas/1.7.3/schema.json",
"organizeImports": {
"enabled": true
},
Expand Down
Binary file modified bun.lockb
Binary file not shown.
29 changes: 16 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@
"scripts": {
"build": "turbo run build",
"build:typecheck": "turbo run build:typecheck",
"check": "biome check apps packages services",
"check:fix": "biome check --apply-unsafe apps packages services",
"check": "biome check apps packages",
"check:fix": "biome check --apply-unsafe apps packages",
"changeset": "changeset",
"changeset:version": "changeset version",
"docs": "typedoc && cd docs && find . -type f -name \"*.html\" -exec sed -i'' -e 's/__namedParameters/options/g' {} +",
"prepublishOnly": "turbo run prepublishOnly",
"prepare": "husky install"
"prepare": "husky init"
},
"devDependencies": {
"@biomejs/biome": "1.5.2",
"@biomejs/biome": "1.7.3",
"@changesets/cli": "^2.26.1",
"@types/node": "18.16.12",
"dotenv": "16.0.3",
"@types/node": "18.19.33",
"dotenv": "16.4.5",
"gen-esm-wrapper": "1.1.3",
"husky": "7.0.4",
"lint-staged": "13.2.2",
"nodemon": "^2.0.22",
"rimraf": "5.0.1",
"husky": "9.0.11",
"lint-staged": "15.2.2",
"nodemon": "^3.1.0",
"rimraf": "5.0.6",
"turbo": "^1.11.2",
"typedoc": "0.24.7",
"typescript": "5.0.4"
"typedoc": "0.25.13",
"typescript": "5.4.5"
},
"contributors": [
{
Expand All @@ -54,5 +54,8 @@
"workspaces": [
"packages/*",
"apps/*"
],
"trustedDependencies": [
"better-sqlite3"
]
}
}
2 changes: 1 addition & 1 deletion packages/api/lib/rest/util/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function parseMessage(data: APIContent): parsedMessage {
x.data as {
embeds: APIEmbed[];
}
).embeds.length > 0
).embeds.length > 0
: true,
);

Expand Down
4 changes: 2 additions & 2 deletions packages/api/lib/rest/webhook/WebhookClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ export class WebhookClient {
? {
...content,
embeds: resEmbeds,
}
}
: {
content,
embeds: resEmbeds,
username: options?.username ?? this.username ?? undefined,
avatar_url: options?.avatarURL ?? this.avatarURL ?? undefined,
};
};

let body: FormData | RESTPostWebhookBody = baseBody;
const formData = new FormData();
Expand Down
Loading

0 comments on commit 24353f1

Please sign in to comment.