Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.travis.yml
#	src/GitServerClient.js
#	src/components/save/CreateRepoModal.js
#	src/components/save/FileModal.js
  • Loading branch information
lucaju committed Aug 6, 2021
2 parents e9988fd + fe19339 commit 90bc2a5
Show file tree
Hide file tree
Showing 37 changed files with 21,639 additions and 9,460 deletions.
45 changes: 34 additions & 11 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
{
"presets": [
["@babel/preset-env", {
"corejs": 3,
"useBuiltIns": "entry"
}],
"@babel/preset-react"
"presets": [
[
"@babel/preset-env",
{
"corejs": 3,
"useBuiltIns": "entry"
}
],
"plugins": [
["@babel/plugin-transform-runtime", {
"regenerator": true
}]
"@babel/preset-react"
],
"plugins": [
[
"@babel/plugin-transform-runtime",
{
"corejs": { "version": 3, "proposals": true },
"helpers": true,
"regenerator": true,
"useESModules": true,
"version": "^7.12.15"
}
]
}
],
"env": {
"test": {
"presets": ["@babel/preset-env", "@babel/preset-react"],
"plugins": [
[
"@babel/plugin-transform-runtime",
{
"regenerator": true
}
]
]
}
}
}
3 changes: 3 additions & 0 deletions .czrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "git-cz"
}
49 changes: 21 additions & 28 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
{
"env": {
"browser": true,
"es6": true,
"jquery": true,
"jest": true,
"node": true
},
"extends": ["eslint:recommended", "plugin:react/recommended"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"rules": {
"indent": ["warn", "tab"],
"no-multi-spaces": 1,
"no-trailing-spaces": 1,
"no-unused-vars": 2,
"quotes": [2, "single"],
"require-atomic-updates": "off",
"require-await": ["error"],
"semi": ["error", "always"]
}
}
"env": {
"browser": true,
"es6": true,
"jquery": true,
"jest": true,
"node": true
},
"extends": ["eslint:recommended", "plugin:react/recommended", "prettier"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"rules": {
"no-unused-vars": 2
}
}
55 changes: 55 additions & 0 deletions .github/workflows/action-CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI (test and release)

## Controls when the workflow will run
on:
push:
branches: [master, development, next]
pull_request:
branches: [master]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
tests:
name: run tests on nodejs
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: npm test
- name: report coverage
if: ${{ success() }}
run: npm run report-coverage

release:
if: github.ref == 'refs/heads/master'
needs: tests
name: Release on NPM
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 100,
"react/jsx-max-props-per-line": [1, {
"when": "always"
}],
"singleQuote": true
}
2 changes: 1 addition & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"branches": ["master"]
"branches": ["master"]
}
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion changelog.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
maxMessageLength: 110,
maxMessageLength: 110,
};
32 changes: 16 additions & 16 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
module.exports = {
collectCoverage: true,
collectCoverageFrom: ['./src/index.js'],
coverageDirectory: './coverage',
coverageThreshold: {
global: {
branches: 10,
functions: 10,
lines: 10,
statements: 10,
},
},
testMatch: ['**/test/**/*.[jt]s?(x)'],
transform: {
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
'^.+\\.js$': 'babel-jest',
},
collectCoverage: true,
collectCoverageFrom: ['./src/index.js'],
coverageDirectory: './coverage',
coverageThreshold: {
global: {
branches: 20,
functions: 15,
lines: 40,
statements: 40,
},
},
testMatch: ['**/test/**/*.[jt]s?(x)'],
transform: {
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
'^.+\\.js$': 'babel-jest',
},
};
Loading

0 comments on commit 90bc2a5

Please sign in to comment.