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

Feature/diff #432

Open
wants to merge 21 commits into
base: alpha
Choose a base branch
from
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .dependabot/config.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,3 @@ trim_trailing_whitespace = true

[*.yml]
indent_size = 2

[*.ts]
indent_size = 2

[package.json]
indent_size = 2
19 changes: 19 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
extends: ["@anolilab/eslint-config"],
"parserOptions": {
"project": "./tsconfig.json"
},
env: {
"node": true,
"es6": true,
"jest/globals": true
},
globals: {
// Your global variables (setting to false means it's not allowed to be reassigned)
//
// myGlobal: false
},
rules: {
// Customize your rules
}
};
56 changes: 0 additions & 56 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,56 +0,0 @@
{
"plugins": ["jest", "@typescript-eslint"],
"extends": ["plugin:github/es6"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"eslint-comments/no-use": "off",
"import/no-namespace": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-ignore": "warn",
"camelcase": "off",
"@typescript-eslint/camelcase": "error",
"@typescript-eslint/class-name-casing": "error",
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"semi": "off",
"@typescript-eslint/semi": ["error", "never"],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error"
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
}
}
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2

updates:
- commit-message:
include: "scope"
prefix: "chore"
directory: "/"
labels:
- "dependency"
open-pull-requests-limit: 10
package-ecosystem: "github-actions"
schedule:
interval: "daily"
71 changes: 71 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
extends: ["config:base"],
labels: ["dependency", "Changed"],
semanticCommits: true,
major: {
semanticCommitType: "chore",
semanticCommitScope: "deps",
},
minor: {
semanticCommitType: "chore",
semanticCommitScope: "deps",
},
packageRules: [
{
groupName: "renovate-meta",
automerge: true,
updateTypes: ["lockFileMaintenance", "pin"],
labels: ["dependency", "Changed"],
semanticCommitType: "chore",
semanticCommitScope: "deps",
rangeStrategy: "replace",
vulnerabilityAlerts: {
labels: ["Security"],
assignees: ["@prisis"],
},
},
{
groupName: "dependencies (non-major)",
automerge: true,
depTypeList: ["dependencies"],
updateTypes: ["patch", "minor"],
labels: ["type/deps"],
semanticCommitType: "chore",
semanticCommitScope: "deps",
rangeStrategy: "replace",
vulnerabilityAlerts: {
labels: ["Security"],
assignees: ["@prisis"],
},
},
{
groupName: "devDependencies (major)",
automerge: true,
depTypeList: ["devDependencies"],
updateTypes: ["major"],
labels: ["dependency", "Changed"],
semanticCommitType: "chore",
semanticCommitScope: "deps",
rangeStrategy: "replace",
vulnerabilityAlerts: {
labels: ["Security"],
assignees: ["@prisis"],
},
},
{
groupName: "devDependencies (non-major)",
automerge: true,
depTypeList: ["devDependencies"],
updateTypes: ["patch", "minor"],
labels: ["dependency", "Changed"],
semanticCommitType: "chore",
semanticCommitScope: "deps",
rangeStrategy: "replace",
vulnerabilityAlerts: {
labels: ["Security"],
assignees: ["@prisis"],
},
},
],
}
16 changes: 16 additions & 0 deletions .github/workflows/auto-close-fixed-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This action will automatically close issues fixed in
# pull requests that doesn't target the default branch.

name: Auto Close Fixed Issues
on:
pull_request_target:
types: [closed]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: bubkoo/auto-close-fixed-issues@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
comment: |
This issue was closed by #{{ pr }}.
15 changes: 15 additions & 0 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Greetings"

on: ["pull_request", "issues"]

jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Awesome! Thank you for taking the time to create your first issue! Please review the [guidelines](https://narrowspark.com/docs/current/contributing)"
pr-message: "Great! Thank you for taking the time to create your first pull request! Please review the [guidelines](https://narrowspark.com/docs/current/contributing)"
2 changes: 1 addition & 1 deletion .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
push:
branches:
- ([0-9])?(.{+([0-9]),x}).x
- master
- main
- next
- next-major
- alpha
Expand Down
53 changes: 38 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,54 @@
name: "test"
on: ["pull_request", "push"]
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Tests"

on: [push]

jobs:
build:
test:
name: "Tests"

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
fetch-depth: 0
persist-credentials: false

- name: "Setup node"
uses: actions/setup-node@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v2
with:
node-version: 12
node-version: 12.x

- name: "Cache dependencies"
uses: actions/cache@v1
- name: set git credentials
run: |
git config --local user.email "d.bannert@anolilab.de"
git config --local user.name "Daniel Bannert"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
key: npm-${{ hashFiles('package-lock.json') }}
path: ~/.npm
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
npm-
${{ runner.os }}-yarn-

- name: install
run: yarn install

- name: lint
run: yarn run lint

- name: "Install dependencies"
run: npm ci --ignore-scripts --no-audit --no-progress --prefer-offline
- name: build
run: yarn run build && yarn run pack

- run: npm run all
- name: test
run: yarn run test

- name: "Send code coverage report to Codecov.io"
uses: codecov/codecov-action@v1
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
14 changes: 14 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

# The hook should exit with non-zero status after issuing
# an appropriate message if it wants to stop the commit.
#
# https://rushjs.io/pages/maintainer/git_hooks/

echo --------------------------------------------
echo Starting Git hook: commit-msg

yarn commitlint --edit $1 || exit $?

echo Finished Git hook: commit-msg
echo --------------------------------------------
16 changes: 16 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

# The hook should exit with non-zero status after issuing
# an appropriate message if it wants to stop the commit.
#
# https://rushjs.io/pages/maintainer/git_hooks/

echo --------------------------------------------
echo Starting Git hook: pre-commit

yarn pretty-quick --staged

yarn sort-package-json

echo Finished Git hook: pre-commit
echo --------------------------------------------
9 changes: 9 additions & 0 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

echo --------------------------------------------
echo Starting Git hook: prepare-commit-msg

exec < /dev/tty && yarn commitizen --hook || true

echo Finished Git hook: prepare-commit-msg
echo --------------------------------------------
23 changes: 23 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
"printWidth": 120,
"tabWidth": 4,
"useTabs": false,
"semi": true,
"singleQuote": false,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "always",
"rangeStart": 0,
"rangeEnd": null,
"requirePragma": false,
"insertPragma": false,
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "css",
"vueIndentScriptAndStyle": false,
"endOfLine": "lf",
"embeddedLanguageFormatting": "auto",
"parser": "typescript"
}
11 changes: 0 additions & 11 deletions .prettierrc.json

This file was deleted.

Loading