Skip to content

Commit

Permalink
Merge pull request #3342 from cowprotocol/release/1.49.0
Browse files Browse the repository at this point in the history
Release/1.49.0
  • Loading branch information
anxolin authored Nov 9, 2023
2 parents d8cab51 + c4ba4bb commit 3faf553
Show file tree
Hide file tree
Showing 575 changed files with 9,993 additions and 11,315 deletions.
123 changes: 123 additions & 0 deletions .eslintrc-common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx", "unused-imports"],
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"no-prototype-builtins": "off",
"react/jsx-no-useless-fragment": "off",
"no-irregular-whitespace": "off",
"no-case-declarations": "off",
"no-dupe-else-if": "off",
"jsx-a11y/accessible-emoji": "off",
"no-async-promise-executor": "off",
"no-constant-condition": "off",
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "ethers",
"message": "Please import from '@ethersproject/module' directly to support tree-shaking."
},
{
"name": "styled-components",
"message": "Please import from styled-components/macro."
}
],
"patterns": [
{
"group": ["**/dist"],
"message": "Do not import from dist/ - this is an implementation detail, and breaks tree-shaking."
},
{
"group": ["!styled-components/macro"]
}
]
}
],
"no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"import/order": [
"error",
{
"pathGroups": [
{
"pattern": "{react,jotai,jotai/*}",
"group": "external",
"position": "before"
},
{
"pattern": "{@cowprotocol,@cowprotocol,@uniswap,@safe-global,@ethersproject,@web3-react}/**",
"group": "external",
"position": "before"
},
{
"pattern": "legacy/**",
"group": "external",
"position": "after"
},
{
"pattern": "modules/**",
"group": "builtin",
"position": "after"
},
{
"pattern": "{api,abis,common,constants,legacy,lib,pages,types,utils}/**",
"group": "internal",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["react"],
"groups": ["external", "builtin", "internal", "sibling", "parent", "object", "index", "type"],
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"newlines-between": "always"
}
],
"prefer-const": "error",
"no-unneeded-ternary": "error",
"no-var": "error"
},
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
}
]
}
13 changes: 3 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@ on:
types: [opened, synchronize]

env:
REPO_NAME_SLUG: cowswap
PR_NUMBER: ${{ github.event.number }}
NODE_VERSION: lts/gallium
NODE_VERSION: lts/hydrogen
REACT_APP_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
REACT_APP_PINATA_API_KEY: ${{ secrets.REACT_APP_PINATA_API_KEY }}
REACT_APP_PINATA_SECRET_API_KEY: ${{ secrets.REACT_APP_PINATA_SECRET_API_KEY }}
REACT_APP_SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
REACT_APP_BLOCKNATIVE_API_KEY: ${{ secrets.REACT_APP_BLOCKNATIVE_API_KEY }}
REACT_APP_GOOGLE_ANALYTICS_ID: ${{ secrets.REACT_APP_GOOGLE_ANALYTICS_ID }}
REACT_APP_AMPLITUDE_KEY: ${{ secrets.REACT_APP_AMPLITUDE_KEY }}
REACT_APP_BLOCKNATIVE_API_KEY: ${{ secrets.REACT_APP_BLOCKNATIVE_API_KEY }}

jobs:
setup:
Expand All @@ -24,7 +20,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up node
uses: actions/setup-node@v3
Expand Down Expand Up @@ -89,7 +85,6 @@ jobs:
- name: Unit Test
run: yarn test


# - name: Coveralls
# uses: coverallsapp/[email protected]
# with:
Expand Down Expand Up @@ -187,8 +182,6 @@ jobs:
# cypress-custom/videos
# cypress-custom/screenshots



# Open tmate ssh connection on failure for debugging
# Uncomment when needed and push upstream
# - name: Setup tmate session
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/ipfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ on:
tags: [v*]

env:
REPO_NAME_SLUG: cowswap
REACT_APP_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
REACT_APP_PINATA_API_KEY: ${{ secrets.REACT_APP_PINATA_API_KEY }}
REACT_APP_PINATA_SECRET_API_KEY: ${{ secrets.REACT_APP_PINATA_SECRET_API_KEY }}
REACT_APP_GOOGLE_ANALYTICS_ID: ${{ secrets.REACT_APP_GOOGLE_ANALYTICS_ID }}
REACT_APP_BLOCKNATIVE_API_KEY: ${{ secrets.REACT_APP_BLOCKNATIVE_API_KEY }}
# Duplicated keys as these are required by `ipfs-deploy`
IPFS_DEPLOY_PINATA__API_KEY: ${{ secrets.REACT_APP_PINATA_API_KEY }}
IPFS_DEPLOY_PINATA__SECRET_API_KEY: ${{ secrets.REACT_APP_PINATA_SECRET_API_KEY }}
NODE_VERSION: lts/gallium
NODE_VERSION: lts/hydrogen

jobs:
ipfs:
Expand Down Expand Up @@ -54,13 +56,6 @@ jobs:

- name: Build Web Apps
run: yarn ipfs:build
env:
REACT_APP_CHAIN_ID: 1
REACT_APP_NETWORK_URL_XDAI: https://rpc.gnosischain.com/
REACT_APP_ADDITIONAL_SERVICES_API_URL_XDAI: https://ido-api-xdai.gnosis.io/
REACT_APP_NETWORK_URL_MAINNET: https://mainnet.infura.io/v3/${{ secrets.INFURA_PROJECT_KEY }}
REACT_APP_ADDITIONAL_SERVICES_API_URL_MAINNET: https://ido-api-mainnet.gnosis.io/
REACT_APP_BLOCKNATIVE_API_KEY: ${{ secrets.REACT_APP_BLOCKNATIVE_API_KEY }}

- name: "Deploy to IPFS with infura"
- name: 'Deploy to IPFS with infura'
run: yarn ipfs:publish
67 changes: 0 additions & 67 deletions .github/workflows/pr_comments.yml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Publish

on:
workflow_dispatch: # Manually trigger it via UI/CLI/API
inputs:
lib:
description: Lib to publish
required: true
type: choice
options:
- permit-utils
- widget-lib
- widget-react
# Add more publishable libs here
tag:
description: NPM package tag
required: false
type: choice
options:
- latest
- next
default: latest

env:
NODE_VERSION: lts/hydrogen
DESTINATION_PATH: dist/libs/${{ inputs.lib }}

jobs:
publish-npm:
name: Publish NPM package
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
cache: yarn

- name: Install Nx
run: yarn add nx

- name: Build
run: yarn nx build ${{ inputs.lib }}

- name: Copy .npmrc to destination
run: cp ${{ env.NPM_CONFIG_USERCONFIG }} ${{ env.DESTINATION_PATH }}/

- name: Copy README
run: cp libs/${{ inputs.lib }}/README.md ${{ env.DESTINATION_PATH }}/

- name: Publish
working-directory: ${{ env.DESTINATION_PATH }}
run: npm publish --tag ${{ inputs.tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 1 addition & 3 deletions .github/workflows/vercel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@ jobs:
- name: Build Project Artifacts
run: >
REACT_APP_SENTRY_DSN=${{ secrets.SENTRY_DSN }}
REACT_APP_SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
REACT_APP_PINATA_API_KEY=${{ secrets.REACT_APP_PINATA_API_KEY }}
REACT_APP_PINATA_SECRET_API_KEY=${{ secrets.REACT_APP_PINATA_SECRET_API_KEY }}
REACT_APP_BLOCKNATIVE_API_KEY=${{ secrets.REACT_APP_BLOCKNATIVE_API_KEY }}
REACT_APP_GOOGLE_ANALYTICS_ID=${{ secrets.REACT_APP_GOOGLE_ANALYTICS_ID }}
REACT_APP_AMPLITUDE_KEY=${{ secrets.REACT_APP_AMPLITUDE_KEY }}
REACT_APP_LAUNCH_DARKLY_KEY=${{ secrets.REACT_APP_LAUNCH_DARKLY_KEY }}
REACT_APP_WALLET_CONNECT_V1_BRIDGE=${{ secrets.REACT_APP_WALLET_CONNECT_V1_BRIDGE }}
REACT_APP_INFURA_KEY=${{ secrets.REACT_APP_INFURA_KEY }}
REACT_APP_NETWORK_URL_1=${{ secrets.REACT_APP_NETWORK_URL_1 }}
REACT_APP_NETWORK_URL_100=${{ secrets.REACT_APP_NETWORK_URL_100 }}
REACT_APP_NETWORK_URL_5=${{ secrets.REACT_APP_NETWORK_URL_5 }}
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,7 @@ yalc.lock
# vercel
.vercel

analyse.html
analyse.html

# NX
.nx
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/gallium
lts/hydrogen
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ yarn install
## Generate locale files

```
yarn i18n:extract
yarn i18n
```

## Run the interface
Expand Down
Loading

2 comments on commit 3faf553

@vercel
Copy link

@vercel vercel bot commented on 3faf553 Nov 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 3faf553 Nov 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

cosmos – ./

cowswap-seven.vercel.app
cosmos-cowswap.vercel.app
cosmos-git-main-cowswap.vercel.app
cosmos.cow.fi

Please sign in to comment.