fix(path): change path package to pathe (#4038)
* fix(path): change path package to pathe * fix: handle special chat in filename, fixed #3342 - Integrated @sindresorhus/slugify to format file names based on titles. - Updated pnpm-lock.yaml to include new dependencies. - Minor adjustments in package.json files to ensure consistency. Signed-off-by: Innei <tukon479@gmail.com> * fix: add eslint rule for use pathe first * refactor: useWhoami from user store (#4061) * refactor: useWhoami from user store * update * update * update * update * return all * fix: invalidate entries query after unsubscribe * feat: implement imperative modal (#4041) * feat: implement ImperativeModalProvider with modal context and controls * fix: make onClose prop optional for bottom modal * chore: add ImperativeModalProvider to context providers * feat: wrap BottomModal content in KeyboardAvoidingView for better keyboard handling * chore: add polyfill for Promise.withResolvers * fix: wrap ImperativeModal in a View and update onClose to accept modal ID * feat: implement ImperativeModal with context and modal control hooks * refactor: redesign imperative modal with root-siblings * fix: wrap BottomModal in a View to resolve rendering issues on Android * refactor: replace Alert.prompt with modalPrompt for category creation and renaming * fix(desktop): show login modal when auth fail * feat: invalidate entry readability cache * refactor: long press to open text select sheet for ai summary * feat: new domain folo.is * fix: enhance auth client with mobile-specific headers (#4064) * feat(desktop): add missing i18n key (#4066) * feat: update twitter handle * docs: use google play badge * feat: add hideAvatar prop to ProfileSettingForm for conditional avatar display Signed-off-by: Innei <tukon479@gmail.com> * docs: update images * feat(ssr): add Google Analytics tracking to index.html - Integrated Google Tag Manager for enhanced tracking and analytics capabilities. - Added asynchronous loading of gtag.js and configuration for tracking ID G-DZMBZBW3EC. Signed-off-by: Innei <tukon479@gmail.com> * chore: Update Japanese Languages (#4078) * chore: update ja.json * chore: update 6 ja.json files chore: update and bump 6 ja.json files. * chore: update error/ja.json fix locale/error/ja.json * chore: auto-fix linting and formatting issues * chore: update app/ja.json * chore: update ja.json * chore: update ja.json * chore: update ja.json and tested local. * chore: update ja.json update settings/ja.json * feat(i18n): update Japanese locale files with new error messages and dialog options * chore(vscode): set default formatter for JSON and JSONC files * Remove JSON and JSONC formatter settings so sorry, @hyoban 😢 Perhaps my local settings are in. I have restored it to the original. Thanks for your kindness. You have always been a great help. * chore: auto-fix linting and formatting issues * chore: update ja.json sync and update settings/ja.json * chore: update Japanese translations for clarity and consistency * chore: update some ja.json * chore(locales): update Japanese translations with new entry actions and settings * fix: update Japanese translations for user actions and login prompts * feat(locales): add Japanese translations for login and registration features * feat(locales): update Japanese translations for RSSHub and related settings * chore: auto-fix linting and formatting issues * feat(i18n): update Japanese locale with new toolbar customization and profile link social fields * feat(locales): update Japanese translations for search results and two-factor authentication * feat: 日本語ローカライズの更新 --------- Co-authored-by: dai <dai@users.noreply.github.com> Co-authored-by: Innei <i@innei.in> Co-authored-by: Innei <Innei@users.noreply.github.com> * feat(desktop): real user deletion * feat(mobile): real user deletion * feat(settings): add accent color customization and update UI components - Introduced accent color setting to allow users to customize the app's interface. - Updated various components to utilize the new accent color, including buttons, sliders, and text elements. - Added translations for accent color settings in English, Japanese, and Chinese. - Refactored related styles in Tailwind CSS configuration to support the new accent color feature. Signed-off-by: Innei <tukon479@gmail.com> * fix: update text styling for feed parameters message * feat: use insertedBefore for mark above read * feat(mobile): use insertedBefore for mark above read * fix: improved lightbox component for iOS (#4089) * feat: replace Image component with ProxyImage for improved performance and styling * fix: update Image component style prop * fix: improved layout in ImageItem component * feat: integrate animated ref for media preview in EntryPictureItem * fix: option can not be press when out of screen in the FlatList * fix: lint * fix: types * fix: update lock * fix: lint * chore: auto-fix linting and formatting issues --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Innei <tukon479@gmail.com> Co-authored-by: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Co-authored-by: Whitewater <me@waterwater.moe> Co-authored-by: lawvs <18554747+lawvs@users.noreply.github.com> Co-authored-by: DIYgod <i@diygod.me> Co-authored-by: Konv Suu <2583695112@qq.com> Co-authored-by: dai <dosada@gmail.com> Co-authored-by: dai <dai@users.noreply.github.com> Co-authored-by: Innei <i@innei.in> Co-authored-by: Innei <Innei@users.noreply.github.com>
This commit is contained in:
parent
9931e412e0
commit
913b1178c8
|
|
@ -1,7 +1,6 @@
|
|||
import { dirname } from "node:path"
|
||||
import { resolve } from "node:path/posix"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import { dirname, resolve } from "pathe"
|
||||
import { tsImport } from "tsx/esm/api"
|
||||
import type { UserConfig } from "vite"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { readFileSync } from "node:fs"
|
||||
import { dirname, resolve } from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import { sentryVitePlugin } from "@sentry/vite-plugin"
|
||||
import react from "@vitejs/plugin-react"
|
||||
import { codeInspectorPlugin } from "code-inspector-plugin"
|
||||
import { dirname, resolve } from "pathe"
|
||||
import { prerelease } from "semver"
|
||||
import type { UserConfig } from "vite"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { resolve } from "node:path"
|
||||
|
||||
import { defineConfig } from "electron-vite"
|
||||
import { resolve } from "pathe"
|
||||
|
||||
import { getGitHash } from "../../scripts/lib"
|
||||
import rendererConfig from "./configs/vite.electron-render.config"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import "dotenv/config"
|
|||
import crypto from "node:crypto"
|
||||
import fs, { readdirSync } from "node:fs"
|
||||
import { cp, readdir } from "node:fs/promises"
|
||||
import path, { resolve } from "node:path"
|
||||
|
||||
import { FuseV1Options, FuseVersion } from "@electron/fuses"
|
||||
import { MakerAppX } from "@electron-forge/maker-appx"
|
||||
|
|
@ -16,6 +15,7 @@ import type { ForgeConfig } from "@electron-forge/shared-types"
|
|||
import MakerAppImage from "@pengx17/electron-forge-maker-appimage"
|
||||
import setLanguages from "electron-packager-languages"
|
||||
import yaml from "js-yaml"
|
||||
import path, { resolve } from "pathe"
|
||||
import { rimraf, rimrafSync } from "rimraf"
|
||||
|
||||
const platform = process.argv.find((arg) => arg.startsWith("--platform"))?.split("=")[1]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import path from "node:path"
|
||||
|
||||
import { app, protocol } from "electron"
|
||||
import path from "pathe"
|
||||
|
||||
import { initializeSentry } from "./sentry"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import path from "node:path"
|
||||
|
||||
import { app } from "electron"
|
||||
import path from "pathe"
|
||||
|
||||
export const UNREAD_BACKGROUND_POLLING_INTERVAL = 1000 * 60 * 5
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import path from "node:path"
|
||||
import { fileURLToPath, pathToFileURL } from "node:url"
|
||||
|
||||
import { MODE, ModeEnum } from "@follow/shared/constants"
|
||||
import path from "pathe"
|
||||
|
||||
import { isMacOS, isWindows } from "./env"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import fsp from "node:fs/promises"
|
||||
import path from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import { callWindowExpose } from "@follow/shared/bridge"
|
||||
import { DEV } from "@follow/shared/constants"
|
||||
import { app, BrowserWindow, clipboard, dialog, shell } from "electron"
|
||||
import path from "pathe"
|
||||
|
||||
import { getCacheSize } from "~/lib/cleaner"
|
||||
import { i18n } from "~/lib/i18n"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { existsSync } from "node:fs"
|
||||
import fsp from "node:fs/promises"
|
||||
import path from "node:path"
|
||||
|
||||
import slugify from "@sindresorhus/slugify"
|
||||
import path from "pathe"
|
||||
|
||||
import type { IpcContext } from "../base"
|
||||
import { IpcMethod, IpcService } from "../base"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
|
||||
import { callWindowExpose } from "@follow/shared/bridge"
|
||||
import { readability } from "@follow-app/readability"
|
||||
import { app, BrowserWindow } from "electron"
|
||||
import { MsEdgeTTS, OUTPUT_FORMAT } from "msedge-tts"
|
||||
import path from "pathe"
|
||||
import type { ModelResult } from "vscode-languagedetection"
|
||||
|
||||
import { detectCodeStringLanguage } from "../../modules/language-detection"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { statSync } from "node:fs"
|
||||
import fsp from "node:fs/promises"
|
||||
import path from "node:path"
|
||||
|
||||
import { callWindowExpose } from "@follow/shared/bridge"
|
||||
import { app, dialog } from "electron"
|
||||
import path from "pathe"
|
||||
|
||||
import { getIconPath } from "~/helper"
|
||||
import { logger } from "~/logger"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import path from "node:path"
|
||||
|
||||
import { PushReceiver } from "@eneris/push-receiver"
|
||||
import { callWindowExpose } from "@follow/shared/bridge"
|
||||
import { APP_PROTOCOL, DEV, LEGACY_APP_PROTOCOL } from "@follow/shared/constants"
|
||||
|
|
@ -7,6 +5,7 @@ import { env } from "@follow/shared/env.desktop"
|
|||
import type { MessagingData } from "@follow/shared/hono"
|
||||
import { app, nativeTheme, Notification, shell } from "electron"
|
||||
import contextMenu from "electron-context-menu"
|
||||
import path from "pathe"
|
||||
|
||||
import { WindowManager } from "~/manager/window"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import path from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import { is } from "@electron-toolkit/utils"
|
||||
|
|
@ -8,6 +7,7 @@ import { APP_PROTOCOL, DEV } from "@follow/shared/constants"
|
|||
import type { BrowserWindowConstructorOptions } from "electron"
|
||||
import { app, BrowserWindow, screen, shell } from "electron"
|
||||
import type { Event } from "electron/main"
|
||||
import path from "pathe"
|
||||
|
||||
import { START_IN_TRAY_ARGS } from "~/constants/app"
|
||||
import { isMacOS, isWindows, isWindows11 } from "~/env"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import path from "node:path"
|
||||
|
||||
import { DEV, MODE, ModeEnum } from "@follow/shared/constants"
|
||||
import path from "pathe"
|
||||
|
||||
import { isWindows } from "../env"
|
||||
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@ import { createHash } from "node:crypto"
|
|||
import { existsSync, readFileSync } from "node:fs"
|
||||
import { mkdir, readdir, rename, rm, stat, writeFile } from "node:fs/promises"
|
||||
import os from "node:os"
|
||||
import path from "node:path"
|
||||
|
||||
import { callWindowExpose } from "@follow/shared/bridge"
|
||||
import { mainHash, version as appVersion } from "@pkg"
|
||||
import log from "electron-log"
|
||||
import { load } from "js-yaml"
|
||||
import path from "pathe"
|
||||
import { x } from "tar"
|
||||
|
||||
import { GITHUB_OWNER, GITHUB_REPO, HOTUPDATE_RENDER_ENTRY_DIR } from "~/constants/app"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
|
||||
import { app } from "electron"
|
||||
import path from "pathe"
|
||||
import { major, minor } from "semver"
|
||||
|
||||
let _isSquirrelBuild: boolean | null = null
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { readFileSync } from "node:fs"
|
||||
import { resolve } from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import { resolve } from "pathe"
|
||||
import tsconfigPath from "vite-tsconfig-paths"
|
||||
import { defineProject } from "vitest/config"
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,8 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@hcaptcha/react-hcaptcha": "1.12.0",
|
||||
"cookie-es": "2.0.0"
|
||||
"cookie-es": "2.0.0",
|
||||
"pathe": "2.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@clack/prompts": "0.11.0",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
|
||||
import path from "pathe"
|
||||
import type { Plugin, ResolvedConfig } from "vite"
|
||||
|
||||
export function cleanupUnnecessaryFilesPlugin(files: string[]): Plugin {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { execSync } from "node:child_process"
|
||||
import { createHash } from "node:crypto"
|
||||
import fs from "node:fs/promises"
|
||||
import path from "node:path"
|
||||
|
||||
import path from "pathe"
|
||||
import * as tar from "tar"
|
||||
import type { Plugin } from "vite"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { createHash } from "node:crypto"
|
||||
import fs from "node:fs/promises"
|
||||
import path from "node:path"
|
||||
|
||||
import fg from "fast-glob"
|
||||
import path from "pathe"
|
||||
|
||||
export async function calculateMainHash(mainDir: string): Promise<string> {
|
||||
// Get all TypeScript files in the main directory recursively
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import path from "node:path"
|
||||
|
||||
import { red, yellow } from "kolorist"
|
||||
import path from "pathe"
|
||||
import type { HmrContext, Plugin } from "vite"
|
||||
|
||||
function isNodeWithinCircularImports(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import path from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import { set } from "es-toolkit/compat"
|
||||
import path from "pathe"
|
||||
import type { Logger, Plugin } from "vite"
|
||||
|
||||
const __dirname = fileURLToPath(new URL(".", import.meta.url))
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import fs from "node:fs"
|
||||
import path, { dirname } from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import { set } from "es-toolkit/compat"
|
||||
import path, { dirname } from "pathe"
|
||||
import type { Plugin } from "vite"
|
||||
|
||||
export function localesPlugin(): Plugin {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
|
||||
import path from "pathe"
|
||||
import type { Plugin } from "vite"
|
||||
|
||||
export default function manifestPlugin(): Plugin {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import fs from "node:fs"
|
||||
import path, { dirname } from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import path, { dirname } from "pathe"
|
||||
|
||||
type LanguageCompletion = Record<string, number>
|
||||
|
||||
function getLanguageFiles(dir: string): string[] {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { copyFileSync, readFileSync, renameSync, writeFileSync } from "node:fs"
|
||||
import { dirname, join } from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import { dirname, join } from "pathe"
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const changelogDir = join(__dirname, "..", "changelog")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
|
||||
import yaml from "js-yaml"
|
||||
import path from "pathe"
|
||||
|
||||
const outDir = "./out/make"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { resolve } from "node:path"
|
||||
|
||||
import { resolve } from "pathe"
|
||||
import { defineConfig } from "vite"
|
||||
|
||||
import config from "./configs/vite.electron-render.config"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { existsSync, readFileSync, writeFileSync } from "node:fs"
|
||||
import { resolve } from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import type { env as EnvType } from "@follow/shared/env.desktop"
|
||||
|
|
@ -7,6 +6,7 @@ import legacy from "@vitejs/plugin-legacy"
|
|||
import { minify as htmlMinify } from "html-minifier-terser"
|
||||
import { cyan, dim, green } from "kolorist"
|
||||
import { parseHTML } from "linkedom"
|
||||
import { resolve } from "pathe"
|
||||
import { tsImport } from "tsx/esm/api"
|
||||
import type { PluginOption, ResolvedConfig, ViteDevServer } from "vite"
|
||||
import { defineConfig, loadEnv } from "vite"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { resolve } from "node:path"
|
||||
|
||||
import type { ConfigContext, ExpoConfig } from "expo/config"
|
||||
import { resolve } from "pathe"
|
||||
|
||||
import PKG from "./package.json"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
const { getDefaultConfig } = require("expo/metro-config")
|
||||
const { withNativeWind } = require("nativewind/metro")
|
||||
const path = require("node:path")
|
||||
const path = require("pathe")
|
||||
const { wrapWithReanimatedMetroConfig } = require("react-native-reanimated/metro-config")
|
||||
|
||||
const config = getDefaultConfig(__dirname, { isCSSEnabled: true })
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
const { getDefaultConfig } = require("expo/metro-config")
|
||||
const { withNativeWind } = require("nativewind/metro")
|
||||
const path = require("node:path")
|
||||
const path = require("pathe")
|
||||
const { wrapWithReanimatedMetroConfig } = require("react-native-reanimated/metro-config")
|
||||
|
||||
const config = getDefaultConfig(__dirname, { isCSSEnabled: true })
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
const { AndroidConfig, withAndroidManifest } = require("@expo/config-plugins")
|
||||
const { Paths } = require("@expo/config-plugins/build/android")
|
||||
const path = require("node:path")
|
||||
const path = require("pathe")
|
||||
const fs = require("node:fs")
|
||||
|
||||
const fsPromises = fs.promises
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
const { withDangerousMod, withXcodeProject, IOSConfig } = require("@expo/config-plugins")
|
||||
const fs = require("node:fs")
|
||||
const path = require("node:path")
|
||||
const path = require("pathe")
|
||||
const { execSync } = require("node:child_process")
|
||||
|
||||
const IOS_GROUP_NAME = "Assets"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { copyFileSync, readFileSync, renameSync, writeFileSync } from "node:fs"
|
||||
import { dirname, join } from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import { dirname, join } from "pathe"
|
||||
|
||||
// @ts-ignore
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const changelogDir = join(__dirname, "..", "changelog")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import path from "node:path"
|
||||
|
||||
import { extendConfig } from "@follow/configs/tailwindcss/web"
|
||||
import path from "pathe"
|
||||
|
||||
const rootDir = path.resolve(__dirname, "../../../..")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import path from "node:path"
|
||||
|
||||
import react from "@vitejs/plugin-react"
|
||||
import path from "pathe"
|
||||
import { defineConfig } from "vite"
|
||||
|
||||
import { viteRenderBaseConfig } from "../../../desktop/configs/vite.render.config"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import * as fs from "node:fs/promises"
|
||||
import * as path from "node:path"
|
||||
import { dirname } from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import chokidar from "chokidar"
|
||||
import fg from "fast-glob"
|
||||
import * as path from "pathe"
|
||||
import { dirname } from "pathe"
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { rmSync } from "node:fs"
|
||||
import { dirname, resolve } from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import { dirname, resolve } from "pathe"
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
rmSync(resolve(__dirname, "../.generated"), { recursive: true, force: true })
|
||||
// restore env file
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
import { mkdirSync } from "node:fs"
|
||||
import fs from "node:fs/promises"
|
||||
import path, { dirname } from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import path, { dirname } from "pathe"
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
mkdirSync(path.join(__dirname, "../.generated"), { recursive: true })
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { dirname, resolve } from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import type { FastifyInstance } from "fastify"
|
||||
import { dirname, resolve } from "pathe"
|
||||
import type { ViteDevServer } from "vite"
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import fs from "node:fs"
|
||||
import { createRequire } from "node:module"
|
||||
import path, { resolve } from "node:path"
|
||||
|
||||
import path, { resolve } from "pathe"
|
||||
|
||||
const require = createRequire(import.meta.url)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { readFileSync } from "node:fs"
|
||||
import path, { dirname, resolve } from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import { env } from "@follow/shared/env.ssr"
|
||||
|
|
@ -7,6 +6,7 @@ import type { FastifyInstance, FastifyReply, FastifyRequest } from "fastify"
|
|||
import { minify } from "html-minifier-terser"
|
||||
import { parseHTML } from "linkedom"
|
||||
import { FetchError } from "ofetch"
|
||||
import path, { dirname, resolve } from "pathe"
|
||||
import xss from "xss"
|
||||
|
||||
import { NotFoundError } from "~/lib/not-found"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { createReadStream, createWriteStream, readdirSync, renameSync } from "node:fs"
|
||||
import { createRequire } from "node:module"
|
||||
import { resolve } from "node:path"
|
||||
|
||||
import { resolve } from "pathe"
|
||||
import { defineConfig } from "tsdown"
|
||||
|
||||
export default defineConfig({
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { dirname, resolve } from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import react from "@vitejs/plugin-react"
|
||||
import { codeInspectorPlugin } from "code-inspector-plugin"
|
||||
import { dirname, resolve } from "pathe"
|
||||
import { tsImport } from "tsx/esm/api"
|
||||
import { defineConfig } from "vite"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
// @ts-check
|
||||
import path from "node:path"
|
||||
|
||||
import { fixupPluginRules } from "@eslint/compat"
|
||||
import { defineConfig } from "eslint-config-hyoban"
|
||||
import reactNative from "eslint-plugin-react-native"
|
||||
import path from "pathe"
|
||||
|
||||
import checkI18nJson from "./plugins/eslint/eslint-check-i18n-json.js"
|
||||
import noDebug from "./plugins/eslint/eslint-no-debug.js"
|
||||
|
|
@ -111,6 +110,23 @@ export default defineConfig(
|
|||
"package-json/require-type": 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ["**/*.{js,ts,tsx}"],
|
||||
rules: {
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
paths: [
|
||||
{
|
||||
name: "node:path",
|
||||
message:
|
||||
"For better cross-platform compatibility, please use 'pathe' instead of 'node:path'",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
plugins: {
|
||||
// @ts-expect-error
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
/* @moduleResolution bundler */
|
||||
import "./tw-css-plugin"
|
||||
|
||||
import path, { resolve } from "node:path"
|
||||
|
||||
import { getIconCollections, iconsPlugin } from "@egoist/tailwindcss-icons"
|
||||
import { cleanupSVG, importDirectorySync, isEmptyColor, parseColors, runSVGO } from "@iconify/tools"
|
||||
import { compareColors, stringToColor } from "@iconify/utils/lib/colors"
|
||||
import { merge } from "es-toolkit/compat"
|
||||
import path, { resolve } from "pathe"
|
||||
import { theme } from "tailwindcss/defaultConfig"
|
||||
import type { Config } from "tailwindcss/types/config"
|
||||
import { withUIKit } from "tailwindcss-uikit-colors/src/macos/tailwind"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { mkdirSync, readFileSync, writeFileSync } from "node:fs"
|
||||
import { resolve } from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import { marked } from "marked"
|
||||
import { resolve } from "pathe"
|
||||
|
||||
// Define paths to markdown and output files
|
||||
const __dirname = fileURLToPath(new URL(".", import.meta.url))
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ vi.mock("fast-glob", () => ({
|
|||
},
|
||||
}))
|
||||
|
||||
vi.mock("node:path", () => ({
|
||||
vi.mock("pathe", () => ({
|
||||
resolve: vi.fn((root: string, path: string) => `${root}/${path}`),
|
||||
relative: vi.fn((from: string, to: string) => to.replace(from, "")),
|
||||
dirname: vi.fn((path: string) => path.split("/").slice(0, -1).join("/")),
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { writeFileSync } from "node:fs"
|
||||
import { dirname, relative, resolve } from "node:path"
|
||||
import { inspect } from "node:util"
|
||||
|
||||
import glob from "fast-glob"
|
||||
import { dirname, relative, resolve } from "pathe"
|
||||
import type { Logger, Plugin } from "vite"
|
||||
|
||||
import { buildGlobRoutes } from "./utils/route-builder"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
// @ts-check
|
||||
/** @type {import("eslint").ESLint.Plugin} */
|
||||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
|
||||
import path from "pathe"
|
||||
|
||||
import { cleanJsonText } from "../utils.js"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
// @ts-check
|
||||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
import process from "node:process"
|
||||
|
||||
import fg from "fast-glob"
|
||||
import path from "pathe"
|
||||
|
||||
const dependencyKeys = ["dependencies", "devDependencies"]
|
||||
|
||||
|
|
|
|||
|
|
@ -167,6 +167,9 @@ importers:
|
|||
cookie-es:
|
||||
specifier: 2.0.0
|
||||
version: 2.0.0
|
||||
pathe:
|
||||
specifier: 2.0.3
|
||||
version: 2.0.3
|
||||
devDependencies:
|
||||
'@clack/prompts':
|
||||
specifier: 0.11.0
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
|
||||
import path from "pathe"
|
||||
|
||||
const sourceDir = "./locales/app"
|
||||
const targetDir = "./locales/mobile/default"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { execSync } from "node:child_process"
|
||||
import { readdirSync, readFileSync, writeFileSync } from "node:fs"
|
||||
import path, { dirname } from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
import { intro, outro, select } from "@clack/prompts"
|
||||
import path, { dirname } from "pathe"
|
||||
import color from "picocolors"
|
||||
import * as ts from "typescript"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
|
||||
import path from "pathe"
|
||||
import { parse } from "svg-parser"
|
||||
|
||||
const DIST_DIR = "apps/mobile/src/icons"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
|
||||
import path from "pathe"
|
||||
|
||||
const PATH_TO_NEW_ICONS_FOLDER = "../SVG 1.36"
|
||||
const PATH_TO_PROJECT_ICONS_FOLDER = "./icons/mgc"
|
||||
|
|
|
|||
Loading…
Reference in New Issue