Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

chore: more utils import re-org#1134

Merged
mydearxym merged 18 commits intodevfromdebug-ci-build
Aug 3, 2021
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
18 commits
Select commitHold shift + click to select a range
49f11e4
chore: hide PagedArticles tmply
mydearxymAug 3, 2021
3f2a338
chore: downgrade cypress
mydearxymAug 3, 2021
f494bcd
chore: debug
mydearxymAug 3, 2021
89caad3
chore: abs import re-org
mydearxymAug 3, 2021
a45a02e
chore: bring e2e tests back
mydearxymAug 3, 2021
1636a81
chore: debug net err
mydearxymAug 3, 2021
390df3d
chore: retest cy 4.2.0
mydearxymAug 3, 2021
c92d5d0
chore: try NO_PROXY
mydearxymAug 3, 2021
4ec220a
chore: alright, use latest
mydearxymAug 3, 2021
e34d9aa
chore: try cy official example
mydearxymAug 3, 2021
1df2cfb
chore: try cy official example
mydearxymAug 3, 2021
1692949
chore: try cy official example
mydearxymAug 3, 2021
dc22ed6
chore: try cy official example
mydearxymAug 3, 2021
4c26f04
chore: debug actions
mydearxymAug 3, 2021
37dd8df
chore: debug actions
mydearxymAug 3, 2021
5c08be2
chore: debug actions
mydearxymAug 3, 2021
19d3c37
chore: debug actions
mydearxymAug 3, 2021
df451f6
chore: debug actions aaa
mydearxymAug 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions.github/workflows/ci.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -87,9 +87,24 @@ jobs:
- name: (Frontend) Build Project
working-directory: ./frontend_server
run: npm run build.ci
- name:(Frontend) Check Bundle Size
- name:check /etc/hosts
working-directory: ./frontend_server
run: BUNDLEWATCH_GITHUB_TOKEN=${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }} npm run size.check
- name: (Frontend) Run e2e Tests
run: echo "#>>>>#"; cat /etc/hosts; pwd; echo "#>>>>#"
# - name: (Frontend) Check Bundle Size
# working-directory: ./frontend_server
# run: BUNDLEWATCH_GITHUB_TOKEN=${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }} npm run size.check
# - name: (Frontend) Run e2e Tests
# working-directory: ./frontend_server
# run: npm run test:ci
cypress-run:
name: run cypress
runs-on: ubuntu-latest
steps:
- name: Cypress run
working-directory: ./frontend_server
run: npm run test:ci
uses: cypress-io/github-action@v2
with:
browser: chrome
# build: npm run build
start: npm run ci
wait-on: http://localhost:3000
4 changes: 2 additions & 2 deletionspackage.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@
"dev": "cross-env NODE_ENV=dev node server.js",
"prod": "cross-env NODE_ENV=production run-p server",
"local": "cross-env NODE_ENV=local node server",
"ci": "cross-env NODE_ENV=ci node server --inspect",
"ci": "cross-env NODE_ENV=ci node server",
"server": "npm run clean && node server.js",
"build": "next build",
"build:clean": "run-s dist clean",
Expand DownExpand Up@@ -149,7 +149,7 @@
"bundlewatch": "^0.2.7",
"commitizen": "3.1.2",
"coveralls": "3.0.14",
"cypress": "4.2.0",
"cypress": "^8.1.0",
"cz-conventional-changelog": "^3.0.0",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.2",
Expand Down
3 changes: 2 additions & 1 deletionsrc/components/FormItem/index.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,8 @@ import React from 'react'
import T from 'prop-types'
import { isEmpty } from 'ramda'

import { buildLog, hasValue } from '@/utils'
import { buildLog } from '@/utils/logger'
import { hasValue } from '@/utils/validator'
import { SIZE } from '@/constant'
import Maybe from '@/components/Maybe'

Expand Down
2 changes: 1 addition & 1 deletionsrc/components/Modal/Belt.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import React from 'react'

import{useScript}from '@/hooks'
import useScript from '@/hooks/useScript'

import { Wrapper, Holder } from './styles/belt'

Expand Down
2 changes: 1 addition & 1 deletionsrc/components/Modal/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,7 +10,7 @@ import usePortal from 'react-useportal'
import { ICON_CMD } from '@/config'
import { toggleGlobalBlur } from '@/utils/dom'
import { buildLog } from '@/utils/logger'
import{useShortcut}from '@/hooks'
import useShortcut from '@/hooks/useShortcut'

import ViewportTracker from '@/components/ViewportTracker'
import Belt from './Belt'
Expand Down
12 changes: 5 additions & 7 deletionssrc/components/NaviCatalog/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,13 +8,11 @@ import { FC, useState, useCallback, useEffect, memo } from 'react'
import { find, findIndex, propEq, last } from 'ramda'

import { URL_QUERY } from '@/constant'
import {
buildLog,
nilOrEmpty,
getQueryFromUrl,
markRoute,
findDeepMatch,
} from '@/utils'

import { findDeepMatch } from '@/utils/helper'
import { buildLog } from '@/utils/logger'
import { nilOrEmpty } from '@/utils/validator'
import { getQueryFromUrl, markRoute } from '@/utils/route'

import type { TMenuItem, TMenuMode } from './spec'
import { ROOT_MENU, CHILD_MENU } from './constant'
Expand Down
3 changes: 2 additions & 1 deletionsrc/components/PostItem/ListView.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,8 @@ import TimeAgo from 'timeago-react'

import type { TPost } from '@/spec'
import { ICON_CMD } from '@/config'
import { cutRest, parseDomain } from '@/utils'
import { cutRest } from '@/utils/helper'
import { parseDomain } from '@/utils/route'

import InlineTags from '@/components/InlineTags'

Expand Down
8 changes: 6 additions & 2 deletionssrc/components/Switcher/Tabs/TabIcon.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import React, { FC, useCallback } from 'react'
import { FC, useCallback } from 'react'
import dynamic from 'next/dynamic'

import type { TTabItem } from '@/spec'
import LocalIcon from './LocalIcon'
import { Wrapper, Icon } from '../styles/tabs/tab_icon'

type TProps = {
Expand All@@ -12,6 +12,10 @@ type TProps = {
active: boolean
}

export const LocalIcon = dynamic(() => import('./LocalIcon'), {
ssr: false,
})

const TabIcon: FC<TProps> = ({ item, clickableRef, active }) => {
const { localIcon, icon } = item

Expand Down
4 changes: 3 additions & 1 deletionsrc/components/Switcher/Tabs/TabItem.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,9 @@
import { FC, useEffect, useCallback, useRef, memo } from 'react'

import type { TSIZE_SM, TTabItem } from '@/spec'
import { buildLog, isString, Trans } from '@/utils'
import { Trans } from '@/utils/i18n'
import { isString } from '@/utils/validator'
import { buildLog } from '@/utils/logger'

import TabIcon from './TabIcon'
import {
Expand Down
3 changes: 2 additions & 1 deletionsrc/components/ThemeSelector/styles/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
import styled from 'styled-components'

import type { TActive, TThemeName } from '@/spec'
import { theme, themeCoverMap, themeCoverIndexMap, css } from '@/utils'
import { theme, themeCoverMap, themeCoverIndexMap } from '@/utils/themes'
import css from '@/utils/css'

type TDot = TActive & { name: TThemeName }
export const Dot = styled.div<TDot>`
Expand Down
9 changes: 7 additions & 2 deletionssrc/components/Tooltip/RealTooltip.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,8 +8,13 @@ import { FC, ReactNode, useState, useRef, memo } from 'react'
import { hideAll } from 'tippy.js'

import type { TTooltipPlacement } from '@/spec'
import { css, buildLog, isDescendant, isString } from '@/utils'
import { useOutsideClick } from '@/hooks'

import css from '@/utils/css'
import { buildLog } from '@/utils/logger'
import { isString } from '@/utils/validator'
import { isDescendant } from '@/utils/dom'

import useOutsideClick from '@/hooks/useOutsideClick'

import ConfirmFooter from './ConfirmFooter'
import { FOOTER_BEHAVIOR } from './constant'
Expand Down
2 changes: 1 addition & 1 deletionsrc/components/UserBrief/NumbersPad.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import React from 'react'

import { prettyNum } from '@/utils'
import { prettyNum } from '@/utils/helper'
import { Wrapper, Section, Title, Number } from './styles/numbers_pad'

const NumbersPad = ({ user, listFollowers, listFollowings }) => (
Expand Down
3 changes: 2 additions & 1 deletionsrc/components/UserBrief/SocialIcons.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,8 @@ import React from 'react'
import { contains } from 'ramda'

import { ICON_CMD } from '@/config'
import { nilOrEmpty, SOCIAL_LISTS } from '@/utils'
import SOCIAL_LISTS from '@/utils/social'
import { nilOrEmpty } from '@/utils/validator'

import Tooltip from '@/components/Tooltip'
import { Wrapper, Linker, SocialIcon } from './styles/social_icons'
Expand Down
2 changes: 1 addition & 1 deletionsrc/containers/Route/index.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@
import React from 'react'
import { useRouter } from 'next/router'

import { pluggedIn } from '@/utils'
import { pluggedIn } from '@/utils/mobx'
import { useInit } from './logic'

const RouteContainer = ({ route }) => {
Expand Down
5 changes: 4 additions & 1 deletionsrc/containers/Route/logic.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
import { useEffect } from 'react'
import { Global, buildLog, parseURL } from '@/utils'

import { parseURL } from '@/utils/route'
import { Global } from '@/utils/helper'
import { buildLog } from '@/utils/logger'

/* eslint-disable-next-line */
const log = buildLog('L:Route')
Expand Down
5 changes: 4 additions & 1 deletionsrc/containers/content/ArticleContent/logic.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
import { useEffect } from 'react'

import { EVENT, ERR } from '@/constant'
import { asyncSuit, buildLog, errRescue, isElementInViewport } from '@/utils'
import { isElementInViewport } from '@/utils/dom'
import { errRescue } from '@/utils/helper'
import { buildLog } from '@/utils/logger'
import asyncSuit from '@/utils/async'

import type { TStore } from './store'
import S from './schema'
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
import styled from 'styled-components'

import type { TTestable, TMetric } from '@/spec'
import { theme, css, WIDTH } from '@/utils'
import css from '@/utils/css'
import { theme } from '@/utils/themes'
import { WIDTH } from '@/utils/css/metric'

export const Wrapper = styled.article.attrs(({ testid }: TTestable) => ({
'data-test-id': testid,
Expand Down
6 changes: 5 additions & 1 deletionsrc/containers/content/CommunityContent/logic.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,11 @@ import { values, includes } from 'ramda'

import type { TThread } from '@/spec'
import { ERR, EVENT, ARTICLE_THREAD } from '@/constant'
import { send, asyncSuit, buildLog, errRescue, thread2Subpath } from '@/utils'

import { send, errRescue } from '@/utils/helper'
import { thread2Subpath } from '@/utils/route'
import asyncSuit from '@/utils/async'
import { buildLog } from '@/utils/logger'

import type { TStore } from './store'

Expand Down
2 changes: 1 addition & 1 deletionsrc/containers/content/CoolGuideContent/FilterBar.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import { FC, Fragment, memo } from 'react'

import { ICON_CMD } from '@/config'
import { mockNaviCatalogMenu } from '@/utils'
import { mockNaviCatalogMenu } from '@/utils/mock'

import Sticky from '@/components/Sticky'
import NaviIntro from '@/components/NaviIntro'
Expand Down
4 changes: 3 additions & 1 deletionsrc/containers/content/CoolGuideContent/logic.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
import { useEffect } from 'react'

import { ERR } from '@/constant'
import { asyncSuit, buildLog, errRescue } from '@/utils'
import { errRescue } from '@/utils/helper'
import asyncSuit from '@/utils/async'
import { buildLog } from '@/utils/logger'

import type { TStore } from './store'

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@ import React from 'react'
import { contains } from 'ramda'

import { NON_FILL_COMMUNITY } from '@/constant'
import { prettyNum, cutRest } from '@/utils'
import { prettyNum, cutRest } from '@/utils/helper'

import TrendLine from '@/components/TrendLine'
import { CommunityHolder } from '@/components/Loading'
Expand Down
13 changes: 6 additions & 7 deletionssrc/containers/content/DiscoveryContent/logic.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,13 +2,12 @@ import { useEffect } from 'react'
import { isEmpty } from 'ramda'

import { EVENT, ERR } from '@/constant'
import {
asyncSuit,
buildLog,
pagedFilter,
errRescue,
updateEditing,
} from '@/utils'

import { errRescue } from '@/utils/helper'
import { pagedFilter } from '@/utils/graphql'
import asyncSuit from '@/utils/async'
import { buildLog } from '@/utils/logger'
import { updateEditing } from '@/utils/mobx'

import S from './schema'

Expand Down
7 changes: 5 additions & 2 deletionssrc/containers/content/HaveADrinkContent/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,8 +8,11 @@ import { FC } from 'react'
import dynamic from 'next/dynamic'

import type { TMetric } from '@/spec'
import { pluggedIn, buildLog, scrollToTop, lockPage, unlockPage } from '@/utils'
import { useShortcut } from '@/hooks'
import { scrollToTop, lockPage, unlockPage } from '@/utils/dom'
import { buildLog } from '@/utils/logger'
import { pluggedIn } from '@/utils/mobx'

import useShortcut from '@/hooks/useShortcut'

import type { TStore } from './store'
import Header from './Header'
Expand Down
5 changes: 4 additions & 1 deletionsrc/containers/content/HaveADrinkContent/logic.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
import { useEffect } from 'react'

import { ERR } from '@/constant'
import { asyncSuit, buildLog, errRescue } from '@/utils'

import { errRescue } from '@/utils/helper'
import asyncSuit from '@/utils/async'
import { buildLog } from '@/utils/logger'

import { ANIMATE_TIMER_CLASS } from './constant'
import type { TStore } from './store'
Expand Down
5 changes: 4 additions & 1 deletionsrc/containers/content/MeetupsContent/logic.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
import { useEffect } from 'react'

import { ERR } from '@/constant'
import { asyncSuit, buildLog, errRescue } from '@/utils'

import { errRescue } from '@/utils/helper'
import asyncSuit from '@/utils/async'
import { buildLog } from '@/utils/logger'

import type { TStore } from './store'

Expand Down
3 changes: 2 additions & 1 deletionsrc/containers/content/MembershipContent/logic.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,8 @@ import { useEffect } from 'react'

import { SENIOR_AMOUNT_THRESHOLD } from '@/config'
import { PAYMENT_USAGE } from '@/constant'
import { asyncSuit, buildLog } from '@/utils'
import asyncSuit from '@/utils/async'
import { buildLog } from '@/utils/logger'

import type { TStore } from './store'
import type { TPackage } from './spec'
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
import styled, { css as styledCss } from 'styled-components'

import type { TActive } from '@/spec'
import { animate, css } from '@/utils'
import css from '@/utils/css'
import animate from '@/utils/animations'
import Img from '@/Img'

export const Wrapper = styled.div<TActive>`
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
import styled, { css as styledCss } from 'styled-components'

import type { TTestable, TActive } from '@/spec'
import { animate, css } from '@/utils'
import css from '@/utils/css'
import animate from '@/utils/animations'

import {
Star1 as Star1Base,
Expand Down
2 changes: 1 addition & 1 deletionsrc/containers/content/RecipesContent/tempData.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
import { ICON_BASE } from '@/config'
import{uid}from '@/utils'
import uid from '@/utils/uid'

const menu = [
{
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@ import React from 'react'

import { ICON_CMD } from '@/config'

import{useCopyToClipboard}from '@/hooks'
import useCopyToClipboard from 'react-use/lib/useCopyToClipboard'
import EmailSubscriber from '@/components/EmailSubscriber'
import { Br, SpaceGrow } from '@/components/Common'
// TODO: extract to Email Subscriber
Expand Down
5 changes: 4 additions & 1 deletionsrc/containers/content/SubscribeContent/styles/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
import styled from 'styled-components'

import type { TTestable } from '@/spec'
import { css, theme, WIDTH } from '@/utils'
import Sticky from '@/components/Sticky'

import { theme } from '@/utils/themes'
import css from '@/utils/css'
import { WIDTH } from '@/utils/css/metric'

export const Wrapper = styled.div.attrs(({ testid }: TTestable) => ({
'data-test-id': testid,
}))<TTestable>`
Expand Down
5 changes: 4 additions & 1 deletionsrc/containers/content/UserContent/logic.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,10 @@ import { useEffect } from 'react'

import type { TID, TThread, TUser } from '@/spec'
import { TYPE, EVENT, ERR } from '@/constant'
import { asyncSuit, buildLog, send, errRescue } from '@/utils'

import asyncSuit from '@/utils/async'
import { send, errRescue } from '@/utils/helper'
import { buildLog } from '@/utils/logger'

import type { TStore } from './store'

Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp