mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-02 10:41:54 +02:00
♻️ Move nanoid to utils package (#1430)
This commit is contained in:
parent
d55131c2ab
commit
0fc7d0a0c8
12 changed files with 371 additions and 439 deletions
|
@ -28,7 +28,7 @@
|
|||
"i18next-icu": "^2.3.0",
|
||||
"intl-messageformat": "^10.3.4",
|
||||
"lodash": "^4.17.21",
|
||||
"nanoid": "^4.0.0",
|
||||
"nanoid": "^5.0.8",
|
||||
"next-i18next": "^13.0.3",
|
||||
"next-mdx-remote": "^5.0.0",
|
||||
"next-seo": "^6.1.0",
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
"lodash": "^4.17.21",
|
||||
"lucide-react": "^0.387.0",
|
||||
"micro": "^10.0.1",
|
||||
"nanoid": "^4.0.0",
|
||||
"nanoid": "^5.0.8",
|
||||
"next-auth": "^4.24.5",
|
||||
"next-i18next": "^13.0.3",
|
||||
"php-serialize": "^4.1.1",
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
import languages from "@rallly/languages";
|
||||
import { absoluteUrl } from "@rallly/utils/absolute-url";
|
||||
import { randomid } from "@rallly/utils/nanoid";
|
||||
import languageParser from "accept-language-parser";
|
||||
import type { NextRequest, NextResponse } from "next/server";
|
||||
import type { JWT } from "next-auth/jwt";
|
||||
import { encode } from "next-auth/jwt";
|
||||
|
||||
import { randomid } from "@/utils/nanoid";
|
||||
|
||||
const supportedLocales = Object.keys(languages);
|
||||
|
||||
function getCookieSettings() {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { prisma } from "@rallly/database";
|
||||
import { absoluteUrl } from "@rallly/utils/absolute-url";
|
||||
import { generateOtp, randomid } from "@rallly/utils/nanoid";
|
||||
import type {
|
||||
GetServerSidePropsContext,
|
||||
NextApiRequest,
|
||||
|
@ -22,7 +23,6 @@ import { env } from "@/env";
|
|||
import type { RegistrationTokenPayload } from "@/trpc/types";
|
||||
import { getEmailClient } from "@/utils/emails";
|
||||
import { getValueByPath } from "@/utils/get-value-by-path";
|
||||
import { generateOtp, randomid } from "@/utils/nanoid";
|
||||
import { decryptToken } from "@/utils/session";
|
||||
|
||||
const providers: Provider[] = [
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { prisma } from "@rallly/database";
|
||||
import { generateOtp } from "@rallly/utils/nanoid";
|
||||
import { z } from "zod";
|
||||
|
||||
import { posthog } from "@/app/posthog";
|
||||
import { isEmailBlocked } from "@/auth";
|
||||
import { generateOtp } from "@/utils/nanoid";
|
||||
import { createToken, decryptToken } from "@/utils/session";
|
||||
|
||||
import { publicProcedure, rateLimitMiddleware, router } from "../trpc";
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import type { PollStatus } from "@rallly/database";
|
||||
import { prisma } from "@rallly/database";
|
||||
import { absoluteUrl, shortUrl } from "@rallly/utils/absolute-url";
|
||||
import { nanoid } from "@rallly/utils/nanoid";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
import dayjs from "dayjs";
|
||||
import * as ics from "ics";
|
||||
|
@ -10,7 +11,6 @@ import { posthog } from "@/app/posthog";
|
|||
import { getEmailClient } from "@/utils/emails";
|
||||
|
||||
import { getTimeZoneAbbreviation } from "../../utils/date";
|
||||
import { nanoid } from "../../utils/nanoid";
|
||||
import {
|
||||
possiblyPublicProcedure,
|
||||
proProcedure,
|
||||
|
|
20
packages/eslint-config/react.js
vendored
Normal file
20
packages/eslint-config/react.js
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
const preset = require("./preset");
|
||||
|
||||
/** @return {import("eslint").Linter.Config} */
|
||||
module.exports = function (workspaceDirPath) {
|
||||
const baseConfig = preset(workspaceDirPath);
|
||||
|
||||
return {
|
||||
...baseConfig,
|
||||
extends: [
|
||||
...baseConfig.extends,
|
||||
"plugin:react/recommended",
|
||||
"plugin:react-hooks/recommended",
|
||||
],
|
||||
settings: {
|
||||
react: {
|
||||
version: "detect",
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
|
@ -3,10 +3,13 @@
|
|||
"display": "Default",
|
||||
"extends": "@tsconfig/strictest/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"noPropertyAccessFromIndexSignature": false,
|
||||
"exactOptionalPropertyTypes": false,
|
||||
"noUncheckedIndexedAccess": false,
|
||||
"noImplicitReturns": false,
|
||||
"verbatimModuleSyntax": true
|
||||
"verbatimModuleSyntax": true,
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@rallly/utils",
|
||||
"type": "module",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
@ -8,6 +9,9 @@
|
|||
"exports": {
|
||||
"./*": "./src/*.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"nanoid": "^5.0.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vitest": "^2.1.1"
|
||||
}
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
"compilerOptions": {
|
||||
"types": ["vitest/globals"],
|
||||
},
|
||||
"extends": "@rallly/tsconfig/react.json",
|
||||
"extends": "@rallly/tsconfig/base.json",
|
||||
"include": ["**/*.ts", "**/*.tsx"],
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue