Skip to content

Commit

Permalink
Merge pull request #1284 from nos/develop
Browse files Browse the repository at this point in the history
[RELEASE] 0.6
  • Loading branch information
Maurice Dalderup authored Dec 31, 2019
2 parents d68f6c9 + 5c921d6 commit cba0135
Show file tree
Hide file tree
Showing 103 changed files with 4,075 additions and 1,770 deletions.
178 changes: 108 additions & 70 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Javascript Node CircleCI 2.0 configuration file.
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
version: 2
version: 2.1

orbs:
codecov: codecov/codecov@1.0.5

references:
workspace: &workspace ~/repo

container_config: &container_config
linux_config: &linux_config
docker:
- image: circleci/node:10.13.0
- image: circleci/node:10.18.0
working_directory: *workspace

win_config: &win_config
windows_config: &windows_config
docker:
- image: legiit/electron-builder-wine:node12
environment:
Expand All @@ -22,100 +23,137 @@ references:
xcode: '10.3.0'
working_directory: *workspace

jobs:
build:
<<: *container_config
commands:
pre-windows:
description: 'Setting up and building environment for windows'
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: sudo apt-get -y update
- run: sudo apt-get -y install libudev-dev libusb-1.0-0-dev
- run: yarn install
- run: chmod -R 777 ~/repo
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
test:
<<: *container_config
- v1-dependencies-windows-{{ checksum "package.json" }}
- v1-dependencies-windows
- run: apt-get -y update
- run: apt-get -y install libusb-1.0-0
- run: apt-get -y install libudev-dev libudev-dev:i386 libusb-1.0-0-dev libusb-1.0-0-dev:i386
- run: yarn

pre-linux:
description: 'Setting up and building environment for linux'
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- v1-dependencies-linux-{{ checksum "package.json" }}
- v1-dependencies-linux
- run: sudo apt-get -y update
- run: sudo apt-get -y install libgtk-3-0 libxss1 libgconf-2-4 libnss3 libasound2
- run: yarn test
- run: yarn codecov
store_artifacts:
- path: artifacts
- destination: yarnpkg
- run: sudo apt-get -y install libusb-1.0-0
- run: yarn

deploy_win:
<<: *win_config
pre-mac:
description: 'Setting up and building environment for mac'
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: dpkg --add-architecture i386
- run: apt-get -y update
- run: apt-get -y install libudev-dev libudev-dev:i386 libusb-1.0-0-dev libusb-1.0-0-dev:i386
- run: yarn install
- v1-dependencies-mac-{{ checksum "package.json" }}
- v1-dependencies-mac
- run: yarn

jobs:
build_linux:
<<: *linux_config
steps:
- pre-linux
- run: yarn dist --linux
- save_cache:
key: v1-dependencies-linux-{{ checksum "package.json" }}
paths:
- node_modules

build_windows:
<<: *windows_config
steps:
- pre-windows
- run: yarn dist --win --x64 --ia32
- save_cache:
key: v1-dependencies-windows-{{ checksum "package.json" }}
paths:
- node_modules

build_mac:
<<: *mac_config
steps:
- pre-mac
- run: yarn dist --mac
- save_cache:
key: v1-dependencies-mac-{{ checksum "package.json" }}
paths:
- node_modules

unit_tests:
<<: *linux_config
steps:
- pre-linux
- run: yarn test
- run: yarn codecov
- codecov/upload:
file: ./coverage/lcov.info

deploy_windows:
<<: *windows_config
steps:
- pre-windows
- run: yarn release:win
- store_artifacts:
path: dist
destination: build
- persist_to_workspace:
root: *workspace
paths:
- dist/*.*

deploy_linux:
<<: *container_config
<<: *linux_config
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: sudo apt-get -y update
- run: sudo apt-get -y install build-essential libudev-dev
- run: yarn install
- pre-linux
- run: yarn release:linux
- store_artifacts:
path: dist
destination: build
- persist_to_workspace:
root: *workspace
paths:
- dist/*.*

deploy_mac:
<<: *mac_config
steps:
- checkout
- restore_cache:
keys:
- v3-dependencies-{{ checksum "package.json" }}
- v3-dependencies-
- run: yarn install
- pre-mac
- run: yarn release:mac
- store_artifacts:
path: dist
destination: build
- persist_to_workspace:
root: *workspace
paths:
- ./dist/*.*

calculate_checksums:
<<: *linux_config
steps:
- attach_workspace:
at: *workspace
- run: cd ./dist && shasum -a 256 *.*

workflows:
version: 2
build_test:
platform_builds:
jobs:
- build
- test:
requires:
- build

- build_windows
- build_linux
- build_mac
platform_tests:
jobs:
- unit_tests
deploy:
jobs:
- deploy_win:
- calculate_checksums:
requires:
- deploy_windows
- deploy_linux
- deploy_mac
- deploy_windows:
filters:
branches:
ignore: /.*/
Expand Down
9 changes: 2 additions & 7 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
"endOfLine": "auto"
}
],
"react/state-in-constructor": "off",
"react/jsx-props-no-spreading": "off",
"react/static-property-placement": "off",
"consistent-return": "off",
"linebreak-style": "off",
"react/jsx-fragments": "off",
"arrow-body-style": ["off"],
"arrow-parens": ["error", "always"],
"comma-dangle": ["error", "never"],
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"no-else-return": ["off"],
Expand All @@ -39,12 +39,7 @@
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"__mocks__/**/*.js",
"__tests__/**/*.js",
"config/**/*.js",
"scripts/**/*.js"
]
"devDependencies": ["__mocks__/**/*.js", "__tests__/**/*.js", "config/**/*.js", "scripts/**/*.js"]
}
],
"import/order": [
Expand Down
30 changes: 25 additions & 5 deletions renovate.json → .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,34 @@
{
"extends": ["config:base"],
"ignoreDeps": ["@ledgerhq/hw-transport-node-hid"],
"ignoreDeps": [
"@ledgerhq/hw-transport-node-hid",
"react-redux",
"redux-saga",
"connected-react-router",
"react-router-dom",
"jest",
"babel-jest",
"sass-loader",
"style-loader",
"electron-context-menu"
],
"schedule": ["on monday"],
"labels": ["Renovate 🌴"],
"semanticCommits": true,
"statusCheckVerify": true,
"packageRules": [
{
"packagePatterns": ["*"],
"semanticCommitType": "renovate"
},
{
"packageNames": ["@cityofzion/neon-js"],
"allowedVersions": "< 4"
},
{
"packageNames": ["react", "react-dom", "react-is"],
"allowedVersions": "< 16.9.0"
},
{
"packageNames": ["electron-is-dev"],
"allowedVersions": "< 1"
Expand Down Expand Up @@ -38,19 +58,19 @@
"allowedVersions": "<= 20.32.0"
},
{
"packagePatterns": ["eslint", "stylelint"],
"packageNames": ["eslint", "stylelint"],
"groupName": "lint"
},
{
"packagePatterns": ["fortawesome"],
"packageNames": ["fortawesome"],
"groupName": "fortawesome"
},
{
"packagePatterns": ["babel"],
"packageNames": ["babel"],
"groupName": "babel"
},
{
"packagePatterns": ["enzyme"],
"packageNames": ["enzyme"],
"groupName": "enzyme"
}
]
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v10.13.0
10.18.0
27 changes: 25 additions & 2 deletions .snyk
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.13.5
ignore: {}
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
SNYK-JS-CSVPARSE-467403:
- sifter > csv-parse:
reason: None given
expires: '2020-01-29T09:11:28.468Z'
SNYK-JS-PUPA-174563:
- electron-context-menu > electron-dl > pupa:
reason: None given
expires: '2020-01-29T09:11:28.468Z'
SNYK-JS-AXIOS-174505:
- '@cityofzion/neon-js > axios':
reason: None given
expires: '2020-01-29T09:11:28.468Z'
SNYK-JS-ELLIPTIC-511941:
- '@cityofzion/neon-js > elliptic':
reason: None given
expires: '2020-01-29T09:11:28.468Z'
- bip32 > tiny-secp256k1 > elliptic:
reason: None given
expires: '2020-01-29T09:11:28.468Z'
- ethereumjs-utils > secp256k1 > elliptic:
reason: None given
expires: '2020-01-29T09:11:28.468Z'
# patches apply the minimum changes required to fix a vulnerability
patch:
SNYK-JS-AXIOS-174505:
- '@cityofzion/neon-js > axios':
patched: '2019-08-02T07:32:26.723Z'
patched: '2019-10-18T16:30:20.194Z'
13 changes: 13 additions & 0 deletions .versionrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"types": [
{"type": "feat", "section": "Features"},
{"type": "fix", "section": "Bug Fixes"},
{"type": "chore", "section": "Bug Fixes"},
{"type": "docs", "section": "Documentation"},
{"type": "style", "hidden": true},
{"type": "refactor", "hidden": true},
{"type": "perf", "hidden": true},
{"type": "test", "hidden": true},
{"type": "renovate", "hidden": true}
]
}
Loading

0 comments on commit cba0135

Please sign in to comment.