Skip to content

Commit 71f79a3

Browse files
authored
Merge pull request #12 from flow-build/dev-1.0
release/v1.0.0
2 parents 61a345c + 922ed43 commit 71f79a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+30126
-13874
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ indent_size = 2
99
end_of_line = lf
1010
charset = utf-8
1111
trim_trailing_whitespace = true
12-
insert_final_newline = true
12+
insert_final_newline = true

.eslintrc.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended",
9+
"plugin:import/recommended",
10+
"plugin:import/typescript",
11+
"plugin:react/recommended",
12+
"plugin:prettier/recommended",
13+
"plugin:react-hooks/recommended",
14+
"plugin:sonarjs/recommended"
15+
],
16+
"parser": "@typescript-eslint/parser",
17+
"parserOptions": {
18+
"ecmaVersion": 12,
19+
"sourceType": "module",
20+
"ecmaFeatures": {
21+
"jsx": true
22+
}
23+
},
24+
"plugins": [
25+
"@typescript-eslint",
26+
"react",
27+
"prettier",
28+
"eslint-plugin-import-helpers",
29+
"import",
30+
"react-hooks",
31+
"sonarjs"
32+
],
33+
"rules": {
34+
"prettier/prettier": "error",
35+
"linebreak-style": ["error", "unix"],
36+
"max-len": [
37+
"error",
38+
{
39+
"code": 80,
40+
"ignoreStrings": true,
41+
"ignoreComments": true,
42+
"ignoreRegExpLiterals": true,
43+
"ignorePattern": "^\\s*\\w+\\s*\\(.*\\).+;$"
44+
}
45+
],
46+
"import-helpers/order-imports": [
47+
"error",
48+
{
49+
"newlinesBetween": "always",
50+
"groups": ["/^react/", "module", ["parent", "sibling", "index"]],
51+
"alphabetize": { "order": "asc", "ignoreCase": true }
52+
}
53+
],
54+
"no-console": "warn",
55+
"no-nested-ternary": "off",
56+
"react/jsx-filename-extension": ["warn", { "extensions": [".tsx"] }],
57+
"react-hooks/rules-of-hooks": "error",
58+
"react-hooks/exhaustive-deps": "warn",
59+
"react/prop-types": "off",
60+
"import/no-unresolved": "error",
61+
"import/prefer-default-export": "off"
62+
},
63+
"settings": {
64+
"import/resolver": {}
65+
}
66+
}

.github/label-settings/labeler.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
js:
2+
- 'src/**/*.js'
3+
test:
4+
- '**/tests'
5+
- '**/_tests_'
6+
- '**/*.spec.js'
7+
- '**/*.test.js'
8+
9+
doc:
10+
- '**/*.md'
11+
12+
configuration:
13+
- '**/*.yml'
14+
- '**/*.json'
15+
- '**/.env'
16+
- '**/.env.**'
17+
- '**/knexfile.js'
18+
- '**/jest.config.js'
19+
20+
dependencies:
21+
- '**/package.json'
22+
- '**/build.gradle'
23+
- '**/.*ignore'
24+
25+
github-actions:
26+
- '**/.github/workflows/**'
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
feature: ['feature/*', 'feat/*', 'features/*']
2+
bug: ['fix/*', 'bug/*', 'bugfix/*']
3+
chore: chore/*
4+
fixed-branch: fixed-branch-name
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Labeler
2+
on:
3+
- pull_request_target
4+
jobs:
5+
pattern-labaler:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/labeler@v2
9+
with:
10+
configuration-path: .github/label-settings/labeler.yml
11+
repo-token: ${{ secrets.GH_TOKEN }}
12+
branch-name-labeler:
13+
runs-on: ubuntu-18.04
14+
steps:
15+
- uses: TimonVS/pr-labeler-action@v3
16+
with:
17+
configuration-path: .github/label-settings/name-pattern-labeler.yml
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

.github/workflows/main.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ jobs:
77
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
10-
node: ['10.x', '12.x', '14.x']
11-
os: [ubuntu-latest, windows-latest, macOS-latest]
10+
node: ['18.x']
11+
os: [ubuntu-latest, macOS-latest]
1212

1313
steps:
1414
- name: Checkout repo
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
ref: ${{github.event.pull_request.head.ref}}
19+
repository: ${{github.event.pull_request.head.repo.full_name}}
1620

1721
- name: Use Node ${{ matrix.node }}
1822
uses: actions/setup-node@v1
@@ -26,7 +30,7 @@ jobs:
2630
run: yarn lint
2731

2832
- name: Test
29-
run: yarn test --ci --coverage --maxWorkers=2
33+
run: yarn test
3034

3135
- name: Build
3236
run: yarn build
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- next
7+
- beta
8+
- alpha
9+
jobs:
10+
release:
11+
name: Release
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: 'lts/*'
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Get version from package.json before release step
28+
id: get_version_before_release
29+
run: echo "::set-output name=version::$(npm run get-version --silent)"
30+
31+
- name: Release
32+
id: release
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
35+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
36+
GIT_AUTHOR_NAME: bot-flowbuild
37+
GIT_AUTHOR_EMAIL: bot.flowbuild@gmail.com
38+
GIT_COMMITTER_NAME: bot-flowbuilld
39+
GIT_COMMITTER_EMAIL: bot.flowbuild@gmail.com
40+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
41+
run: npm run release
42+
43+
- name: Get version from package.json after release step
44+
id: get_version_after_release
45+
run: echo "::set-output name=version::$(npm run get-version --silent)"
46+
47+
- name: Create Pull Request with updated package files
48+
if: steps.get_version_before_release.outputs.version != steps.get_version_after_release.outputs.version
49+
uses: peter-evans/create-pull-request@v3
50+
with:
51+
token: ${{ secrets.GH_TOKEN }}
52+
commit-message: 'chore(release): ${{ steps.get_version_after_release.outputs.version }}'
53+
committer: bot-flowbuilld <bot.flowbuild@gmail.com>
54+
author: bot-flowbuilld <bot.flowbuild@gmail.com>
55+
title: 'chore(release): ${{ steps.get_version_after_release.outputs.version }}'
56+
body: 'Version bump in package.json and package-lock.json for release [${{ steps.get_version_after_release.outputs.version }}](https://github.com/${{github.repository}}/releases/tag/v${{ steps.get_version_after_release.outputs.version }})'
57+
branch: version-bump/${{ steps.get_version_after_release.outputs.version }}

.github/workflows/size.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,26 @@ name: size
22
on: [pull_request]
33
jobs:
44
size:
5-
runs-on: ubuntu-latest
5+
name: Verify size limit, on Node ${{ matrix.node }} and ${{ matrix.os }}
6+
runs-on: ${{ matrix.os }}
7+
strategy:
8+
matrix:
9+
node: ['18.x']
10+
os: [ubuntu-latest, macOS-latest]
611
env:
712
CI_JOB_NUMBER: 1
813
steps:
9-
- uses: actions/checkout@v1
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
ref: ${{github.event.pull_request.head.ref}}
18+
repository: ${{github.event.pull_request.head.repo.full_name}}
19+
20+
- name: Use Node ${{ matrix.node }}
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: ${{ matrix.node }}
24+
1025
- uses: andresz1/size-limit-action@v1
1126
with:
1227
github_token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33
node_modules
44
.cache
55
dist
6+
esbuild-why*.html
7+
.env
8+
.npmrc
9+
yarn.lock
10+

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged

0 commit comments

Comments
 (0)