Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Sync floating_rate branch with master" #5081

Merged
merged 1 commit into from
Mar 21, 2022
Merged
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
  •  
  •  
  •  
64 changes: 63 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ commands:
# VERIFY_CACHE_FOLDERS_START (DO NOT REMOVE)
- "node_modules"
- "packages/account/node_modules"
- "packages/appstore/node_modules"
- "packages/bot-skeleton/node_modules"
- "packages/bot-web-ui/node_modules"
- "packages/cashier/node_modules"
- "packages/components/node_modules"
- "packages/core/node_modules"
- "packages/dashboard/node_modules"
- "packages/indicators/node_modules"
- "packages/p2p/node_modules"
- "packages/shared/node_modules"
Expand All @@ -80,6 +80,13 @@ commands:
name: "Build all packages"
command: npm run build

build_dashboard:
description: "Build dashboard"
steps:
- run:
name: "Build all packages for deriv dashboard"
command: npm run build:dashboard

build_storybook:
description: "Build storybook"
steps:
Expand Down Expand Up @@ -165,6 +172,14 @@ jobs:
- npm_install_from_cache
- build

build_dashboard:
docker:
- image: circleci/node:14.17.1-stretch
steps:
- git_checkout_from_cache
- npm_install_from_cache
- build_dashboard

release_storybook:
docker:
- image: circleci/node:14.17.1-stretch
Expand Down Expand Up @@ -200,6 +215,22 @@ jobs:
environment:
NODE_ENV: staging

release_staging_dashboard:
docker:
- image: circleci/node:14.17.1-stretch
steps:
- git_checkout_from_cache
- npm_install_from_cache
- build_dashboard
- versioning:
version_name: staging-dashboard
- docker_build_push:
docker_image_name: deriv-app-dashboard
docker_image_latest_tag: latest-staging-dashboard
- notify_slack
environment:
NODE_ENV: staging

release_production:
docker:
- image: circleci/node:14.17.1-stretch
Expand All @@ -217,6 +248,22 @@ jobs:
environment:
NODE_ENV: staging

release_production_dashboard:
docker:
- image: circleci/node:14.17.1-stretch
steps:
- git_checkout_from_cache
- npm_install_from_cache
- build_dashboard
- versioning:
version_name: production-dashboard
- docker_build_push:
docker_image_name: deriv-app-dashboard
docker_image_latest_tag: latest
- notify_slack
environment:
NODE_ENV: staging

build_and_test:
docker:
- image: circleci/node:14.17.1-stretch
Expand Down Expand Up @@ -247,6 +294,11 @@ workflows:
filters:
branches:
only: /^master$/
- release_staging_dashboard:
context: binary-frontend-artifact-upload
filters:
branches:
only: /^master$/

release_production:
jobs:
Expand All @@ -258,6 +310,16 @@ workflows:
tags:
only: /^production.*/

release_production_dashboard:
jobs:
- release_production_dashboard:
context: binary-frontend-artifact-upload
filters:
branches:
ignore: /.*/
tags:
only: /^dashboard-production.*/

test:
jobs:
- build_and_test:
Expand Down
12 changes: 6 additions & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# matin-binary
# mehrzad-fs
# nijil-binary
# njazuli-deriv
# nikolai-deriv
# yashim-deriv

######################################################################################################
Expand Down Expand Up @@ -79,9 +79,9 @@
# deriv-app/bot
# ==============================================================

/packages/bot-skeleton/**/* @mehrzad-fs
/packages/bot-web-ui/**/* @mehrzad-fs
/packages/indicators/**/* @mehrzad-fs
/packages/bot-skeleton/**/* @mehrzad-fs @nikolai-deriv
/packages/bot-web-ui/**/* @mehrzad-fs @nikolai-deriv
/packages/indicators/**/* @mehrzad-fs @nikolai-deriv


# ==============================================================
Expand Down Expand Up @@ -122,7 +122,7 @@
/packages/publisher/**/* @nijil-binary

# ==============================================================
# deriv-app/appstore
# deriv-app/dashboard
# ==============================================================

/packages/appstore/**/* @matin-binary @balakrishna-binary @njazuli-deriv @bahar-fs
/packages/dashboard/**/* @matin-binary @akmal-binary
4 changes: 2 additions & 2 deletions .github/boring-cyborg.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
labelPRBasedOnFilePath:
Account:
- packages/account/**/*
AppStore:
- packages/appstore/**/*
Bot:
- packages/bot-*/**/*
Components:
- packages/components/**/*
Core:
- packages/core/**/*
Dashboard:
- packages/dashboard/**/*
P2P:
- packages/p2p/**/*
Shared:
Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/codecov.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/generate_and_push_deriv_api_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ jobs:
cd deriv-app

package_name="@deriv/api-types"
old_version=$(json -f packages/appstore/package.json -a dependencies."$package_name")
old_version=$(json -f packages/dashboard/package.json -a devDependencies."$package_name")
safe_old_version=$(echo $old_version | sed 's/[^a-zA-Z0-9.]//g')

git checkout -b "$package_name"

# "Manually" bump the version in package.json to accommodate
# Lerna's flexibility (or its lack thereof).
json -I -f packages/appstore/package.json -e "this.dependencies[\"$package_name\"]=\"$new_version\"" -o json-4
json -I -f packages/trader/package.json -e "this.dependencies[\"$package_name\"]=\"$new_version\"" -o json-4
json -I -f packages/dashboard/package.json -e "this.devDependencies[\"$package_name\"]=\"$new_version\"" -o json-4
rm packages/dashboard/package-lock.json

# We have to run "lerna bootstrap --no-ci" to generate a new
# package-lock.json ("npm run bootstrap" requires this).
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ packages/account/lib/
packages/components/.out
packages/components/src/components/icon/icons-manifest.js
packages/p2p/lib/
packages/appstore/dist/
packages/appstore/lib/
packages/dashboard/lib/
.env

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ This repository contains the various platforms of the Deriv application.
![CircleCI](https://img.shields.io/circleci/build/github/binary-com/deriv-app) ![Prerequisite](https://img.shields.io/badge/node-%3E%3D14.17.1-blue.svg) ![Prerequisite](https://img.shields.io/badge/npm-%3E%3D7.21.0-blue.svg) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
![Sonar Tech Debt](https://img.shields.io/sonar/tech_debt/binary-com_deriv-app?server=https%3A%2F%2Fsonarcloud.io)
![Sonar Violations (short format)](https://img.shields.io/sonar/violations/binary-com_deriv-app?server=https%3A%2F%2Fsonarcloud.io)
[![codecov](https://codecov.io/gh/binary-com/deriv-app/branch/dev/graph/badge.svg?token=LClg2rlZ4z)](https://codecov.io/gh/binary-com/deriv-app)

**In this document**:

Expand Down Expand Up @@ -105,10 +104,10 @@ Before running or contribute to this project, you need to have the setup of the

| Package name | Docs | Version |
| :------------- | :------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------- |
| `Appstore` | [![](https://img.shields.io/badge/API%20Docs-readme-orange.svg?style=flat-square)](packages/appstore/README.md) | - |
| `Bot` | [![](https://img.shields.io/badge/API%20Docs-readme-orange.svg?style=flat-square)](packages/bot/README.md) | - |
| `Components` | [![](https://img.shields.io/badge/API%20Docs-readme-orange.svg?style=flat-square)](packages/components/README.md) | - |
| `Core` | [![](https://img.shields.io/badge/API%20Docs-readme-orange.svg?style=flat-square)](packages/core/README.md) | - |
| `Dashboard` | [![](https://img.shields.io/badge/API%20Docs-readme-orange.svg?style=flat-square)](packages/dashboard/README.md) | [![npm](https://img.shields.io/npm/v/@deriv/dashboard.svg?style=flat-square&color=blue)](https://www.npmjs.com/package/@deriv/dashboard) |
| `P2P` | [![](https://img.shields.io/badge/API%20Docs-readme-orange.svg?style=flat-square)](packages/p2p/README.md) | [![npm](https://img.shields.io/npm/v/@deriv/p2p.svg?style=flat-square&color=blue)](https://www.npmjs.com/package/@deriv/p2p) |
| `Shared` | [![](https://img.shields.io/badge/API%20Docs-readme-orange.svg?style=flat-square)](packages/shared/README.md) | - |
| `Trader` | [![](https://img.shields.io/badge/API%20Docs-readme-orange.svg?style=flat-square)](packages/trader/README.md) | - |
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ There are 2 types of dependencies:

2. Platforms/Modules/Apps - These can be viewed as applications of their own. According to business logic, these are different domains/sections, and most likely have their own route. At the time of writing, this includes:
- `@deriv/account`
- `@deriv/appstore`
- `@deriv/bot-skeleton`
- `@deriv/bot-web-ui`
- `@deriv/cashier`
- `@deriv/dashboard`
- `@deriv/p2p`
- `@deriv/trader`

Expand Down
11 changes: 11 additions & 0 deletions package-lock.json

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

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"bootstrap": "f () { npm ci && lerna link && lerna bootstrap --ci --hoist --strict && lerna link && npm run build:travis ;}; f",
"build": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run build $2 ;}; f",
"build:publish": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run build:publish $2 ;}; f",
"build:dashboard": "export IS_DASHBOARD=true && npm run build && export IS_DASHBOARD=",
"build:local": "f () { lerna exec --scope @deriv/trader --scope @deriv/bot-web-ui --parallel -- npm run build $1 ;}; f",
"build:travis": "lerna exec --scope @deriv/shared --scope @deriv/components --scope @deriv/translations --scope @deriv/cashier --scope @deriv/account --scope @deriv/p2p -- npm run build:travis",
"build:prod": "export NODE_ENV=staging && npm run build && export NODE_ENV=",
Expand All @@ -69,20 +70,22 @@
"publish_package": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run publish_package $2 ;}; f",
"serve": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run serve $npm_config_open;}; f",
"start": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run start ;}; f",
"test": "f () { bash ./scripts/circleci-config.test.sh && npm run test:stylelint && npm run test:eslint && npm run test:jest ;}; f",
"test": "f () { bash ./scripts/circleci-config.test.sh && npm run test:typecheck && npm run test:stylelint && npm run test:eslint && npm run test:jest ;}; f",
"test:eslint": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run test:eslint $2;}; f",
"test:mocha": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run test:mocha ;}; f",
"test:stylelint": "stylelint \"./packages/*/src/**/*.s(a|c)ss\"",
"test:jest": "jest --all --maxWorkers=2",
"test:qa": "cd e2e_tests && jest -c ./jest.config.js --maxWorkers=2 --detectOpenHandles",
"test:performance": "cd e2e_tests && jest -c ./jest.config.js --maxWorkers=2 --detectOpenHandles performance",
"test:typecheck": "lerna exec --scope=@deriv/dashboard -- npm run test:typecheck",
"stylelint:fix": "stylelint \"./packages/*/src/**/*.s(a|c)ss\" --fix",
"translate": "f () { lerna exec --scope @deriv/translations -- npm run translate ;}; f",
"stylelint-check": "stylelint-config-prettier-check",
"prepare": "husky install"
},
"dependencies": {
"@babel/preset-typescript": "^7.16.5",
"@deriv/api-types": "1.0.48",
"@testing-library/jest-dom": "^5.12.0",
"@types/react-transition-group": "^4.4.4",
"babel-jest": "^27.3.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/account/src/Components/Routes/binary-link.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import getRoutesConfig from 'Constants/routes-config';
import { findRouteByPath, normalizePath } from './helpers';

const BinaryLink = ({ active_class, to, children, ...props }) => {
const { is_appstore } = React.useContext(PlatformContext);
const { is_dashboard } = React.useContext(PlatformContext);
const path = normalizePath(to);
const route = findRouteByPath(path, getRoutesConfig({ is_appstore }));
const route = findRouteByPath(path, getRoutesConfig({ is_dashboard }));

if (!route) {
throw new Error(`Route not found: ${to}`);
Expand Down
4 changes: 2 additions & 2 deletions packages/account/src/Components/Routes/binary-routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import getRoutesConfig from 'Constants/routes-config';
import RouteWithSubRoutes from './route-with-sub-routes.jsx';

const BinaryRoutes = props => {
const { is_appstore } = React.useContext(PlatformContext);
const { is_dashboard } = React.useContext(PlatformContext);

return (
<React.Suspense
Expand All @@ -18,7 +18,7 @@ const BinaryRoutes = props => {
}}
>
<Switch>
{getRoutesConfig({ is_appstore }).map((route, idx) => (
{getRoutesConfig({ is_dashboard }).map((route, idx) => (
<RouteWithSubRoutes key={idx} {...route} {...props} />
))}
</Switch>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const AccountLimitsArticle = () => {
<Localize
key={1}
i18n_default_text='To learn more about trading limits and how they apply, please go to the <0>Help Centre.</0>'
components={[<StaticUrl key={0} className='link' href='/help-centre/trading/#trading-limits' />]}
components={[<StaticUrl key={0} className='link' href='/help-centre' />]}
/>,
]}
/>
Expand Down
Loading