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

Modify runner #1

Open
wants to merge 188 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
fcc4ae1
Improve error message in migration.js (#506)
craigglennie Nov 12, 2019
950650f
Updates to docs - specifying schema for trigger_name (#505)
DylanYang0523 Nov 12, 2019
a74c020
Update all non-major dependencies (#507)
renovate[bot] Nov 12, 2019
71dc58d
Write node-pg-migrate in TypeScript (#502)
Nov 15, 2019
a6ce3ea
Bumped version
dolezel Nov 15, 2019
05ae2b4
Merge branch 'master' into next
dolezel Nov 15, 2019
2870345
Removed optional dependencies (#509)
dolezel Nov 15, 2019
5c4ba9e
Update all non-major dependencies
renovate-bot Nov 18, 2019
823c9cb
Update dependency husky to v3.1.0
renovate-bot Nov 18, 2019
5673d33
Update dependency yargs to v15 (#513)
renovate[bot] Nov 18, 2019
1e04975
Tests in TS (#510)
dolezel Nov 18, 2019
96cf70d
Merge branch 'master' into next
dolezel Nov 18, 2019
49ce1d4
Configuring eslint, prettier, ... (#515)
dolezel Nov 18, 2019
52f4c84
Using definitions for PgType (#516)
dolezel Nov 18, 2019
8fa980a
Update all non-major dependencies
renovate-bot Nov 25, 2019
9e1b82b
Update all non-major dependencies Docker tags
renovate-bot Nov 25, 2019
c159f43
Refactored types (#519)
dolezel Nov 25, 2019
775c45f
Merge branch 'master' into next
dolezel Nov 25, 2019
e9231f4
Bumped version
dolezel Nov 25, 2019
ead81a1
Cleaning installed files (#520)
dolezel Nov 25, 2019
290dd2a
Alternative for transpiling (#522)
Nov 29, 2019
ac09a89
Merge branch 'master' into next
dolezel Nov 29, 2019
d6bade9
Fix for error in tests
dolezel Nov 29, 2019
97d2b29
Support for TS migrations (#521)
dolezel Nov 29, 2019
0fb00f2
Strict TS (#523)
dolezel Nov 29, 2019
9825ff3
Update all non-major dependencies
renovate-bot Dec 2, 2019
621bc50
createIndex doc (#524)
DylanYang0523 Dec 2, 2019
05040f6
Merge branch 'master' into next
dolezel Dec 2, 2019
5bb42a8
Updated changelog
dolezel Dec 2, 2019
d65bc2b
Drop old node support (#526)
dolezel Dec 2, 2019
f35f383
Updated changelog
dolezel Dec 2, 2019
463c691
Optionally create index (#528)
kamranjon Dec 3, 2019
34c7d3b
More realistic target version
dolezel Dec 6, 2019
14528d6
Updated year in licence
dolezel Dec 6, 2019
c7f251d
Troubleshooting docs (#529)
dolezel Dec 9, 2019
3c4ec54
Allow 'Down' migrations in .sql files (#530)
thejetou Dec 11, 2019
8ca17d0
Updated changelog
dolezel Dec 11, 2019
8327aeb
Fixed versioning
dolezel Dec 11, 2019
9d3e0f4
4.0.0-rc.2
dolezel Dec 11, 2019
ab32ea1
Updated changelog
dolezel Dec 12, 2019
c8831be
4.0.0
dolezel Dec 12, 2019
0ac91f2
Pin dependencies
renovate-bot Dec 16, 2019
4b2f539
Expression generated columns (#532)
dolezel Dec 16, 2019
e4e7614
Updated changelog
dolezel Dec 16, 2019
3cbde11
4.1.0
dolezel Dec 16, 2019
8b9a41a
Update all non-major dependencies (#534)
renovate[bot] Dec 17, 2019
b3ebc07
Improving CI installation (#535)
dolezel Dec 18, 2019
cfaab3c
Adding include option for createIndex (#537)
dolezel Dec 19, 2019
ca8941e
Updated changelog
dolezel Dec 19, 2019
4cf8fe0
4.2.0
dolezel Dec 19, 2019
a91974d
Update all non-major dependencies
renovate-bot Dec 23, 2019
f11537a
Update cockroachdb/cockroach Docker tag to v2.1.10
renovate-bot Dec 23, 2019
ed8c637
Update dependency sinon to v8 (#541)
renovate[bot] Dec 23, 2019
f0aed9e
Update all non-major dependencies
renovate-bot Dec 30, 2019
c90c5e0
Update all non-major dependencies
renovate-bot Jan 6, 2020
96ebf53
Update dependency mocha to v7 (#546)
renovate[bot] Jan 6, 2020
844f81a
Updated year in licence (#547)
Shinigami92 Jan 7, 2020
7d4623a
Fixing typing of createTrigger parameters (#548)
dolezel Jan 7, 2020
d2897ea
Updated changelog
dolezel Jan 7, 2020
de87ee6
4.2.1
dolezel Jan 7, 2020
8e2e695
Update all non-major dependencies
renovate-bot Jan 13, 2020
66da9d2
Update dependency husky to v4 (#551)
renovate[bot] Jan 13, 2020
4d2b8f2
Update all non-major dependencies
renovate-bot Jan 20, 2020
a2fc50f
Update dependency lint-staged to v10 (#553)
renovate[bot] Jan 20, 2020
9c87237
Escape BEFORE and AFTER in addTypeValue (#554)
dolezel Jan 20, 2020
025e7b2
Updated changelog
dolezel Jan 20, 2020
b8402aa
4.2.2
dolezel Jan 20, 2020
519ce33
Update all non-major dependencies
renovate-bot Jan 27, 2020
b377666
Update dependency cross-env to v7 (#556)
renovate[bot] Jan 27, 2020
22f0924
Update dependency mkdirp to v1 (#558)
renovate[bot] Jan 27, 2020
43c00f8
Update dependency decamelize to v4 (#557)
renovate[bot] Jan 27, 2020
ba546bc
Update cockroachdb/cockroach Docker tag to v2.1.11
renovate-bot Feb 3, 2020
efd880c
Update dependency @types/mocha to v7 (#562)
renovate[bot] Feb 3, 2020
0be840b
Update all non-major dependencies (#560)
renovate[bot] Feb 3, 2020
84916bb
docsify to generate github pages (#563)
dolezel Feb 6, 2020
528fe4c
Update all non-major dependencies
renovate-bot Feb 10, 2020
057d4cb
Update dependency @types/mkdirp to v1 (#567)
renovate[bot] Feb 17, 2020
0fecb8d
Update all non-major dependencies Docker tags (#566)
renovate[bot] Feb 17, 2020
6f562f7
Update all non-major dependencies (#565)
renovate[bot] Feb 17, 2020
8ce64c5
Update all non-major dependencies
renovate-bot Feb 24, 2020
40069f1
Update dependency sinon to v9 (#570)
renovate[bot] Feb 24, 2020
b80adda
Update all non-major dependencies
renovate-bot Mar 2, 2020
136370b
Update all non-major dependencies
renovate-bot Mar 9, 2020
c639562
Update all non-major dependencies
renovate-bot Mar 16, 2020
077a9ab
Updated changelog
dolezel Mar 17, 2020
3496703
4.2.3
dolezel Mar 17, 2020
5afc343
Update all non-major dependencies
renovate-bot Mar 23, 2020
966883f
Update dependency prettier to v2 (#577)
renovate[bot] Mar 23, 2020
7ae8040
Update all non-major dependencies
renovate-bot Mar 30, 2020
ca7ed84
Possibility to pass custom logger (#580)
dolezel Mar 30, 2020
b3c1e0c
Ability to switch off debug logging (#581)
dolezel Mar 30, 2020
0eb472b
Using async/await in tests (#582)
dolezel Mar 30, 2020
22ea1c5
4.3.0
dolezel Mar 30, 2020
8c5b1c9
pg v8 (#584)
dolezel Mar 31, 2020
3e162f5
Updated changelog
dolezel Mar 31, 2020
681505c
4.4.0
dolezel Mar 31, 2020
f6e8fac
Command line arguments should override the config ones (#585)
dolezel Apr 1, 2020
1ff88a4
Updated changelog
dolezel Apr 1, 2020
2dddd7a
4.5.0
dolezel Apr 1, 2020
ee60ad2
Fix locking (#586)
Nevon Apr 3, 2020
0cf01a7
Do provide default cli option value only if not specified (#588)
dolezel Apr 3, 2020
1241582
Updated changelog
dolezel Apr 3, 2020
a98bfe4
4.5.1
dolezel Apr 3, 2020
5fe4385
Update dependency @types/sinon to v9 (#592)
renovate[bot] Apr 6, 2020
68130f1
Update all non-major dependencies (#591)
renovate[bot] Apr 6, 2020
9baefa6
reject-unauthorized CLI option (#594)
dolezel Apr 7, 2020
3a01302
Updated changelog
dolezel Apr 7, 2020
8cbf45b
4.6.0
dolezel Apr 7, 2020
10b6455
Updated docs
dolezel Apr 7, 2020
04e00c2
Accepting Pool Client (#596)
dolezel Apr 8, 2020
eb5f0aa
Updated changelog
dolezel Apr 8, 2020
bbded11
4.6.1
dolezel Apr 8, 2020
54efb39
Update all non-major dependencies (#598)
renovate[bot] Apr 14, 2020
d7264ac
Update all non-major dependencies
renovate-bot Apr 20, 2020
2435a3f
Fixing default options (#601)
dolezel Apr 23, 2020
3cffc72
Update all non-major dependencies
renovate-bot Apr 27, 2020
464685e
pipe return writeable, should use close event (#608)
wenerme Apr 29, 2020
809b8b0
Export ColumnDefinition (#611)
dolezel Apr 29, 2020
4be4ba8
support for parsing `tsconfig.json` with comments (#606)
ryands17 Apr 29, 2020
68a897a
Updated changelog
dolezel Apr 29, 2020
fde8eb5
4.7.0
dolezel Apr 29, 2020
5424d6c
Update all non-major dependencies
renovate-bot May 4, 2020
992e6ba
add DB env var and tsconfig path to config options (#613)
ryands17 May 4, 2020
9150a22
Updated changelog
dolezel May 4, 2020
cc2e84c
4.8.0
dolezel May 4, 2020
1b7914a
Update all non-major dependencies
renovate-bot May 11, 2020
5d5e040
Update dependency eslint to v7
renovate-bot May 11, 2020
d272ea6
Added tests for node 14 (#621)
dolezel May 13, 2020
1d75c92
Update all non-major dependencies
renovate-bot May 18, 2020
866ad14
Update all non-major dependencies Docker tags
renovate-bot May 18, 2020
92bcc2b
Fixed position of TEMPORARY clause in create table (#629)
dolezel May 19, 2020
84bc9ed
feat: remove node 8 support (#615)
ryands17 May 19, 2020
9efcc02
Migration can be also symlink (#630)
dolezel May 19, 2020
de0d11a
Ability to use sort of UTC time in filename (#622)
dolezel May 19, 2020
8350b68
Updated changelog
dolezel May 19, 2020
4151c01
5.0.0
dolezel May 19, 2020
017b51c
Fixing docs about configuration files (#631)
dolezel May 19, 2020
c0f6e38
Update all non-major dependencies
renovate-bot May 25, 2020
59e3d50
Update typescript-eslint monorepo to v3 (major) (#634)
renovate[bot] May 25, 2020
1b433d1
Update all non-major dependencies
renovate-bot Jun 1, 2020
cafa509
Keep this bind in logger methods (#638)
dolezel Jun 2, 2020
d1454ec
Updated changelog
dolezel Jun 2, 2020
4e640e3
5.0.1
dolezel Jun 2, 2020
f18d32b
Fix alter column collation (#641)
dolezel Jun 5, 2020
75aabfb
Updated changelog
dolezel Jun 5, 2020
545fe7d
5.0.2
dolezel Jun 5, 2020
c552488
Ability to specify own template file (#642)
dolezel Jun 5, 2020
bd68b10
Updated changelog
dolezel Jun 5, 2020
470ee0b
5.1.0
dolezel Jun 5, 2020
333cd4a
Update all non-major dependencies
renovate-bot Jun 8, 2020
075c681
Fix creating migration (#646)
dolezel Jun 8, 2020
afedbfe
Updated changelog
dolezel Jun 8, 2020
6c6f1e5
5.1.1
dolezel Jun 8, 2020
638def7
Update all non-major dependencies
renovate-bot Jun 15, 2020
e0eebff
Update dependency mocha to v8 (#650)
renovate[bot] Jun 15, 2020
4d3e84d
Update all non-major dependencies
renovate-bot Jun 22, 2020
9a6380c
View options (#656)
dolezel Jun 26, 2020
00564fd
Updated changelog
dolezel Jun 26, 2020
2f93dff
5.2.0
dolezel Jun 26, 2020
97c5d36
Update all non-major dependencies
renovate-bot Jun 29, 2020
fe796dc
Update all non-major dependencies
renovate-bot Jul 6, 2020
925f7fa
Update all non-major dependencies
renovate-bot Jul 13, 2020
7b60acb
Update dependency @types/mocha to v8 (#662)
renovate[bot] Jul 13, 2020
9937845
let console.error display all the properties on an err object, which …
jhillacre Jul 13, 2020
09fb554
Updated changelog
dolezel Jul 13, 2020
f8c5f90
5.3.0
dolezel Jul 13, 2020
4275b83
Updated dependencies (#663)
dolezel Jul 13, 2020
4a8a006
Update all non-major dependencies
renovate-bot Jul 20, 2020
5a2a660
Update all non-major dependencies
renovate-bot Jul 27, 2020
058a70a
Update all non-major dependencies
renovate-bot Aug 3, 2020
0b355e0
docs: fixed small error (#666)
0xflotus Aug 3, 2020
ae78aa1
Merge remote-tracking branch 'upstream/master' into modify-runner
valerii-kovalov Aug 4, 2020
d0407c8
exporting function type;
valerii-kovalov Aug 5, 2020
d958c2b
lint fix;
valerii-kovalov Aug 5, 2020
e62881f
refactoring;
valerii-kovalov Aug 5, 2020
771bad1
adding separate runner;
valerii-kovalov Aug 6, 2020
5bf0491
refactoring runner;
valerii-kovalov Aug 7, 2020
afb39bd
adding libRunner script for managing yargs commands;
valerii-kovalov Aug 7, 2020
ff3ca1c
adding separating of different types of migrations files;
valerii-kovalov Aug 18, 2020
27cf066
adding additional command for applying migrations by one or by range;
valerii-kovalov Aug 19, 2020
fd571e4
updating functionality of command 'redo';
valerii-kovalov Aug 20, 2020
225e9ff
updating functionality of command 'apply';
valerii-kovalov Aug 20, 2020
70da615
refactoring functionality for using 'reset' script as default export …
valerii-kovalov Aug 20, 2020
c0f51ec
adding snapshot functionality;
valerii-kovalov Aug 21, 2020
a93e11d
updating snapshot functionality;
valerii-kovalov Aug 25, 2020
99405df
refactoring;
valerii-kovalov Aug 25, 2020
3b15879
refactoring;
valerii-kovalov Aug 26, 2020
28504c0
refactoring;
valerii-kovalov Aug 27, 2020
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
13 changes: 0 additions & 13 deletions .babelrc.js

This file was deleted.

145 changes: 112 additions & 33 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2

node-image: &node-image
image: circleci/node:10
image: circleci/node:12

set-npm-global: &set-npm-global
run:
Expand Down Expand Up @@ -37,12 +37,9 @@ test-postgres: &test-postgres
cockroach-wait: &cockroach-wait
run:
name: Wait for DB
command: dockerize -wait tcp://127.0.0.1:26257 -timeout 120s
run:
name: create-cockroach-db
command: |
node -e '
(new require("pg").Pool({ connectionString: process.env.DATABASE_URL }))
dockerize -wait tcp://127.0.0.1:26257 -timeout 120s && node -e '
(new (require("pg").Pool)({ connectionString: process.env.DATABASE_URL }))
.query(
"CREATE DATABASE circle_test",
err => (process.exitCode = err ? 1 : 0) && process.stdout.write(err.stack)
Expand All @@ -56,12 +53,11 @@ jobs:
steps:
- checkout
- <<: *set-npm-global
- run: npm install -g [email protected]
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
key: dependency-cache-{{ checksum "package-lock.json" }}
- run: npm i
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
key: dependency-cache-{{ checksum "package-lock.json" }}
paths:
- ./node_modules
- <<: *save
Expand All @@ -81,10 +77,11 @@ jobs:
docker:
- <<: *node-image
environment:
- DATABASE_URL=postgres://ubuntu@localhost:5432/circle_test
- DATABASE_URL=postgres://ubuntu:ubuntu@localhost:5432/circle_test
- image: postgres:9.6-alpine
environment:
- POSTGRES_USER=ubuntu
- POSTGRES_PASSWORD=ubuntu
- POSTGRES_DB=circle_test
steps:
- <<: *restore
Expand All @@ -94,10 +91,11 @@ jobs:
docker:
- <<: *node-image
environment:
- DATABASE_URL=postgres://ubuntu@localhost:5432/circle_test
- image: postgres:10.10-alpine
- DATABASE_URL=postgres://ubuntu:ubuntu@localhost:5432/circle_test
- image: postgres:10.13-alpine
environment:
- POSTGRES_USER=ubuntu
- POSTGRES_PASSWORD=ubuntu
- POSTGRES_DB=circle_test
steps:
- <<: *restore
Expand All @@ -107,10 +105,25 @@ jobs:
docker:
- <<: *node-image
environment:
- DATABASE_URL=postgres://ubuntu@localhost:5432/circle_test
- image: postgres:11.5-alpine
- DATABASE_URL=postgres://ubuntu:ubuntu@localhost:5432/circle_test
- image: postgres:11.8-alpine
environment:
- POSTGRES_USER=ubuntu
- POSTGRES_PASSWORD=ubuntu
- POSTGRES_DB=circle_test
steps:
- <<: *restore
- <<: *postgres-wait
- <<: *test-postgres
test-pg-12:
docker:
- <<: *node-image
environment:
- DATABASE_URL=postgres://ubuntu:ubuntu@localhost:5432/circle_test
- image: postgres:12.3-alpine
environment:
- POSTGRES_USER=ubuntu
- POSTGRES_PASSWORD=ubuntu
- POSTGRES_DB=circle_test
steps:
- <<: *restore
Expand All @@ -134,35 +147,37 @@ jobs:
- <<: *node-image
environment:
- DATABASE_URL=postgresql://root@localhost:26257/circle_test
- image: cockroachdb/cockroach:v2.1.9
- image: cockroachdb/cockroach:v2.1.11
command: ['start', '--insecure', '--host=localhost']
steps:
- <<: *restore
- <<: *cockroach-wait
- run:
name: test
command: npm run migrate up -- -m test/cockroach --no-lock && npm run migrate down 0 -- -m test/cockroach --no-lock --timestamps
test-node-8:
test-node-10:
docker:
- image: circleci/node:8
- image: circleci/node:10
environment:
- DATABASE_URL=postgres://ubuntu@localhost:5432/circle_test
- image: postgres:10.10-alpine
- DATABASE_URL=postgres://ubuntu:ubuntu@localhost:5432/circle_test
- image: postgres:12.3-alpine
environment:
- POSTGRES_USER=ubuntu
- POSTGRES_PASSWORD=ubuntu
- POSTGRES_DB=circle_test
steps:
- <<: *restore
- <<: *postgres-wait
- <<: *test-postgres
test-node-12:
test-node-14:
docker:
- image: circleci/node:12
- image: circleci/node:14
environment:
- DATABASE_URL=postgres://ubuntu@localhost:5432/circle_test
- image: postgres:10.10-alpine
- DATABASE_URL=postgres://ubuntu:ubuntu@localhost:5432/circle_test
- image: postgres:12.3-alpine
environment:
- POSTGRES_USER=ubuntu
- POSTGRES_PASSWORD=ubuntu
- POSTGRES_DB=circle_test
steps:
- <<: *restore
Expand All @@ -171,9 +186,10 @@ jobs:
test-config:
docker:
- <<: *node-image
- image: postgres:10.10-alpine
- image: postgres:12.3-alpine
environment:
- POSTGRES_USER=ubuntu
- POSTGRES_PASSWORD=ubuntu
- POSTGRES_DB=circle_test
steps:
- <<: *restore
Expand All @@ -185,6 +201,7 @@ jobs:
{
"db": {
"user": "ubuntu",
"password": "ubuntu",
"host": "localhost",
"port": "5432",
"database": "circle_test"
Expand All @@ -199,7 +216,7 @@ jobs:
environment:
# can't use characters @#?/ in password - they have special meaning in url
- DATABASE_URL=postgres://ubuntu:123456abcdefghABCDEFGH~\`\!$%^\&*-_=+{}[]\(\)\<\>,.\;:\"\'\|\\@localhost:5432/circle_test
- image: postgres:10.10-alpine
- image: postgres:12.3-alpine
environment:
- POSTGRES_USER=ubuntu
- POSTGRES_PASSWORD=123456abcdefghABCDEFGH~\`\!$%^\&*-_=+{}[]\(\)\<\>,.\;:\"\'\|\\
Expand All @@ -211,7 +228,7 @@ jobs:
test-password-2:
docker:
- <<: *node-image
- image: postgres:10.10-alpine
- image: postgres:12.3-alpine
environment:
- POSTGRES_USER=ubuntu
- POSTGRES_PASSWORD=123456abcdefghABCDEFGH~\`\!@#$%^\&*-_=+{}[]\(\)\<\>,.\;:\"\'?\|/\\
Expand Down Expand Up @@ -242,7 +259,7 @@ jobs:
- PGUSER=ubuntu
- PGPASSWORD=123456abcdefghABCDEFGH~\`\!@#$%^\&*-_=+{}[]\(\)\<\>,.\;:\"\'?\|/\\
- PGDATABASE=circle_test
- image: postgres:10.10-alpine
- image: postgres:12.3-alpine
environment:
- POSTGRES_USER=ubuntu
- POSTGRES_PASSWORD=123456abcdefghABCDEFGH~\`\!@#$%^\&*-_=+{}[]\(\)\<\>,.\;:\"\'?\|/\\
Expand All @@ -255,12 +272,13 @@ jobs:
docker:
- <<: *node-image
environment:
- DATABASE_URL=postgres://ubuntu@localhost:5432/circle_test
- DATABASE_URL=postgres://ubuntu:ubuntu@localhost:5432/circle_test
# used in tests
- SCHEMA=myschema
- image: postgres:10.10-alpine
- image: postgres:12.3-alpine
environment:
- POSTGRES_USER=ubuntu
- POSTGRES_PASSWORD=ubuntu
- POSTGRES_DB=circle_test
steps:
- <<: *restore
Expand All @@ -272,19 +290,68 @@ jobs:
docker:
- <<: *node-image
environment:
- DATABASE_URL=postgres://ubuntu@localhost:5432/circle_test
- DATABASE_URL=postgres://ubuntu:ubuntu@localhost:5432/circle_test
# used in tests
- SCHEMA=myschema
- image: postgres:10.10-alpine
- image: postgres:12.3-alpine
environment:
- POSTGRES_USER=ubuntu
- POSTGRES_PASSWORD=ubuntu
- POSTGRES_DB=circle_test
steps:
- <<: *restore
- <<: *postgres-wait
- run:
name: test
command: npm run migrate up -- -s myschema public --create-schema -m test/migrations && npm run migrate down 0 -- -s myschema public -m test/migrations --timestamps
test-typescript-migration:
docker:
- <<: *node-image
environment:
- DATABASE_URL=postgres://ubuntu:ubuntu@localhost:5432/circle_test
- image: postgres:12.3-alpine
environment:
- POSTGRES_USER=ubuntu
- POSTGRES_PASSWORD=ubuntu
- POSTGRES_DB=circle_test
steps:
- <<: *restore
- <<: *postgres-wait
- run:
name: test
command: npm run migrate up -- --tsconfig tsconfig.json -m test/ts/migrations && npm run migrate down 0 -- --tsconfig tsconfig.json -m test/ts/migrations --timestamps
test-typescript-customrunner:
docker:
- <<: *node-image
environment:
- DATABASE_URL=postgres://ubuntu:ubuntu@localhost:5432/circle_test
- image: postgres:12.3-alpine
environment:
- POSTGRES_USER=ubuntu
- POSTGRES_PASSWORD=ubuntu
- POSTGRES_DB=circle_test
steps:
- <<: *restore
- <<: *postgres-wait
- run:
name: test
command: $(npm bin)/ts-node test/ts/customRunner.ts
test-create-migration:
docker:
- <<: *node-image
steps:
- <<: *restore
- run:
name: check dir does not exists
command: |
[ ! -d migrations ]
- run:
name: create migration
command: npm run migrate create test
- run:
name: check file was created
command: |
[ $(ls -1 migrations | wc -l) -eq 1 ]

workflows:
version: 2
Expand All @@ -306,16 +373,19 @@ workflows:
- test-pg-11:
requires:
- install
- test-pg-12:
requires:
- install
- test-cockroach-1:
requires:
- install
- test-cockroach-2:
requires:
- install
- test-node-8:
- test-node-10:
requires:
- install
- test-node-12:
- test-node-14:
requires:
- install
- test-config:
Expand All @@ -336,3 +406,12 @@ workflows:
- test-schemas:
requires:
- install
- test-typescript-migration:
requires:
- install
- test-typescript-customrunner:
requires:
- install
- test-create-migration:
requires:
- install
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
lib/migration-template.js
lib/migration-template.ts
node_modules
dist
templates
*.d.ts
45 changes: 32 additions & 13 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,44 @@ module.exports = {
extends: [
'eslint:recommended',
'eslint-config-airbnb-base',
'plugin:@typescript-eslint/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:security/recommended',
'plugin:prettier/recommended'
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
parser: 'babel-eslint',
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'import', 'security'],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {},
},
},
env: {
node: true,
mocha: true
mocha: true,
},
rules: {
'no-underscore-dangle': 0,
'security/detect-object-injection': 0,
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['mocha.bootstrap.js', '/test/**']
}
]
'no-underscore-dangle': 'off',
'security/detect-object-injection': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'import/extensions': ['error', 'never'],
},
plugins: ['import', 'security']
};
overrides: [
{
files: ['*.js', 'node-pg-migrate'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/camelcase': 'off',
},
},
],
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
*.log
/migrations
/node_modules
/dist*/**
/dist
/lib
Loading