Skip to content

Commit

Permalink
replace debug & mfs by cher-ami version
Browse files Browse the repository at this point in the history
  • Loading branch information
willybrauner committed Nov 2, 2023
1 parent 65f5b00 commit c4c80c1
Show file tree
Hide file tree
Showing 23 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ render previous and current page component when route change.

This router loads [history](https://github.com/ReactTraining/history)
, [path-to-regexp](https://github.com/pillarjs/path-to-regexp)
and [@wbe/debug](https://github.com/willybrauner/debug) as dependencies.
and [@cher-ami/debug](https://github.com/willybrauner/debug) as dependencies.

## Playground

Expand Down
2 changes: 1 addition & 1 deletion examples/example-client/src/helper/transitionsHelper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { gsap } from "gsap"
import debug from "@wbe/debug"
import debug from "@cher-ami/debug"
const log = debug(`router:transitionsHelper`)

export const transitionsHelper = (
Expand Down
2 changes: 1 addition & 1 deletion examples/example-client/src/pages/ArticlePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { ForwardedRef, forwardRef, useEffect, useRef } from "react"
import { useLocation } from "@cher-ami/router"
import { useStack } from "@cher-ami/router"
import { transitionsHelper } from "../helper/transitionsHelper"
import debug from "@wbe/debug"
import debug from "@cher-ami/debug"

interface IProps {
params?: {
Expand Down
2 changes: 1 addition & 1 deletion examples/example-client/src/pages/BarPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from "@cher-ami/router"
import { transitionsHelper } from "../helper/transitionsHelper"
import { routesList } from "../routes"
import debug from "@wbe/debug"
import debug from "@cher-ami/debug"

const componentName: string = "BarPage"
const log = debug(`router:${componentName}`)
Expand Down
2 changes: 1 addition & 1 deletion examples/example-client/src/pages/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
useStack,
} from "@cher-ami/router"
import { transitionsHelper } from "../helper/transitionsHelper"
import debug from "@wbe/debug"
import debug from "@cher-ami/debug"

const componentName: string = "HomePage"
const log = debug(`router:${componentName}`)
Expand Down
4 changes: 2 additions & 2 deletions examples/example-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"@types/react": "^18.2.24",
"@types/react-dom": "^18.2.8",
"@vitejs/plugin-react": "^4.1.0",
"@wbe/debug": "^1.2.0",
"@wbe/mfs": "^0.1.1",
"@cher-ami/debug": "^1.2.0",
"@cher-ami/mfs": "^0.1.1",
"chalk": "^5.3.0",
"compression": "^1.7.4",
"isomorphic-unfetch": "^4.0.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/example-ssr/prerender/prerender.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @ts-ignore
import { render } from "~/server/index-server"
import * as mfs from "@wbe/mfs"
import * as mfs from "@cher-ami/mfs"
import path, { resolve } from "path"
import chalk from "chalk"
import { loadEnv } from "vite"
Expand Down
2 changes: 1 addition & 1 deletion examples/example-ssr/src/helpers/transitionsHelper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { gsap } from "gsap"
import debug from "@wbe/debug"
import debug from "@cher-ami/debug"
const log = debug(`router:transitionsHelper`)

export const transitionsHelper = (
Expand Down
2 changes: 1 addition & 1 deletion examples/example-ssr/src/pages/AboutPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from "@cher-ami/router"
import { transitionsHelper } from "../helpers/transitionsHelper"
import { getPathByRouteName } from "@cher-ami/router"
import debug from "@wbe/debug"
import debug from "@cher-ami/debug"
import { useLang } from "@cher-ami/router"
import { EPages } from "../routes"

Expand Down
2 changes: 1 addition & 1 deletion examples/example-ssr/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { resolve } from "path"
import { defineConfig } from "vite"
import debug from "@wbe/debug"
import debug from "@cher-ami/debug"
import react from "@vitejs/plugin-react"
const log = debug("config:vite.config")

Expand Down
2 changes: 1 addition & 1 deletion examples/example-ssr/vite.scripts.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { resolve } from "path"
import { defineConfig } from "vite"
import debug from "@wbe/debug"
import debug from "@cher-ami/debug"
const log = debug("config:vite.config")

export default defineConfig(({ command, mode }) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}
],
"dependencies": {
"@wbe/debug": "^1.2.0",
"@cher-ami/debug": "^1.2.0",
"history": "^5.3.0",
"path-to-regexp": "^6.2.1",
"react": ">=16.8.0",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/components/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { createUrl, TOpenRouteParams } from "../core/core"
import { joinPaths, removeLastCharFromString } from "../core/helpers"
import { useRouter } from "../hooks/useRouter"
import { useLocation } from "../hooks/useLocation"
import debug from "@wbe/debug"
import debug from "@cher-ami/debug"

// exclude href because it collides with "to"
type TAnchorWithoutHref = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "href">
Expand Down
2 changes: 1 addition & 1 deletion src/components/Router.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import debug from "@wbe/debug"
import debug from "@cher-ami/debug"
import { BrowserHistory, HashHistory, MemoryHistory } from "history"
import { Match } from "path-to-regexp"
import React, {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Stack.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react"
import { IRouterContext } from "./Router"
import debug from "@wbe/debug"
import debug from "@cher-ami/debug"
import { IRouteStack } from "../hooks/useStack"
import { useRouter } from "../hooks/useRouter"
import { isSSR } from "../core/helpers"
Expand Down
2 changes: 1 addition & 1 deletion src/core/LangService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Routers } from "./Routers"
import { compileUrl, createUrl } from "./core"
import { isSSR, joinPaths, removeLastCharFromString } from "./helpers"
import { TRoute } from "../components/Router"
import debug from "@wbe/debug"
import debug from "@cher-ami/debug"

const log = debug(`router:LangService`)

Expand Down
2 changes: 1 addition & 1 deletion src/core/core.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Routers } from "./Routers"
import debug from "@wbe/debug"
import debug from "@cher-ami/debug"
import { compile, match } from "path-to-regexp"
import { TRoute } from "../components/Router"
import LangService from "./LangService"
Expand Down
2 changes: 1 addition & 1 deletion src/core/staticPropsCache.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Routers } from "./Routers"
import debug from "@wbe/debug"
import debug from "@cher-ami/debug"
const componentName: string = "cache"
const log = debug(`router:${componentName}`)

Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useHistory.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BrowserHistory, HashHistory, MemoryHistory, Update } from "history"
import React from "react"
import { useRouter } from "./useRouter"
import debug from "@wbe/debug"
import debug from "@cher-ami/debug"

const log = debug("router:useHistory")

Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useLang.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import LangService, { TLanguage } from "../core/LangService"
import debug from "@wbe/debug"
import debug from "@cher-ami/debug"
import React from "react"
import { Routers } from "../core/Routers"
import { useHistory } from "../hooks/useHistory"
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useLocation.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from "react"
import { useHistory } from "../hooks/useHistory"
import { createUrl, TOpenRouteParams } from "../core/core"
import debug from "@wbe/debug"
import debug from "@cher-ami/debug"
import { useRouter } from "./useRouter"
const log = debug("router:useLocation")

Expand Down
2 changes: 1 addition & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
dts: true,
format: ["cjs", "esm"],
name: "@cher-ami/router",
external: ["@wbe/debug", "history", "path-to-regexp", "react", "react-dom"],
external: ["@cher-ami/debug", "history", "path-to-regexp", "react", "react-dom"],
sourcemap: true,
async onSuccess() {
const process = spawn("npx", ["size-limit"], { shell: true })
Expand Down

0 comments on commit c4c80c1

Please sign in to comment.