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

chore: Merge master into next #6583

Merged
merged 174 commits into from
Sep 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
685d76b
chore(deps): bump acorn from 5.7.3 to 5.7.4 (#5679)
dependabot[bot] Mar 13, 2020
b77f520
docs: Update DEVELOPER.md (#5768)
dhritzkiv Mar 27, 2020
50a0641
fix: handle URL objects as column field values (#5771)
dhritzkiv Mar 27, 2020
0aba8a2
docs: fixed `sql` to `query` in the last example (#5753)
tejovanthWork Mar 27, 2020
edeb561
fix: update dependency mkdirp to 1.x (#5748)
urdeveloper Mar 27, 2020
442bff9
docs: typo fix (#5739)
sliuqin Mar 27, 2020
5b50f47
docs: added soft-delete documentation (#5862)
artoodeeto Apr 12, 2020
5a2eb30
feat: create-column, update-column, version-column column kinds now s…
pleerock Apr 13, 2020
aa28e2b
docs: fix readme wording (#5842)
artemnih Apr 13, 2020
e92c743
docs: fix raw query (#5845)
stefan-malcek Apr 13, 2020
61d59ca
fix: expo sqlite driver disconnect() (#6027)
allandiego May 15, 2020
826ed36
docs: fix typeorm alias for TS (#6045)
JSteunou May 15, 2020
08cc076
docs: update image.json (#6015)
beqa7137 May 15, 2020
8e0d817
fix: use an empty string enum as the type of a primary key column (#6…
BTOdell May 15, 2020
5fc802d
fix: escape column comment in mysql driver (#6056)
BTOdell May 15, 2020
52a5619
docs: add @DeleteDateColumn to special columns docs (#6016)
rednebmas May 16, 2020
0acedda
docs: update env variables listing (#6007)
Andreyco May 16, 2020
53d92ba
docs: fix grammar for ormconfig error (#6001)
vegerot May 16, 2020
37fd946
docs: fix select query builder link (#5980)
vuki656 May 16, 2020
360122f
feat: add FOR NO KEY UPDATE lock mode for postgresql (#5971)
ohjeyong May 16, 2020
3cfcc50
feat: add name option to view column (#5962)
dsbert May 16, 2020
4ef0bce
docs: fix grammatical error (lets => let's) (#5954)
patrickhpan May 16, 2020
2fd0a8a
fix: HANA - SSL options, column delta detection mechanism (#5938)
elsbrock May 16, 2020
87cc6f4
fix: insert and update query builder to handle mssql geometry column …
waikuen2010 May 16, 2020
665b83c
refactor: refactor deprecated new Buffer to Buffer.from (#5924)
kaznovac May 16, 2020
90d31a0
docs: update connection-options.md (#5902)
tareqdayya May 16, 2020
2c90e1c
feat: added support for NOWAIT & SKIP LOCKED in Postgres (#5927)
Nopik May 16, 2020
2ab88c2
fix: use correct typings for the result of `getUpsertedIds()` (#5878)
jessepinho May 16, 2020
e584297
feat: Aurora Data API - Postgres Support (#5651)
ArsenyYankovsky May 16, 2020
9d2b8e0
feat: Add soft remove and recover methods to entity (#5854)
jannostern May 16, 2020
a0feabc
docs: missing word in docs (#5793)
scadgek May 16, 2020
416e419
fix: migrations being generated for FK even if there are no changes (…
zaro May 16, 2020
327144a
fix: wrong table name parameter when not using default schema (#5801)
igoraguiar May 16, 2020
c6cbddc
fix: prevent TypeError when calling bind function with sql.js 1.2.X (…
fb64 May 16, 2020
9874227
docs: fix many-to-many example table (#5717)
mmKALLL May 16, 2020
8ac5d5d
docs: add the missing text in the sentence (#5736)
klevamane May 16, 2020
1829f96
feat: aurora Data API - Support for AWS configuration options through…
cklam2 May 16, 2020
7d8a1ca
fix: update Entity decorator return type to ClassDecorator (#5776)
GrayStrider May 16, 2020
f8c52f3
fix: calling EntityManager.insert() with an empty array of entities (…
May 16, 2020
8c3f48a
fix: sha.js import (#5728)
guybedford May 16, 2020
6a6cc7b
docs: note about bigint type being mapped to a string (#5730)
golergka May 16, 2020
c5a22f5
docs: added enumName property (#5731)
golergka May 16, 2020
ec3be41
feat: names of extra columns for specific tree types moved to NamingS…
steerio May 16, 2020
2066734
docs: update FindOneOptions lock property comment (#5701)
Koronen May 16, 2020
265d1ae
feat: PG allow providing a function for password (#5673)
robbiet480 May 16, 2020
d5cde49
fix: redundant undefined parameters are not generated in migration fi…
olegmdev May 16, 2020
9e8a8cf
fix: provide a default empty array for parameters. (#5677)
graham- May 16, 2020
ed75d59
fix: respect database from connection urls (#5640)
ant45de May 16, 2020
3dc9ffd
docs: documentation for "-c" connection option (#6080)
mateusppereira May 18, 2020
215f106
fix: Unknown fields are stripped from WHERE clause (issue #3416) (#5603)
johannessjoberg May 18, 2020
4ef6b65
fix: columns with transformer should be normalized for update (#5700)
shayded-exe May 18, 2020
a9bdb37
perf: Optimized version of EntityMetadata#compareIds() for the common…
njam May 18, 2020
8977365
fix: 'in' clause case for ORACLE (#5345)
gerwinbrunner May 18, 2020
7093801
docs: fix typo (#6083)
dolsup May 18, 2020
69d3e06
removed .only
pleerock May 18, 2020
d7256c7
docs: updated link to TS node (#6090)
jpbulman May 18, 2020
9c4207e
fixed sap issue with dates
pleerock May 19, 2020
db9d0fa
fix: prototype pollution issue (#6096)
pleerock May 19, 2020
eaadf20
version bump
pleerock May 19, 2020
650b716
closes #6110 (#6117)
chriswep May 23, 2020
203f51d
feat: add AWS configurationOptions to aurora-data-api-pg connector (#…
sdurban May 24, 2020
b4a29f4
docs: add a link to TypeORM website (#6143)
mikemaccana May 27, 2020
e073e02
fix: revert fix handle URL objects as column field values (#6145)
pleerock May 27, 2020
a595fed
fix: SqlQueryRunner.hasColumn was not working (#6146)
pleerock May 27, 2020
0072149
feat: add postgres connection timeout option (#6160)
mothershipper Jun 6, 2020
defa9bc
docs: fix undefined `repository` variable on docs (#6221)
GiancarlosIO Jun 7, 2020
fc7a4f1
added sap hana note
pleerock Jun 22, 2020
9a88751
docs: fixed small error (#6258)
0xflotus Jul 2, 2020
1c09dc3
docs: replace body-parser with express built-in parser (#6257)
mustaphee Jul 2, 2020
4073a8d
docs: fix markdown typo (#6359)
Nipodemos Jul 6, 2020
1bc5658
docs: update relations-faq.md (#6355)
rahul3883 Jul 6, 2020
8e2d97d
fix: resolve missing decorators on shim (#6354)
Silventino Jul 6, 2020
60711c2
docs: Add advance subdocument query documentation (#6344)
Ibcs16 Jul 6, 2020
0d99b46
fix: remove unnecessary optionality from Raw operator's columnAlias a…
yokomotod Jul 6, 2020
0ba2a48
fix: properly override database url properties (#6247)
Redmega Jul 6, 2020
6eeb03a
feat: support cjs extension for ormconfig (#6285)
dpickett Jul 7, 2020
6f6bdbd
fix: insert IN(null) instead of IN() when In([]) empty array for mysq…
zstiu Jul 7, 2020
51af310
chore(deps): bump lodash from 4.17.15 to 4.17.19 (#6408)
dependabot[bot] Jul 16, 2020
c9f184e
docs: update using-cli.md (#6407)
nandomoreirame Jul 16, 2020
afc62fd
docs: Added one-to-one-relations.md & many-to-one-one-to-many-relatio…
tajpouria Jul 16, 2020
874e573
fix: Query builder makes query with joins, without limit for inherite…
grkov90 Jul 17, 2020
c23c888
fix: decorators should implement the official TypeScript interface (#…
Jul 17, 2020
911ac93
docs: fixed small typo error (#6418)
0xflotus Jul 17, 2020
c6336aa
fix: exporting missing load event (#6396)
saulotoledo Jul 17, 2020
298a3b9
fix: support multiple `JoinColumn`s in EntitySchema (#6397)
imnotjames Jul 17, 2020
54a3a15
fix: correctly parse connection URI with query params (#6390)
ruscon Jul 17, 2020
7c0da1c
fix: getPendingMigrations isn't properly working (#6372)
axos88 Jul 17, 2020
2241451
feat: add better-sqlite3 driver (#6224)
K024 Jul 17, 2020
c6ae601
style: use LF instead of CRLF in BetterSqlite3 modules (#6433)
imnotjames Jul 21, 2020
9abab82
fix: pass formatOptions to Data API Client, fix extensions (#6404)
ArsenyYankovsky Jul 21, 2020
9d82a45
added sponsors section
pleerock Jul 24, 2020
83eb25e
updated sponsors section
pleerock Jul 24, 2020
feeb7d1
Update README.md
pleerock Jul 24, 2020
5e47caf
ads styling fixes
pleerock Jul 24, 2020
cc23ba2
docs: fix grammatical error (#6458)
nlap Jul 24, 2020
259ad0e
chore: use eslint instead of tslint (#6452)
imnotjames Jul 24, 2020
f642a9e
fix: @JoinTable does not respect inverseJoinColumns referenced column…
michael-golden Jul 24, 2020
1c52ccf
chore: update slack invite link (#6447)
imnotjames Jul 24, 2020
275061b
chore: update pg to 8.3.0 (#6462)
imnotjames Jul 26, 2020
906d97f
fix: mysql migration: make sure the indices sql which left-join be th…
echoulen Jul 26, 2020
86a31a8
chore: use circleci for all builds (#6460)
imnotjames Aug 2, 2020
0d6191b
doc: change @types/node install to install in dev dependencies (#6485)
AlcidesA Aug 2, 2020
43a7386
feat: implement postgres ltree (#6480)
tomSawkins Aug 2, 2020
f270c0b
docs: remove out-of-place 'example:' (#6468)
iahsanujunda Aug 2, 2020
33041cc
test: remove hardcoded test from github issue tst 2096 (#6463)
imnotjames Aug 2, 2020
9750e38
doc: use CircleCI for CI badge (#6516)
imnotjames Aug 7, 2020
21b51f3
docs: Update slack invite link for typeorm.io support page (#6524)
imnotjames Aug 7, 2020
6b795a8
docs: update supported-platforms.md (#6545)
ilanolkies Aug 16, 2020
92f2554
docs: fix typos (#6538)
epicfaace Aug 16, 2020
15afef3
chore: discourage questions as issues (#6535)
imnotjames Aug 16, 2020
31029bd
chore(deps-dev): bump class-transformer from 0.2.3 to 0.3.1 (#6532)
dependabot[bot] Aug 16, 2020
c96ab43
build: use `npm install` to work around npm/cli#558 (#6571)
imnotjames Aug 17, 2020
10d0aea
chore: pin version of cockroach to a known good version (#6585)
imnotjames Aug 19, 2020
5a9150e
chore: remove uneccessary cockroachdriver calls in view-entity tests …
imnotjames Aug 19, 2020
9d2df28
fix: change InsertQueryBuilder.values() with an empty array into a no…
415mcc Aug 23, 2020
8d90d40
fix: DeepPartial with any and {[k: string]: any} (#6581)
MatthiasKunnen Aug 23, 2020
d1ed572
build: use docker-compose for database services (#6602)
imnotjames Aug 24, 2020
10b05a9
removing gitads
pleerock Sep 2, 2020
85c07fd
docs: update zh_CN link path (#6652)
xgqfrms Sep 2, 2020
c99ba40
feat: FileLogger accepts custom file path (#6642)
artysidorenko Sep 2, 2020
4f7481b
chore: instead of require, import chalk from chalk (#6637)
imnotjames Sep 2, 2020
cf3ad62
fix: pass `ids_` to alias builder to prevent length overflow (#6624)
imnotjames Sep 2, 2020
2b5f139
feat: support absolute paths in migrationsDir for the CLI (#6660)
tomasreimers Sep 3, 2020
490ad0d
refactor: only use PlatformTools.load for optional dependencies (#6630)
imnotjames Sep 3, 2020
0397e44
fix: Migration issues with scale & precision in sqlite/sql.js (#6638)
michaelbromley Sep 3, 2020
a50e09a
added directory typing
pleerock Sep 4, 2020
df70dc3
added directory typing
pleerock Sep 4, 2020
c81b405
fix: Unnecessary migrations for fulltext indices (#6634)
michaelbromley Sep 4, 2020
ef2011d
fix: get correct insert ids for multiple entities inserted (#6668)
dolsup Sep 4, 2020
4fc4a1b
fix: make only a single SELECT to get inserted default and generated …
dolsup Sep 4, 2020
16a2d80
fix: Child entities not being saved correctly with cascade actions (#…
ZBAGI Sep 4, 2020
23110d1
fix: update query deep partial TypeScript definition (#6085)
sdomagala Sep 4, 2020
fa21f87
build: add oracle to CI (#6623)
imnotjames Sep 4, 2020
802e0f6
test: escape table name for Github #4410 (#6672)
imnotjames Sep 5, 2020
8b8bc35
fix: add missing schema for OracleDriver (#6673)
pirouet Sep 6, 2020
a8b2845
docs: update select-query-builder.md (#6681)
tuliomolina Sep 8, 2020
620a243
docs: update query runner examples (#6680)
Cristuker Sep 8, 2020
2d4a8d7
test: Testing that the discriminatorValue gets saved for ChildEntity …
Garethp Sep 8, 2020
ae3cf0e
fix: handle 'error' events from pool connection (#6262)
joras Sep 8, 2020
7ddaf23
fix: unnecessary migrations for unsigned numeric types (#6632)
michaelbromley Sep 10, 2020
7167903
version bump
pleerock Sep 10, 2020
ea59b8d
fix: sql.js v1.2+ don't support undefined parameters (#6698)
imnotjames Sep 11, 2020
9583430
fix: hdb-pool is not namespaced under @sap (#6700)
imnotjames Sep 11, 2020
8b68f40
feat: create EntityTarget and use instead of EntitySchema / ObjectTyp…
imnotjames Sep 11, 2020
330262d
chore: bump all package versions except typescript (#6696)
imnotjames Sep 12, 2020
370442c
feat: Beautify generated SQL for migrations (#6685)
artysidorenko Sep 12, 2020
7a52f18
feat: backport SQLite Busy handler & WAL mode enable (#6588)
imnotjames Sep 12, 2020
208cf6b
fix: prevent multiple `release` listeners in PostgresQueryRunner (#6708)
imnotjames Sep 14, 2020
b50576e
docs: correct the comment of OneToMany decorator (#6712)
juusaw Sep 14, 2020
2b37808
fix: backport FindOperator return types (#6717)
imnotjames Sep 15, 2020
4baac71
style: backport style fixes in next to cut down on churn (#6715)
imnotjames Sep 15, 2020
fabab95
Merge branch 'master' into next
imnotjames Sep 15, 2020
2c9315e
update FindOptionUtils to fix typing
imnotjames Aug 18, 2020
0f292e3
update test to handle withDeleted living under FindOptions.optionswit…
imnotjames Aug 19, 2020
cf15e3f
default import for Observable
imnotjames Aug 18, 2020
f46c8a3
work around typing preventing test 3416 from running
imnotjames Aug 19, 2020
d2201ab
fix test 6399
imnotjames Aug 19, 2020
cbfbc56
SchemaTransformer requires a connection now
imnotjames Aug 19, 2020
51da0ab
correctly handle composite PK & failed entity loads
imnotjames Sep 15, 2020
0128a9e
FindCriteriaNotFoundError must extend EntityColumnNotFound
imnotjames Sep 15, 2020
589c543
fix findOneOrFail passing invalid data to findOne
imnotjames Sep 15, 2020
c88c863
drop generic from concrete EntityManagers
imnotjames Sep 15, 2020
774c5ba
update 4415 to address cockroachDB changes
imnotjames Sep 15, 2020
96eddfb
chore: explicitly pull in typescript 3.9 (#6724)
imnotjames Sep 17, 2020
8820d4a
test: disable logging for test 1960 (#6721)
imnotjames Sep 17, 2020
6e28322
fix: migration:generate issue with onUpdate using mariadb 10.4 (#6714)
jesussegado Sep 17, 2020
4bc7431
docs: update many-to-many-relations.md (#6725)
Louai-H Sep 17, 2020
5084e47
feat: add option to pass postgres server notices to client logger (#6…
artysidorenko Sep 17, 2020
c714867
fix: ensure browser builds don't include any non-browser modules (#6743)
imnotjames Sep 19, 2020
dfe8259
fix: count() method for multiple primary keys for cockroachdb (#6745)
temnov98 Sep 21, 2020
f2356dc
refactor: create a ReplicationMode type and update function defs (#6747)
imnotjames Sep 21, 2020
1b29591
refactor: drop promise utils (#6746)
imnotjames Sep 21, 2020
b55a417
fix: resolve issues ora-00972:identifier is too long (#6751)
imnotjames Sep 22, 2020
b2eeba6
Merge branch 'master' into next
imnotjames Sep 22, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
285 changes: 193 additions & 92 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,114 +1,215 @@
# Javascript Node CircleCI 2.0 configuration file
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
version: 2
jobs:
common:
working_directory: ~/typeorm
docker:
- image: circleci/node:10.16.0
- image: mysql:5.7.24
environment:
MYSQL_ROOT_PASSWORD: "admin"
MYSQL_DATABASE: "test"
- image: mariadb:10.1.37
name: mariadb
environment:
MYSQL_ROOT_PASSWORD: "admin"
MYSQL_DATABASE: "test"
- image: circleci/postgres:9.6.11-postgis
environment:
POSTGRES_USER: "test"
POSTGRES_PASSWORD: "test"
POSTGRES_DB: "test"
- image: circleci/mongo:3.4.18
# - image: mcr.microsoft.com/mssql/server:2017-latest-ubuntu
# environment:
# SA_PASSWORD: "Admin12345"
# ACCEPT_EULA: "Y"
version: 2.1

orbs:
codecov: codecov/codecov@1.1.1

commands:
create-typeorm-config:
parameters:
databases:
type: string
default: ""
steps:
- when:
condition:
equal: [ << parameters.databases >>, "" ]
steps:
- run:
name: "Enabling Databases in ORM config"
command: cp ormconfig.circleci-common.json ./ormconfig.json
- unless:
condition:
equal: [ << parameters.databases >>, "" ]
steps:
- run:
name: "Enabling Databases in ORM config"
command: >
cat ormconfig.circleci-common.json \
| jq 'map(.skip = if (.name | IN($ARGS.positional[])) then false else true end)' --args << parameters.databases >> \
> ormconfig.json
- run:
name: Check ORMConfig
command: cat ormconfig.json

install-packages:
parameters:
cache-key:
type: string
default: ""
steps:
- checkout
- run: cp ormconfig.circleci-common.json ormconfig.json
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: npm install
name: Restore node_modules cache
key: node_modules-<< parameters.cache-key >>-{{ checksum "package-lock.json" }}
- run:
name: Verify `package.json` and `package-lock.json` are in sync
command: npx lock-verify
- run:
# This uses `npm install` instead of `npm ci`
# because of https://github.com/npm/cli/issues/558
name: Install Node Packages
command: |
if [ ! -d node_modules ]; then
npm install
fi
- run:
# This is pretty terrible but OracleDB requires you to grab the binaries OOB
# from the normal installation, place them in the LD Path
# also - not super well documented - grab `libaio` as well
# Because this is technically the same image as the runner we'll snag
# the libaio1 and place them in the same instantclient directory.
name: Download Required OracleDB Binaries
command: |
if [ ! -d node_modules/oracledb/instantclient_19_8 ]; then
curl -sf -o node_modules/oracledb/instantclient.zip $BLOB_URL
unzip -qqo node_modules/oracledb/instantclient.zip -d node_modules/oracledb/
rm node_modules/oracledb/instantclient.zip

DEBIAN_FRONTEND=noninteractive sudo apt-get -qq -y install libaio1
cp /lib/*/libaio.so.* node_modules/oracledb/instantclient_19_8/
fi
environment:
BLOB_URL: https://download.oracle.com/otn_software/linux/instantclient/19800/instantclient-basiclite-linux.x64-19.8.0.0.0dbru.zip
- save_cache:
name: Save node_modules cache
key: node_modules-{{ checksum "package-lock.json" }}
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

jobs:
lint:
working_directory: ~/typeorm
docker:
- image: circleci/node:12
steps:
- checkout
- install-packages:
cache-key: node12
- run: npm run lint
- run: npm test

cockroachdb:
build:
working_directory: ~/typeorm
docker:
- image: circleci/node:10.15.0
- image: cockroachdb/cockroach:latest
command: start --insecure
- image: circleci/node:12
steps:
- checkout
- run: cp ormconfig.circleci-cockroach.json ormconfig.json
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: npm install
- save_cache:
- install-packages:
cache-key: node12
- run: npm run compile
- persist_to_workspace:
root: ~/typeorm
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run: npm run lint
- run:
npm test
oracle:
- build/

test:
parameters:
databases:
type: string
default: ""
node-version:
type: string
default: "10"
working_directory: ~/typeorm
docker:
- image: circleci/node:10.16.0
- image: "store/oracle/database-enterprise:12.2.0.1-slim"
auth:
username: $DOCKER_USER
password: $DOCKER_PASSWORD
environment:
DB_SID: "sys"
SYS_PASSWORD: "ORCLCDB"
- image: circleci/node:<< parameters.node-version >>
steps:
- run: if [ -z "$DOCKER_USER" ]; then echo "DOCKER_USER is unset"; circleci step halt; fi
- checkout
- run: sudo npm install -g npm@latest
- run: cp ormconfig.circleci-oracle.json ormconfig.json
- setup_remote_docker
- attach_workspace:
at: ~/typeorm
- create-typeorm-config:
databases: << parameters.databases >>
- run:
name: Start all Relevant Services
command: |
SERVICES=$(
npx js-yaml ./docker-compose.yml \
| jq -r '.services | keys | map(select(. | IN($ARGS.positional[]))) | join(" ")' --args << parameters.databases >>
)

docker-compose --project-name typeorm --no-ansi up --detach $SERVICES
- install-packages:
cache-key: node<< parameters.node-version >>
- run:
name: Set up TypeORM Test Runner
command: |
docker run \
--volume /typeorm \
--name typeorm-code \
--workdir /typeorm \
circleci/node:<< parameters.node-version >> \
/bin/bash -c "sudo chmod 777 /typeorm && sudo chown circleci /typeorm"
docker cp ./ typeorm-code:/typeorm
- run:
name: Wait for Services to be Available
command: |
COMMANDS=$(
cat ormconfig.json \
| jq -r '
map(select(.skip == false)
| select(.host)
| select(.port)
| "nc -z " + .host + " " + (.port|tostring) + " && echo " + .host + " " + (.port|tostring) + " is up")
| join(" && ")
'
)
echo "Running '$COMMANDS'"

docker run \
--network typeorm_default \
--tty \
ubuntu:trusty \
timeout 60 sh -c "until ($COMMANDS); do echo \"Waiting for Services to be Available ...\"; sleep 5; done"
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run: wget https://download.oracle.com/otn_software/linux/instantclient/195000/instantclient-basiclite-linux.x64-19.5.0.0.0dbru.zip
- run: unzip instantclient-basiclite-linux.x64-19.5.0.0.0dbru.zip -d /tmp/oracle
- run: wget https://download.oracle.com/otn_software/linux/instantclient/195000/instantclient-sqlplus-linux.x64-19.5.0.0.0dbru.zip
- run: unzip instantclient-sqlplus-linux.x64-19.5.0.0.0dbru.zip -d /tmp/oracle
- run: echo "export LD_LIBRARY_PATH=/tmp/oracle/instantclient_19_5" >> $BASH_ENV
- run: sudo sh -c "echo /tmp/oracle/instantclient_19_5 > /etc/ld.so.conf.d/oracle-instantclient.conf";sudo ldconfig
- run: sh -c 'echo WHENEVER SQLERROR EXIT FAILURE > /tmp/user.sql; echo CREATE USER typeorm IDENTIFIED BY Passw0rd\; >> /tmp/user.sql; echo GRANT CONNECT TO typeorm\; >> /tmp/user.sql; echo GRANT UNLIMITED TABLESPACE TO typeorm\; >> /tmp/user.sql; echo exit >> /tmp/user.sql'
- run: sudo apt install libaio1
- run: until /tmp/oracle/instantclient_19_5/sqlplus -L -S sys/Oradoc_db1@//localhost:1521/orclpdb1.localdomain as sysdba @/tmp/user.sql ; do echo waiting for oracle; sleep 10; done;
- run: npm install oracledb --no-save
- run: npm run lint
- run: npm test
- run:
name: "Run Tests with Coverage"
command: |
docker run \
--env LD_LIBRARY_PATH='/typeorm/node_modules/oracledb/instantclient_19_8/:$LD_LIBRARY_PATH' \
--volumes-from typeorm-code \
--network typeorm_default \
--tty \
--workdir /typeorm \
--name typeorm-testrunner \
circleci/node:<< parameters.node-version >> \
npx nyc npm run test-fast

docker cp typeorm-testrunner:/typeorm/coverage/ ./
- run:
name: Stop all Relevant Services
command: docker-compose down
- store_artifacts:
path: coverage
- codecov/upload

workflows:
version: 2
test:
jobs:
- common
- cockroachdb
# - oracle
- lint
- build
- test:
name: test (mysql mariadb postgres mssql mongodb sqlite better-sqlite3 sqljs) - Node v<< matrix.node-version >>
requires:
- lint
- build
databases: "mysql mariadb postgres mssql mongodb sqlite better-sqlite3 sqljs"
matrix:
parameters:
node-version:
- "10"
- "12"
- "13"
- test:
name: test (cockroachdb) - Node v12
requires:
- lint
- build
databases: "cockroachdb"
node-version: "12"
- test:
name: test (oracle) - Node v12
requires:
- lint
- build
databases: "oracle"
node-version: "12"
54 changes: 54 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
module.exports = {
"env": {
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "none"
}
],
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/quotes": [
"error",
"double",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"@typescript-eslint/semi": [
"error"
],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/no-redeclare": "error",
"eqeqeq": [
"error",
"smart"
],
"id-blacklist": [
"error",
"any",
"Number",
"number",
"String",
"string",
"Boolean",
"boolean",
"Undefined",
"undefined"
],
"id-match": "error",
"no-eval": "error",
"no-var": "error"
}
};
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

Loading