Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 17 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
cache: pnpm

- name: Install dependencies
run: yarn install:ci --frozen-lockfile
run: pnpm run install:ci --frozen-lockfile

- name: Cache generated files
id: cache-generated-files
Expand All @@ -49,7 +49,7 @@ jobs:
path: |
src/state/data
src/locales
key: ${{ runner.os }}-generatedFiles-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-generatedFiles-${{ hashFiles('**/pnpm-lock.yaml') }}

test:
name: Test
Expand All @@ -66,10 +66,10 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
cache: pnpm

- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Load generated files
id: cache-generated-files
Expand All @@ -78,10 +78,10 @@ jobs:
path: |
src/state/data
src/locales
key: ${{ runner.os }}-generatedFiles-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-generatedFiles-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Unit Test
run: yarn test
run: pnpm run test

# - name: Coveralls
# uses: coverallsapp/[email protected]
Expand All @@ -103,10 +103,10 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
cache: pnpm

- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Load generated files
id: cache-generated-files
Expand All @@ -115,10 +115,10 @@ jobs:
path: |
src/state/data
src/locales
key: ${{ runner.os }}-generatedFiles-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-generatedFiles-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Run eslint
run: yarn lint
run: pnpm run lint

build:
name: Build
Expand All @@ -135,10 +135,10 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
cache: pnpm

- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Load generated files
id: cache-generated-files
Expand All @@ -147,10 +147,10 @@ jobs:
path: |
src/state/data
src/locales
key: ${{ runner.os }}-generatedFiles-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-generatedFiles-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Build
run: yarn build
run: pnpm run build

integration-tests:
name: Cypress
Expand All @@ -168,7 +168,7 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
cache: pnpm

# Install deps only
- name: Cypress install dependencies
Expand All @@ -187,7 +187,7 @@ jobs:
run: npx cypress install

- name: Start server in the background
run: yarn start &
run: pnpm run start &

# Actually run tests, building repo
- name: Cypress run
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ipfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
cache: pnpm

- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Build Web Apps
run: yarn ipfs
run: pnpm run ipfs
4 changes: 2 additions & 2 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
cache: yarn
cache: pnpm

- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Build
run: npx nx build $LIB
Expand Down
14 changes: 7 additions & 7 deletions apps/cow-fi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,38 @@ This is the website for CoW Protocol
## Setup
```bash
# Install dependencies
yarn
pnpm install
```

## Dev server
```bash
# Run server
yarn dev
pnpm run dev
```

## Lint
```bash
# Run eslint
yarn lint
pnpm run lint
```


## Build
```bash
yarn build
pnpm run build
```

# Run server
```bash
# Run app
yarn start
pnpm run start
```

# Internationalization
```bash
# Extract internationalization literals from the code
yarn i18n:extract
pnpm run i18n:extract

# Generate JS files for the language file
yarn i18n:compile
pnpm run i18n:compile
```
3 changes: 0 additions & 3 deletions apps/cow-fi/app/(learn)/learn/[article]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ import { fetchArticleWithRetry } from '@/util/fetchHelpers'
import { getPageMetadata } from '@/util/getPageMetadata'
import { stripHtmlTags } from '@/util/stripHTMLTags'



// Next.js requires revalidate to be a literal number for static analysis
// 12 hours (43200 seconds) - balanced between freshness and cache efficiency
export const revalidate = 43200
Expand Down Expand Up @@ -96,7 +94,6 @@ export async function generateStaticParams(): Promise<{ article: string }[]> {
export default async function ArticlePage({ params }: Props): Promise<ReactNode> {
const articleSlug = (await params).article


try {
const article = await fetchArticleWithRetry(articleSlug)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Metadata } from 'next'

import { getPageMetadata } from '@/util/getPageMetadata'

export const metadata: Metadata = getPageMetadata({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Article, Category, getArticles, getCategories } from '../../../../../se
import { ArticlesPageComponents } from '@/components/ArticlesPageComponents'
import { ARTICLES_PER_PAGE } from '@/const/pagination'


type Props = {
params: Promise<{ pageIndex?: string[] }>
}
Expand Down
3 changes: 2 additions & 1 deletion apps/cow-fi/app/(learn)/learn/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Metadata } from 'next'
import { getPageMetadata } from '@/util/getPageMetadata'

import { CONFIG } from '@/const/meta'
import { getPageMetadata } from '@/util/getPageMetadata'

const title = 'Knowledge Base - CoW DAO'

Expand Down
1 change: 0 additions & 1 deletion apps/cow-fi/app/(learn)/learn/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Category, getArticles, getCategories } from '../../../services/cms'
import { LearnPageComponent } from '@/components/LearnPageComponent'
import { FEATURED_ARTICLES_PAGE_SIZE } from '@/const/pagination'


// Next.js requires revalidate to be a literal number for static analysis
// 12 hours (43200 seconds) - balanced between freshness and cache efficiency
export const revalidate = 43200
Expand Down
2 changes: 0 additions & 2 deletions apps/cow-fi/app/(learn)/learn/topic/[topicSlug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import type { Metadata } from 'next'
import { TopicPageComponent } from '@/components/TopicPageComponent'
import { getPageMetadata } from '@/util/getPageMetadata'



type Props = {
params: Promise<{ topicSlug: string }>
searchParams?: Promise<{ [key: string]: string | string[] | undefined }>
Expand Down
1 change: 1 addition & 0 deletions apps/cow-fi/app/(learn)/learn/topics/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Metadata } from 'next'

import { getPageMetadata } from '@/util/getPageMetadata'

export const metadata: Metadata = getPageMetadata({
Expand Down
1 change: 0 additions & 1 deletion apps/cow-fi/app/(learn)/learn/topics/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { Category, getArticles, getCategories } from '../../../../services/cms'
import { TopicsPageComponent } from '@/components/TopicsPageComponent'
import { ARTICLES_LARGE_PAGE_SIZE } from '@/const/pagination'


// Next.js requires revalidate to be a literal number for static analysis
// 12 hours (43200 seconds) - balanced between freshness and cache efficiency
export const revalidate = 43200
Expand Down
1 change: 1 addition & 0 deletions apps/cow-fi/app/(main)/careers/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Metadata } from 'next'

import { getPageMetadata } from '@/util/getPageMetadata'

export const metadata: Metadata = {
Expand Down
4 changes: 2 additions & 2 deletions apps/cow-fi/app/(main)/careers/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CareersPageContent } from '@/components/CareersPageContent'

import { getJobs } from '../../../services/ashByHq'

import { CareersPageContent } from '@/components/CareersPageContent'

export default async function Page() {
const jobsData = (await getJobs()) || {}
const department = 'All'
Expand Down
2 changes: 1 addition & 1 deletion apps/cow-fi/app/(main)/careers/refer-to-earn/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import { useCowAnalytics } from '@cowprotocol/analytics'
import { UI } from '@cowprotocol/ui'

import { CowFiCategory } from 'src/common/analytics/types'
import styled from 'styled-components/macro'

import { ContainerCard, ArticleContent, Breadcrumbs, ArticleMainTitle, BodyContent } from '@/styles/styled'
import { CowFiCategory } from 'src/common/analytics/types'

const Wrapper = styled.div`
display: flex;
Expand Down
3 changes: 2 additions & 1 deletion apps/cow-fi/app/(main)/cow-amm/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Metadata } from 'next'
import { getPageMetadata } from '@/util/getPageMetadata'

import { CONFIG } from '@/const/meta'
import { getPageMetadata } from '@/util/getPageMetadata'

export const metadata: Metadata = {
...getPageMetadata({
Expand Down
18 changes: 10 additions & 8 deletions apps/cow-fi/app/(main)/cow-amm/page.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
'use client'

import { useCowAnalytics } from '@cowprotocol/analytics'
import IMG_ICON_BULB_COW from '@cowprotocol/assets/images/icon-bulb-cow.svg'
import IMG_ICON_CROWN_COW from '@cowprotocol/assets/images/icon-crown-cow.svg'
import IMG_ICON_FAQ from '@cowprotocol/assets/images/icon-faq.svg'
import IMG_COWAMM_HERO from '@cowprotocol/assets/images/image-cowamm-hero.svg'
import IMG_COWAMM_PASSIVE from '@cowprotocol/assets/images/image-cowamm-passive.svg'
import IMG_COWAMM_RAISING from '@cowprotocol/assets/images/image-cowamm-raising.svg'
import IMG_COWAMM_REKT from '@cowprotocol/assets/images/image-cowamm-rekt.svg'
import { Color, ProductLogo, ProductVariant, UI } from '@cowprotocol/ui'

import { CowFiCategory } from 'src/common/analytics/types'

import IMG_ICON_BULB_COW from '../../../src/assets/images/icon-bulb-cow.svg'
import IMG_ICON_CROWN_COW from '../../../src/assets/images/icon-crown-cow.svg'
import IMG_ICON_FAQ from '../../../src/assets/images/icon-faq.svg'
import IMG_COWAMM_HERO from '../../../src/assets/images/image-cowamm-hero.svg'
import IMG_COWAMM_PASSIVE from '../../../src/assets/images/image-cowamm-passive.svg'
import IMG_COWAMM_RAISING from '../../../src/assets/images/image-cowamm-raising.svg'
import IMG_COWAMM_REKT from '../../../src/assets/images/image-cowamm-rekt.svg'

import FAQ from '@/components/FAQ'
import LazySVG from '@/components/LazySVG'
import { Link, LinkType } from '@/components/Link'
Expand Down Expand Up @@ -37,7 +40,6 @@ import {
TopicList,
TopicTitle,
} from '@/styles/styled'
import { CowFiCategory } from 'src/common/analytics/types'

export default function Page() {
const analytics = useCowAnalytics()
Expand Down
3 changes: 2 additions & 1 deletion apps/cow-fi/app/(main)/cow-protocol/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Metadata } from 'next'
import { getPageMetadata } from '@/util/getPageMetadata'

import { CONFIG } from '@/const/meta'
import { getPageMetadata } from '@/util/getPageMetadata'

export const metadata: Metadata = {
...getPageMetadata({
Expand Down
36 changes: 19 additions & 17 deletions apps/cow-fi/app/(main)/cow-protocol/page.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
'use client'

import IMG_ICON_BUILD_WITH_COW from '@cowprotocol/assets/images/icon-build-with-cow.svg'
import IMG_ICON_BULB_COW from '@cowprotocol/assets/images/icon-bulb-cow.svg'
import IMG_COW_LENS from '@cowprotocol/assets/images/icon-cow-lens.svg'
import IMG_ICON_CROWN_COW from '@cowprotocol/assets/images/icon-crown-cow.svg'
import IMG_ICON_FAQ from '@cowprotocol/assets/images/icon-faq.svg'
import IMG_ICON_GHOST from '@cowprotocol/assets/images/icon-ghost.svg'
import IMG_LOGO_CURVE from '@cowprotocol/assets/images/icon-logo-curve.svg'
import IMG_LOGO_LIDO from '@cowprotocol/assets/images/icon-logo-lido.svg'
import IMG_LOGO_SAFE from '@cowprotocol/assets/images/icon-logo-safe.svg'
import IMG_ICON_OWL from '@cowprotocol/assets/images/icon-owl.svg'
import IMG_ICON_SECURE from '@cowprotocol/assets/images/icon-secure.svg'
import IMG_BATCHAUCTIONS from '@cowprotocol/assets/images/image-batchauctions.svg'
import IMG_COW_BITS from '@cowprotocol/assets/images/image-cow-bits.svg'
import IMG_INTENTS from '@cowprotocol/assets/images/image-intents.svg'
import IMG_LEADING from '@cowprotocol/assets/images/image-leading.svg'
import IMG_SOLVERS from '@cowprotocol/assets/images/image-solvers.svg'
import { Color, ProductLogo, ProductVariant, UI } from '@cowprotocol/ui'

import { CowFiCategory, toCowFiGtmEvent } from 'src/common/analytics/types'

import IMG_ICON_BUILD_WITH_COW from '../../../src/assets/images/icon-build-with-cow.svg'
import IMG_ICON_BULB_COW from '../../../src/assets/images/icon-bulb-cow.svg'
import IMG_COW_LENS from '../../../src/assets/images/icon-cow-lens.svg'
import IMG_ICON_CROWN_COW from '../../../src/assets/images/icon-crown-cow.svg'
import IMG_ICON_FAQ from '../../../src/assets/images/icon-faq.svg'
import IMG_ICON_GHOST from '../../../src/assets/images/icon-ghost.svg'
import IMG_LOGO_CURVE from '../../../src/assets/images/icon-logo-curve.svg'
import IMG_LOGO_LIDO from '../../../src/assets/images/icon-logo-lido.svg'
import IMG_LOGO_SAFE from '../../../src/assets/images/icon-logo-safe.svg'
import IMG_ICON_OWL from '../../../src/assets/images/icon-owl.svg'
import IMG_ICON_SECURE from '../../../src/assets/images/icon-secure.svg'
import IMG_BATCHAUCTIONS from '../../../src/assets/images/image-batchauctions.svg'
import IMG_COW_BITS from '../../../src/assets/images/image-cow-bits.svg'
import IMG_INTENTS from '../../../src/assets/images/image-intents.svg'
import IMG_LEADING from '../../../src/assets/images/image-leading.svg'
import IMG_SOLVERS from '../../../src/assets/images/image-solvers.svg'

import FAQ from '@/components/FAQ'
import LazySVG from '@/components/LazySVG'
import { Link, LinkType } from '@/components/Link'
Expand Down Expand Up @@ -54,7 +57,6 @@ import {
TopicList,
TopicTitle,
} from '@/styles/styled'
import { CowFiCategory, toCowFiGtmEvent } from 'src/common/analytics/types'

export default function Page() {
const faqData = useFaqData()
Expand Down
Loading
Loading