-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #298 from knorm/chore/monorepo
chore: merge all knorm code into a single repository
- Loading branch information
Showing
146 changed files
with
172,305 additions
and
23,232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
node_modules | ||
coverage | ||
|
||
# nyc output directories | ||
.nyc_output | ||
coverage | ||
|
||
# local yarn install | ||
.yarn | ||
|
||
# documentation site | ||
website | ||
|
||
# typescript build output directories | ||
packages/*/lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,54 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"env": { | ||
"mocha": true, | ||
"node": true, | ||
"es6": true | ||
}, | ||
"plugins": [ | ||
"mocha" | ||
], | ||
"extends": [ | ||
"ganintegrity" | ||
] | ||
"eslint:recommended", | ||
"standard", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:prettier/recommended", | ||
"plugin:mocha/recommended", | ||
"prettier/standard", | ||
"prettier/@typescript-eslint", | ||
"plugin:prettier/recommended" | ||
], | ||
"rules": { | ||
"curly": [ | ||
"error", | ||
"all" | ||
], | ||
"eqeqeq": [ | ||
"error", | ||
"always" | ||
], | ||
"no-var": "error", | ||
"no-console": "error", | ||
"no-unused-vars": [ | ||
"error", | ||
{ | ||
"vars": "all", | ||
"args": "after-used", | ||
"ignoreRestSiblings": true | ||
} | ||
], | ||
"prefer-const": "error", | ||
"prettier/prettier": [ | ||
"error" | ||
], | ||
"mocha/no-mocha-arrows": "off", | ||
"mocha/no-sibling-hooks": "off", | ||
"mocha/no-hooks-for-single-case": "off", | ||
"require-atomic-updates": "off", | ||
"@typescript-eslint/no-var-requires": "warn", | ||
"@typescript-eslint/no-use-before-define": "warn", | ||
"@typescript-eslint/no-this-alias": "warn", | ||
"@typescript-eslint/no-empty-function": "warn", | ||
"@typescript-eslint/camelcase": "warn" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,204 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master, v* ] | ||
pull_request: | ||
branches: [ master, v* ] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Use yarn cache | ||
uses: actions/cache@v1 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install dependencies | ||
run: yarn --frozen-lockfile | ||
|
||
- name: Run lint | ||
run: yarn lint | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [8.x, 10.x, 12.x] | ||
|
||
services: | ||
postgres9: | ||
image: postgres:9.6-alpine | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
ports: | ||
- 5432:5432 | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
postgres10: | ||
image: postgres:9.6-alpine | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
ports: | ||
- 5433:5432 | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
postgres11: | ||
image: postgres:9.6-alpine | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
ports: | ||
- 5434:5432 | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
postgres12: | ||
image: postgres:9.6-alpine | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
ports: | ||
- 5435:5432 | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install psql | ||
run: sudo apt-get update && sudo apt-get install -y postgresql-client | ||
|
||
- name: Create test databases | ||
run: | | ||
psql -Atx postgres://postgres:postgres@localhost:5432/postgres -f util/create-databases.sql | ||
psql -Atx postgres://postgres:postgres@localhost:5433/postgres -f util/create-databases.sql | ||
psql -Atx postgres://postgres:postgres@localhost:5434/postgres -f util/create-databases.sql | ||
psql -Atx postgres://postgres:postgres@localhost:5435/postgres -f util/create-databases.sql | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Use yarn cache | ||
uses: actions/cache@v1 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install dependencies on Node.js 8 | ||
if: matrix.node-version == '8.x' | ||
# @docusaurus/core requires node >= 10 but since we don't use it in | ||
# tests, we can ignore that check here | ||
run: yarn --frozen-lockfile --ignore-engines | ||
|
||
- name: Install dependencies on Node.js != 8 | ||
if: matrix.node-version != '8.x' | ||
run: yarn --frozen-lockfile | ||
|
||
- name: Run tests on PostgreSQL 9.6 | ||
run: yarn mocha | ||
env: | ||
PGHOST: localhost | ||
PGPORT: 5432 | ||
|
||
- name: Run tests on PostgreSQL 10 | ||
run: yarn mocha | ||
env: | ||
PGHOST: localhost | ||
PGPORT: 5433 | ||
|
||
- name: Run tests on PostgreSQL 11 | ||
run: yarn mocha | ||
env: | ||
PGHOST: localhost | ||
PGPORT: 5434 | ||
|
||
- name: Run coverage on PostgreSQL 12 | ||
run: yarn nyc | ||
env: | ||
PGHOST: localhost | ||
PGPORT: 5435 | ||
|
||
- name: Run example on PostgreSQL 9.6 | ||
run: yarn workspace postgres-example start | ||
env: | ||
PGHOST: localhost | ||
PGPORT: 5432 | ||
|
||
- name: Run example on PostgreSQL 10 | ||
run: yarn workspace postgres-example start | ||
env: | ||
PGHOST: localhost | ||
PGPORT: 5433 | ||
|
||
- name: Run example on PostgreSQL 11 | ||
run: yarn workspace postgres-example start | ||
env: | ||
PGHOST: localhost | ||
PGPORT: 5434 | ||
|
||
- name: Run example on PostgreSQL 12 | ||
run: yarn workspace postgres-example start | ||
env: | ||
PGHOST: localhost | ||
PGPORT: 5435 | ||
|
||
- name: Send coverage to coveralls | ||
if: matrix.node-version == '12.x' | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@master | ||
|
||
- name: Publish docs | ||
uses: netlify/actions/build@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
# node.js modules | ||
node_modules | ||
coverage | ||
|
||
# nyc coverage output directories | ||
.nyc_output | ||
coverage | ||
|
||
# typescript output directories | ||
packages/*/lib | ||
|
||
# typescript build files | ||
tsconfig.tsbuildinfo | ||
|
||
# yarn log output files | ||
yarn-debug.log | ||
yarn-error.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"exit": true, | ||
"extension": [ | ||
"js", | ||
"ts" | ||
], | ||
"spec": [ | ||
"packages/*/test/*.spec.*" | ||
], | ||
"require": [ | ||
"tsconfig-paths/register", | ||
"ts-node/register" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
10 | ||
12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"semi": true, | ||
"trailingComma": "es5", | ||
"singleQuote": true | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.