Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2324f3c89f | ||
|
|
c35c32bddd | ||
|
|
6eb36b44f3 | ||
|
|
a1fc0287fc | ||
|
|
02dd763e63 | ||
|
|
a4024394e3 | ||
|
|
c72096058a | ||
|
|
672fcd5bc4 | ||
|
|
25f34b3715 | ||
|
|
8a7557f0eb |
15
Dockerfile
15
Dockerfile
@@ -1,15 +0,0 @@
|
|||||||
FROM node:lts-slim
|
|
||||||
|
|
||||||
ENV CYPRESS_INSTALL_BINARY=0
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
COPY / ./
|
|
||||||
RUN ls -R
|
|
||||||
|
|
||||||
RUN npm install -g pnpm
|
|
||||||
RUN pnpm install --unsafe-perm --frozen-lockfile
|
|
||||||
RUN pnpm run build -C packages/website
|
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
|
||||||
CMD [ "pnpm", "-C", "packages/website", "start" ]
|
|
||||||
@@ -3,7 +3,10 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint --ext js,ts,tsx .",
|
"lint": "eslint --ext js,ts,tsx .",
|
||||||
"lint-fix": "pnpm lint -- --fix",
|
"lint-fix": "pnpm lint -- --fix",
|
||||||
"format": "prettier --write ."
|
"format": "prettier --write .",
|
||||||
|
"release": "pnpm -C packages/reacord run release",
|
||||||
|
"build": "pnpm -C packages/website run build",
|
||||||
|
"start": "pnpm -C packages/website run start"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@itsmapleleaf/configs": "^1.1.3",
|
"@itsmapleleaf/configs": "^1.1.3",
|
||||||
@@ -11,7 +14,8 @@
|
|||||||
"@types/eslint": "^8.4.1",
|
"@types/eslint": "^8.4.1",
|
||||||
"eslint": "^8.14.0",
|
"eslint": "^8.14.0",
|
||||||
"prettier": "^2.6.2",
|
"prettier": "^2.6.2",
|
||||||
"typescript": "^4.6.3"
|
"typescript": "^4.6.3",
|
||||||
|
"node": "^16"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"esbuild": "latest"
|
"esbuild": "latest"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { expect, test } from "vitest"
|
import { expect, test } from "vitest"
|
||||||
import { PruneNullishValues, pruneNullishValues } from "./prune-nullish-values"
|
import type { PruneNullishValues } from "./prune-nullish-values"
|
||||||
|
import { pruneNullishValues } from "./prune-nullish-values"
|
||||||
|
|
||||||
test("pruneNullishValues", () => {
|
test("pruneNullishValues", () => {
|
||||||
type InputType = {
|
type InputType = {
|
||||||
@@ -14,6 +15,7 @@ test("pruneNullishValues", () => {
|
|||||||
|
|
||||||
const input: InputType = {
|
const input: InputType = {
|
||||||
a: "a",
|
a: "a",
|
||||||
|
// eslint-disable-next-line unicorn/no-null
|
||||||
b: null,
|
b: null,
|
||||||
c: undefined,
|
c: undefined,
|
||||||
d: {
|
d: {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable import/no-unused-modules */
|
|
||||||
export type MaybePromise<T> = T | Promise<T>
|
export type MaybePromise<T> = T | Promise<T>
|
||||||
|
|
||||||
export type ValueOf<Type> = Type extends ReadonlyArray<infer Value>
|
export type ValueOf<Type> = Type extends ReadonlyArray<infer Value>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { setTimeout } from "timers/promises"
|
import { setTimeout } from "node:timers/promises"
|
||||||
|
|
||||||
const maxTime = 1000
|
const maxTime = 1000
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "reacord",
|
"name": "reacord",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "Create interactive Discord messages using React.",
|
"description": "Create interactive Discord messages using React.",
|
||||||
"version": "0.3.5",
|
"version": "0.3.7",
|
||||||
"types": "./dist/main.d.ts",
|
"types": "./dist/main.d.ts",
|
||||||
"homepage": "https://reacord.mapleleaf.dev",
|
"homepage": "https://reacord.mapleleaf.dev",
|
||||||
"repository": "https://github.com/itsMapleLeaf/reacord.git",
|
"repository": "https://github.com/itsMapleLeaf/reacord.git",
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsup-node library/main.ts --target node16 --format cjs,esm --dts --sourcemap",
|
"build": "tsup library/main.ts --target node16 --format cjs,esm --dts --sourcemap",
|
||||||
"build-watch": "pnpm build -- --watch",
|
"build-watch": "pnpm build -- --watch",
|
||||||
"test": "vitest --coverage --no-watch",
|
"test": "vitest --coverage --no-watch",
|
||||||
"test-dev": "vitest",
|
"test-dev": "vitest",
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"type-fest": "^2.12.2",
|
"type-fest": "^2.12.2",
|
||||||
"typescript": "^4.6.3",
|
"typescript": "^4.6.3",
|
||||||
"vite": "^2.9.5",
|
"vite": "^2.9.5",
|
||||||
"vitest": "^0.9.4"
|
"vitest": "^0.10.0"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"esbuild": "latest"
|
"esbuild": "latest"
|
||||||
|
|||||||
12
packages/reacord/test/commonjs-require.test.ts
Normal file
12
packages/reacord/test/commonjs-require.test.ts
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import { spawnSync } from "node:child_process"
|
||||||
|
import { createRequire } from "node:module"
|
||||||
|
import { beforeAll, expect, test } from "vitest"
|
||||||
|
|
||||||
|
beforeAll(() => {
|
||||||
|
spawnSync("pnpm", ["run", "build"])
|
||||||
|
})
|
||||||
|
|
||||||
|
test("can require commonjs", () => {
|
||||||
|
const require = createRequire(import.meta.url)
|
||||||
|
expect(() => require("../dist/main.cjs")).not.toThrow()
|
||||||
|
})
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
import packageJson from "reacord/package.json"
|
|
||||||
import type {
|
import type {
|
||||||
LinksFunction,
|
LinksFunction,
|
||||||
LoaderFunction,
|
LoaderFunction,
|
||||||
@@ -13,6 +12,7 @@ import {
|
|||||||
ScrollRestoration,
|
ScrollRestoration,
|
||||||
useLoaderData,
|
useLoaderData,
|
||||||
} from "@remix-run/react"
|
} from "@remix-run/react"
|
||||||
|
import packageJson from "reacord/package.json"
|
||||||
import bannerUrl from "~/assets/banner.png"
|
import bannerUrl from "~/assets/banner.png"
|
||||||
import faviconUrl from "~/assets/favicon.png"
|
import faviconUrl from "~/assets/favicon.png"
|
||||||
import { GuideLinksProvider } from "~/modules/navigation/guide-links-context"
|
import { GuideLinksProvider } from "~/modules/navigation/guide-links-context"
|
||||||
@@ -77,6 +77,7 @@ export default function App() {
|
|||||||
return (
|
return (
|
||||||
<html lang="en" className="bg-slate-900 text-slate-100">
|
<html lang="en" className="bg-slate-900 text-slate-100">
|
||||||
<head>
|
<head>
|
||||||
|
{/* eslint-disable-next-line unicorn/text-encoding-identifier-case */}
|
||||||
<meta charSet="utf-8" />
|
<meta charSet="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||||
<Meta />
|
<Meta />
|
||||||
@@ -84,9 +85,10 @@ export default function App() {
|
|||||||
{process.env.NODE_ENV === "production" && (
|
{process.env.NODE_ENV === "production" && (
|
||||||
<script
|
<script
|
||||||
async
|
async
|
||||||
data-website-id="49c69ade-5593-4853-9686-c9ca9d519a18"
|
defer
|
||||||
src="https://umami-production-265f.up.railway.app/umami.js"
|
data-website-id="e3ce3a50-720e-4489-be37-cc091c1b7029"
|
||||||
/>
|
src="https://umami-production-72bc.up.railway.app/umami.js"
|
||||||
|
></script>
|
||||||
)}
|
)}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"typecheck": "tsc --noEmit && tsc --project cypress/tsconfig.json --noEmit"
|
"typecheck": "tsc --noEmit && tsc --project cypress/tsconfig.json --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@headlessui/react": "^1.5.0",
|
"@headlessui/react": "^1.6.0",
|
||||||
"@heroicons/react": "^1.0.6",
|
"@heroicons/react": "^1.0.6",
|
||||||
"@reach/rect": "^0.17.0",
|
"@reach/rect": "^0.17.0",
|
||||||
"@remix-run/node": "^1.4.1",
|
"@remix-run/node": "^1.4.1",
|
||||||
@@ -33,13 +33,13 @@
|
|||||||
"@remix-run/node": "^1.4.1",
|
"@remix-run/node": "^1.4.1",
|
||||||
"@testing-library/cypress": "^8.0.2",
|
"@testing-library/cypress": "^8.0.2",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"@types/react": "^18.0.6",
|
"@types/react": "^18.0.7",
|
||||||
"@types/react-dom": "^18.0.2",
|
"@types/react-dom": "^18.0.2",
|
||||||
"@types/tailwindcss": "^3.0.10",
|
"@types/tailwindcss": "^3.0.10",
|
||||||
"@types/wait-on": "^5.3.1",
|
"@types/wait-on": "^5.3.1",
|
||||||
"autoprefixer": "^10.4.4",
|
"autoprefixer": "^10.4.5",
|
||||||
"concurrently": "^7.1.0",
|
"concurrently": "^7.1.0",
|
||||||
"cypress": "^9.5.4",
|
"cypress": "^9.6.0",
|
||||||
"execa": "^6.1.0",
|
"execa": "^6.1.0",
|
||||||
"postcss": "^8.4.12",
|
"postcss": "^8.4.12",
|
||||||
"rehype-prism-plus": "^1.3.2",
|
"rehype-prism-plus": "^1.3.2",
|
||||||
@@ -48,8 +48,5 @@
|
|||||||
"typescript": "^4.6.3",
|
"typescript": "^4.6.3",
|
||||||
"wait-on": "^6.0.1"
|
"wait-on": "^6.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
|
||||||
"node": ">=14"
|
|
||||||
},
|
|
||||||
"sideEffects": false
|
"sideEffects": false
|
||||||
}
|
}
|
||||||
|
|||||||
1959
pnpm-lock.yaml
generated
1959
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user