diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 21cf1ae2c2..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,246 +0,0 @@ -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: - - restore_cache: - name: Restore node_modules cache - key: node_modules-<< parameters.cache-key >>-{{ checksum "package-lock.json" }} - # removed this item because lock-verify is deprecated - # - 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 - npm install oracledb - 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 - - sudo apt-get update -qq && sudo apt-get -qq -y install libaio1 - (cp /lib/*/libaio.so.* node_modules/oracledb/instantclient_19_8/ || - cp /usr/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 - DEBIAN_FRONTEND: noninteractive - - save_cache: - name: Save node_modules cache - key: node_modules-{{ checksum "package-lock.json" }} - paths: - - node_modules - -jobs: - lint: - working_directory: ~/typeorm - docker: - - image: cimg/node:16.20.0 - steps: - - checkout - - install-packages: - cache-key: node16 - - run: npm run lint - - build: - working_directory: ~/typeorm - docker: - - image: cimg/node:16.20.0 - steps: - - checkout - - install-packages: - cache-key: node16 - - run: npm run compile - - persist_to_workspace: - root: ~/typeorm - paths: - - build/ - - test: - parameters: - databases: - type: string - default: "" - node-version: - type: string - default: "16" - working_directory: ~/typeorm - docker: - - image: cimg/node:<< parameters.node-version >> - steps: - - checkout - - 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 \ - cimg/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" - - run: - name: "Wait for OracleDB to be Available" - command: | - COMMANDS=$( - cat ormconfig.json \ - | jq -r ' - map(select(.skip == false) - | select(.name == "oracle") - | "sleep 60" - ) - | join(" && ") - ' - ) - if [ ! -z "$COMMANDS" ]; then - echo "$COMMANDS seconds to wait for oracledb"; - $COMMANDS - fi - - # Download and cache dependencies - - run: - name: "Run Tests with Coverage" - - command: | - docker run \ - --env npm_config_yes='true' \ - --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 \ - cimg/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: - - 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: - - "14.21.3" - - "16.20.0" - - test: - name: test (cockroachdb) - Node v16 - requires: - - lint - - build - databases: "cockroachdb" - node-version: "16.20.0" - - test: - name: test (oracle) - Node v16 - requires: - - lint - - build - databases: "oracle" - node-version: "16.20.0" - - test: - name: test (postgres 12) - Node v16 - requires: - - lint - - build - databases: "postgres-12" - node-version: "16.20.0" diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000000..16d66464b9 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,29 @@ +{ + "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], + "parser": "@typescript-eslint/parser", + "plugins": ["@typescript-eslint"], + "ignorePatterns": ["*.d.ts"], + "rules": { + "@typescript-eslint/ban-types": "warn", + "@typescript-eslint/ban-ts-comment": "warn", + "@typescript-eslint/no-explicit-any": "warn", + "@typescript-eslint/no-loss-of-precision": "warn", + "@typescript-eslint/no-misused-new": "warn", + "@typescript-eslint/no-namespace": "warn", + "@typescript-eslint/no-this-alias": "warn", + "@typescript-eslint/no-unnecessary-type-constraint": "warn", + "@typescript-eslint/no-unsafe-declaration-merging": "warn", + "@typescript-eslint/no-unused-vars": "warn", + "@typescript-eslint/no-var-requires": "warn", + "@typescript-eslint/triple-slash-reference": "warn", + "no-async-promise-executor": "warn", + "no-control-regex": "warn", + "no-empty": "warn", + "no-extra-semi": "warn", + "no-prototype-builtins": "warn", + "no-regex-spaces": "warn", + "prefer-const": "warn", + "prefer-rest-params": "warn", + "prefer-spread": "warn" + } +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 114d00e3e6..3d8bc4c77d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,11 +1,9 @@ name: Deploy Player - on: push: branches: ["main"] pull_request: branches: ["main"] - jobs: build: name: Deployment @@ -16,7 +14,7 @@ jobs: - name: Setup uses: actions/setup-node@v3 with: - node-version: "16.16.0" + node-version: "20.14.0" registry-url: "https://npm.pkg.github.com" scope: "@streamyard" - name: Install Dependencies diff --git a/.github/workflows/database-compose-tests.yml b/.github/workflows/database-compose-tests.yml new file mode 100644 index 0000000000..8fe1bd7c18 --- /dev/null +++ b/.github/workflows/database-compose-tests.yml @@ -0,0 +1,24 @@ +name: database-tests + +on: + workflow_call: + inputs: + node-version: + required: true + type: string + +jobs: + oracle: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - uses: actions/setup-node@v4 + with: + node-version: ${{inputs.node-version}} + - uses: actions/checkout@v4 + - run: docker compose -f .github/workflows/test/oracle.docker-compose up -d + - run: npm i + - run: cp .github/workflows/test/oracle.ormconfig.json ormconfig.json + - run: npm test diff --git a/.github/workflows/database-tests.yml b/.github/workflows/database-tests.yml new file mode 100644 index 0000000000..256c7d08bc --- /dev/null +++ b/.github/workflows/database-tests.yml @@ -0,0 +1,170 @@ +name: database-tests + +on: + workflow_call: + inputs: + node-container: + required: true + type: string + +jobs: + cockroachdb: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + container: ${{inputs.node-container}} + services: + crdb: + image: cockroachdb/cockroach + env: + COCKROACH_ARGS: 'start-single-node --insecure --cache=1GB --store=type=mem,size=4GB' + + steps: + - uses: actions/checkout@v4 + - run: npm i + - run: chown -R 1001:127 /github/home/.npm #This fix is needed for running CLI tests + - run: cp .github/workflows/test/cockroachdb.ormconfig.json ormconfig.json + - run: npm test + + mongodb: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + container: ${{inputs.node-container}} + services: + mongodb: + image: mongo:5.0.12 + + steps: + - uses: actions/checkout@v4 + - run: npm i + - run: chown -R 1001:127 /github/home/.npm #This fix is needed for running CLI tests + - run: cp .github/workflows/test/mongodb.ormconfig.json ormconfig.json + - run: npm test + + + mssql: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + container: ${{inputs.node-container}} + services: + mssql: + image: "mcr.microsoft.com/mssql/server:2022-latest" + env: + SA_PASSWORD: "Admin12345" + ACCEPT_EULA: "Y" + + steps: + - uses: actions/checkout@v4 + - run: npm i + - run: chown -R 1001:127 /github/home/.npm #This fix is needed for running CLI tests + - run: cp .github/workflows/test/mssql.ormconfig.json ormconfig.json + - run: npm test + + + mysql_mariadb: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + container: ${{inputs.node-container}} + services: + mysql: + image: mysql:5.7.37 + env: + MYSQL_ROOT_PASSWORD: "admin" + MYSQL_USER: "test" + MYSQL_PASSWORD: "test" + MYSQL_DATABASE: "test" + mariadb: + image: mariadb:10.10.3 + env: + MYSQL_ROOT_PASSWORD: "admin" + MYSQL_USER: "test" + MYSQL_PASSWORD: "test" + MYSQL_DATABASE: "test" + + steps: + - uses: actions/checkout@v4 + - run: npm i + - run: chown -R 1001:127 /github/home/.npm #This fix is needed for running CLI tests + - run: cp .github/workflows/test/mysql-mariadb.ormconfig.json ormconfig.json + - run: npm test + + + better-sqlite3: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + container: ${{inputs.node-container}} + + steps: + - uses: actions/checkout@v4 + - run: npm i + - run: chown -R 1001:127 /github/home/.npm #This fix is needed for running CLI tests + - run: chown -R 1001:127 ./temp #This fix is needed for fixing permission error on Node 16 + - run: cp .github/workflows/test/better-sqlite3.ormconfig.json ormconfig.json + - run: npm test + + + sqlite: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + container: ${{inputs.node-container}} + + steps: + - uses: actions/checkout@v4 + - run: npm i + - run: chown -R 1001:127 /github/home/.npm #This fix is needed for running CLI tests + - run: chown -R 1001:127 ./temp #This fix is needed for fixing permission error on Node 16 + - run: cp .github/workflows/test/sqlite.ormconfig.json ormconfig.json + - run: npm test + + + sqljs: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + container: ${{inputs.node-container}} + + steps: + - uses: actions/checkout@v4 + - run: npm i + - run: chown -R 1001:127 /github/home/.npm #This fix is needed for running CLI tests + - run: cp .github/workflows/test/sqljs.ormconfig.json ormconfig.json + - run: npm test + + + postgres: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + container: ${{inputs.node-container}} + services: + postgres: + image: postgis/postgis:14-3.3 + env: + POSTGRES_USERNAME: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: postgres + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + steps: + - uses: actions/checkout@v4 + - run: npm i + - run: chown -R 1001:127 /github/home/.npm #This fix is needed for running CLI tests + - run: cp .github/workflows/test/postgres.ormconfig.json ormconfig.json + - run: npm test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..46e4f10ec1 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,49 @@ +# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs +# https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-nodejs +# https://docs.github.com/en/actions/use-cases-and-examples/using-containerized-services/creating-postgresql-service-containers + +name: test + +on: + push: + branches: [ "**" ] + pull_request: + branches: [ "master" ] + +jobs: + formatting: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - uses: actions/setup-node@v4 + with: + node-version: "18.x" + - uses: actions/checkout@v4 + - run: npm i + - run: npm run lint + + + # These tests run in standard node containers with their db attached as a service + database-tests: + strategy: + fail-fast: false + matrix: + node-container: ["node:16", "node:18", "node:20"] #, "node:22"] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + uses: ./.github/workflows/database-tests.yml + with: + node-container: ${{matrix.node-container}} + + + # These tests run with custom docker image attributes that can't be specified in a GHA service + database-compose-tests: + strategy: + fail-fast: false + matrix: + node-version: [16.x, 18.x, 20.x] #, 22.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + uses: ./.github/workflows/database-compose-tests.yml + with: + node-version: ${{matrix.node-version}} diff --git a/.github/workflows/test/better-sqlite3.ormconfig.json b/.github/workflows/test/better-sqlite3.ormconfig.json new file mode 100644 index 0000000000..3eb981f92f --- /dev/null +++ b/.github/workflows/test/better-sqlite3.ormconfig.json @@ -0,0 +1,21 @@ +[ + { + "skip": false, + "name": "better-sqlite3", + "type": "better-sqlite3", + "database": "./temp/better-sqlite3db.db", + "logging": false + }, + + { + "skip": true, + "name": "postgres", + "type": "postgres", + "host": "postgres", + "port": 5432, + "username": "postgres", + "password": "postgres", + "database": "postgres", + "logging": false + } +] diff --git a/.github/workflows/test/cockroachdb.ormconfig.json b/.github/workflows/test/cockroachdb.ormconfig.json new file mode 100644 index 0000000000..170374b7f2 --- /dev/null +++ b/.github/workflows/test/cockroachdb.ormconfig.json @@ -0,0 +1,25 @@ +[ + { + "skip": false, + "name": "cockroachdb", + "type": "cockroachdb", + "host": "crdb", + "port": 26257, + "username": "root", + "password": "", + "database": "defaultdb", + "logging": false + }, + + { + "skip": true, + "name": "postgres", + "type": "postgres", + "host": "postgres", + "port": 5432, + "username": "postgres", + "password": "postgres", + "database": "postgres", + "logging": false + } +] diff --git a/.github/workflows/test/mongodb.ormconfig.json b/.github/workflows/test/mongodb.ormconfig.json new file mode 100644 index 0000000000..c03c017646 --- /dev/null +++ b/.github/workflows/test/mongodb.ormconfig.json @@ -0,0 +1,26 @@ +[ + { + "skip": false, + "disabledIfNotEnabledImplicitly": true, + "name": "mongodb", + "type": "mongodb", + "host": "mongodb", + "port": 27017, + "database": "test", + "logging": false, + "useNewUrlParser": true, + "useUnifiedTopology": true + }, + + { + "skip": true, + "name": "postgres", + "type": "postgres", + "host": "postgres", + "port": 5432, + "username": "postgres", + "password": "postgres", + "database": "postgres", + "logging": false + } +] diff --git a/.github/workflows/test/mssql.ormconfig.json b/.github/workflows/test/mssql.ormconfig.json new file mode 100644 index 0000000000..570bee1276 --- /dev/null +++ b/.github/workflows/test/mssql.ormconfig.json @@ -0,0 +1,28 @@ +[ + { + "skip": false, + "name": "mssql", + "type": "mssql", + "host": "mssql", + "port": 1433, + "username": "sa", + "password": "Admin12345", + "database": "tempdb", + "logging": false, + "extra": { + "trustServerCertificate": true + } + }, + + { + "skip": true, + "name": "postgres", + "type": "postgres", + "host": "postgres", + "port": 5432, + "username": "postgres", + "password": "postgres", + "database": "postgres", + "logging": false + } +] diff --git a/.github/workflows/test/mysql-mariadb.ormconfig.json b/.github/workflows/test/mysql-mariadb.ormconfig.json new file mode 100644 index 0000000000..9b06509d52 --- /dev/null +++ b/.github/workflows/test/mysql-mariadb.ormconfig.json @@ -0,0 +1,36 @@ +[ + { + "skip": false, + "name": "mysql", + "type": "mysql", + "host": "mysql", + "port": 3306, + "username": "root", + "password": "admin", + "database": "test", + "logging": false + }, + { + "skip": false, + "name": "mariadb", + "type": "mariadb", + "host": "mariadb", + "port": 3306, + "username": "root", + "password": "admin", + "database": "test", + "logging": false + }, + + { + "skip": true, + "name": "postgres", + "type": "postgres", + "host": "postgres", + "port": 5432, + "username": "postgres", + "password": "postgres", + "database": "postgres", + "logging": false + } +] diff --git a/.github/workflows/test/oracle.docker-compose b/.github/workflows/test/oracle.docker-compose new file mode 100644 index 0000000000..2f79eab314 --- /dev/null +++ b/.github/workflows/test/oracle.docker-compose @@ -0,0 +1,13 @@ +version: "3" +services: + oracle: + build: + context: ../../../docker/oracle + container_name: "typeorm-oracle" + ports: + - "1521:1521" + #volumes: + # - oracle-data:/opt/oracle/oradata + healthcheck: + test: [ "CMD", "/opt/oracle/checkDBStatus.sh" ] + interval: 2s \ No newline at end of file diff --git a/.github/workflows/test/oracle.ormconfig.json b/.github/workflows/test/oracle.ormconfig.json new file mode 100644 index 0000000000..9bf120d624 --- /dev/null +++ b/.github/workflows/test/oracle.ormconfig.json @@ -0,0 +1,28 @@ +[ + { + "skip": false, + "name": "oracle", + "type": "oracle", + "host": "localhost", + "port": 1521, + "serviceName": "XEPDB1", + "username": "typeorm", + "password": "oracle", + "logging": false, + "extra": { + "connectString": "localhost:1521/XEPDB1" + } + }, + + { + "skip": true, + "name": "postgres", + "type": "postgres", + "host": "postgres", + "port": 5432, + "username": "postgres", + "password": "postgres", + "database": "postgres", + "logging": false + } +] diff --git a/.github/workflows/test/postgres.ormconfig.json b/.github/workflows/test/postgres.ormconfig.json new file mode 100644 index 0000000000..dd20cd4c08 --- /dev/null +++ b/.github/workflows/test/postgres.ormconfig.json @@ -0,0 +1,13 @@ +[ + { + "skip": false, + "name": "postgres", + "type": "postgres", + "host": "postgres", + "port": 5432, + "username": "postgres", + "password": "postgres", + "database": "postgres", + "logging": false + } +] diff --git a/.github/workflows/test/sqlite.ormconfig.json b/.github/workflows/test/sqlite.ormconfig.json new file mode 100644 index 0000000000..55a30706a8 --- /dev/null +++ b/.github/workflows/test/sqlite.ormconfig.json @@ -0,0 +1,22 @@ +[ + { + "skip": false, + "name": "sqlite", + "type": "sqlite", + "database": "./temp/sqlitedb-1.db", + "logging": false, + "relationLoadStrategy": "join" + }, + + { + "skip": true, + "name": "postgres", + "type": "postgres", + "host": "postgres", + "port": 5432, + "username": "postgres", + "password": "postgres", + "database": "postgres", + "logging": false + } +] diff --git a/.github/workflows/test/sqljs.ormconfig.json b/.github/workflows/test/sqljs.ormconfig.json new file mode 100644 index 0000000000..897ada4114 --- /dev/null +++ b/.github/workflows/test/sqljs.ormconfig.json @@ -0,0 +1,20 @@ +[ + { + "skip": false, + "name": "sqljs", + "type": "sqljs", + "logging": false + }, + + { + "skip": true, + "name": "postgres", + "type": "postgres", + "host": "postgres", + "port": 5432, + "username": "postgres", + "password": "postgres", + "database": "postgres", + "logging": false + } +] diff --git a/CHANGELOG.md b/CHANGELOG.md index 85ad2473cc..b0c0e53c87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,320 +1,431 @@ -## [0.3.16](https://github.com/typeorm/typeorm/compare/0.3.15...0.3.16) (2023-05-09) +## [0.3.20](https://github.com/typeorm/typeorm/compare/0.3.19...0.3.20) (2024-01-26) ### Bug Fixes -* add `trustServerCertificate` option to `SqlServerConnectionOptions` ([#9985](https://github.com/typeorm/typeorm/issues/9985)) ([0305805](https://github.com/typeorm/typeorm/commit/03058055df78034a4544e52cfd277ed1c0cbdcb2)), closes [#8093](https://github.com/typeorm/typeorm/issues/8093) -* add directConnection options to MongoDB connection ([#9955](https://github.com/typeorm/typeorm/issues/9955)) ([e0165e7](https://github.com/typeorm/typeorm/commit/e0165e75ee818c759b51a7fa3b0b3adc6befa347)) -* add onDelete option validation for oracle ([#9786](https://github.com/typeorm/typeorm/issues/9786)) ([938f94b](https://github.com/typeorm/typeorm/commit/938f94bded92b272bdcecc04534ffb879186dc44)), closes [#9189](https://github.com/typeorm/typeorm/issues/9189) -* added instanceName to options ([#9968](https://github.com/typeorm/typeorm/issues/9968)) ([7c5627f](https://github.com/typeorm/typeorm/commit/7c5627f2728500bb45a2586a3bfd34ab39d46fad)) -* added transaction retry logic in cockroachdb ([#10032](https://github.com/typeorm/typeorm/issues/10032)) ([607d6f9](https://github.com/typeorm/typeorm/commit/607d6f959525b7c01bad5fe14364e4af82d878bb)) -* allow json as alias for longtext mariadb ([#10018](https://github.com/typeorm/typeorm/issues/10018)) ([2a2bb4b](https://github.com/typeorm/typeorm/commit/2a2bb4bdc11915966a65dc144189b33d410d9d57)) -* convert the join table ID to the referenceColumn ID type ([#9887](https://github.com/typeorm/typeorm/issues/9887)) ([9460296](https://github.com/typeorm/typeorm/commit/9460296147b8117e414ca311828615d87f5ab283)) -* correct encode mongodb auth credentials ([#10024](https://github.com/typeorm/typeorm/issues/10024)) ([96b7ee4](https://github.com/typeorm/typeorm/commit/96b7ee44b2538f65c77c7d168e4f10316cc123fa)), closes [#9885](https://github.com/typeorm/typeorm/issues/9885) -* create correct children during cascade saving entities with STI ([#9034](https://github.com/typeorm/typeorm/issues/9034)) ([06c1e98](https://github.com/typeorm/typeorm/commit/06c1e98ae20cf516f4f5afc53fec4df91209f121)), closes [#7758](https://github.com/typeorm/typeorm/issues/7758) [#7758](https://github.com/typeorm/typeorm/issues/7758) [#9033](https://github.com/typeorm/typeorm/issues/9033) [#9033](https://github.com/typeorm/typeorm/issues/9033) [#7758](https://github.com/typeorm/typeorm/issues/7758) [#7758](https://github.com/typeorm/typeorm/issues/7758) -* express option bug in init command ([#10022](https://github.com/typeorm/typeorm/issues/10022)) ([5be20e2](https://github.com/typeorm/typeorm/commit/5be20e2bcd18431e457090a63a99dc06f9c2d3d2)) -* for running cli-ts-node-esm use exit code from child process ([#10030](https://github.com/typeorm/typeorm/issues/10030)) ([a188b1d](https://github.com/typeorm/typeorm/commit/a188b1d9f4cc0bdc36a30be1380104e5f38ccb24)), closes [#10029](https://github.com/typeorm/typeorm/issues/10029) -* mongodb typings breaks the browser version ([#9962](https://github.com/typeorm/typeorm/issues/9962)) ([99bef49](https://github.com/typeorm/typeorm/commit/99bef491280aedb6b337a14e6723b33e67b048d0)), closes [#9959](https://github.com/typeorm/typeorm/issues/9959) -* RelationIdLoader has access to queryPlanner when wrapped in transaction ([#9990](https://github.com/typeorm/typeorm/issues/9990)) ([21a9d67](https://github.com/typeorm/typeorm/commit/21a9d67fcf294e805c416d55394d55b238860b7d)), closes [#9988](https://github.com/typeorm/typeorm/issues/9988) -* resolve duplicate subscriber updated columns ([#9958](https://github.com/typeorm/typeorm/issues/9958)) ([3d67901](https://github.com/typeorm/typeorm/commit/3d67901fde2750a8c10521bedc3eee3d57065b43)), closes [#9948](https://github.com/typeorm/typeorm/issues/9948) -* select + addOrderBy broke in 0.3.14 ([#9961](https://github.com/typeorm/typeorm/issues/9961)) ([0e56f0f](https://github.com/typeorm/typeorm/commit/0e56f0fcf8ec3f2ec37fee92f75ba09262801655)), closes [#9960](https://github.com/typeorm/typeorm/issues/9960) -* support More/LessThanOrEqual in relations ([#9978](https://github.com/typeorm/typeorm/issues/9978)) ([8795c86](https://github.com/typeorm/typeorm/commit/8795c864e835a875e78577b5737da42d78e19247)) +- added missing parentheses in where conditions ([#10650](https://github.com/typeorm/typeorm/issues/10650)) ([4624930](https://github.com/typeorm/typeorm/commit/46249303be03adea74266837b8e6eb49227f476e)), closes [#10534](https://github.com/typeorm/typeorm/issues/10534) +- don't escape indexPredicate ([#10618](https://github.com/typeorm/typeorm/issues/10618)) ([dd49a25](https://github.com/typeorm/typeorm/commit/dd49a254dc475eedfe72378be2670cc6a61aacf1)) +- fallback runMigrations transaction to DataSourceOptions ([#10601](https://github.com/typeorm/typeorm/issues/10601)) ([0cab0dd](https://github.com/typeorm/typeorm/commit/0cab0dd7308d2cb8ba5600ce46899bd14a062565)) +- hangup when load relations with relationLoadStrategy: query ([#10630](https://github.com/typeorm/typeorm/issues/10630)) ([54d8d9e](https://github.com/typeorm/typeorm/commit/54d8d9efe9bb41671f44f41ea6372b7b5d2ad0f1)), closes [#10481](https://github.com/typeorm/typeorm/issues/10481) +- include asExpression columns in returning clause ([#10632](https://github.com/typeorm/typeorm/issues/10632)) ([f232ba7](https://github.com/typeorm/typeorm/commit/f232ba780872660fbfd2467b52ef5b97cb6f2935)), closes [#8450](https://github.com/typeorm/typeorm/issues/8450) [#8450](https://github.com/typeorm/typeorm/issues/8450) +- multiple insert in SAP Hana ([#10597](https://github.com/typeorm/typeorm/issues/10597)) ([1b34c9a](https://github.com/typeorm/typeorm/commit/1b34c9a49e99fa937dd9894ddb7e6bba85c08a42)) +- resolve issue CREATE/DROP Index concurrently ([#10634](https://github.com/typeorm/typeorm/issues/10634)) ([8aa8690](https://github.com/typeorm/typeorm/commit/8aa8690f94c12c9740bf746b2ec55def13941d35)), closes [#10626](https://github.com/typeorm/typeorm/issues/10626) +- type inferencing of EntityManager#create ([#10569](https://github.com/typeorm/typeorm/issues/10569)) ([99d8249](https://github.com/typeorm/typeorm/commit/99d8249e450f7e649685105b372e265f41a0ee47)) ### Features -* mariadb uuid inet4 inet6 column data type support ([#9845](https://github.com/typeorm/typeorm/issues/9845)) ([d8a2e37](https://github.com/typeorm/typeorm/commit/d8a2e3730f12bb2b8e521635e176a284594121f3)) +- add json type support for Oracle ([#10611](https://github.com/typeorm/typeorm/issues/10611)) ([7e85460](https://github.com/typeorm/typeorm/commit/7e85460f10b0c6f57dda9d532fe925ebf0711fe9)) +- add postgres multirange column types ([#10627](https://github.com/typeorm/typeorm/issues/10627)) ([d0b7670](https://github.com/typeorm/typeorm/commit/d0b76703cc1c7919f5c6a974ad0889c331d78672)), closes [#10556](https://github.com/typeorm/typeorm/issues/10556) +- add table comment for postgres ([#10613](https://github.com/typeorm/typeorm/issues/10613)) ([4493db4](https://github.com/typeorm/typeorm/commit/4493db4d1b02eaa2c3f997ff256057d01cc48323)) ### Reverts -* "refactor: remove date-fns package ([#9634](https://github.com/typeorm/typeorm/issues/9634))" ([54f4f89](https://github.com/typeorm/typeorm/commit/54f4f8986adf197eb96ec0bc6d9d5a44d6552bcc)) +- Revert "fix: prevent using absolute table path in migrations unless required (#10123)" (#10624) ([8f371f2](https://github.com/typeorm/typeorm/commit/8f371f23978600c36a2edf8222fec1024ae09c2e)), closes [#10123](https://github.com/typeorm/typeorm/issues/10123) [#10624](https://github.com/typeorm/typeorm/issues/10624) +- revert "feat: nullable embedded entities (#10289)" (#10614) ([15de46f](https://github.com/typeorm/typeorm/commit/15de46fd5d31cd742477821e7a32bc98c9616d30)), closes [#10289](https://github.com/typeorm/typeorm/issues/10289) [#10614](https://github.com/typeorm/typeorm/issues/10614) + +## [0.3.19](https://github.com/typeorm/typeorm/compare/0.3.18...0.3.19) (2024-01-03) + +### Bug Fixes + +- fixed `Cannot read properties of undefined (reading 'sync')` caused after glob package upgrade + +## [0.3.18](https://github.com/typeorm/typeorm/compare/0.3.17...0.3.18) (2024-01-03) + +### Bug Fixes + +- add BaseEntity to model-shim ([#10503](https://github.com/typeorm/typeorm/issues/10503)) ([3cf938e](https://github.com/typeorm/typeorm/commit/3cf938efc04bf73129d2e755e2bb8a243be19e24)) +- add error handling for missing join columns ([#10525](https://github.com/typeorm/typeorm/issues/10525)) ([122c897](https://github.com/typeorm/typeorm/commit/122c897a2ff4cc6f5e8149d488f18bf5c21b5ca9)), closes [#7034](https://github.com/typeorm/typeorm/issues/7034) +- add missing export for View class ([#10261](https://github.com/typeorm/typeorm/issues/10261)) ([7adbc9b](https://github.com/typeorm/typeorm/commit/7adbc9bdc7e3e5a4bd3db9c5cf980b71c74fc8fa)) +- added fail callback while opening the database in Cordova ([#10566](https://github.com/typeorm/typeorm/issues/10566)) ([8b4df5b](https://github.com/typeorm/typeorm/commit/8b4df5b2998c561047ac817b6c188fbb6ad0af7b)) +- aggregate function throw error when column alias name is set ([#10035](https://github.com/typeorm/typeorm/issues/10035)) ([022d2b5](https://github.com/typeorm/typeorm/commit/022d2b5f622771349355f00a087c26c930db0d25)), closes [#9927](https://github.com/typeorm/typeorm/issues/9927) +- backport postgres connection error handling to crdb ([#10177](https://github.com/typeorm/typeorm/issues/10177)) ([149226d](https://github.com/typeorm/typeorm/commit/149226dd677ca3ca69c9f5ccd7b96e86573eb26e)) +- bump better-sqlite3 version range ([#10452](https://github.com/typeorm/typeorm/issues/10452)) ([75ec8f2](https://github.com/typeorm/typeorm/commit/75ec8f2032657560fed7418a6ca4a059a58d18ee)) +- caching always enabled not caching queries ([#10524](https://github.com/typeorm/typeorm/issues/10524)) ([8af533f](https://github.com/typeorm/typeorm/commit/8af533f79f993e97f8c5608eec1da1d2f5e23156)) +- circular dependency breaking node.js 20.6 ([#10344](https://github.com/typeorm/typeorm/issues/10344)) ([ba7ad3c](https://github.com/typeorm/typeorm/commit/ba7ad3c69b4d7813cf71503c130ae9ef248ea28d)), closes [#10338](https://github.com/typeorm/typeorm/issues/10338) +- correctly keep query.data from ormOption for commit / rollback subscribers ([#10151](https://github.com/typeorm/typeorm/issues/10151)) ([73ee70b](https://github.com/typeorm/typeorm/commit/73ee70b33165af9151aadf9d26c58e78eebdfa53)) +- default value in child table/entity column decorator for multiple table inheritance is ignored for inherited columns ([#10563](https://github.com/typeorm/typeorm/issues/10563)) ([#10564](https://github.com/typeorm/typeorm/issues/10564)) ([af77a5d](https://github.com/typeorm/typeorm/commit/af77a5d0acf0c9661c4d61c38fd57bca9a1b65fc)) +- deletedAt column leaking as side effect of object update while creating a row ([#10435](https://github.com/typeorm/typeorm/issues/10435)) ([7de4890](https://github.com/typeorm/typeorm/commit/7de4890265d5045e21c0ea1db7c45cea826f9e31)) +- empty objects being hydrated when eager loading relations that have a `@VirtualColumn` ([#10432](https://github.com/typeorm/typeorm/issues/10432)) ([b53e410](https://github.com/typeorm/typeorm/commit/b53e410e5abe930ab489ff4c8c16f62306910f6a)), closes [#10431](https://github.com/typeorm/typeorm/issues/10431) +- extend GiST index with range types for Postgres driver ([#10572](https://github.com/typeorm/typeorm/issues/10572)) ([a4900ae](https://github.com/typeorm/typeorm/commit/a4900ae15feb6727f085cbeae09000566b15081e)), closes [#10567](https://github.com/typeorm/typeorm/issues/10567) +- ignore changes for columns with `update: false` in persistence ([#10250](https://github.com/typeorm/typeorm/issues/10250)) ([f8fa1fd](https://github.com/typeorm/typeorm/commit/f8fa1fd821a0ca61b09079625e04583f9e1a0403)), closes [#10249](https://github.com/typeorm/typeorm/issues/10249) +- improve helper for cli for commands missing positionals ([#10133](https://github.com/typeorm/typeorm/issues/10133)) ([9f8899f](https://github.com/typeorm/typeorm/commit/9f8899f56cb95fbee70eed73d507530e8b6c74ff)) +- loading datasource unable to process a regular default export ([#10184](https://github.com/typeorm/typeorm/issues/10184)) ([201342d](https://github.com/typeorm/typeorm/commit/201342d1509938925b90deeac1d974cd01fe3d3c)), closes [#8810](https://github.com/typeorm/typeorm/issues/8810) +- logMigration has incorrect logging condition ([#10323](https://github.com/typeorm/typeorm/issues/10323)) ([d41930f](https://github.com/typeorm/typeorm/commit/d41930f0d6b8f672a5242da4a4b5568d90090d59)), closes [#10322](https://github.com/typeorm/typeorm/issues/10322) [#10322](https://github.com/typeorm/typeorm/issues/10322) +- ManyToMany ER_DUP_ENTRY error ([#10343](https://github.com/typeorm/typeorm/issues/10343)) ([e296063](https://github.com/typeorm/typeorm/commit/e296063b128318ddd3b59ae1e23e104d0ed524b0)), closes [#5704](https://github.com/typeorm/typeorm/issues/5704) +- migrations on indexed TIMESTAMP WITH TIME ZONE Oracle columns ([#10506](https://github.com/typeorm/typeorm/issues/10506)) ([cf37f13](https://github.com/typeorm/typeorm/commit/cf37f1370bb0a180bedf0a2e2fedd8047ae4ef78)), closes [#10493](https://github.com/typeorm/typeorm/issues/10493) +- mongodb - undefined is not constructor ([#10559](https://github.com/typeorm/typeorm/issues/10559)) ([ad5bf11](https://github.com/typeorm/typeorm/commit/ad5bf11a918170b50e3251410004f75c1811eb01)) +- mongodb resolves leaked cursor ([#10316](https://github.com/typeorm/typeorm/issues/10316)) ([2dc9624](https://github.com/typeorm/typeorm/commit/2dc9624d0016447b0738d85c6ddeace1110eb56f)), closes [#10315](https://github.com/typeorm/typeorm/issues/10315) +- mssql datasource testonborrow not affecting anything ([#10589](https://github.com/typeorm/typeorm/issues/10589)) ([122b683](https://github.com/typeorm/typeorm/commit/122b683840487f05b26a938a1fb057d71beb1bb3)) +- nested transactions issues ([#10210](https://github.com/typeorm/typeorm/issues/10210)) ([25e6ecd](https://github.com/typeorm/typeorm/commit/25e6ecdfd23569b4b6ba15b845b4444927386f42)) +- prevent using absolute table path in migrations unless required ([#10123](https://github.com/typeorm/typeorm/issues/10123)) ([dd59524](https://github.com/typeorm/typeorm/commit/dd595242a7fbb8c7445cc79bf0b751f1ed1762bd)) +- remove `date-fns` in favor of `DayJs` ([#10306](https://github.com/typeorm/typeorm/issues/10306)) ([cf7147f](https://github.com/typeorm/typeorm/commit/cf7147fa7c0231089b45078abc813f0e56e5dd9e)) +- remove dynamic require calls ([#10196](https://github.com/typeorm/typeorm/issues/10196)) ([a939654](https://github.com/typeorm/typeorm/commit/a939654c95804b172276ba26769c43af97469d5d)) +- resolve circular dependency when using Vite ([#10273](https://github.com/typeorm/typeorm/issues/10273)) ([080528b](https://github.com/typeorm/typeorm/commit/080528b11716cc786b00c4890160f6ccf3375925)) +- resolve issue building eager relation alias for nested relations ([#10004](https://github.com/typeorm/typeorm/issues/10004)) ([c6f608d](https://github.com/typeorm/typeorm/commit/c6f608d3e8f9c28646240ac67e20e6567be1aab6)), closes [#9944](https://github.com/typeorm/typeorm/issues/9944) +- resolve issue of generating migration for numeric arrays repeatedly ([#10471](https://github.com/typeorm/typeorm/issues/10471)) ([39fdcf6](https://github.com/typeorm/typeorm/commit/39fdcf651fc0b690febbe11fa39892034529fd03)), closes [#10043](https://github.com/typeorm/typeorm/issues/10043) +- resolve issue queryBuilder makes different parameter identifiers for same parameter ([#10327](https://github.com/typeorm/typeorm/issues/10327)) ([6c918ea](https://github.com/typeorm/typeorm/commit/6c918ea3923488e3744cf4a09f01b21117674fe5)), closes [#7308](https://github.com/typeorm/typeorm/issues/7308) +- resolve issues on upsert ([#10588](https://github.com/typeorm/typeorm/issues/10588)) ([dc1bfed](https://github.com/typeorm/typeorm/commit/dc1bfed6d53691135628e064e0c3bda21f7d0ee3)), closes [#10587](https://github.com/typeorm/typeorm/issues/10587) +- scrub all comment end markers from comments ([#10163](https://github.com/typeorm/typeorm/issues/10163)) ([d937f61](https://github.com/typeorm/typeorm/commit/d937f6106a1c0a5770de7c06c315009c5549c4d5)) +- serialize bigint when building a query id [#10336](https://github.com/typeorm/typeorm/issues/10336) ([#10337](https://github.com/typeorm/typeorm/issues/10337)) ([bfc1cc5](https://github.com/typeorm/typeorm/commit/bfc1cc5ab4232459a1d11b82fd131e7e2e9c2aa4)) +- should automatically cache if alwaysEnable ([#10137](https://github.com/typeorm/typeorm/issues/10137)) ([173910e](https://github.com/typeorm/typeorm/commit/173910ed79aada4d250fd658d6dd73fca7740950)), closes [#9910](https://github.com/typeorm/typeorm/issues/9910) +- SQLite simple-enum column parsing ([#10550](https://github.com/typeorm/typeorm/issues/10550)) ([696e688](https://github.com/typeorm/typeorm/commit/696e688d0072eb54608eaf081be1a6d9c40910e3)) +- update UpdateDateColumn on upsert ([#10458](https://github.com/typeorm/typeorm/issues/10458)) ([fdb9866](https://github.com/typeorm/typeorm/commit/fdb9866ad2359aa37fed1e7e99b3736a4dc9dc74)), closes [#9015](https://github.com/typeorm/typeorm/issues/9015) +- upgrade ts-node version to latest(10.9.1) version ([#10143](https://github.com/typeorm/typeorm/issues/10143)) ([fcb9904](https://github.com/typeorm/typeorm/commit/fcb9904f247d9ddf21bad07101b488d33e0a1fd2)) +- using async datasource to configure typeorm ([#10170](https://github.com/typeorm/typeorm/issues/10170)) ([fbd45db](https://github.com/typeorm/typeorm/commit/fbd45dba32cd92ddcb00cc4f3c745d247ad27bae)) + +### Features + +- ability to change default replication mode ([#10419](https://github.com/typeorm/typeorm/issues/10419)) ([72b1d1b](https://github.com/typeorm/typeorm/commit/72b1d1b865d7d67f4609740be0db325804a600b5)) +- add concurrent indexes for postgres ([#10442](https://github.com/typeorm/typeorm/issues/10442)) ([f4e6eaf](https://github.com/typeorm/typeorm/commit/f4e6eaf15597cf387a268ab1c7e81eaaecefdd6a)) +- add exists and exists by ([#10291](https://github.com/typeorm/typeorm/issues/10291)) ([b6b46fb](https://github.com/typeorm/typeorm/commit/b6b46fb133559c8c5508fc0cdabc8f1a02683409)) +- add isolated where statements ([#10213](https://github.com/typeorm/typeorm/issues/10213)) ([3cda7ec](https://github.com/typeorm/typeorm/commit/3cda7ec39d145f4f37f74bf40906565e472852ed)) +- add MSSQL disableAsciiToUnicodeParamConversion option and tests ([#10161](https://github.com/typeorm/typeorm/issues/10161)) ([df7c069](https://github.com/typeorm/typeorm/commit/df7c06948cc53efda8b2d519338c8a5dc5159607)), closes [#10131](https://github.com/typeorm/typeorm/issues/10131) +- add support for mssql server DefaultAzureCredential usage ([#10246](https://github.com/typeorm/typeorm/issues/10246)) ([c8ee5b1](https://github.com/typeorm/typeorm/commit/c8ee5b1d1a77cc08c358d8c7f2a96e53ecb83872)) +- add support for table comment in MySQL ([#10017](https://github.com/typeorm/typeorm/issues/10017)) ([338df16](https://github.com/typeorm/typeorm/commit/338df164395fa1475149614281b3c649fb5b2611)) +- allow to use custom type witch extends object type for find where argument ([#10475](https://github.com/typeorm/typeorm/issues/10475)) ([48f5f85](https://github.com/typeorm/typeorm/commit/48f5f85d687e1a4d4d4ee83741759d70990985f7)) +- BeforeQuery and AfterQuery events ([#10234](https://github.com/typeorm/typeorm/issues/10234)) ([5c28154](https://github.com/typeorm/typeorm/commit/5c28154cbe19008b5ae7b3612c8a718a8e628dcb)), closes [#3302](https://github.com/typeorm/typeorm/issues/3302) +- custom STI discriminator value for EntitySchema ([#10508](https://github.com/typeorm/typeorm/issues/10508)) ([b240d87](https://github.com/typeorm/typeorm/commit/b240d87f347de49975f87a42b885c2d103bbff12)), closes [#10494](https://github.com/typeorm/typeorm/issues/10494) +- enabled CTE for oracle driver ([#10319](https://github.com/typeorm/typeorm/issues/10319)) ([65858f3](https://github.com/typeorm/typeorm/commit/65858f3a1759a950325e830ab9d4e0b2f519e455)) +- entityId in InsertEvent ([#10540](https://github.com/typeorm/typeorm/issues/10540)) ([ae006af](https://github.com/typeorm/typeorm/commit/ae006af501025f709fe585b821f0da683628eec3)) +- expose countDocuments in mongodb ([#10314](https://github.com/typeorm/typeorm/issues/10314)) ([ebd61d1](https://github.com/typeorm/typeorm/commit/ebd61d14400e2769517e1afaa1c9b00d95b14ec5)) +- exposed entity and criteria properties on EntityNotFoundError ([#10202](https://github.com/typeorm/typeorm/issues/10202)) ([bafcd17](https://github.com/typeorm/typeorm/commit/bafcd1709b7c88b5140bb38e5536c3b4b28dad3d)) +- implement column comments for SAP HANA ([#10502](https://github.com/typeorm/typeorm/issues/10502)) ([45e31cc](https://github.com/typeorm/typeorm/commit/45e31cc57aac636ec4f13101a8a5ac0a1a12b8d1)) +- implement OR operator ([#10086](https://github.com/typeorm/typeorm/issues/10086)) ([a00b1df](https://github.com/typeorm/typeorm/commit/a00b1df68f249335c0266d16f02c33cff941f528)), closes [#10054](https://github.com/typeorm/typeorm/issues/10054) [#10054](https://github.com/typeorm/typeorm/issues/10054) [#10054](https://github.com/typeorm/typeorm/issues/10054) [#10054](https://github.com/typeorm/typeorm/issues/10054) [#10054](https://github.com/typeorm/typeorm/issues/10054) [#10054](https://github.com/typeorm/typeorm/issues/10054) [#10054](https://github.com/typeorm/typeorm/issues/10054) +- implement streaming for SAP HANA ([#10512](https://github.com/typeorm/typeorm/issues/10512)) ([7e9cead](https://github.com/typeorm/typeorm/commit/7e9cead8a3bfe36bdec4d6146cb1ab6681d5b556)) +- implements QueryFailedError generic for driverError typing ([#10253](https://github.com/typeorm/typeorm/issues/10253)) ([78b2f48](https://github.com/typeorm/typeorm/commit/78b2f4805ca5f1302b3cf91f4c7affd851bcc801)) +- modify repository.extend method for chaining repositories ([#10256](https://github.com/typeorm/typeorm/issues/10256)) ([ca29c0f](https://github.com/typeorm/typeorm/commit/ca29c0ff8e40e5bfa29d769b59c405509060cacc)) +- nullable embedded entities ([#10289](https://github.com/typeorm/typeorm/issues/10289)) ([e67d704](https://github.com/typeorm/typeorm/commit/e67d7041387df78c69599c1d3c880389a935ffbf)) +- support for MongoDB 6.x ([#10545](https://github.com/typeorm/typeorm/issues/10545)) ([3647b26](https://github.com/typeorm/typeorm/commit/3647b269ccb1f236595bf8ff3adcca5460a0d205)) +- support mssql@10 ([#10356](https://github.com/typeorm/typeorm/issues/10356)) ([f6bb671](https://github.com/typeorm/typeorm/commit/f6bb6711e2c5b05db656568bee5152ed800ea9f7)), closes [#10340](https://github.com/typeorm/typeorm/issues/10340) +- use node-oracledb 6 ([#10285](https://github.com/typeorm/typeorm/issues/10285)) ([3af891a](https://github.com/typeorm/typeorm/commit/3af891a8e69a921c0fd83a2fcc3d1739c0360a8d)), closes [#10277](https://github.com/typeorm/typeorm/issues/10277) +- user-defined index name for STI discriminator column ([#10509](https://github.com/typeorm/typeorm/issues/10509)) ([89c5257](https://github.com/typeorm/typeorm/commit/89c525761d6979d1f876b09adb9b3fc08097fe86)), closes [#10496](https://github.com/typeorm/typeorm/issues/10496) + +### Performance Improvements + +- improve SapQueryRunner performance ([#10198](https://github.com/typeorm/typeorm/issues/10198)) ([f6b87e3](https://github.com/typeorm/typeorm/commit/f6b87e3ee1ab218edd93061bbec84a42ed6ac481)) + +### BREAKING CHANGES + +- With node-oracledb the thin client is used as default. Added a option to use the thick client. Also added the option to specify the instant client lib +- MongoDB: from the previous behavior of returning a result with metadata describing when a document is not found. + See: https://github.com/mongodb/node-mongodb-native/blob/HEAD/etc/notes/CHANGES_6.0.0.md +- [new nullable embeds feature](https://github.com/typeorm/typeorm/pull/10289) introduced a breaking change which might enforce you to update types on your entities to ` | null`, + if all columns in your embed entity are nullable. Since database queries now return embedded property as `null` if all its column values are null. +## [0.3.17](https://github.com/typeorm/typeorm/compare/0.3.16...0.3.17) (2023-06-20) + +### Bug Fixes + +- [#10040](https://github.com/typeorm/typeorm/issues/10040) TypeORM synchronize database even if it is up to date ([#10041](https://github.com/typeorm/typeorm/issues/10041)) ([b1a3a39](https://github.com/typeorm/typeorm/commit/b1a3a395049052f3f031e9fd27b99769b03b9011)) +- add missing await ([#10084](https://github.com/typeorm/typeorm/issues/10084)) ([f5d4397](https://github.com/typeorm/typeorm/commit/f5d43975dbbf02d0e40d64d01265105d4018cf7a)) + +## [0.3.16](https://github.com/typeorm/typeorm/compare/0.3.15...0.3.16) (2023-05-09) + +### Bug Fixes + +- add `trustServerCertificate` option to `SqlServerConnectionOptions` ([#9985](https://github.com/typeorm/typeorm/issues/9985)) ([0305805](https://github.com/typeorm/typeorm/commit/03058055df78034a4544e52cfd277ed1c0cbdcb2)), closes [#8093](https://github.com/typeorm/typeorm/issues/8093) +- add directConnection options to MongoDB connection ([#9955](https://github.com/typeorm/typeorm/issues/9955)) ([e0165e7](https://github.com/typeorm/typeorm/commit/e0165e75ee818c759b51a7fa3b0b3adc6befa347)) +- add onDelete option validation for oracle ([#9786](https://github.com/typeorm/typeorm/issues/9786)) ([938f94b](https://github.com/typeorm/typeorm/commit/938f94bded92b272bdcecc04534ffb879186dc44)), closes [#9189](https://github.com/typeorm/typeorm/issues/9189) +- added instanceName to options ([#9968](https://github.com/typeorm/typeorm/issues/9968)) ([7c5627f](https://github.com/typeorm/typeorm/commit/7c5627f2728500bb45a2586a3bfd34ab39d46fad)) +- added transaction retry logic in cockroachdb ([#10032](https://github.com/typeorm/typeorm/issues/10032)) ([607d6f9](https://github.com/typeorm/typeorm/commit/607d6f959525b7c01bad5fe14364e4af82d878bb)) +- allow json as alias for longtext mariadb ([#10018](https://github.com/typeorm/typeorm/issues/10018)) ([2a2bb4b](https://github.com/typeorm/typeorm/commit/2a2bb4bdc11915966a65dc144189b33d410d9d57)) +- convert the join table ID to the referenceColumn ID type ([#9887](https://github.com/typeorm/typeorm/issues/9887)) ([9460296](https://github.com/typeorm/typeorm/commit/9460296147b8117e414ca311828615d87f5ab283)) +- correct encode mongodb auth credentials ([#10024](https://github.com/typeorm/typeorm/issues/10024)) ([96b7ee4](https://github.com/typeorm/typeorm/commit/96b7ee44b2538f65c77c7d168e4f10316cc123fa)), closes [#9885](https://github.com/typeorm/typeorm/issues/9885) +- create correct children during cascade saving entities with STI ([#9034](https://github.com/typeorm/typeorm/issues/9034)) ([06c1e98](https://github.com/typeorm/typeorm/commit/06c1e98ae20cf516f4f5afc53fec4df91209f121)), closes [#7758](https://github.com/typeorm/typeorm/issues/7758) [#7758](https://github.com/typeorm/typeorm/issues/7758) [#9033](https://github.com/typeorm/typeorm/issues/9033) [#9033](https://github.com/typeorm/typeorm/issues/9033) [#7758](https://github.com/typeorm/typeorm/issues/7758) [#7758](https://github.com/typeorm/typeorm/issues/7758) +- express option bug in init command ([#10022](https://github.com/typeorm/typeorm/issues/10022)) ([5be20e2](https://github.com/typeorm/typeorm/commit/5be20e2bcd18431e457090a63a99dc06f9c2d3d2)) +- for running cli-ts-node-esm use exit code from child process ([#10030](https://github.com/typeorm/typeorm/issues/10030)) ([a188b1d](https://github.com/typeorm/typeorm/commit/a188b1d9f4cc0bdc36a30be1380104e5f38ccb24)), closes [#10029](https://github.com/typeorm/typeorm/issues/10029) +- mongodb typings breaks the browser version ([#9962](https://github.com/typeorm/typeorm/issues/9962)) ([99bef49](https://github.com/typeorm/typeorm/commit/99bef491280aedb6b337a14e6723b33e67b048d0)), closes [#9959](https://github.com/typeorm/typeorm/issues/9959) +- RelationIdLoader has access to queryPlanner when wrapped in transaction ([#9990](https://github.com/typeorm/typeorm/issues/9990)) ([21a9d67](https://github.com/typeorm/typeorm/commit/21a9d67fcf294e805c416d55394d55b238860b7d)), closes [#9988](https://github.com/typeorm/typeorm/issues/9988) +- resolve duplicate subscriber updated columns ([#9958](https://github.com/typeorm/typeorm/issues/9958)) ([3d67901](https://github.com/typeorm/typeorm/commit/3d67901fde2750a8c10521bedc3eee3d57065b43)), closes [#9948](https://github.com/typeorm/typeorm/issues/9948) +- select + addOrderBy broke in 0.3.14 ([#9961](https://github.com/typeorm/typeorm/issues/9961)) ([0e56f0f](https://github.com/typeorm/typeorm/commit/0e56f0fcf8ec3f2ec37fee92f75ba09262801655)), closes [#9960](https://github.com/typeorm/typeorm/issues/9960) +- support More/LessThanOrEqual in relations ([#9978](https://github.com/typeorm/typeorm/issues/9978)) ([8795c86](https://github.com/typeorm/typeorm/commit/8795c864e835a875e78577b5737da42d78e19247)) + +### Features + +- mariadb uuid inet4 inet6 column data type support ([#9845](https://github.com/typeorm/typeorm/issues/9845)) ([d8a2e37](https://github.com/typeorm/typeorm/commit/d8a2e3730f12bb2b8e521635e176a284594121f3)) + +### Reverts + +- "refactor: remove date-fns package ([#9634](https://github.com/typeorm/typeorm/issues/9634))" ([54f4f89](https://github.com/typeorm/typeorm/commit/54f4f8986adf197eb96ec0bc6d9d5a44d6552bcc)) ## [0.3.15](https://github.com/typeorm/typeorm/compare/0.3.14...0.3.15) (2023-04-15) ### Bug Fixes -* make cache optional fields optional ([#9942](https://github.com/typeorm/typeorm/issues/9942)) ([159c60a](https://github.com/typeorm/typeorm/commit/159c60a6e8cedbd32766fdca9694ec28cde9f6f7)) -* prevent unique index identical to primary key (all sql dialects) ([#9940](https://github.com/typeorm/typeorm/issues/9940)) ([51eecc2](https://github.com/typeorm/typeorm/commit/51eecc2aa07bfe3cfdd649fefadea3d719436d5e)) -* SelectQueryBuilder builds incorrectly escaped alias in Oracle when used on entity with composite key ([#9668](https://github.com/typeorm/typeorm/issues/9668)) ([83c6c0e](https://github.com/typeorm/typeorm/commit/83c6c0ed803f72c872fa40a740eb6fabe2102cbb)) +- make cache optional fields optional ([#9942](https://github.com/typeorm/typeorm/issues/9942)) ([159c60a](https://github.com/typeorm/typeorm/commit/159c60a6e8cedbd32766fdca9694ec28cde9f6f7)) +- prevent unique index identical to primary key (all sql dialects) ([#9940](https://github.com/typeorm/typeorm/issues/9940)) ([51eecc2](https://github.com/typeorm/typeorm/commit/51eecc2aa07bfe3cfdd649fefadea3d719436d5e)) +- SelectQueryBuilder builds incorrectly escaped alias in Oracle when used on entity with composite key ([#9668](https://github.com/typeorm/typeorm/issues/9668)) ([83c6c0e](https://github.com/typeorm/typeorm/commit/83c6c0ed803f72c872fa40a740eb6fabe2102cbb)) ### Features -* support for the latest mongodb v5 ([#9925](https://github.com/typeorm/typeorm/issues/9925)) ([f6a3ce7](https://github.com/typeorm/typeorm/commit/f6a3ce732d86fd01807fc13c049ab51df785d772)), closes [#7907](https://github.com/typeorm/typeorm/issues/7907) [#7907](https://github.com/typeorm/typeorm/issues/7907) +- support for the latest mongodb v5 ([#9925](https://github.com/typeorm/typeorm/issues/9925)) ([f6a3ce7](https://github.com/typeorm/typeorm/commit/f6a3ce732d86fd01807fc13c049ab51df785d772)), closes [#7907](https://github.com/typeorm/typeorm/issues/7907) [#7907](https://github.com/typeorm/typeorm/issues/7907) ## [0.3.14](https://github.com/typeorm/typeorm/compare/0.3.12...0.3.14) (2023-04-09) ### Bug Fixes -* drop xml & yml connection option support. Addresses security issues in underlying dependency ([#9930](https://github.com/typeorm/typeorm/issues/9930)) ([7dac12c](https://github.com/typeorm/typeorm/commit/7dac12c2b18be34fb63ebfde988eb0825ec21384)) +- drop xml & yml connection option support. Addresses security issues in underlying dependency ([#9930](https://github.com/typeorm/typeorm/issues/9930)) ([7dac12c](https://github.com/typeorm/typeorm/commit/7dac12c2b18be34fb63ebfde988eb0825ec21384)) ### Features -* QueryBuilder performance optimizations ([#9914](https://github.com/typeorm/typeorm/issues/9914)) ([12e9db0](https://github.com/typeorm/typeorm/commit/12e9db07b6b9676e63fff5f55a45b1d269716ed9)) +- QueryBuilder performance optimizations ([#9914](https://github.com/typeorm/typeorm/issues/9914)) ([12e9db0](https://github.com/typeorm/typeorm/commit/12e9db07b6b9676e63fff5f55a45b1d269716ed9)) ## [0.3.13](https://github.com/typeorm/typeorm/compare/0.3.12...0.3.13) (2023-04-06) ### Bug Fixes -* firstCapital=true not working in camelCase() function ([f1330ad](https://github.com/typeorm/typeorm/commit/f1330ad6e23bea65a16b4f1c4199f10f3fa7282b)) -* handles "query" relation loading strategy for TreeRepositories ([#9680](https://github.com/typeorm/typeorm/issues/9680)) ([a11809e](https://github.com/typeorm/typeorm/commit/a11809e1b20cc77fd2767b8bab2500a0c7e20d23)), closes [#9673](https://github.com/typeorm/typeorm/issues/9673) -* improve EntityNotFound error message in QueryBuilder.findOneOrFail ([#9872](https://github.com/typeorm/typeorm/issues/9872)) ([f7f6817](https://github.com/typeorm/typeorm/commit/f7f68178640120d8c1e92b8c9be0eeaa8262b4f3)) -* loading tables with fk in sqlite query runner ([#9875](https://github.com/typeorm/typeorm/issues/9875)) ([4997da0](https://github.com/typeorm/typeorm/commit/4997da054b5cfafdbdf374b3e554e5c4e0590da7)), closes [#9266](https://github.com/typeorm/typeorm/issues/9266) -* prevent foreign key support during migration batch under sqlite ([#9775](https://github.com/typeorm/typeorm/issues/9775)) ([197cc05](https://github.com/typeorm/typeorm/commit/197cc05e90c0182357d85aa1ce7ae45de99d9d98)), closes [#9770](https://github.com/typeorm/typeorm/issues/9770) -* proper default value on generating migration when default value is a function calling [Postgres] ([#9830](https://github.com/typeorm/typeorm/issues/9830)) ([bebba05](https://github.com/typeorm/typeorm/commit/bebba05388a40a9f278a450d4a988865c158abb7)) -* react-native doesn't properly work in ESM projects because of circular dependency ([#9765](https://github.com/typeorm/typeorm/issues/9765)) ([099fcd9](https://github.com/typeorm/typeorm/commit/099fcd9b104bc930faea08f97ee3d5610118e0c4)) -* resolve issues for mssql migration when simple-enum was changed ([cb154d4](https://github.com/typeorm/typeorm/commit/cb154d4ca36cda251fcb9eb05a29b7758ae813cf)), closes [#7785](https://github.com/typeorm/typeorm/issues/7785) [#9457](https://github.com/typeorm/typeorm/issues/9457) [#7785](https://github.com/typeorm/typeorm/issues/7785) [#9457](https://github.com/typeorm/typeorm/issues/9457) -* resolves issue with mssql column recreation ([#9773](https://github.com/typeorm/typeorm/issues/9773)) ([07221a3](https://github.com/typeorm/typeorm/commit/07221a364682b567533c93130efb4f5189e009a9)), closes [#9399](https://github.com/typeorm/typeorm/issues/9399) -* transform values for FindOperators [#9381](https://github.com/typeorm/typeorm/issues/9381) ([#9777](https://github.com/typeorm/typeorm/issues/9777)) ([de1228d](https://github.com/typeorm/typeorm/commit/de1228deace974eca3e9dd3956208ebe4cd9347f)), closes [#9816](https://github.com/typeorm/typeorm/issues/9816) -* use forward slashes when normalizing path ([#9768](https://github.com/typeorm/typeorm/issues/9768)) ([58fc088](https://github.com/typeorm/typeorm/commit/58fc08840a4a64ca1935391f4709a784c3f0b373)), closes [#9766](https://github.com/typeorm/typeorm/issues/9766) -* use object create if entity skip constructor is set ([#9831](https://github.com/typeorm/typeorm/issues/9831)) ([a868979](https://github.com/typeorm/typeorm/commit/a8689795dad796338e2a291a6a2fda89b00ef243)) +- firstCapital=true not working in camelCase() function ([f1330ad](https://github.com/typeorm/typeorm/commit/f1330ad6e23bea65a16b4f1c4199f10f3fa7282b)) +- handles "query" relation loading strategy for TreeRepositories ([#9680](https://github.com/typeorm/typeorm/issues/9680)) ([a11809e](https://github.com/typeorm/typeorm/commit/a11809e1b20cc77fd2767b8bab2500a0c7e20d23)), closes [#9673](https://github.com/typeorm/typeorm/issues/9673) +- improve EntityNotFound error message in QueryBuilder.findOneOrFail ([#9872](https://github.com/typeorm/typeorm/issues/9872)) ([f7f6817](https://github.com/typeorm/typeorm/commit/f7f68178640120d8c1e92b8c9be0eeaa8262b4f3)) +- loading tables with fk in sqlite query runner ([#9875](https://github.com/typeorm/typeorm/issues/9875)) ([4997da0](https://github.com/typeorm/typeorm/commit/4997da054b5cfafdbdf374b3e554e5c4e0590da7)), closes [#9266](https://github.com/typeorm/typeorm/issues/9266) +- prevent foreign key support during migration batch under sqlite ([#9775](https://github.com/typeorm/typeorm/issues/9775)) ([197cc05](https://github.com/typeorm/typeorm/commit/197cc05e90c0182357d85aa1ce7ae45de99d9d98)), closes [#9770](https://github.com/typeorm/typeorm/issues/9770) +- proper default value on generating migration when default value is a function calling [Postgres] ([#9830](https://github.com/typeorm/typeorm/issues/9830)) ([bebba05](https://github.com/typeorm/typeorm/commit/bebba05388a40a9f278a450d4a988865c158abb7)) +- react-native doesn't properly work in ESM projects because of circular dependency ([#9765](https://github.com/typeorm/typeorm/issues/9765)) ([099fcd9](https://github.com/typeorm/typeorm/commit/099fcd9b104bc930faea08f97ee3d5610118e0c4)) +- resolve issues for mssql migration when simple-enum was changed ([cb154d4](https://github.com/typeorm/typeorm/commit/cb154d4ca36cda251fcb9eb05a29b7758ae813cf)), closes [#7785](https://github.com/typeorm/typeorm/issues/7785) [#9457](https://github.com/typeorm/typeorm/issues/9457) [#7785](https://github.com/typeorm/typeorm/issues/7785) [#9457](https://github.com/typeorm/typeorm/issues/9457) +- resolves issue with mssql column recreation ([#9773](https://github.com/typeorm/typeorm/issues/9773)) ([07221a3](https://github.com/typeorm/typeorm/commit/07221a364682b567533c93130efb4f5189e009a9)), closes [#9399](https://github.com/typeorm/typeorm/issues/9399) +- transform values for FindOperators [#9381](https://github.com/typeorm/typeorm/issues/9381) ([#9777](https://github.com/typeorm/typeorm/issues/9777)) ([de1228d](https://github.com/typeorm/typeorm/commit/de1228deace974eca3e9dd3956208ebe4cd9347f)), closes [#9816](https://github.com/typeorm/typeorm/issues/9816) +- use forward slashes when normalizing path ([#9768](https://github.com/typeorm/typeorm/issues/9768)) ([58fc088](https://github.com/typeorm/typeorm/commit/58fc08840a4a64ca1935391f4709a784c3f0b373)), closes [#9766](https://github.com/typeorm/typeorm/issues/9766) +- use object create if entity skip constructor is set ([#9831](https://github.com/typeorm/typeorm/issues/9831)) ([a868979](https://github.com/typeorm/typeorm/commit/a8689795dad796338e2a291a6a2fda89b00ef243)) ### Features -* add support for json datatype for sqlite ([#9744](https://github.com/typeorm/typeorm/issues/9744)) ([4ac8c00](https://github.com/typeorm/typeorm/commit/4ac8c00117417ae622368aabe36d0fd5c676bd00)) -* add support for STI on EntitySchema ([#9834](https://github.com/typeorm/typeorm/issues/9834)) ([bc306fb](https://github.com/typeorm/typeorm/commit/bc306fb5a2c4dc02d04632af2b2f6c697a684356)), closes [#9833](https://github.com/typeorm/typeorm/issues/9833) -* allow type FindOptionsOrderValue for order by object property ([#9895](https://github.com/typeorm/typeorm/issues/9895)) ([#9896](https://github.com/typeorm/typeorm/issues/9896)) ([0814970](https://github.com/typeorm/typeorm/commit/0814970a9cc2c958199c9d74d1ef313de43dab50)) -* Broadcast identifier for removed related entities ([#9913](https://github.com/typeorm/typeorm/issues/9913)) ([f530811](https://github.com/typeorm/typeorm/commit/f530811b0da2863711db3467e55bf815c66b4b4b)) -* leftJoinAndMapOne and innerJoinAndMapOne map result to entity ([#9354](https://github.com/typeorm/typeorm/issues/9354)) ([947ffc3](https://github.com/typeorm/typeorm/commit/947ffc34324c1d692496804e43dafa6302efc1db)) - +- add support for json datatype for sqlite ([#9744](https://github.com/typeorm/typeorm/issues/9744)) ([4ac8c00](https://github.com/typeorm/typeorm/commit/4ac8c00117417ae622368aabe36d0fd5c676bd00)) +- add support for STI on EntitySchema ([#9834](https://github.com/typeorm/typeorm/issues/9834)) ([bc306fb](https://github.com/typeorm/typeorm/commit/bc306fb5a2c4dc02d04632af2b2f6c697a684356)), closes [#9833](https://github.com/typeorm/typeorm/issues/9833) +- allow type FindOptionsOrderValue for order by object property ([#9895](https://github.com/typeorm/typeorm/issues/9895)) ([#9896](https://github.com/typeorm/typeorm/issues/9896)) ([0814970](https://github.com/typeorm/typeorm/commit/0814970a9cc2c958199c9d74d1ef313de43dab50)) +- Broadcast identifier for removed related entities ([#9913](https://github.com/typeorm/typeorm/issues/9913)) ([f530811](https://github.com/typeorm/typeorm/commit/f530811b0da2863711db3467e55bf815c66b4b4b)) +- leftJoinAndMapOne and innerJoinAndMapOne map result to entity ([#9354](https://github.com/typeorm/typeorm/issues/9354)) ([947ffc3](https://github.com/typeorm/typeorm/commit/947ffc34324c1d692496804e43dafa6302efc1db)) ## [0.3.12](https://github.com/typeorm/typeorm/compare/0.3.11...0.3.12) (2023-02-07) ### Bug Fixes -* allow to pass ObjectLiteral in mongo find where condition ([#9632](https://github.com/typeorm/typeorm/issues/9632)) ([4eda5df](https://github.com/typeorm/typeorm/commit/4eda5df8693d1a659ff5c3461124cf05619fdd72)), closes [#9518](https://github.com/typeorm/typeorm/issues/9518) -* DataSource.setOptions doesn't properly update the database in the drivers ([#9635](https://github.com/typeorm/typeorm/issues/9635)) ([a95bed7](https://github.com/typeorm/typeorm/commit/a95bed7c05d10eb4b508e225faa4cb3c7ea7944f)) -* Fix grammar error in no migrations found log ([#9754](https://github.com/typeorm/typeorm/issues/9754)) ([6fb2121](https://github.com/typeorm/typeorm/commit/6fb212187fdf97c07c41aad20d4f5503dfd44215)) -* improved `FindOptionsWhere` behavior with union types ([#9607](https://github.com/typeorm/typeorm/issues/9607)) ([7726f5a](https://github.com/typeorm/typeorm/commit/7726f5ad1ec0c826510202a0f2cbeea705547eee)) -* Incorrect enum default value when table name contains dash character ([#9685](https://github.com/typeorm/typeorm/issues/9685)) ([b3b0c11](https://github.com/typeorm/typeorm/commit/b3b0c118a40441b31ac18ee7ce0cea0696b701ab)) -* incorrect sorting of entities with multi-inheritances ([#9406](https://github.com/typeorm/typeorm/issues/9406)) ([54ca9dd](https://github.com/typeorm/typeorm/commit/54ca9dd801a77e011c2faf056b9e12845ccde82b)) -* make sure "require" is defined in the environment ([1a9b9fb](https://github.com/typeorm/typeorm/commit/1a9b9fbcd683b2a28acbd26e39ac98dc6b60f001)) -* materialized hints support for cte ([#9605](https://github.com/typeorm/typeorm/issues/9605)) ([67973b4](https://github.com/typeorm/typeorm/commit/67973b4726500fc835639ffc302e0b6b20093df4)) -* multiple select queries during db sync in sqlite ([#9639](https://github.com/typeorm/typeorm/issues/9639)) ([6c928a4](https://github.com/typeorm/typeorm/commit/6c928a4aa002cf5db0733055c0a754e97e4b43b3)) -* overriding caching settings when alwaysEnabled is true ([#9731](https://github.com/typeorm/typeorm/issues/9731)) ([4df969e](https://github.com/typeorm/typeorm/commit/4df969ea6254f9f69c371a72d80e857ab7c1f62d)) -* redundant Unique constraint on primary join column in Postgres ([#9677](https://github.com/typeorm/typeorm/issues/9677)) ([b8704f8](https://github.com/typeorm/typeorm/commit/b8704f87d2e06c048dea3f0b408ab18738acf7d7)) -* remove unnecessary .js extension in imports ([#9713](https://github.com/typeorm/typeorm/issues/9713)) ([6b37e38](https://github.com/typeorm/typeorm/commit/6b37e3818bd74541cadbd44e55c84df510e41e3a)) -* resolve issue with "simple-enum" synchronization in SQLite ([#9716](https://github.com/typeorm/typeorm/issues/9716)) ([c77c43e](https://github.com/typeorm/typeorm/commit/c77c43e2423201bdc2ede85ae921447570685585)), closes [#9715](https://github.com/typeorm/typeorm/issues/9715) -* sql expression when `where` parameter is empty array ([#9691](https://github.com/typeorm/typeorm/issues/9691)) ([7df2ccf](https://github.com/typeorm/typeorm/commit/7df2ccf69d13f8f0769e614638d8badd89c181b0)), closes [#9690](https://github.com/typeorm/typeorm/issues/9690) -* synchronizing View with schema broken for oracle ([#9602](https://github.com/typeorm/typeorm/issues/9602)) ([18b659d](https://github.com/typeorm/typeorm/commit/18b659d1298a4606da0ea54ebd852f1c726ed4f2)) +- allow to pass ObjectLiteral in mongo find where condition ([#9632](https://github.com/typeorm/typeorm/issues/9632)) ([4eda5df](https://github.com/typeorm/typeorm/commit/4eda5df8693d1a659ff5c3461124cf05619fdd72)), closes [#9518](https://github.com/typeorm/typeorm/issues/9518) +- DataSource.setOptions doesn't properly update the database in the drivers ([#9635](https://github.com/typeorm/typeorm/issues/9635)) ([a95bed7](https://github.com/typeorm/typeorm/commit/a95bed7c05d10eb4b508e225faa4cb3c7ea7944f)) +- Fix grammar error in no migrations found log ([#9754](https://github.com/typeorm/typeorm/issues/9754)) ([6fb2121](https://github.com/typeorm/typeorm/commit/6fb212187fdf97c07c41aad20d4f5503dfd44215)) +- improved `FindOptionsWhere` behavior with union types ([#9607](https://github.com/typeorm/typeorm/issues/9607)) ([7726f5a](https://github.com/typeorm/typeorm/commit/7726f5ad1ec0c826510202a0f2cbeea705547eee)) +- Incorrect enum default value when table name contains dash character ([#9685](https://github.com/typeorm/typeorm/issues/9685)) ([b3b0c11](https://github.com/typeorm/typeorm/commit/b3b0c118a40441b31ac18ee7ce0cea0696b701ab)) +- incorrect sorting of entities with multi-inheritances ([#9406](https://github.com/typeorm/typeorm/issues/9406)) ([54ca9dd](https://github.com/typeorm/typeorm/commit/54ca9dd801a77e011c2faf056b9e12845ccde82b)) +- make sure "require" is defined in the environment ([1a9b9fb](https://github.com/typeorm/typeorm/commit/1a9b9fbcd683b2a28acbd26e39ac98dc6b60f001)) +- materialized hints support for cte ([#9605](https://github.com/typeorm/typeorm/issues/9605)) ([67973b4](https://github.com/typeorm/typeorm/commit/67973b4726500fc835639ffc302e0b6b20093df4)) +- multiple select queries during db sync in sqlite ([#9639](https://github.com/typeorm/typeorm/issues/9639)) ([6c928a4](https://github.com/typeorm/typeorm/commit/6c928a4aa002cf5db0733055c0a754e97e4b43b3)) +- overriding caching settings when alwaysEnabled is true ([#9731](https://github.com/typeorm/typeorm/issues/9731)) ([4df969e](https://github.com/typeorm/typeorm/commit/4df969ea6254f9f69c371a72d80e857ab7c1f62d)) +- redundant Unique constraint on primary join column in Postgres ([#9677](https://github.com/typeorm/typeorm/issues/9677)) ([b8704f8](https://github.com/typeorm/typeorm/commit/b8704f87d2e06c048dea3f0b408ab18738acf7d7)) +- remove unnecessary .js extension in imports ([#9713](https://github.com/typeorm/typeorm/issues/9713)) ([6b37e38](https://github.com/typeorm/typeorm/commit/6b37e3818bd74541cadbd44e55c84df510e41e3a)) +- resolve issue with "simple-enum" synchronization in SQLite ([#9716](https://github.com/typeorm/typeorm/issues/9716)) ([c77c43e](https://github.com/typeorm/typeorm/commit/c77c43e2423201bdc2ede85ae921447570685585)), closes [#9715](https://github.com/typeorm/typeorm/issues/9715) +- sql expression when `where` parameter is empty array ([#9691](https://github.com/typeorm/typeorm/issues/9691)) ([7df2ccf](https://github.com/typeorm/typeorm/commit/7df2ccf69d13f8f0769e614638d8badd89c181b0)), closes [#9690](https://github.com/typeorm/typeorm/issues/9690) +- synchronizing View with schema broken for oracle ([#9602](https://github.com/typeorm/typeorm/issues/9602)) ([18b659d](https://github.com/typeorm/typeorm/commit/18b659d1298a4606da0ea54ebd852f1c726ed4f2)) ### Features -* add find operator json contains ([#9665](https://github.com/typeorm/typeorm/issues/9665)) ([d2f37f6](https://github.com/typeorm/typeorm/commit/d2f37f6e72f3f7566bcd312a256c652ea5dc5508)) -* allow mysql2 v3 as peerDependency ([#9747](https://github.com/typeorm/typeorm/issues/9747)) ([6c9010e](https://github.com/typeorm/typeorm/commit/6c9010e466ef103685ad842b5bcfef8ad8ace0c2)), closes [#9714](https://github.com/typeorm/typeorm/issues/9714) -* naming strategy for legacy Oracle ([#9703](https://github.com/typeorm/typeorm/issues/9703)) ([0eb7441](https://github.com/typeorm/typeorm/commit/0eb74411d62f9132ba45154040b204f31a98c779)) -* support busy_timeout param parameter for sqlite ([#9623](https://github.com/typeorm/typeorm/issues/9623)) ([8668c29](https://github.com/typeorm/typeorm/commit/8668c29d83765001d68918f0fbe663061eee9373)) -* support enableWal for the better-sqlite3 driver ([#9619](https://github.com/typeorm/typeorm/issues/9619)) ([8731858](https://github.com/typeorm/typeorm/commit/8731858fbc88150f935b9a853f533d5c217d9d0e)) -* support for SQL aggregate functions SUM, AVG, MIN, and MAX to the Repository API ([#9737](https://github.com/typeorm/typeorm/issues/9737)) ([7d1f1d6](https://github.com/typeorm/typeorm/commit/7d1f1d69588b771c5ec393c86976008a352ddcc0)) -* support time travel queries, upsert, enums, spatial types in cockroachdb ([#9128](https://github.com/typeorm/typeorm/issues/9128)) ([defb409](https://github.com/typeorm/typeorm/commit/defb409f5650fed0b7a4ff2933208282a45572fb)), closes [#9068](https://github.com/typeorm/typeorm/issues/9068) [#8532](https://github.com/typeorm/typeorm/issues/8532) [#8532](https://github.com/typeorm/typeorm/issues/8532) [#9199](https://github.com/typeorm/typeorm/issues/9199) -* update mssql dependency and other dependencies as well ([#9763](https://github.com/typeorm/typeorm/issues/9763)) ([4555211](https://github.com/typeorm/typeorm/commit/4555211bcb71dce59b418a185141cc413a910352)) - +- add find operator json contains ([#9665](https://github.com/typeorm/typeorm/issues/9665)) ([d2f37f6](https://github.com/typeorm/typeorm/commit/d2f37f6e72f3f7566bcd312a256c652ea5dc5508)) +- allow mysql2 v3 as peerDependency ([#9747](https://github.com/typeorm/typeorm/issues/9747)) ([6c9010e](https://github.com/typeorm/typeorm/commit/6c9010e466ef103685ad842b5bcfef8ad8ace0c2)), closes [#9714](https://github.com/typeorm/typeorm/issues/9714) +- naming strategy for legacy Oracle ([#9703](https://github.com/typeorm/typeorm/issues/9703)) ([0eb7441](https://github.com/typeorm/typeorm/commit/0eb74411d62f9132ba45154040b204f31a98c779)) +- support busy_timeout param parameter for sqlite ([#9623](https://github.com/typeorm/typeorm/issues/9623)) ([8668c29](https://github.com/typeorm/typeorm/commit/8668c29d83765001d68918f0fbe663061eee9373)) +- support enableWal for the better-sqlite3 driver ([#9619](https://github.com/typeorm/typeorm/issues/9619)) ([8731858](https://github.com/typeorm/typeorm/commit/8731858fbc88150f935b9a853f533d5c217d9d0e)) +- support for SQL aggregate functions SUM, AVG, MIN, and MAX to the Repository API ([#9737](https://github.com/typeorm/typeorm/issues/9737)) ([7d1f1d6](https://github.com/typeorm/typeorm/commit/7d1f1d69588b771c5ec393c86976008a352ddcc0)) +- support time travel queries, upsert, enums, spatial types in cockroachdb ([#9128](https://github.com/typeorm/typeorm/issues/9128)) ([defb409](https://github.com/typeorm/typeorm/commit/defb409f5650fed0b7a4ff2933208282a45572fb)), closes [#9068](https://github.com/typeorm/typeorm/issues/9068) [#8532](https://github.com/typeorm/typeorm/issues/8532) [#8532](https://github.com/typeorm/typeorm/issues/8532) [#9199](https://github.com/typeorm/typeorm/issues/9199) +- update mssql dependency and other dependencies as well ([#9763](https://github.com/typeorm/typeorm/issues/9763)) ([4555211](https://github.com/typeorm/typeorm/commit/4555211bcb71dce59b418a185141cc413a910352)) ## [0.3.11](https://github.com/typeorm/typeorm/compare/0.3.10...0.3.11) (2022-12-03) ### Fixes -* boolean parameter escape in SQLiteDriver ([#9400](https://github.com/typeorm/typeorm/issues/9400)) ([4a36d0e](https://github.com/typeorm/typeorm/commit/4a36d0e8c1c50260b3a15c693802856341adfee6)), closes [#1981](https://github.com/typeorm/typeorm/issues/1981) -* cacheId not used when loading relations with take ([#9469](https://github.com/typeorm/typeorm/issues/9469)) ([93e6b3d](https://github.com/typeorm/typeorm/commit/93e6b3dd8e6c26c64a30350a6dcd486c47d7e516)) -* correctly return insertId for react-native ([#9554](https://github.com/typeorm/typeorm/issues/9554)) ([97fae63](https://github.com/typeorm/typeorm/commit/97fae631b33e5bea957f96b242df30737e2c3792)) -* disable transactionSupport option for CordovaDriver ([#9391](https://github.com/typeorm/typeorm/issues/9391)) ([53fad8f](https://github.com/typeorm/typeorm/commit/53fad8f235140b5625d0f2fb738c74d33fa31ea2)) -* explicitly define property for entity relation as enumerable ([#9437](https://github.com/typeorm/typeorm/issues/9437)) ([85fa9c6](https://github.com/typeorm/typeorm/commit/85fa9c6e7df1a0e3ba8c95d64d9b2a6ab464e0e0)), closes [#6631](https://github.com/typeorm/typeorm/issues/6631) -* fix ormUtils prototype check crashing on null prototype ([#9517](https://github.com/typeorm/typeorm/issues/9517)) ([19536ed](https://github.com/typeorm/typeorm/commit/19536edc3997d4ce83da28cc63b3962491c093d9)) -* fixed outdated `init` command ([#9422](https://github.com/typeorm/typeorm/issues/9422)) ([0984307](https://github.com/typeorm/typeorm/commit/09843078bec2e8bccece0807847ba0bc100aef5f)) -* left instead of inner join for where or + optional relations ([#9516](https://github.com/typeorm/typeorm/issues/9516)) ([d490793](https://github.com/typeorm/typeorm/commit/d490793c7ced454bcc4d770638701a54032595cc)) -* Mark array arguments to find operators as read-only ([#9474](https://github.com/typeorm/typeorm/issues/9474)) ([6eb674b](https://github.com/typeorm/typeorm/commit/6eb674bb9d5272b41b3312211e3a55390e2fe2ff)) -* pass fake flag to undoLastMigration ([#9562](https://github.com/typeorm/typeorm/issues/9562)) ([2458ac7](https://github.com/typeorm/typeorm/commit/2458ac70444ec79f800a9f5d7b8c42aeacaf4571)), closes [#9561](https://github.com/typeorm/typeorm/issues/9561) -* resolve issue with migrations and unsigned int columns in aurora-data-api ([#9478](https://github.com/typeorm/typeorm/issues/9478)) ([38e0eff](https://github.com/typeorm/typeorm/commit/38e0eff18ae23133dd0f8a392a1943a7572e68f7)), closes [#9477](https://github.com/typeorm/typeorm/issues/9477) -* resolve nameless TableForeign on drop foreign key ([#9460](https://github.com/typeorm/typeorm/issues/9460)) ([efb4168](https://github.com/typeorm/typeorm/commit/efb41688403b4daf59a129d0fd24aa4dadb626a6)), closes [#9432](https://github.com/typeorm/typeorm/issues/9432) -* synchronize with typeorm_metadata table only if needed ([#9175](https://github.com/typeorm/typeorm/issues/9175)) ([cdabaa3](https://github.com/typeorm/typeorm/commit/cdabaa30287d357c0ae994209e573f97f92dad22)), closes [#9173](https://github.com/typeorm/typeorm/issues/9173) [#9173](https://github.com/typeorm/typeorm/issues/9173) [#9173](https://github.com/typeorm/typeorm/issues/9173) -* the mpath is incorrect when the parent of the tree entity is null ([#9535](https://github.com/typeorm/typeorm/issues/9535)) ([658604d](https://github.com/typeorm/typeorm/commit/658604d0aeb65304053378ce0405f41217da45f1)) -* typings for Repository.extend function ([#9396](https://github.com/typeorm/typeorm/issues/9396)) ([f07fb2c](https://github.com/typeorm/typeorm/commit/f07fb2c3f2a4e970aef247cfd25b4a501933e6cc)) - +- boolean parameter escape in SQLiteDriver ([#9400](https://github.com/typeorm/typeorm/issues/9400)) ([4a36d0e](https://github.com/typeorm/typeorm/commit/4a36d0e8c1c50260b3a15c693802856341adfee6)), closes [#1981](https://github.com/typeorm/typeorm/issues/1981) +- cacheId not used when loading relations with take ([#9469](https://github.com/typeorm/typeorm/issues/9469)) ([93e6b3d](https://github.com/typeorm/typeorm/commit/93e6b3dd8e6c26c64a30350a6dcd486c47d7e516)) +- correctly return insertId for react-native ([#9554](https://github.com/typeorm/typeorm/issues/9554)) ([97fae63](https://github.com/typeorm/typeorm/commit/97fae631b33e5bea957f96b242df30737e2c3792)) +- disable transactionSupport option for CordovaDriver ([#9391](https://github.com/typeorm/typeorm/issues/9391)) ([53fad8f](https://github.com/typeorm/typeorm/commit/53fad8f235140b5625d0f2fb738c74d33fa31ea2)) +- explicitly define property for entity relation as enumerable ([#9437](https://github.com/typeorm/typeorm/issues/9437)) ([85fa9c6](https://github.com/typeorm/typeorm/commit/85fa9c6e7df1a0e3ba8c95d64d9b2a6ab464e0e0)), closes [#6631](https://github.com/typeorm/typeorm/issues/6631) +- fix ormUtils prototype check crashing on null prototype ([#9517](https://github.com/typeorm/typeorm/issues/9517)) ([19536ed](https://github.com/typeorm/typeorm/commit/19536edc3997d4ce83da28cc63b3962491c093d9)) +- fixed outdated `init` command ([#9422](https://github.com/typeorm/typeorm/issues/9422)) ([0984307](https://github.com/typeorm/typeorm/commit/09843078bec2e8bccece0807847ba0bc100aef5f)) +- left instead of inner join for where or + optional relations ([#9516](https://github.com/typeorm/typeorm/issues/9516)) ([d490793](https://github.com/typeorm/typeorm/commit/d490793c7ced454bcc4d770638701a54032595cc)) +- Mark array arguments to find operators as read-only ([#9474](https://github.com/typeorm/typeorm/issues/9474)) ([6eb674b](https://github.com/typeorm/typeorm/commit/6eb674bb9d5272b41b3312211e3a55390e2fe2ff)) +- pass fake flag to undoLastMigration ([#9562](https://github.com/typeorm/typeorm/issues/9562)) ([2458ac7](https://github.com/typeorm/typeorm/commit/2458ac70444ec79f800a9f5d7b8c42aeacaf4571)), closes [#9561](https://github.com/typeorm/typeorm/issues/9561) +- resolve issue with migrations and unsigned int columns in aurora-data-api ([#9478](https://github.com/typeorm/typeorm/issues/9478)) ([38e0eff](https://github.com/typeorm/typeorm/commit/38e0eff18ae23133dd0f8a392a1943a7572e68f7)), closes [#9477](https://github.com/typeorm/typeorm/issues/9477) +- resolve nameless TableForeign on drop foreign key ([#9460](https://github.com/typeorm/typeorm/issues/9460)) ([efb4168](https://github.com/typeorm/typeorm/commit/efb41688403b4daf59a129d0fd24aa4dadb626a6)), closes [#9432](https://github.com/typeorm/typeorm/issues/9432) +- synchronize with typeorm_metadata table only if needed ([#9175](https://github.com/typeorm/typeorm/issues/9175)) ([cdabaa3](https://github.com/typeorm/typeorm/commit/cdabaa30287d357c0ae994209e573f97f92dad22)), closes [#9173](https://github.com/typeorm/typeorm/issues/9173) [#9173](https://github.com/typeorm/typeorm/issues/9173) [#9173](https://github.com/typeorm/typeorm/issues/9173) +- the mpath is incorrect when the parent of the tree entity is null ([#9535](https://github.com/typeorm/typeorm/issues/9535)) ([658604d](https://github.com/typeorm/typeorm/commit/658604d0aeb65304053378ce0405f41217da45f1)) +- typings for Repository.extend function ([#9396](https://github.com/typeorm/typeorm/issues/9396)) ([f07fb2c](https://github.com/typeorm/typeorm/commit/f07fb2c3f2a4e970aef247cfd25b4a501933e6cc)) ### Features -* "And" operator in FindOptions ([#9489](https://github.com/typeorm/typeorm/issues/9489)) ([fc3b4f8](https://github.com/typeorm/typeorm/commit/fc3b4f8021271601d5b896b6b30b3820303ca6fe)), closes [#3113](https://github.com/typeorm/typeorm/issues/3113) -* add id in migrate:show command logging ([#9475](https://github.com/typeorm/typeorm/issues/9475)) ([71efa8e](https://github.com/typeorm/typeorm/commit/71efa8e8590b6c2ff58e46cdaed0ef2c146e3eb0)) -* add Open DB Flags and URI DB Name in SQLite ([#9468](https://github.com/typeorm/typeorm/issues/9468)) ([73148c9](https://github.com/typeorm/typeorm/commit/73148c9ad484983123090f2ebedd3f48f83808ce)) -* add parseInt8 option to postgres driver. Closes [#9341](https://github.com/typeorm/typeorm/issues/9341) ([#9435](https://github.com/typeorm/typeorm/issues/9435)) ([2473ff0](https://github.com/typeorm/typeorm/commit/2473ff0a8eca2fafffdabd6fa4cc46b76347f0c2)) -* Add synchronize to @JoinTable ([#9442](https://github.com/typeorm/typeorm/issues/9442)) ([93e14a9](https://github.com/typeorm/typeorm/commit/93e14a928bc8755742ddbe81dffd44eac21c05e4)), closes [#3443](https://github.com/typeorm/typeorm/issues/3443) -* added opaque types support over primitives in find-options ([#9560](https://github.com/typeorm/typeorm/issues/9560)) ([4ec04fa](https://github.com/typeorm/typeorm/commit/4ec04fa1205ec9587946869c56077dae5454a063)) -* allow for partial index conditions for on conflict statments in postgres ([#8971](https://github.com/typeorm/typeorm/issues/8971)) ([2c54381](https://github.com/typeorm/typeorm/commit/2c543818158ecf0a3425b2bc7c5b26f6aff95b03)) -* allow peerDependency of better-sqlite3 version 8.x.x ([#9564](https://github.com/typeorm/typeorm/issues/9564)) ([26107e6](https://github.com/typeorm/typeorm/commit/26107e6b313fcc1a4c68998caa480a416a3af3e1)), closes [#9563](https://github.com/typeorm/typeorm/issues/9563) -* allow per-migration control over transaction behavior ([#9459](https://github.com/typeorm/typeorm/issues/9459)) ([6ba48bd](https://github.com/typeorm/typeorm/commit/6ba48bdc1bf032540256f6435327e70204bdfd6e)), closes [#7087](https://github.com/typeorm/typeorm/issues/7087) -* implement exists query method ([#9303](https://github.com/typeorm/typeorm/issues/9303)) ([598e269](https://github.com/typeorm/typeorm/commit/598e26980d0ae8431f53c14afe8f1f3ba93e43c1)), closes [#2815](https://github.com/typeorm/typeorm/issues/2815) -* index support for materialized views of PostgreSQL ([#9414](https://github.com/typeorm/typeorm/issues/9414)) ([1cb738a](https://github.com/typeorm/typeorm/commit/1cb738a701fde93814f9aaeee1b99ece938c0744)) -* migration:generate successful exit the process with zero code ([#9288](https://github.com/typeorm/typeorm/issues/9288)) ([f215e2d](https://github.com/typeorm/typeorm/commit/f215e2d16f75c730d0f2bdbd9abdbccd3b69865e)) -* new virtual column decorator ([#9339](https://github.com/typeorm/typeorm/issues/9339)) ([d305e5f](https://github.com/typeorm/typeorm/commit/d305e5f9ac431f9b38a21e493886bf4836daa488)), closes [#9323](https://github.com/typeorm/typeorm/issues/9323) [typeorm#9323](https://github.com/typeorm/issues/9323) [typeorm#9323](https://github.com/typeorm/issues/9323) [typeorm#9323](https://github.com/typeorm/issues/9323) [typeorm#9323](https://github.com/typeorm/issues/9323) -* upsert options conflictPaths as Entity keys ([#9365](https://github.com/typeorm/typeorm/issues/9365)) ([b282428](https://github.com/typeorm/typeorm/commit/b2824288f83b76b1bb8af83f51e814cc8311e4e5)) +- "And" operator in FindOptions ([#9489](https://github.com/typeorm/typeorm/issues/9489)) ([fc3b4f8](https://github.com/typeorm/typeorm/commit/fc3b4f8021271601d5b896b6b30b3820303ca6fe)), closes [#3113](https://github.com/typeorm/typeorm/issues/3113) +- add id in migrate:show command logging ([#9475](https://github.com/typeorm/typeorm/issues/9475)) ([71efa8e](https://github.com/typeorm/typeorm/commit/71efa8e8590b6c2ff58e46cdaed0ef2c146e3eb0)) +- add Open DB Flags and URI DB Name in SQLite ([#9468](https://github.com/typeorm/typeorm/issues/9468)) ([73148c9](https://github.com/typeorm/typeorm/commit/73148c9ad484983123090f2ebedd3f48f83808ce)) +- add parseInt8 option to postgres driver. Closes [#9341](https://github.com/typeorm/typeorm/issues/9341) ([#9435](https://github.com/typeorm/typeorm/issues/9435)) ([2473ff0](https://github.com/typeorm/typeorm/commit/2473ff0a8eca2fafffdabd6fa4cc46b76347f0c2)) +- Add synchronize to @JoinTable ([#9442](https://github.com/typeorm/typeorm/issues/9442)) ([93e14a9](https://github.com/typeorm/typeorm/commit/93e14a928bc8755742ddbe81dffd44eac21c05e4)), closes [#3443](https://github.com/typeorm/typeorm/issues/3443) +- added opaque types support over primitives in find-options ([#9560](https://github.com/typeorm/typeorm/issues/9560)) ([4ec04fa](https://github.com/typeorm/typeorm/commit/4ec04fa1205ec9587946869c56077dae5454a063)) +- allow for partial index conditions for on conflict statments in postgres ([#8971](https://github.com/typeorm/typeorm/issues/8971)) ([2c54381](https://github.com/typeorm/typeorm/commit/2c543818158ecf0a3425b2bc7c5b26f6aff95b03)) +- allow peerDependency of better-sqlite3 version 8.x.x ([#9564](https://github.com/typeorm/typeorm/issues/9564)) ([26107e6](https://github.com/typeorm/typeorm/commit/26107e6b313fcc1a4c68998caa480a416a3af3e1)), closes [#9563](https://github.com/typeorm/typeorm/issues/9563) +- allow per-migration control over transaction behavior ([#9459](https://github.com/typeorm/typeorm/issues/9459)) ([6ba48bd](https://github.com/typeorm/typeorm/commit/6ba48bdc1bf032540256f6435327e70204bdfd6e)), closes [#7087](https://github.com/typeorm/typeorm/issues/7087) +- implement exists query method ([#9303](https://github.com/typeorm/typeorm/issues/9303)) ([598e269](https://github.com/typeorm/typeorm/commit/598e26980d0ae8431f53c14afe8f1f3ba93e43c1)), closes [#2815](https://github.com/typeorm/typeorm/issues/2815) +- index support for materialized views of PostgreSQL ([#9414](https://github.com/typeorm/typeorm/issues/9414)) ([1cb738a](https://github.com/typeorm/typeorm/commit/1cb738a701fde93814f9aaeee1b99ece938c0744)) +- migration:generate successful exit the process with zero code ([#9288](https://github.com/typeorm/typeorm/issues/9288)) ([f215e2d](https://github.com/typeorm/typeorm/commit/f215e2d16f75c730d0f2bdbd9abdbccd3b69865e)) +- new virtual column decorator ([#9339](https://github.com/typeorm/typeorm/issues/9339)) ([d305e5f](https://github.com/typeorm/typeorm/commit/d305e5f9ac431f9b38a21e493886bf4836daa488)), closes [#9323](https://github.com/typeorm/typeorm/issues/9323) [typeorm#9323](https://github.com/typeorm/issues/9323) [typeorm#9323](https://github.com/typeorm/issues/9323) [typeorm#9323](https://github.com/typeorm/issues/9323) [typeorm#9323](https://github.com/typeorm/issues/9323) +- upsert options conflictPaths as Entity keys ([#9365](https://github.com/typeorm/typeorm/issues/9365)) ([b282428](https://github.com/typeorm/typeorm/commit/b2824288f83b76b1bb8af83f51e814cc8311e4e5)) ## [0.3.10](https://github.com/typeorm/typeorm/compare/0.3.9...0.3.10) (2022-09-19) ### Bug Fixes -* "Cannot commit, no transaction is active" error in sql.js ([#9234](https://github.com/typeorm/typeorm/issues/9234)) ([749809a](https://github.com/typeorm/typeorm/commit/749809a42ada15674c995753f683287efe6b3722)), closes [#9100](https://github.com/typeorm/typeorm/issues/9100) -* add missing support for primaryKeyConstraintName property in EntitySchema ([cc63961](https://github.com/typeorm/typeorm/commit/cc639610dc3fb3fabb982bb25cd7f7cf9dd4e68a)) -* malformed query when selecting deeply nested embedded entities ([#9273](https://github.com/typeorm/typeorm/issues/9273)) ([83f7b88](https://github.com/typeorm/typeorm/commit/83f7b88387f47fdf59c63b906cd7e60c33789673)) -* prototype pollution issue ([e3aac27](https://github.com/typeorm/typeorm/commit/e3aac270319006069b37f574c6e41a1fcfe7c5b1)) -* typescript 4.8 type issues [#9331](https://github.com/typeorm/typeorm/issues/9331) ([#9357](https://github.com/typeorm/typeorm/issues/9357)) ([a1960e1](https://github.com/typeorm/typeorm/commit/a1960e1125c36cd7c9bd2e550a001631090314aa)) -* Update RelationIdLoader to use DriverUtils.getAlias ([#9380](https://github.com/typeorm/typeorm/issues/9380)) ([a917d65](https://github.com/typeorm/typeorm/commit/a917d657fbb2492cf78eee3a49b09bbb13898aa0)), closes [#9379](https://github.com/typeorm/typeorm/issues/9379) +- "Cannot commit, no transaction is active" error in sql.js ([#9234](https://github.com/typeorm/typeorm/issues/9234)) ([749809a](https://github.com/typeorm/typeorm/commit/749809a42ada15674c995753f683287efe6b3722)), closes [#9100](https://github.com/typeorm/typeorm/issues/9100) +- add missing support for primaryKeyConstraintName property in EntitySchema ([cc63961](https://github.com/typeorm/typeorm/commit/cc639610dc3fb3fabb982bb25cd7f7cf9dd4e68a)) +- malformed query when selecting deeply nested embedded entities ([#9273](https://github.com/typeorm/typeorm/issues/9273)) ([83f7b88](https://github.com/typeorm/typeorm/commit/83f7b88387f47fdf59c63b906cd7e60c33789673)) +- prototype pollution issue ([e3aac27](https://github.com/typeorm/typeorm/commit/e3aac270319006069b37f574c6e41a1fcfe7c5b1)) +- typescript 4.8 type issues [#9331](https://github.com/typeorm/typeorm/issues/9331) ([#9357](https://github.com/typeorm/typeorm/issues/9357)) ([a1960e1](https://github.com/typeorm/typeorm/commit/a1960e1125c36cd7c9bd2e550a001631090314aa)) +- Update RelationIdLoader to use DriverUtils.getAlias ([#9380](https://github.com/typeorm/typeorm/issues/9380)) ([a917d65](https://github.com/typeorm/typeorm/commit/a917d657fbb2492cf78eee3a49b09bbb13898aa0)), closes [#9379](https://github.com/typeorm/typeorm/issues/9379) ### Features -* orphanedRowAction=disabled (rebase of PR 8285) ([#8678](https://github.com/typeorm/typeorm/issues/8678)) ([de15df1](https://github.com/typeorm/typeorm/commit/de15df14ede16f11da176a499282a79a2aa9e324)) -* sqlite - deferrable options for foreign keys ([#9360](https://github.com/typeorm/typeorm/issues/9360)) ([773a4fe](https://github.com/typeorm/typeorm/commit/773a4fe439e0a3c4ee90e5c9545b2d4784008eb0)) -* unify Pool max connection size in supported Drivers ([#9305](https://github.com/typeorm/typeorm/issues/9305)) ([48976c2](https://github.com/typeorm/typeorm/commit/48976c2967ce821252c636f54f027a89b71db142)), closes [#3388](https://github.com/typeorm/typeorm/issues/3388) -* update db image versions in docker compose ([#9367](https://github.com/typeorm/typeorm/issues/9367)) ([f24b262](https://github.com/typeorm/typeorm/commit/f24b26202b86dc70a97e3fc11136051f26f68046)), closes [#9326](https://github.com/typeorm/typeorm/issues/9326) - +- orphanedRowAction=disabled (rebase of PR 8285) ([#8678](https://github.com/typeorm/typeorm/issues/8678)) ([de15df1](https://github.com/typeorm/typeorm/commit/de15df14ede16f11da176a499282a79a2aa9e324)) +- sqlite - deferrable options for foreign keys ([#9360](https://github.com/typeorm/typeorm/issues/9360)) ([773a4fe](https://github.com/typeorm/typeorm/commit/773a4fe439e0a3c4ee90e5c9545b2d4784008eb0)) +- unify Pool max connection size in supported Drivers ([#9305](https://github.com/typeorm/typeorm/issues/9305)) ([48976c2](https://github.com/typeorm/typeorm/commit/48976c2967ce821252c636f54f027a89b71db142)), closes [#3388](https://github.com/typeorm/typeorm/issues/3388) +- update db image versions in docker compose ([#9367](https://github.com/typeorm/typeorm/issues/9367)) ([f24b262](https://github.com/typeorm/typeorm/commit/f24b26202b86dc70a97e3fc11136051f26f68046)), closes [#9326](https://github.com/typeorm/typeorm/issues/9326) ## [0.3.9](https://github.com/typeorm/typeorm/compare/0.3.7...0.3.9) (2022-08-28) -* fixed regression introduced in 0.3.8 - broken CLI because of #8917 ([#9332](https://github.com/typeorm/typeorm/issues/9332)), closes [#9330](https://github.com/typeorm/typeorm/issues/9330) +- fixed regression introduced in 0.3.8 - broken CLI because of #8917 ([#9332](https://github.com/typeorm/typeorm/issues/9332)), closes [#9330](https://github.com/typeorm/typeorm/issues/9330) ## [0.3.8](https://github.com/typeorm/typeorm/compare/0.3.7...0.3.8) (2022-08-26) ### Bug Fixes -* allow space and no-space syntaxes for SQLite constraints ([#9238](https://github.com/typeorm/typeorm/issues/9238)) ([bb07244](https://github.com/typeorm/typeorm/commit/bb07244b6188e623a6f8c8407e808d75f94918af)), closes [#9237](https://github.com/typeorm/typeorm/issues/9237) -* allow where IsNull for ManyToOne relations ([#9031](https://github.com/typeorm/typeorm/issues/9031)) ([72728f1](https://github.com/typeorm/typeorm/commit/72728f155d2e9d11fd9c2c1fb97c071c3b41ae6b)), closes [#8890](https://github.com/typeorm/typeorm/issues/8890) -* change postgres driver version checking query ([#9319](https://github.com/typeorm/typeorm/issues/9319)) ([c4f4650](https://github.com/typeorm/typeorm/commit/c4f46506d87009a589a7adf9b9367be06c92042c)), closes [#9318](https://github.com/typeorm/typeorm/issues/9318) [#9318](https://github.com/typeorm/typeorm/issues/9318) -* don't use temporary table name to create foreign key, unique, check constraint with SQLite ([#9185](https://github.com/typeorm/typeorm/issues/9185)) ([e519910](https://github.com/typeorm/typeorm/commit/e51991076dbed4ed06f3cd008eac8029a01c78d2)), closes [#9176](https://github.com/typeorm/typeorm/issues/9176) -* dropIndex now works when providing a tableIndex without name ([#8937](https://github.com/typeorm/typeorm/issues/8937)) ([de8aaac](https://github.com/typeorm/typeorm/commit/de8aaac54c72f098a50362430ca160ab1c672597)) -* entity manager remove using entity schemas ([#9221](https://github.com/typeorm/typeorm/issues/9221)) ([f045536](https://github.com/typeorm/typeorm/commit/f045536f2449f7adcbc346a94dcf30573c76e56b)) -* find query mongodb properly with @DeleteDateColumn() ([#9262](https://github.com/typeorm/typeorm/issues/9262)) ([e49d0c8](https://github.com/typeorm/typeorm/commit/e49d0c8740b9dec45448131edc012a920e6fcea2)) -* handle inherited relations insert order ([#9242](https://github.com/typeorm/typeorm/issues/9242)) ([14dfadb](https://github.com/typeorm/typeorm/commit/14dfadbde94f4f87678e155394ca9334af7bfa32)), closes [#9241](https://github.com/typeorm/typeorm/issues/9241) -* handle inherited relations insert order ([#9321](https://github.com/typeorm/typeorm/issues/9321)) ([3671887](https://github.com/typeorm/typeorm/commit/36718876f9289175452ca93d4c0b70393b3324ed)), closes [#9242](https://github.com/typeorm/typeorm/issues/9242) [#9241](https://github.com/typeorm/typeorm/issues/9241) -* pass error to pgpool release ([#9209](https://github.com/typeorm/typeorm/issues/9209)) ([eb8f0c6](https://github.com/typeorm/typeorm/commit/eb8f0c6c0442aa7a74c6581344fa64be5637538c)), closes [#7792](https://github.com/typeorm/typeorm/issues/7792) [#5112](https://github.com/typeorm/typeorm/issues/5112) -* QueryBuilder update handles Date objects wrong on a ManyToOne relationship ([#8748](https://github.com/typeorm/typeorm/issues/8748)) ([88d0ced](https://github.com/typeorm/typeorm/commit/88d0ced812c9e05ef088dfd5ebaab003eb1811b4)), closes [#8747](https://github.com/typeorm/typeorm/issues/8747) -* resolve FindOptionsOrder.nulls to allow FIRST/LAST in uppercase ([#8978](https://github.com/typeorm/typeorm/issues/8978)) ([5e5abbd](https://github.com/typeorm/typeorm/commit/5e5abbd14854a431db06d4ab337705797415786b)), closes [#8970](https://github.com/typeorm/typeorm/issues/8970) -* resolve issues with new synonymous for GeometryCollection type in MySQL 8 ([#8927](https://github.com/typeorm/typeorm/issues/8927)) ([5ebc626](https://github.com/typeorm/typeorm/commit/5ebc626d29af8c343cee445153377d10d92e309f)) -* sqlite temporary tables now honor withoutRowid ([#8431](https://github.com/typeorm/typeorm/issues/8431)) ([b8d04dc](https://github.com/typeorm/typeorm/commit/b8d04dc3f9aef0658b72d5d438716c1f76420004)), closes [#8430](https://github.com/typeorm/typeorm/issues/8430) -* support async import for DataSource in CLI [#8914](https://github.com/typeorm/typeorm/issues/8914) ([#8917](https://github.com/typeorm/typeorm/issues/8917)) ([15f90e0](https://github.com/typeorm/typeorm/commit/15f90e0be897f5bd2f4dac1d1e8d24f539a842a8)) -* update date utils to parse year correctly for years 1-999 ([#9236](https://github.com/typeorm/typeorm/issues/9236)) ([72a0147](https://github.com/typeorm/typeorm/commit/72a0147f31c14ca27b88af1d69a3a5ab409fec8d)), closes [#9230](https://github.com/typeorm/typeorm/issues/9230) +- allow space and no-space syntaxes for SQLite constraints ([#9238](https://github.com/typeorm/typeorm/issues/9238)) ([bb07244](https://github.com/typeorm/typeorm/commit/bb07244b6188e623a6f8c8407e808d75f94918af)), closes [#9237](https://github.com/typeorm/typeorm/issues/9237) +- allow where IsNull for ManyToOne relations ([#9031](https://github.com/typeorm/typeorm/issues/9031)) ([72728f1](https://github.com/typeorm/typeorm/commit/72728f155d2e9d11fd9c2c1fb97c071c3b41ae6b)), closes [#8890](https://github.com/typeorm/typeorm/issues/8890) +- change postgres driver version checking query ([#9319](https://github.com/typeorm/typeorm/issues/9319)) ([c4f4650](https://github.com/typeorm/typeorm/commit/c4f46506d87009a589a7adf9b9367be06c92042c)), closes [#9318](https://github.com/typeorm/typeorm/issues/9318) [#9318](https://github.com/typeorm/typeorm/issues/9318) +- don't use temporary table name to create foreign key, unique, check constraint with SQLite ([#9185](https://github.com/typeorm/typeorm/issues/9185)) ([e519910](https://github.com/typeorm/typeorm/commit/e51991076dbed4ed06f3cd008eac8029a01c78d2)), closes [#9176](https://github.com/typeorm/typeorm/issues/9176) +- dropIndex now works when providing a tableIndex without name ([#8937](https://github.com/typeorm/typeorm/issues/8937)) ([de8aaac](https://github.com/typeorm/typeorm/commit/de8aaac54c72f098a50362430ca160ab1c672597)) +- entity manager remove using entity schemas ([#9221](https://github.com/typeorm/typeorm/issues/9221)) ([f045536](https://github.com/typeorm/typeorm/commit/f045536f2449f7adcbc346a94dcf30573c76e56b)) +- find query mongodb properly with @DeleteDateColumn() ([#9262](https://github.com/typeorm/typeorm/issues/9262)) ([e49d0c8](https://github.com/typeorm/typeorm/commit/e49d0c8740b9dec45448131edc012a920e6fcea2)) +- handle inherited relations insert order ([#9242](https://github.com/typeorm/typeorm/issues/9242)) ([14dfadb](https://github.com/typeorm/typeorm/commit/14dfadbde94f4f87678e155394ca9334af7bfa32)), closes [#9241](https://github.com/typeorm/typeorm/issues/9241) +- handle inherited relations insert order ([#9321](https://github.com/typeorm/typeorm/issues/9321)) ([3671887](https://github.com/typeorm/typeorm/commit/36718876f9289175452ca93d4c0b70393b3324ed)), closes [#9242](https://github.com/typeorm/typeorm/issues/9242) [#9241](https://github.com/typeorm/typeorm/issues/9241) +- pass error to pgpool release ([#9209](https://github.com/typeorm/typeorm/issues/9209)) ([eb8f0c6](https://github.com/typeorm/typeorm/commit/eb8f0c6c0442aa7a74c6581344fa64be5637538c)), closes [#7792](https://github.com/typeorm/typeorm/issues/7792) [#5112](https://github.com/typeorm/typeorm/issues/5112) +- QueryBuilder update handles Date objects wrong on a ManyToOne relationship ([#8748](https://github.com/typeorm/typeorm/issues/8748)) ([88d0ced](https://github.com/typeorm/typeorm/commit/88d0ced812c9e05ef088dfd5ebaab003eb1811b4)), closes [#8747](https://github.com/typeorm/typeorm/issues/8747) +- resolve FindOptionsOrder.nulls to allow FIRST/LAST in uppercase ([#8978](https://github.com/typeorm/typeorm/issues/8978)) ([5e5abbd](https://github.com/typeorm/typeorm/commit/5e5abbd14854a431db06d4ab337705797415786b)), closes [#8970](https://github.com/typeorm/typeorm/issues/8970) +- resolve issues with new synonymous for GeometryCollection type in MySQL 8 ([#8927](https://github.com/typeorm/typeorm/issues/8927)) ([5ebc626](https://github.com/typeorm/typeorm/commit/5ebc626d29af8c343cee445153377d10d92e309f)) +- sqlite temporary tables now honor withoutRowid ([#8431](https://github.com/typeorm/typeorm/issues/8431)) ([b8d04dc](https://github.com/typeorm/typeorm/commit/b8d04dc3f9aef0658b72d5d438716c1f76420004)), closes [#8430](https://github.com/typeorm/typeorm/issues/8430) +- support async import for DataSource in CLI [#8914](https://github.com/typeorm/typeorm/issues/8914) ([#8917](https://github.com/typeorm/typeorm/issues/8917)) ([15f90e0](https://github.com/typeorm/typeorm/commit/15f90e0be897f5bd2f4dac1d1e8d24f539a842a8)) +- update date utils to parse year correctly for years 1-999 ([#9236](https://github.com/typeorm/typeorm/issues/9236)) ([72a0147](https://github.com/typeorm/typeorm/commit/72a0147f31c14ca27b88af1d69a3a5ab409fec8d)), closes [#9230](https://github.com/typeorm/typeorm/issues/9230) ### Features -* add fake migrations running and reverting ([#8976](https://github.com/typeorm/typeorm/issues/8976)) ([340ab67](https://github.com/typeorm/typeorm/commit/340ab67b1013781184ab74bc8c8f72d76be2c927)), closes [#6195](https://github.com/typeorm/typeorm/issues/6195) -* add setOnLocked for SKIP LOCKED and NOWAIT ([#9317](https://github.com/typeorm/typeorm/issues/9317)) ([68e8f22](https://github.com/typeorm/typeorm/commit/68e8f2289487ad21c18fb7b93754788a02199ee4)) -* add support for non-generated columns with uuid_generate_v4() default ([#9065](https://github.com/typeorm/typeorm/issues/9065)) ([dadb658](https://github.com/typeorm/typeorm/commit/dadb658c59645effaacf4e737e4401cc66b1099d)), closes [#9063](https://github.com/typeorm/typeorm/issues/9063) -* new mssql option appName ([#9213](https://github.com/typeorm/typeorm/issues/9213)) ([51a0ebe](https://github.com/typeorm/typeorm/commit/51a0ebe5f296db8251b037928021715404eeabda)) +- add fake migrations running and reverting ([#8976](https://github.com/typeorm/typeorm/issues/8976)) ([340ab67](https://github.com/typeorm/typeorm/commit/340ab67b1013781184ab74bc8c8f72d76be2c927)), closes [#6195](https://github.com/typeorm/typeorm/issues/6195) +- add setOnLocked for SKIP LOCKED and NOWAIT ([#9317](https://github.com/typeorm/typeorm/issues/9317)) ([68e8f22](https://github.com/typeorm/typeorm/commit/68e8f2289487ad21c18fb7b93754788a02199ee4)) +- add support for non-generated columns with uuid_generate_v4() default ([#9065](https://github.com/typeorm/typeorm/issues/9065)) ([dadb658](https://github.com/typeorm/typeorm/commit/dadb658c59645effaacf4e737e4401cc66b1099d)), closes [#9063](https://github.com/typeorm/typeorm/issues/9063) +- new mssql option appName ([#9213](https://github.com/typeorm/typeorm/issues/9213)) ([51a0ebe](https://github.com/typeorm/typeorm/commit/51a0ebe5f296db8251b037928021715404eeabda)) ## [0.3.7](https://github.com/typeorm/typeorm/compare/0.3.6...0.3.7) (2022-06-29) ### Bug Fixes -* add missing `enumName` support for EntitySchema ([#9024](https://github.com/typeorm/typeorm/issues/9024)) ([676fd1b](https://github.com/typeorm/typeorm/commit/676fd1bf772db535bd2c084ebadd9f5c0661ca5e)) -* add missing connect call on RedisQueryResultCache connect ([#8894](https://github.com/typeorm/typeorm/issues/8894)) ([7dfb69f](https://github.com/typeorm/typeorm/commit/7dfb69f3664458d6f9f299f5bdbce4bed0b7994f)) -* add SET TRANSACTION AUTOCOMMIT DDL statements (SAP HANA) ([#9020](https://github.com/typeorm/typeorm/issues/9020)) ([cac648e](https://github.com/typeorm/typeorm/commit/cac648e633e0011d42a8a0c4ebcf900f6675d645)) -* call dataSource.destroy() only on initialized dataSource in CLI commands ([#9146](https://github.com/typeorm/typeorm/issues/9146)) ([a100a7a](https://github.com/typeorm/typeorm/commit/a100a7a7f1c17432549e5e93fb141d0f52062213)) -* expo infinite loop on SAVEPOINT ([#8984](https://github.com/typeorm/typeorm/issues/8984)) ([ec23922](https://github.com/typeorm/typeorm/commit/ec23922da745fde7c1e7e353777327f40fbaca28)) -* fixes recursive document to entity attributes mapping ([#9050](https://github.com/typeorm/typeorm/issues/9050)) ([40155d6](https://github.com/typeorm/typeorm/commit/40155d6ceed1f33f26da548681644c17625605e7)), closes [#9049](https://github.com/typeorm/typeorm/issues/9049) -* log command error prior to calling destroy ([#9135](https://github.com/typeorm/typeorm/issues/9135)) ([bf17381](https://github.com/typeorm/typeorm/commit/bf17381fd2f949b36394b3cfa0199831d41f67dc)) -* make soft-remove and recover events importable from index ([#9110](https://github.com/typeorm/typeorm/issues/9110)) ([e296126](https://github.com/typeorm/typeorm/commit/e2961263e07ee058d5b1c3706cea21b3ae24d776)), closes [#9108](https://github.com/typeorm/typeorm/issues/9108) -* migration successful now displays name of the migration file ([#8904](https://github.com/typeorm/typeorm/issues/8904)) ([49cbe23](https://github.com/typeorm/typeorm/commit/49cbe232776a5cbe4369a5fed08221dcff8d59e2)) -* release newly created runner when no runner provided in DbQueryResultCache ([#8969](https://github.com/typeorm/typeorm/issues/8969)) ([ec05f1d](https://github.com/typeorm/typeorm/commit/ec05f1d58a08b3cdb72243856a186fef738a236e)), closes [#4866](https://github.com/typeorm/typeorm/issues/4866) -* resolve cli init peer dependency issues ([#8977](https://github.com/typeorm/typeorm/issues/8977)) ([f7578d4](https://github.com/typeorm/typeorm/commit/f7578d48ef160634744b591636b903728ea79120)), closes [#8975](https://github.com/typeorm/typeorm/issues/8975) -* resolve ESM module declaration file correctly ([#9097](https://github.com/typeorm/typeorm/issues/9097)) ([506133e](https://github.com/typeorm/typeorm/commit/506133e2179529bf3add2b0b982613835d321af6)) -* support for TypeScript 4.8 ([#9106](https://github.com/typeorm/typeorm/issues/9106)) ([d924b70](https://github.com/typeorm/typeorm/commit/d924b705e5ea4ff57c853e8848eeb1f3b90c0a71)), closes [/github.com/microsoft/TypeScript/issues/49461#issuecomment-1154443477](https://github.com//github.com/microsoft/TypeScript/issues/49461/issues/issuecomment-1154443477) -* update mssql peerDependency ([#8887](https://github.com/typeorm/typeorm/issues/8887)) ([9adab34](https://github.com/typeorm/typeorm/commit/9adab34e5d8744c134690f855111d21f5d29cf12)) -* wrong entity transform of relation id when referenced column is a primary key ([#8959](https://github.com/typeorm/typeorm/issues/8959)) ([6e888dd](https://github.com/typeorm/typeorm/commit/6e888dd0a13110f386ed538161740ae059491b91)) +- add missing `enumName` support for EntitySchema ([#9024](https://github.com/typeorm/typeorm/issues/9024)) ([676fd1b](https://github.com/typeorm/typeorm/commit/676fd1bf772db535bd2c084ebadd9f5c0661ca5e)) +- add missing connect call on RedisQueryResultCache connect ([#8894](https://github.com/typeorm/typeorm/issues/8894)) ([7dfb69f](https://github.com/typeorm/typeorm/commit/7dfb69f3664458d6f9f299f5bdbce4bed0b7994f)) +- add SET TRANSACTION AUTOCOMMIT DDL statements (SAP HANA) ([#9020](https://github.com/typeorm/typeorm/issues/9020)) ([cac648e](https://github.com/typeorm/typeorm/commit/cac648e633e0011d42a8a0c4ebcf900f6675d645)) +- call dataSource.destroy() only on initialized dataSource in CLI commands ([#9146](https://github.com/typeorm/typeorm/issues/9146)) ([a100a7a](https://github.com/typeorm/typeorm/commit/a100a7a7f1c17432549e5e93fb141d0f52062213)) +- expo infinite loop on SAVEPOINT ([#8984](https://github.com/typeorm/typeorm/issues/8984)) ([ec23922](https://github.com/typeorm/typeorm/commit/ec23922da745fde7c1e7e353777327f40fbaca28)) +- fixes recursive document to entity attributes mapping ([#9050](https://github.com/typeorm/typeorm/issues/9050)) ([40155d6](https://github.com/typeorm/typeorm/commit/40155d6ceed1f33f26da548681644c17625605e7)), closes [#9049](https://github.com/typeorm/typeorm/issues/9049) +- log command error prior to calling destroy ([#9135](https://github.com/typeorm/typeorm/issues/9135)) ([bf17381](https://github.com/typeorm/typeorm/commit/bf17381fd2f949b36394b3cfa0199831d41f67dc)) +- make soft-remove and recover events importable from index ([#9110](https://github.com/typeorm/typeorm/issues/9110)) ([e296126](https://github.com/typeorm/typeorm/commit/e2961263e07ee058d5b1c3706cea21b3ae24d776)), closes [#9108](https://github.com/typeorm/typeorm/issues/9108) +- migration successful now displays name of the migration file ([#8904](https://github.com/typeorm/typeorm/issues/8904)) ([49cbe23](https://github.com/typeorm/typeorm/commit/49cbe232776a5cbe4369a5fed08221dcff8d59e2)) +- release newly created runner when no runner provided in DbQueryResultCache ([#8969](https://github.com/typeorm/typeorm/issues/8969)) ([ec05f1d](https://github.com/typeorm/typeorm/commit/ec05f1d58a08b3cdb72243856a186fef738a236e)), closes [#4866](https://github.com/typeorm/typeorm/issues/4866) +- resolve cli init peer dependency issues ([#8977](https://github.com/typeorm/typeorm/issues/8977)) ([f7578d4](https://github.com/typeorm/typeorm/commit/f7578d48ef160634744b591636b903728ea79120)), closes [#8975](https://github.com/typeorm/typeorm/issues/8975) +- resolve ESM module declaration file correctly ([#9097](https://github.com/typeorm/typeorm/issues/9097)) ([506133e](https://github.com/typeorm/typeorm/commit/506133e2179529bf3add2b0b982613835d321af6)) +- support for TypeScript 4.8 ([#9106](https://github.com/typeorm/typeorm/issues/9106)) ([d924b70](https://github.com/typeorm/typeorm/commit/d924b705e5ea4ff57c853e8848eeb1f3b90c0a71)), closes [/github.com/microsoft/TypeScript/issues/49461#issuecomment-1154443477](https://github.com//github.com/microsoft/TypeScript/issues/49461/issues/issuecomment-1154443477) +- update mssql peerDependency ([#8887](https://github.com/typeorm/typeorm/issues/8887)) ([9adab34](https://github.com/typeorm/typeorm/commit/9adab34e5d8744c134690f855111d21f5d29cf12)) +- wrong entity transform of relation id when referenced column is a primary key ([#8959](https://github.com/typeorm/typeorm/issues/8959)) ([6e888dd](https://github.com/typeorm/typeorm/commit/6e888dd0a13110f386ed538161740ae059491b91)) ### Features -* add `for_key_share` ("FOR KEY SHARE") lock mode for postgres driver ([#8879](https://github.com/typeorm/typeorm/issues/8879)) ([4687be8](https://github.com/typeorm/typeorm/commit/4687be8b77b0f807b2fe4b1e2278e05d0dbd4431)), closes [#8878](https://github.com/typeorm/typeorm/issues/8878) -* add nativeBinding option to better-sqlite3 driver ([#9157](https://github.com/typeorm/typeorm/issues/9157)) ([bcdddc3](https://github.com/typeorm/typeorm/commit/bcdddc32bddeb3d141c03372971ee27d743b9ab8)) -* add spanner as a db option for the init command ([#9121](https://github.com/typeorm/typeorm/issues/9121)) ([e61cade](https://github.com/typeorm/typeorm/commit/e61cade32fbcd491e4d8e27aea7b35b5a946c879)) -* allow explicitly named primary keys, foreign keys, and indices ([#8900](https://github.com/typeorm/typeorm/issues/8900)) ([78df84c](https://github.com/typeorm/typeorm/commit/78df84c732ce085caf4b5ccf37477ef93b38f4d0)), closes [#1355](https://github.com/typeorm/typeorm/issues/1355) -* Cloud Spanner support ([#8730](https://github.com/typeorm/typeorm/issues/8730)) ([62518ae](https://github.com/typeorm/typeorm/commit/62518ae1226f22b2f230afa615532c92f1544f01)) -* fix issues with generated columns and add support in other drivers ([#8806](https://github.com/typeorm/typeorm/issues/8806)) ([0418ebc](https://github.com/typeorm/typeorm/commit/0418ebcaf6835dfffe3c3db1f66d20bfe3e5b09d)), closes [#8761](https://github.com/typeorm/typeorm/issues/8761) -* implement support for relationids in entity schemas ([#9129](https://github.com/typeorm/typeorm/issues/9129)) ([e24cced](https://github.com/typeorm/typeorm/commit/e24cced8f63206a607deff6445cfcccf63c3a0c8)) -* support TS 4.7+ node16/nodenext module mode ([#9043](https://github.com/typeorm/typeorm/issues/9043)) ([862a402](https://github.com/typeorm/typeorm/commit/862a4027af14e5c3632c2a76c44b62ef0277338a)) -* upgrade ioredis to v5 ([#8997](https://github.com/typeorm/typeorm/issues/8997)) ([723f1e5](https://github.com/typeorm/typeorm/commit/723f1e514bf261bc1539bdaf86fd0a72a1e42a46)) +- add `for_key_share` ("FOR KEY SHARE") lock mode for postgres driver ([#8879](https://github.com/typeorm/typeorm/issues/8879)) ([4687be8](https://github.com/typeorm/typeorm/commit/4687be8b77b0f807b2fe4b1e2278e05d0dbd4431)), closes [#8878](https://github.com/typeorm/typeorm/issues/8878) +- add nativeBinding option to better-sqlite3 driver ([#9157](https://github.com/typeorm/typeorm/issues/9157)) ([bcdddc3](https://github.com/typeorm/typeorm/commit/bcdddc32bddeb3d141c03372971ee27d743b9ab8)) +- add spanner as a db option for the init command ([#9121](https://github.com/typeorm/typeorm/issues/9121)) ([e61cade](https://github.com/typeorm/typeorm/commit/e61cade32fbcd491e4d8e27aea7b35b5a946c879)) +- allow explicitly named primary keys, foreign keys, and indices ([#8900](https://github.com/typeorm/typeorm/issues/8900)) ([78df84c](https://github.com/typeorm/typeorm/commit/78df84c732ce085caf4b5ccf37477ef93b38f4d0)), closes [#1355](https://github.com/typeorm/typeorm/issues/1355) +- Cloud Spanner support ([#8730](https://github.com/typeorm/typeorm/issues/8730)) ([62518ae](https://github.com/typeorm/typeorm/commit/62518ae1226f22b2f230afa615532c92f1544f01)) +- fix issues with generated columns and add support in other drivers ([#8806](https://github.com/typeorm/typeorm/issues/8806)) ([0418ebc](https://github.com/typeorm/typeorm/commit/0418ebcaf6835dfffe3c3db1f66d20bfe3e5b09d)), closes [#8761](https://github.com/typeorm/typeorm/issues/8761) +- implement support for relationids in entity schemas ([#9129](https://github.com/typeorm/typeorm/issues/9129)) ([e24cced](https://github.com/typeorm/typeorm/commit/e24cced8f63206a607deff6445cfcccf63c3a0c8)) +- support TS 4.7+ node16/nodenext module mode ([#9043](https://github.com/typeorm/typeorm/issues/9043)) ([862a402](https://github.com/typeorm/typeorm/commit/862a4027af14e5c3632c2a76c44b62ef0277338a)) +- upgrade ioredis to v5 ([#8997](https://github.com/typeorm/typeorm/issues/8997)) ([723f1e5](https://github.com/typeorm/typeorm/commit/723f1e514bf261bc1539bdaf86fd0a72a1e42a46)) ### Performance Improvements -* don't recompile escapeRegExp for every query ([#8956](https://github.com/typeorm/typeorm/issues/8956)) ([189592c](https://github.com/typeorm/typeorm/commit/189592c77980e766f92f6eb77dbd7412db106086)), closes [#8955](https://github.com/typeorm/typeorm/issues/8955) -* partially lift matching from regexp to js ([#9032](https://github.com/typeorm/typeorm/issues/9032)) ([bbdc20f](https://github.com/typeorm/typeorm/commit/bbdc20f8cafc63e768f248213eafe65f163cb6e5)), closes [#3857](https://github.com/typeorm/typeorm/issues/3857) [#8955](https://github.com/typeorm/typeorm/issues/8955) [#8956](https://github.com/typeorm/typeorm/issues/8956) [/github.com/typeorm/typeorm/issues/3857#issuecomment-699505893](https://github.com//github.com/typeorm/typeorm/issues/3857/issues/issuecomment-699505893) +- don't recompile escapeRegExp for every query ([#8956](https://github.com/typeorm/typeorm/issues/8956)) ([189592c](https://github.com/typeorm/typeorm/commit/189592c77980e766f92f6eb77dbd7412db106086)), closes [#8955](https://github.com/typeorm/typeorm/issues/8955) +- partially lift matching from regexp to js ([#9032](https://github.com/typeorm/typeorm/issues/9032)) ([bbdc20f](https://github.com/typeorm/typeorm/commit/bbdc20f8cafc63e768f248213eafe65f163cb6e5)), closes [#3857](https://github.com/typeorm/typeorm/issues/3857) [#8955](https://github.com/typeorm/typeorm/issues/8955) [#8956](https://github.com/typeorm/typeorm/issues/8956) [/github.com/typeorm/typeorm/issues/3857#issuecomment-699505893](https://github.com//github.com/typeorm/typeorm/issues/3857/issues/issuecomment-699505893) ## [0.3.6](https://github.com/typeorm/typeorm/compare/0.3.5...0.3.6) (2022-04-12) ### Features -* add `for_key_share` ("FOR KEY SHARE") lock mode for postgres driver ([#8879](https://github.com/typeorm/typeorm/issues/8879)) ([4687be8](https://github.com/typeorm/typeorm/commit/4687be8b77b0f807b2fe4b1e2278e05d0dbd4431)), closes [#8878](https://github.com/typeorm/typeorm/issues/8878) -* new driver: Cloud Spanner ([#8730](https://github.com/typeorm/typeorm/issues/8730)) ([62518ae](https://github.com/typeorm/typeorm/commit/62518ae1226f22b2f230afa615532c92f1544f01)) +- add `for_key_share` ("FOR KEY SHARE") lock mode for postgres driver ([#8879](https://github.com/typeorm/typeorm/issues/8879)) ([4687be8](https://github.com/typeorm/typeorm/commit/4687be8b77b0f807b2fe4b1e2278e05d0dbd4431)), closes [#8878](https://github.com/typeorm/typeorm/issues/8878) +- new driver: Cloud Spanner ([#8730](https://github.com/typeorm/typeorm/issues/8730)) ([62518ae](https://github.com/typeorm/typeorm/commit/62518ae1226f22b2f230afa615532c92f1544f01)) ## [0.3.5](https://github.com/typeorm/typeorm/compare/0.3.4...0.3.5) (2022-04-05) ### Bug Fixes -* `.save` repository method not returning generated uuids for aurora-postgres ([#8825](https://github.com/typeorm/typeorm/issues/8825)) ([ed06f4c](https://github.com/typeorm/typeorm/commit/ed06f4c1f1056837f03a97a25762742a12620a94)) -* allow hstore type to use transformers in driver postgres ([#8823](https://github.com/typeorm/typeorm/issues/8823)) ([b1a0107](https://github.com/typeorm/typeorm/commit/b1a01074c99b1fee9b2da2c056f5f773367d391b)) -* broken shebang parameters of `cli-ts-node-commonjs` and `cli-ts-node-esm` on some linux distros ([#8821](https://github.com/typeorm/typeorm/issues/8821)) ([c5dfc11](https://github.com/typeorm/typeorm/commit/c5dfc11ea7b8b33aa9e621b64b953c1d62a27989)), closes [#8818](https://github.com/typeorm/typeorm/issues/8818) -* find select object api should support false values [#8796](https://github.com/typeorm/typeorm/issues/8796) ([#8807](https://github.com/typeorm/typeorm/issues/8807)) ([9ac8e9e](https://github.com/typeorm/typeorm/commit/9ac8e9ed0da0ac5bba71b76ee99d6f0c4eb0871f)) -* resolve missing ConnectionOptions export in index.ts ([#8850](https://github.com/typeorm/typeorm/issues/8850)) ([1693a17](https://github.com/typeorm/typeorm/commit/1693a17011195c353e5bc1d93d9c26ac48624a0b)), closes [#8837](https://github.com/typeorm/typeorm/issues/8837) -* save correct discriminator with STI ([#8819](https://github.com/typeorm/typeorm/issues/8819)) ([9d1e246](https://github.com/typeorm/typeorm/commit/9d1e2460edae9c01f6a56c727f0321b265f78d89)), closes [#2927](https://github.com/typeorm/typeorm/issues/2927) -* Update DeepPartial for usage of generics with Repository class ([#8817](https://github.com/typeorm/typeorm/issues/8817)) ([8ba742e](https://github.com/typeorm/typeorm/commit/8ba742eb36586a21a918ed178208874a53ace3f9)) -* fixed issue with `typeorm init` command ([#8820](https://github.com/typeorm/typeorm/issues/8820)) +- `.save` repository method not returning generated uuids for aurora-postgres ([#8825](https://github.com/typeorm/typeorm/issues/8825)) ([ed06f4c](https://github.com/typeorm/typeorm/commit/ed06f4c1f1056837f03a97a25762742a12620a94)) +- allow hstore type to use transformers in driver postgres ([#8823](https://github.com/typeorm/typeorm/issues/8823)) ([b1a0107](https://github.com/typeorm/typeorm/commit/b1a01074c99b1fee9b2da2c056f5f773367d391b)) +- broken shebang parameters of `cli-ts-node-commonjs` and `cli-ts-node-esm` on some linux distros ([#8821](https://github.com/typeorm/typeorm/issues/8821)) ([c5dfc11](https://github.com/typeorm/typeorm/commit/c5dfc11ea7b8b33aa9e621b64b953c1d62a27989)), closes [#8818](https://github.com/typeorm/typeorm/issues/8818) +- find select object api should support false values [#8796](https://github.com/typeorm/typeorm/issues/8796) ([#8807](https://github.com/typeorm/typeorm/issues/8807)) ([9ac8e9e](https://github.com/typeorm/typeorm/commit/9ac8e9ed0da0ac5bba71b76ee99d6f0c4eb0871f)) +- resolve missing ConnectionOptions export in index.ts ([#8850](https://github.com/typeorm/typeorm/issues/8850)) ([1693a17](https://github.com/typeorm/typeorm/commit/1693a17011195c353e5bc1d93d9c26ac48624a0b)), closes [#8837](https://github.com/typeorm/typeorm/issues/8837) +- save correct discriminator with STI ([#8819](https://github.com/typeorm/typeorm/issues/8819)) ([9d1e246](https://github.com/typeorm/typeorm/commit/9d1e2460edae9c01f6a56c727f0321b265f78d89)), closes [#2927](https://github.com/typeorm/typeorm/issues/2927) +- Update DeepPartial for usage of generics with Repository class ([#8817](https://github.com/typeorm/typeorm/issues/8817)) ([8ba742e](https://github.com/typeorm/typeorm/commit/8ba742eb36586a21a918ed178208874a53ace3f9)) +- fixed issue with `typeorm init` command ([#8820](https://github.com/typeorm/typeorm/issues/8820)) ## [0.3.4](https://github.com/typeorm/typeorm/compare/0.3.3...0.3.4) (2022-03-26) ### Bug Fixes -* BaseEntity.reload method regression and made `findOne` to throw error on missing conditions in runtime ([#8801](https://github.com/typeorm/typeorm/issues/8801)) ([ee8c1ec](https://github.com/typeorm/typeorm/commit/ee8c1ecbc210adcc685d6156a941004b9d724227)) -* improve DeepPartial recursion ([#8732](https://github.com/typeorm/typeorm/issues/8732)) ([0494008](https://github.com/typeorm/typeorm/commit/0494008b703240bf593c6f8f2c601cb0d6761805)), closes [#8681](https://github.com/typeorm/typeorm/issues/8681) -* missing timestamp in created migrations filenames ([#8802](https://github.com/typeorm/typeorm/issues/8802)) ([ceee439](https://github.com/typeorm/typeorm/commit/ceee4396d31da1a7dde53cb50689f53659c8a4b1)) -* PoolConnection leaked by MysqlDriver ([#8803](https://github.com/typeorm/typeorm/issues/8803)) ([d2cfd22](https://github.com/typeorm/typeorm/commit/d2cfd224cacb5db9761aa9679764d699b8abbc65)) -* remove console.log calls from SelectQueryBuilder ([#8795](https://github.com/typeorm/typeorm/issues/8795)) ([54c7db4](https://github.com/typeorm/typeorm/commit/54c7db49355bb09514b6e977d1d7235c02557a0b)), closes [#8792](https://github.com/typeorm/typeorm/issues/8792) -* stop crashing when redis is offline and ignoreErrors on cache options is set ([#8725](https://github.com/typeorm/typeorm/issues/8725)) ([edc39d1](https://github.com/typeorm/typeorm/commit/edc39d14a97d90c534b56693b988a0ad139e69fd)) +- BaseEntity.reload method regression and made `findOne` to throw error on missing conditions in runtime ([#8801](https://github.com/typeorm/typeorm/issues/8801)) ([ee8c1ec](https://github.com/typeorm/typeorm/commit/ee8c1ecbc210adcc685d6156a941004b9d724227)) +- improve DeepPartial recursion ([#8732](https://github.com/typeorm/typeorm/issues/8732)) ([0494008](https://github.com/typeorm/typeorm/commit/0494008b703240bf593c6f8f2c601cb0d6761805)), closes [#8681](https://github.com/typeorm/typeorm/issues/8681) +- missing timestamp in created migrations filenames ([#8802](https://github.com/typeorm/typeorm/issues/8802)) ([ceee439](https://github.com/typeorm/typeorm/commit/ceee4396d31da1a7dde53cb50689f53659c8a4b1)) +- PoolConnection leaked by MysqlDriver ([#8803](https://github.com/typeorm/typeorm/issues/8803)) ([d2cfd22](https://github.com/typeorm/typeorm/commit/d2cfd224cacb5db9761aa9679764d699b8abbc65)) +- remove console.log calls from SelectQueryBuilder ([#8795](https://github.com/typeorm/typeorm/issues/8795)) ([54c7db4](https://github.com/typeorm/typeorm/commit/54c7db49355bb09514b6e977d1d7235c02557a0b)), closes [#8792](https://github.com/typeorm/typeorm/issues/8792) +- stop crashing when redis is offline and ignoreErrors on cache options is set ([#8725](https://github.com/typeorm/typeorm/issues/8725)) ([edc39d1](https://github.com/typeorm/typeorm/commit/edc39d14a97d90c534b56693b988a0ad139e69fd)) ### Features -* add support for insert with alias ([#4003](https://github.com/typeorm/typeorm/issues/4003)) ([#8791](https://github.com/typeorm/typeorm/issues/8791)) ([4b37030](https://github.com/typeorm/typeorm/commit/4b37030fc02878a27b0d57d4217b2efab49999af)) -* applicationName parameter for CockroachDB ([#8800](https://github.com/typeorm/typeorm/issues/8800)) ([79b7f5c](https://github.com/typeorm/typeorm/commit/79b7f5c22840992e205d61f6433916aaf80ea647)) - +- add support for insert with alias ([#4003](https://github.com/typeorm/typeorm/issues/4003)) ([#8791](https://github.com/typeorm/typeorm/issues/8791)) ([4b37030](https://github.com/typeorm/typeorm/commit/4b37030fc02878a27b0d57d4217b2efab49999af)) +- applicationName parameter for CockroachDB ([#8800](https://github.com/typeorm/typeorm/issues/8800)) ([79b7f5c](https://github.com/typeorm/typeorm/commit/79b7f5c22840992e205d61f6433916aaf80ea647)) ## [0.3.3](https://github.com/typeorm/typeorm/compare/0.3.2...0.3.3) (2022-03-23) ### Bug Fixes -* improve initialization of custom repository ([#8782](https://github.com/typeorm/typeorm/issues/8782)) ([52a641c](https://github.com/typeorm/typeorm/commit/52a641ca7ce8e4b168155b5043d1e9289c694fc7)) -* resolve entities correctly in datasource when globs are specified ([#8778](https://github.com/typeorm/typeorm/issues/8778)) ([a641c5d](https://github.com/typeorm/typeorm/commit/a641c5dff86df683b84e14873e88011013258f87)) +- improve initialization of custom repository ([#8782](https://github.com/typeorm/typeorm/issues/8782)) ([52a641c](https://github.com/typeorm/typeorm/commit/52a641ca7ce8e4b168155b5043d1e9289c694fc7)) +- resolve entities correctly in datasource when globs are specified ([#8778](https://github.com/typeorm/typeorm/issues/8778)) ([a641c5d](https://github.com/typeorm/typeorm/commit/a641c5dff86df683b84e14873e88011013258f87)) ### Features -* support for Common Table Expressions ([#8534](https://github.com/typeorm/typeorm/issues/8534)) ([7cc1848](https://github.com/typeorm/typeorm/commit/7cc1848fd4a44aefa986026ee659ed872ea6ab8f)), closes [#1116](https://github.com/typeorm/typeorm/issues/1116) [#5899](https://github.com/typeorm/typeorm/issues/5899) [#4753](https://github.com/typeorm/typeorm/issues/4753) - +- support for Common Table Expressions ([#8534](https://github.com/typeorm/typeorm/issues/8534)) ([7cc1848](https://github.com/typeorm/typeorm/commit/7cc1848fd4a44aefa986026ee659ed872ea6ab8f)), closes [#1116](https://github.com/typeorm/typeorm/issues/1116) [#5899](https://github.com/typeorm/typeorm/issues/5899) [#4753](https://github.com/typeorm/typeorm/issues/4753) ## [0.3.2](https://github.com/typeorm/typeorm/compare/0.3.1...0.3.2) (2022-03-22) ### Bug Fixes -* broken CLI in ESM projects since version 0.3.0 ([#8773](https://github.com/typeorm/typeorm/issues/8773)) ([97699e8](https://github.com/typeorm/typeorm/commit/97699e816e03867efe595f620ceb152af91f9f56)) +- broken CLI in ESM projects since version 0.3.0 ([#8773](https://github.com/typeorm/typeorm/issues/8773)) ([97699e8](https://github.com/typeorm/typeorm/commit/97699e816e03867efe595f620ceb152af91f9f56)) ### Features -* add typeorm CLI variations that include `ts-node` ([#8776](https://github.com/typeorm/typeorm/issues/8776)) ([05fc744](https://github.com/typeorm/typeorm/commit/05fc74446988d100052f46e2dbf61c6cc2999b99)) -* allows user to specify which mysql package should be used ([#8771](https://github.com/typeorm/typeorm/issues/8771)) ([35106df](https://github.com/typeorm/typeorm/commit/35106dfe78a92783abca7d06307ab9106ae536bc)) +- add typeorm CLI variations that include `ts-node` ([#8776](https://github.com/typeorm/typeorm/issues/8776)) ([05fc744](https://github.com/typeorm/typeorm/commit/05fc74446988d100052f46e2dbf61c6cc2999b99)) +- allows user to specify which mysql package should be used ([#8771](https://github.com/typeorm/typeorm/issues/8771)) ([35106df](https://github.com/typeorm/typeorm/commit/35106dfe78a92783abca7d06307ab9106ae536bc)) ### Reverts -* json/jsonb change introduced in 0.3.1 ([#8777](https://github.com/typeorm/typeorm/issues/8777)) ([edf27d9](https://github.com/typeorm/typeorm/commit/edf27d97a30d1aaf28e5c7a7aab96d16152e4983)) - +- json/jsonb change introduced in 0.3.1 ([#8777](https://github.com/typeorm/typeorm/issues/8777)) ([edf27d9](https://github.com/typeorm/typeorm/commit/edf27d97a30d1aaf28e5c7a7aab96d16152e4983)) ## [0.3.1](https://github.com/typeorm/typeorm/compare/0.3.0...0.3.1) (2022-03-21) ### Bug Fixes -* bugfixes introduced in 0.3.0 ([#8764](https://github.com/typeorm/typeorm/issues/8764)) ([d61f857](https://github.com/typeorm/typeorm/commit/d61f857ce9447a25d074810759fd5c4aad9a08e3)), closes [#8762](https://github.com/typeorm/typeorm/issues/8762) [#8759](https://github.com/typeorm/typeorm/issues/8759) [#8758](https://github.com/typeorm/typeorm/issues/8758) [#8757](https://github.com/typeorm/typeorm/issues/8757) +- bugfixes introduced in 0.3.0 ([#8764](https://github.com/typeorm/typeorm/issues/8764)) ([d61f857](https://github.com/typeorm/typeorm/commit/d61f857ce9447a25d074810759fd5c4aad9a08e3)), closes [#8762](https://github.com/typeorm/typeorm/issues/8762) [#8759](https://github.com/typeorm/typeorm/issues/8759) [#8758](https://github.com/typeorm/typeorm/issues/8758) [#8757](https://github.com/typeorm/typeorm/issues/8757) ### Features -* new array find operators (`ArrayContains`, `ArrayContainedBy`, `ArrayOverlap`) ([#8766](https://github.com/typeorm/typeorm/issues/8766)) ([9f1b8e3](https://github.com/typeorm/typeorm/commit/9f1b8e3425739a871c2d0ad84ddd6e7456117f7f)): +- new array find operators (`ArrayContains`, `ArrayContainedBy`, `ArrayOverlap`) ([#8766](https://github.com/typeorm/typeorm/issues/8766)) ([9f1b8e3](https://github.com/typeorm/typeorm/commit/9f1b8e3425739a871c2d0ad84ddd6e7456117f7f)): ### BREAKING CHANGES -* we do not call JSON.stringify() to json/jsonb column types in Postgres. Instead, we delegate value directly to underlying pg driver. This is a correct way of handling jsons. -* array: true must be explicitly defined for array json/jsonb values -* strings being JSON-stringified must be manually escaped - +- we do not call JSON.stringify() to json/jsonb column types in Postgres. Instead, we delegate value directly to underlying pg driver. This is a correct way of handling jsons. +- array: true must be explicitly defined for array json/jsonb values +- strings being JSON-stringified must be manually escaped ## [0.3.0](https://github.com/typeorm/typeorm/pull/8616) (2022-03-17) @@ -323,14 +434,14 @@ They were pending their migration from 2018. Finally, they are in the master bra ### Features -* compilation `target` now is `es2020`. This requires Node.JS version `14+` +- compilation `target` now is `es2020`. This requires Node.JS version `14+` -* TypeORM now properly works when installed within different node_modules contexts - (often happen if TypeORM is a dependency of another library or TypeORM is heavily used in monorepo projects) +- TypeORM now properly works when installed within different node_modules contexts + (often happen if TypeORM is a dependency of another library or TypeORM is heavily used in monorepo projects) -* `Connection` was renamed to `DataSource`. - Old `Connection` is still there, but now it's deprecated. It will be completely removed in next version. - New API: +- `Connection` was renamed to `DataSource`. + Old `Connection` is still there, but now it's deprecated. It will be completely removed in next version. + New API: ```ts export const dataSource = new DataSource({ @@ -346,35 +457,35 @@ They all deprecated in favour of new syntax you can see above. New way gives you more flexibility and simplicity in usage. -* new custom repositories syntax: +- new custom repositories syntax: ```ts export const UserRepository = myDataSource.getRepository(UserEntity).extend({ findUsersWithPhotos() { return this.find({ relations: { - photos: true - } + photos: true, + }, }) - } + }, }) ``` Old ways of custom repository creation were dropped. -* added new option on relation load strategy called `relationLoadStrategy`. - Relation load strategy is used on entity load and determines how relations must be loaded when you query entities and their relations from the database. - Used on `find*` methods and `QueryBuilder`. Value can be set to `join` or `query`. +- added new option on relation load strategy called `relationLoadStrategy`. + Relation load strategy is used on entity load and determines how relations must be loaded when you query entities and their relations from the database. + Used on `find*` methods and `QueryBuilder`. Value can be set to `join` or `query`. - * `join` - loads relations using SQL `JOIN` expression - * `query` - executes separate SQL queries for each relation + - `join` - loads relations using SQL `JOIN` expression + - `query` - executes separate SQL queries for each relation Default is `join`, but default can be set in `ConnectionOptions`: ```ts createConnection({ /* ... */ - relationLoadStrategy: "query" + relationLoadStrategy: "query", }) ``` @@ -383,33 +494,31 @@ Also, it can be set per-query in `find*` methods: ```ts userRepository.find({ relations: { - photos: true - } + photos: true, + }, }) ``` And QueryBuilder: ```ts -userRepository - .createQueryBuilder() - .setRelationLoadStrategy("query") +userRepository.createQueryBuilder().setRelationLoadStrategy("query") ``` For queries returning big amount of data, we recommend to use `query` strategy, because it can be a more performant approach to query relations. -* added new `findOneBy`, `findOneByOrFail`, `findBy`, `countBy`, `findAndCountBy` methods to `BaseEntity`, `EntityManager` and `Repository`: +- added new `findOneBy`, `findOneByOrFail`, `findBy`, `countBy`, `findAndCountBy` methods to `BaseEntity`, `EntityManager` and `Repository`: ```ts const users = await userRepository.findBy({ - name: "Michael" + name: "Michael", }) ``` Overall `find*` and `count*` method signatures where changed, read the "breaking changes" section for more info. -* new `select` type signature in `FindOptions` (used in `find*` methods): +- new `select` type signature in `FindOptions` (used in `find*` methods): ```ts userRepository.find({ @@ -417,7 +526,7 @@ userRepository.find({ id: true, firstName: true, lastName: true, - } + }, }) ``` @@ -435,20 +544,20 @@ userRepository.find({ album: { id: true, name: true, - } - } - } + }, + }, + }, }) ``` -* new `relations` type signature in `FindOptions` (used in `find*` methods): +- new `relations` type signature in `FindOptions` (used in `find*` methods): ```ts userRepository.find({ relations: { contacts: true, photos: true, - } + }, }) ``` @@ -461,17 +570,17 @@ userRepository.find({ photos: { album: true, }, - } + }, }) ``` -* new `order` type signature in `FindOptions` (used in `find*` methods): +- new `order` type signature in `FindOptions` (used in `find*` methods): ```ts userRepository.find({ order: { - id: "ASC" - } + id: "ASC", + }, }) ``` @@ -482,58 +591,58 @@ userRepository.find({ order: { photos: { album: { - name: "ASC" + name: "ASC", }, }, - } + }, }) ``` -* new `where` type signature in `FindOptions` (used in `find*` methods) now allows to build nested statements with conditional relations, for example: +- new `where` type signature in `FindOptions` (used in `find*` methods) now allows to build nested statements with conditional relations, for example: ```ts userRepository.find({ where: { photos: { album: { - name: "profile" - } - } - } + name: "profile", + }, + }, + }, }) ``` Gives you users who have photos in their "profile" album. -* `FindOperator`-s can be applied for relations in `where` statement, for example: +- `FindOperator`-s can be applied for relations in `where` statement, for example: ```ts userRepository.find({ where: { photos: MoreThan(10), - } + }, }) ``` Gives you users with more than 10 photos. -* `boolean` can be applied for relations in `where` statement, for example: +- `boolean` can be applied for relations in `where` statement, for example: ```ts userRepository.find({ where: { - photos: true - } + photos: true, + }, }) ``` ### BREAKING CHANGES -* minimal Node.JS version requirement now is `14+` +- minimal Node.JS version requirement now is `14+` -* drop `ormconfig` support. `ormconfig` still works if you use deprecated methods, -however we do not recommend using it anymore, because it's support will be completely dropped in `0.4.0`. -If you want to have your connection options defined in a separate file, you can still do it like this: +- drop `ormconfig` support. `ormconfig` still works if you use deprecated methods, + however we do not recommend using it anymore, because it's support will be completely dropped in `0.4.0`. + If you want to have your connection options defined in a separate file, you can still do it like this: ```ts import ormconfig from "./ormconfig.json" @@ -553,35 +662,35 @@ But we do not recommend use this practice, because from `0.4.0` you'll only be a We won't be supporting all `ormconfig` extensions (e.g. `json`, `js`, `ts`, `yaml`, `xml`, `env`). -* support for previously deprecated `migrations:*` commands was removed. Use `migration:*` commands instead. +- support for previously deprecated `migrations:*` commands was removed. Use `migration:*` commands instead. -* all commands were re-worked. Please refer to new CLI documentation. +- all commands were re-worked. Please refer to new CLI documentation. -* `cli` option from `BaseConnectionOptions` (now `BaseDataSourceOptions` options) was removed (since CLI commands were re-worked). +- `cli` option from `BaseConnectionOptions` (now `BaseDataSourceOptions` options) was removed (since CLI commands were re-worked). -* now migrations are running before schema synchronization if you have both pending migrations and schema synchronization pending - (it works if you have both `migrationsRun` and `synchronize` enabled in connection options). +- now migrations are running before schema synchronization if you have both pending migrations and schema synchronization pending + (it works if you have both `migrationsRun` and `synchronize` enabled in connection options). -* `aurora-data-api` driver now is called `aurora-mysql` +- `aurora-data-api` driver now is called `aurora-mysql` -* `aurora-data-api-pg` driver now is called `aurora-postgres` +- `aurora-data-api-pg` driver now is called `aurora-postgres` -* `EntityManager.connection` is now `EntityManager.dataSource` +- `EntityManager.connection` is now `EntityManager.dataSource` -* `Repository` now has a constructor (breaks classes extending Repository with custom constructor) +- `Repository` now has a constructor (breaks classes extending Repository with custom constructor) -* `@TransactionRepository`, `@TransactionManager`, `@Transaction` decorators were completely removed. These decorators do the things out of the TypeORM scope. +- `@TransactionRepository`, `@TransactionManager`, `@Transaction` decorators were completely removed. These decorators do the things out of the TypeORM scope. -* Only junction table names shortened. +- Only junction table names shortened. -**MOTIVATION:** We must shorten only table names generated by TypeORM. +**MOTIVATION:** We must shorten only table names generated by TypeORM. It's user responsibility to name tables short if their RDBMS limit table name length since it won't make sense to have table names as random hashes. It's really better if user specify custom table name into `@Entity` decorator. Also, for junction table it's possible to set a custom name using `@JoinTable` decorator. -* `findOne()` signature without parameters was dropped. - If you need a single row from the db you can use a following syntax: +- `findOne()` signature without parameters was dropped. + If you need a single row from the db you can use a following syntax: ```ts const [user] = await userRepository.find() @@ -590,23 +699,27 @@ const [user] = await userRepository.find() This change was made to prevent user confusion. See [this issue](https://github.com/typeorm/typeorm/issues/2500) for details. -* `findOne(id)` signature was dropped. Use following syntax instead: +- `findOne(id)` signature was dropped. Use following syntax instead: ```ts const user = await userRepository.findOneBy({ - id: id // where id is your column name + id: id, // where id is your column name }) ``` This change was made to provide a more type-safe approach for data querying. Due to this change you might need to refactor the way you load entities using MongoDB driver. -* `findOne`, `findOneOrFail`, `find`, `count`, `findAndCount` methods now only accept `FindOptions` as parameter, e.g.: +- `findOne`, `findOneOrFail`, `find`, `count`, `findAndCount` methods now only accept `FindOptions` as parameter, e.g.: ```ts const users = await userRepository.find({ - where: { /* conditions */ }, - relations: { /* relations */ } + where: { + /* conditions */ + }, + relations: { + /* relations */ + }, }) ``` @@ -615,44 +728,44 @@ To supply `where` conditions directly without `FindOptions` new methods were add ```ts const users = await userRepository.findBy({ - name: "Michael" + name: "Michael", }) ``` This change was required to simply current `find*` and `count*` methods typings, improve type safety and prevent user confusion. -* `findByIds` was deprecated, use `findBy` method instead in conjunction with `In` operator, for example: +- `findByIds` was deprecated, use `findBy` method instead in conjunction with `In` operator, for example: ```ts userRepository.findBy({ - id: In([1, 2, 3]) + id: In([1, 2, 3]), }) ``` This change was made to provide a more type-safe approach for data querying. -* `findOne` and `QueryBuilder.getOne()` now return `null` instead of `undefined` in the case if it didn't find anything in the database. - Logically it makes more sense to return `null`. +- `findOne` and `QueryBuilder.getOne()` now return `null` instead of `undefined` in the case if it didn't find anything in the database. + Logically it makes more sense to return `null`. -* `findOne` now limits returning rows to 1 at database level. +- `findOne` now limits returning rows to 1 at database level. **NOTE:** `FOR UPDATE` locking does not work with `findOne` in Oracle since `FOR UPDATE` cannot be used with `FETCH NEXT` in a single query. -* `where` in `FindOptions` (e.g. `find({ where: { ... })`) is more sensitive to input criteria now. +- `where` in `FindOptions` (e.g. `find({ where: { ... })`) is more sensitive to input criteria now. -* `FindConditions` (`where` in `FindOptions`) was renamed to `FindOptionsWhere`. +- `FindConditions` (`where` in `FindOptions`) was renamed to `FindOptionsWhere`. -* `null` as value in `where` used in `find*` methods is not supported anymore. - Now you must explicitly use `IsNull()` operator. +- `null` as value in `where` used in `find*` methods is not supported anymore. + Now you must explicitly use `IsNull()` operator. Before: ```ts userRepository.find({ where: { - photo: null - } + photo: null, + }, }) ``` @@ -661,22 +774,22 @@ After: ```ts userRepository.find({ where: { - photo: IsNull() - } + photo: IsNull(), + }, }) ``` This change was made to make it more transparent on how to add "IS NULL" statement to final SQL, because before it bring too much confusion for ORM users. -* if you had entity properties of a non-primitive type (except Buffer) defined as columns, - then you won't be able to use it in `find*`'s `where`. Example: +- if you had entity properties of a non-primitive type (except Buffer) defined as columns, + then you won't be able to use it in `find*`'s `where`. Example: Before for the `@Column(/*...*/) membership: MembershipKind` you could have a query like: ```ts userRepository.find({ - membership: new MembershipKind("premium") + membership: new MembershipKind("premium"), }) ``` @@ -684,25 +797,25 @@ now, you need to wrap this value into `Equal` operator: ```ts userRepository.find({ - membership: Equal(new MembershipKind("premium")) + membership: Equal(new MembershipKind("premium")), }) ``` This change is due to type-safety improvement new `where` signature brings. -* `order` in `FindOptions` (used in `find*` methods) doesn't support ordering by relations anymore. - Define relation columns, and order by them instead. +- `order` in `FindOptions` (used in `find*` methods) doesn't support ordering by relations anymore. + Define relation columns, and order by them instead. -* `where` in `FindOptions` (used in `find*` methods) previously supported `ObjectLiteral` and `string` types. - Now both signatures were removed. ObjectLiteral was removed because it seriously breaks the type safety, - and `string` doesn't make sense in the context of `FindOptions`. Use `QueryBuilder` instead. +- `where` in `FindOptions` (used in `find*` methods) previously supported `ObjectLiteral` and `string` types. + Now both signatures were removed. ObjectLiteral was removed because it seriously breaks the type safety, + and `string` doesn't make sense in the context of `FindOptions`. Use `QueryBuilder` instead. -* `MongoRepository` and `MongoEntityManager` now use new types called `MongoFindManyOptions` and `MongoFindOneOptions` - for their `find*` methods. +- `MongoRepository` and `MongoEntityManager` now use new types called `MongoFindManyOptions` and `MongoFindOneOptions` + for their `find*` methods. -* `primary relation` (e.g. `@ManyToOne(() => User, { primary: true }) user: User`) support is removed. - You still have an ability to use foreign keys as your primary keys, - however now you must explicitly define a column marked as primary. +- `primary relation` (e.g. `@ManyToOne(() => User, { primary: true }) user: User`) support is removed. + You still have an ability to use foreign keys as your primary keys, + however now you must explicitly define a column marked as primary. Example, before: @@ -738,34 +851,34 @@ user: User This change was required to simplify ORM internals and introduce new features. -* prefix relation id columns contained in embedded entities ([#7432](https://github.com/typeorm/typeorm/pull/7432)) +- prefix relation id columns contained in embedded entities ([#7432](https://github.com/typeorm/typeorm/pull/7432)) -* find by Date object in sqlite driver ([#7538](https://github.com/typeorm/typeorm/pull/7538)) +- find by Date object in sqlite driver ([#7538](https://github.com/typeorm/typeorm/pull/7538)) -* issue with non-reliable `new Date(ISOString)` parsing ([#7796](https://github.com/typeorm/typeorm/pull/7796)) +- issue with non-reliable `new Date(ISOString)` parsing ([#7796](https://github.com/typeorm/typeorm/pull/7796)) ### DEPRECATIONS -* all CLI commands do not support `ormconfig` anymore. You must specify a file with data source instance instead. +- all CLI commands do not support `ormconfig` anymore. You must specify a file with data source instance instead. -* `entities`, `migrations`, `subscribers` options inside `DataSourceOptions` accepting `string` directories support is deprecated. -You'll be only able to pass entity references in the future versions. +- `entities`, `migrations`, `subscribers` options inside `DataSourceOptions` accepting `string` directories support is deprecated. + You'll be only able to pass entity references in the future versions. -* all container-related features (`UseContainerOptions`, `ContainedType`, `ContainerInterface`, `defaultContainer`, -`useContainer`, `getFromContainer`) are deprecated. +- all container-related features (`UseContainerOptions`, `ContainedType`, `ContainerInterface`, `defaultContainer`, + `useContainer`, `getFromContainer`) are deprecated. -* EntityManager's `getCustomRepository` used within transactions is deprecated. Use `withRepository` method instead. +- EntityManager's `getCustomRepository` used within transactions is deprecated. Use `withRepository` method instead. -* `Connection.isConnected` is deprecated. Use `.isInitialized` instead. +- `Connection.isConnected` is deprecated. Use `.isInitialized` instead. -* `select` in `FindOptions` (used in `find*` methods) used as an array of property names is deprecated. - Now you should use a new object-literal notation. Example: +- `select` in `FindOptions` (used in `find*` methods) used as an array of property names is deprecated. + Now you should use a new object-literal notation. Example: Deprecated way of loading entity relations: ```ts userRepository.find({ - select: ["id", "firstName", "lastName"] + select: ["id", "firstName", "lastName"], }) ``` @@ -777,20 +890,20 @@ userRepository.find({ id: true, firstName: true, lastName: true, - } + }, }) ``` This change is due to type-safety improvement new `select` signature brings. -* `relations` in `FindOptions` (used in `find*` methods) used as an array of relation names is deprecated. - Now you should use a new object-literal notation. Example: +- `relations` in `FindOptions` (used in `find*` methods) used as an array of relation names is deprecated. + Now you should use a new object-literal notation. Example: Deprecated way of loading entity relations: ```ts userRepository.find({ - relations: ["contacts", "photos", "photos.album"] + relations: ["contacts", "photos", "photos.album"], }) ``` @@ -801,53 +914,65 @@ userRepository.find({ relations: { contacts: true, photos: { - album: true - } - } + album: true, + }, + }, }) ``` This change is due to type-safety improvement new `relations` signature brings. -* `join` in `FindOptions` (used in `find*` methods) is deprecated. Use `QueryBuilder` to build queries containing manual joins. +- `join` in `FindOptions` (used in `find*` methods) is deprecated. Use `QueryBuilder` to build queries containing manual joins. -* `Connection`, `ConnectionOptions` are deprecated, new names to use are: `DataSource` and `DataSourceOptions`. - To create the same connection you had before use a new syntax: `new DataSource({ /*...*/ })`. +- `Connection`, `ConnectionOptions` are deprecated, new names to use are: `DataSource` and `DataSourceOptions`. + To create the same connection you had before use a new syntax: `new DataSource({ /*...*/ })`. -* `createConnection()`, `createConnections()` are deprecated, since `Connection` is called `DataSource` now, to create a connection and connect to the database - simply do: +- `createConnection()`, `createConnections()` are deprecated, since `Connection` is called `DataSource` now, to create a connection and connect to the database + simply do: ```ts -const myDataSource = new DataSource({ /*...*/ }) +const myDataSource = new DataSource({ + /*...*/ +}) await myDataSource.connect() ``` -* `getConnection()` is deprecated. To have a globally accessible connection, simply export your data source and use it in places you need it: +- `getConnection()` is deprecated. To have a globally accessible connection, simply export your data source and use it in places you need it: ```ts -export const myDataSource = new DataSource({ /*...*/ }) +export const myDataSource = new DataSource({ + /*...*/ +}) // now you can use myDataSource anywhere in your application ``` -* `getManager()`, `getMongoManager()`, `getSqljsManager()`, `getRepository()`, `getTreeRepository()`, `getMongoRepository()`, `createQueryBuilder()` - are all deprecated now. Use globally accessible data source instead: +- `getManager()`, `getMongoManager()`, `getSqljsManager()`, `getRepository()`, `getTreeRepository()`, `getMongoRepository()`, `createQueryBuilder()` + are all deprecated now. Use globally accessible data source instead: ```ts -export const myDataSource = new DataSource({ /*...*/ }) +export const myDataSource = new DataSource({ + /*...*/ +}) export const Manager = myDataSource.manager export const UserRepository = myDataSource.getRepository(UserEntity) export const PhotoRepository = myDataSource.getRepository(PhotoEntity) // ... ``` -* `getConnectionManager()` and `ConnectionManager` itself are deprecated - now `Connection` is called `DataSource`, - and each data source can be defined in exported variable. If you want to have a collection - of data sources, just define them in a variable, simply as: +- `getConnectionManager()` and `ConnectionManager` itself are deprecated - now `Connection` is called `DataSource`, + and each data source can be defined in exported variable. If you want to have a collection + of data sources, just define them in a variable, simply as: ```ts -const dataSource1 = new DataSource({ /*...*/ }) -const dataSource2 = new DataSource({ /*...*/ }) -const dataSource3 = new DataSource({ /*...*/ }) +const dataSource1 = new DataSource({ + /*...*/ +}) +const dataSource2 = new DataSource({ + /*...*/ +}) +const dataSource3 = new DataSource({ + /*...*/ +}) export const MyDataSources = { dataSource1, @@ -856,873 +981,864 @@ export const MyDataSources = { } ``` -* `getConnectionOptions()` is deprecated - in next version we are going to implement different mechanism of connection options loading +- `getConnectionOptions()` is deprecated - in next version we are going to implement different mechanism of connection options loading -* `AbstractRepository` is deprecated. Use new way of custom repositories creation. +- `AbstractRepository` is deprecated. Use new way of custom repositories creation. -* `Connection.name` and `BaseConnectionOptions.name` are deprecated. Connections don't need names anymore since we are going to drop all related methods relying on this property. +- `Connection.name` and `BaseConnectionOptions.name` are deprecated. Connections don't need names anymore since we are going to drop all related methods relying on this property. -* all deprecated signatures will be removed in `0.4.0` +- all deprecated signatures will be removed in `0.4.0` ### EXPERIMENTAL FEATURES NOT PORTED FROM NEXT BRANCH -* `observers` - we will consider returning them back with new API in future versions -* `alternative find operators` - using `$any`, `$in`, `$like` and other operators in `where` condition. +- `observers` - we will consider returning them back with new API in future versions +- `alternative find operators` - using `$any`, `$in`, `$like` and other operators in `where` condition. ## [0.2.45](https://github.com/typeorm/typeorm/compare/0.2.44...0.2.45) (2022-03-04) ### Bug Fixes -* allow clearing database inside a transaction ([#8712](https://github.com/typeorm/typeorm/issues/8712)) ([f3cfdd2](https://github.com/typeorm/typeorm/commit/f3cfdd264105ba8cf1c92832b4b95e5a3ca0ed09)), closes [#8527](https://github.com/typeorm/typeorm/issues/8527) -* discard duplicated columns on update ([#8724](https://github.com/typeorm/typeorm/issues/8724)) ([0fc093d](https://github.com/typeorm/typeorm/commit/0fc093d168b54a0fd99bb411a730aad9be1858ac)), closes [#8723](https://github.com/typeorm/typeorm/issues/8723) -* fix entityManager.getId for custom join table ([#8676](https://github.com/typeorm/typeorm/issues/8676)) ([33b2bd7](https://github.com/typeorm/typeorm/commit/33b2bd7acc55d6eb30bfe0681748d6b6abaff0b5)), closes [#7736](https://github.com/typeorm/typeorm/issues/7736) -* force web bundlers to ignore index.mjs and use the browser ESM version directly ([#8710](https://github.com/typeorm/typeorm/issues/8710)) ([411fa54](https://github.com/typeorm/typeorm/commit/411fa54368c8940e94b1cbf7ab64b8d5377f9406)), closes [#8709](https://github.com/typeorm/typeorm/issues/8709) +- allow clearing database inside a transaction ([#8712](https://github.com/typeorm/typeorm/issues/8712)) ([f3cfdd2](https://github.com/typeorm/typeorm/commit/f3cfdd264105ba8cf1c92832b4b95e5a3ca0ed09)), closes [#8527](https://github.com/typeorm/typeorm/issues/8527) +- discard duplicated columns on update ([#8724](https://github.com/typeorm/typeorm/issues/8724)) ([0fc093d](https://github.com/typeorm/typeorm/commit/0fc093d168b54a0fd99bb411a730aad9be1858ac)), closes [#8723](https://github.com/typeorm/typeorm/issues/8723) +- fix entityManager.getId for custom join table ([#8676](https://github.com/typeorm/typeorm/issues/8676)) ([33b2bd7](https://github.com/typeorm/typeorm/commit/33b2bd7acc55d6eb30bfe0681748d6b6abaff0b5)), closes [#7736](https://github.com/typeorm/typeorm/issues/7736) +- force web bundlers to ignore index.mjs and use the browser ESM version directly ([#8710](https://github.com/typeorm/typeorm/issues/8710)) ([411fa54](https://github.com/typeorm/typeorm/commit/411fa54368c8940e94b1cbf7ab64b8d5377f9406)), closes [#8709](https://github.com/typeorm/typeorm/issues/8709) ### Features -* add nested transaction ([#8541](https://github.com/typeorm/typeorm/issues/8541)) ([6523526](https://github.com/typeorm/typeorm/commit/6523526003bab74a0df8f7d578790c1728b26057)), closes [#1505](https://github.com/typeorm/typeorm/issues/1505) -* add transformer to ViewColumnOptions ([#8717](https://github.com/typeorm/typeorm/issues/8717)) ([96ac8f7](https://github.com/typeorm/typeorm/commit/96ac8f7eece06ae0a8b52ae7da740c92c0c0d4b9)) +- add nested transaction ([#8541](https://github.com/typeorm/typeorm/issues/8541)) ([6523526](https://github.com/typeorm/typeorm/commit/6523526003bab74a0df8f7d578790c1728b26057)), closes [#1505](https://github.com/typeorm/typeorm/issues/1505) +- add transformer to ViewColumnOptions ([#8717](https://github.com/typeorm/typeorm/issues/8717)) ([96ac8f7](https://github.com/typeorm/typeorm/commit/96ac8f7eece06ae0a8b52ae7da740c92c0c0d4b9)) ## [0.2.44](https://github.com/typeorm/typeorm/compare/0.2.43...0.2.44) (2022-02-23) ### Bug Fixes -* alter relation loader to use transforms when present ([#8691](https://github.com/typeorm/typeorm/issues/8691)) ([2c2fb29](https://github.com/typeorm/typeorm/commit/2c2fb29a67bfd0ca7dd9133a2f85f5b4db5fb195)), closes [#8690](https://github.com/typeorm/typeorm/issues/8690) -* cannot read properties of undefined (reading 'joinEagerRelations') ([136015b](https://github.com/typeorm/typeorm/commit/136015b04ee72b0ca2439fbff53b1467c12c24b6)) -* expo driver doesn't work properly because of new beforeMigration() afterMigration() callbacks ([#8683](https://github.com/typeorm/typeorm/issues/8683)) ([5a71803](https://github.com/typeorm/typeorm/commit/5a7180378e34ab58ad40c504ebc5195e2413c5f4)) -* ng webpack default import ([#8688](https://github.com/typeorm/typeorm/issues/8688)) ([2d3374b](https://github.com/typeorm/typeorm/commit/2d3374b3b4cb8163764c035bd687b2c81787f338)), closes [#8674](https://github.com/typeorm/typeorm/issues/8674) -* support imports of absolute paths of ESM files on Windows ([#8669](https://github.com/typeorm/typeorm/issues/8669)) ([12cbfcd](https://github.com/typeorm/typeorm/commit/12cbfcde7bc4f56069ed3298064bb91ad0816bf0)), closes [#8651](https://github.com/typeorm/typeorm/issues/8651) +- alter relation loader to use transforms when present ([#8691](https://github.com/typeorm/typeorm/issues/8691)) ([2c2fb29](https://github.com/typeorm/typeorm/commit/2c2fb29a67bfd0ca7dd9133a2f85f5b4db5fb195)), closes [#8690](https://github.com/typeorm/typeorm/issues/8690) +- cannot read properties of undefined (reading 'joinEagerRelations') ([136015b](https://github.com/typeorm/typeorm/commit/136015b04ee72b0ca2439fbff53b1467c12c24b6)) +- expo driver doesn't work properly because of new beforeMigration() afterMigration() callbacks ([#8683](https://github.com/typeorm/typeorm/issues/8683)) ([5a71803](https://github.com/typeorm/typeorm/commit/5a7180378e34ab58ad40c504ebc5195e2413c5f4)) +- ng webpack default import ([#8688](https://github.com/typeorm/typeorm/issues/8688)) ([2d3374b](https://github.com/typeorm/typeorm/commit/2d3374b3b4cb8163764c035bd687b2c81787f338)), closes [#8674](https://github.com/typeorm/typeorm/issues/8674) +- support imports of absolute paths of ESM files on Windows ([#8669](https://github.com/typeorm/typeorm/issues/8669)) ([12cbfcd](https://github.com/typeorm/typeorm/commit/12cbfcde7bc4f56069ed3298064bb91ad0816bf0)), closes [#8651](https://github.com/typeorm/typeorm/issues/8651) ### Features -* add option to upsert to skip update if the row already exists and no values would be changed ([#8679](https://github.com/typeorm/typeorm/issues/8679)) ([8744395](https://github.com/typeorm/typeorm/commit/87443954b59768ab77fb15097ea9d88822b4a733)) -* allow `{delete,insert}().returning()` on MariaDB ([#8673](https://github.com/typeorm/typeorm/issues/8673)) ([7facbab](https://github.com/typeorm/typeorm/commit/7facbabd2663098156a53983ea38433ed39082d2)), closes [#7235](https://github.com/typeorm/typeorm/issues/7235) [#7235](https://github.com/typeorm/typeorm/issues/7235) -* Implement deferrable foreign keys for SAP HANA ([#6104](https://github.com/typeorm/typeorm/issues/6104)) ([1f54c70](https://github.com/typeorm/typeorm/commit/1f54c70b76de34d4420904b72137df746ea9aaed)) +- add option to upsert to skip update if the row already exists and no values would be changed ([#8679](https://github.com/typeorm/typeorm/issues/8679)) ([8744395](https://github.com/typeorm/typeorm/commit/87443954b59768ab77fb15097ea9d88822b4a733)) +- allow `{delete,insert}().returning()` on MariaDB ([#8673](https://github.com/typeorm/typeorm/issues/8673)) ([7facbab](https://github.com/typeorm/typeorm/commit/7facbabd2663098156a53983ea38433ed39082d2)), closes [#7235](https://github.com/typeorm/typeorm/issues/7235) [#7235](https://github.com/typeorm/typeorm/issues/7235) +- Implement deferrable foreign keys for SAP HANA ([#6104](https://github.com/typeorm/typeorm/issues/6104)) ([1f54c70](https://github.com/typeorm/typeorm/commit/1f54c70b76de34d4420904b72137df746ea9aaed)) ## [0.2.43](https://github.com/typeorm/typeorm/compare/0.2.42...0.2.43) (2022-02-17) ### Bug Fixes -* support `require` to internal files without explicitly writing `.js` in the path ([#8660](https://github.com/typeorm/typeorm/issues/8660)) ([96aed8a](https://github.com/typeorm/typeorm/commit/96aed8aae06df0ae555aa51ed9f1a5ffec141e61)), closes [#8656](https://github.com/typeorm/typeorm/issues/8656) +- support `require` to internal files without explicitly writing `.js` in the path ([#8660](https://github.com/typeorm/typeorm/issues/8660)) ([96aed8a](https://github.com/typeorm/typeorm/commit/96aed8aae06df0ae555aa51ed9f1a5ffec141e61)), closes [#8656](https://github.com/typeorm/typeorm/issues/8656) ### Features -* embedded entities with entity schema ([#8626](https://github.com/typeorm/typeorm/issues/8626)) ([7dbe956](https://github.com/typeorm/typeorm/commit/7dbe956c56da3a430ae6f0e99730e9449deae889)), closes [#3632](https://github.com/typeorm/typeorm/issues/3632) +- embedded entities with entity schema ([#8626](https://github.com/typeorm/typeorm/issues/8626)) ([7dbe956](https://github.com/typeorm/typeorm/commit/7dbe956c56da3a430ae6f0e99730e9449deae889)), closes [#3632](https://github.com/typeorm/typeorm/issues/3632) ### Reverts -* Revert "feat: soft delete recursive cascade (#8436)" (#8654) ([6b0b15b](https://github.com/typeorm/typeorm/commit/6b0b15b0e68584ed7cd81a658d8606cfdb96817c)), closes [#8436](https://github.com/typeorm/typeorm/issues/8436) [#8654](https://github.com/typeorm/typeorm/issues/8654) +- Revert "feat: soft delete recursive cascade (#8436)" (#8654) ([6b0b15b](https://github.com/typeorm/typeorm/commit/6b0b15b0e68584ed7cd81a658d8606cfdb96817c)), closes [#8436](https://github.com/typeorm/typeorm/issues/8436) [#8654](https://github.com/typeorm/typeorm/issues/8654) ## [0.2.42](https://github.com/typeorm/typeorm/compare/0.2.41...0.2.42) (2022-02-16) ### Bug Fixes -* proper column comment mapping from database to metadata in aurora-data-api ([baa5880](https://github.com/typeorm/typeorm/commit/baa5880001064333eb4eb01765b1d79e17cf1fb5)) -* add referencedSchema to PostgresQueryRunner ([#8566](https://github.com/typeorm/typeorm/issues/8566)) ([c490319](https://github.com/typeorm/typeorm/commit/c49031929aca8f3b932c6593b75447256085bfef)) -* adding/removing @Generated() will now generate a migration to add/remove the DEFAULT value ([#8274](https://github.com/typeorm/typeorm/issues/8274)) ([4208393](https://github.com/typeorm/typeorm/commit/42083936e2b65f0d1bd8e23d12689a7f49e2da2f)), closes [#5898](https://github.com/typeorm/typeorm/issues/5898) -* adds entity-schema support for createForeignKeyConstraints ([#8606](https://github.com/typeorm/typeorm/issues/8606)) ([f224f24](https://github.com/typeorm/typeorm/commit/f224f24e5247d3c42385bfc03c89f518aa932310)), closes [#8489](https://github.com/typeorm/typeorm/issues/8489) -* allow special keyword as column name for simple-enum type on sqlite ([#8645](https://github.com/typeorm/typeorm/issues/8645)) ([93bf96e](https://github.com/typeorm/typeorm/commit/93bf96ea635823c7933ea8ef7326be62ccdd6ea7)) -* correctly handle multiple-row insert for SAP HANA driver ([#7957](https://github.com/typeorm/typeorm/issues/7957)) ([8f2ae71](https://github.com/typeorm/typeorm/commit/8f2ae71201e7738fe3c1efd5bbc4584dfe62dcc0)) -* disable SQLite FK checks in synchronize / migrations ([#7922](https://github.com/typeorm/typeorm/issues/7922)) ([f24822e](https://github.com/typeorm/typeorm/commit/f24822ef9cb3051fbe9f3fd5d9e669788852c5a5)) -* find descendants of a non-existing tree parent ([#8557](https://github.com/typeorm/typeorm/issues/8557)) ([cbb61eb](https://github.com/typeorm/typeorm/commit/cbb61eb08139204479110c88d7d1849a24080d11)), closes [#8556](https://github.com/typeorm/typeorm/issues/8556) -* For MS SQL Server use lowercase "sys"."columns" reference. ([#8400](https://github.com/typeorm/typeorm/issues/8400)) ([#8401](https://github.com/typeorm/typeorm/issues/8401)) ([e8a0f92](https://github.com/typeorm/typeorm/commit/e8a0f921b4baa7aa7e55ac1fd34c449dfa1e3229)) -* improve DeepPartial type ([#8187](https://github.com/typeorm/typeorm/issues/8187)) ([b93416d](https://github.com/typeorm/typeorm/commit/b93416d7bc25006b34a90c14c497cc7e6e57e28c)) -* Lock peer dependencies versions ([#8597](https://github.com/typeorm/typeorm/issues/8597)) ([600bd4e](https://github.com/typeorm/typeorm/commit/600bd4e5da74b012409d1fdf411a0a0b5265466b)) -* make EntityMetadataValidator comply with entitySkipConstructor, cover with test ([#8445](https://github.com/typeorm/typeorm/issues/8445)) ([3d6c5da](https://github.com/typeorm/typeorm/commit/3d6c5dae76ad0e0640650058ae58fe0addda2ae6)), closes [#8444](https://github.com/typeorm/typeorm/issues/8444) -* materialized path being computed as "undefined1." ([#8526](https://github.com/typeorm/typeorm/issues/8526)) ([09f54e0](https://github.com/typeorm/typeorm/commit/09f54e0273be4dc836824a38e9c78b50ad21bba6)) -* MongoConnectionOptions sslCA type mismatch ([#8628](https://github.com/typeorm/typeorm/issues/8628)) ([02400da](https://github.com/typeorm/typeorm/commit/02400dab662aceca9a722c4aa0dd74a9fa2cb90d)) -* mongodb repository.find filters soft deleted rows ([#8581](https://github.com/typeorm/typeorm/issues/8581)) ([f7c1f7d](https://github.com/typeorm/typeorm/commit/f7c1f7d7c0481f4ada506e5b811a3219519eadf9)), closes [#7113](https://github.com/typeorm/typeorm/issues/7113) -* mongodb@4 compatibility support ([#8412](https://github.com/typeorm/typeorm/issues/8412)) ([531013b](https://github.com/typeorm/typeorm/commit/531013b2f8dfb8d04b0bfb844dc83a5ba6404569)) -* must invoke key pragma before any other interaction if SEE setted ([#8478](https://github.com/typeorm/typeorm/issues/8478)) ([546b3ed](https://github.com/typeorm/typeorm/commit/546b3ed8886c44fbe3d9e167d1904cb9e5961df7)), closes [#8475](https://github.com/typeorm/typeorm/issues/8475) -* nested eager relations in a lazy-loaded entity are not loaded ([#8564](https://github.com/typeorm/typeorm/issues/8564)) ([1cfd7b9](https://github.com/typeorm/typeorm/commit/1cfd7b98ba27032dd0e9429a245c40cea47900f7)) -* QueryFailedError when tree entity with JoinColumn ([#8443](https://github.com/typeorm/typeorm/issues/8443)) ([#8447](https://github.com/typeorm/typeorm/issues/8447)) ([a11c50d](https://github.com/typeorm/typeorm/commit/a11c50d5519bda1410ab9ccf67bfcb12ef109c61)) -* relation id and afterAll hook performance fixes ([#8169](https://github.com/typeorm/typeorm/issues/8169)) ([31f0b55](https://github.com/typeorm/typeorm/commit/31f0b5535aa0cc49ff23610b1924c03432f5461f)) -* replaced custom uuid generator with `uuid` library ([#8642](https://github.com/typeorm/typeorm/issues/8642)) ([8898a71](https://github.com/typeorm/typeorm/commit/8898a7175f481f1c171acefef61dc089bc3f8a8e)) -* single table inheritance returns the same discriminator value error for unrelated tables where their parents extend from the same entity ([#8525](https://github.com/typeorm/typeorm/issues/8525)) ([6523fcc](https://github.com/typeorm/typeorm/commit/6523fccda1147dc697afbba57792e5cb4165fbf2)), closes [#8522](https://github.com/typeorm/typeorm/issues/8522) -* updating with only `update: false` columns shouldn't trigger @UpdateDateColumn column updation ([2834729](https://github.com/typeorm/typeorm/commit/2834729e80577bd30f09c2c0e4c949cde173bba3)), closes [#8394](https://github.com/typeorm/typeorm/issues/8394) [#8394](https://github.com/typeorm/typeorm/issues/8394) [#8394](https://github.com/typeorm/typeorm/issues/8394) -* upsert should find unique index created by one-to-one relation ([#8618](https://github.com/typeorm/typeorm/issues/8618)) ([c8c00ba](https://github.com/typeorm/typeorm/commit/c8c00baf9351973be5780687418303dd87de2077)) +- proper column comment mapping from database to metadata in aurora-data-api ([baa5880](https://github.com/typeorm/typeorm/commit/baa5880001064333eb4eb01765b1d79e17cf1fb5)) +- add referencedSchema to PostgresQueryRunner ([#8566](https://github.com/typeorm/typeorm/issues/8566)) ([c490319](https://github.com/typeorm/typeorm/commit/c49031929aca8f3b932c6593b75447256085bfef)) +- adding/removing @Generated() will now generate a migration to add/remove the DEFAULT value ([#8274](https://github.com/typeorm/typeorm/issues/8274)) ([4208393](https://github.com/typeorm/typeorm/commit/42083936e2b65f0d1bd8e23d12689a7f49e2da2f)), closes [#5898](https://github.com/typeorm/typeorm/issues/5898) +- adds entity-schema support for createForeignKeyConstraints ([#8606](https://github.com/typeorm/typeorm/issues/8606)) ([f224f24](https://github.com/typeorm/typeorm/commit/f224f24e5247d3c42385bfc03c89f518aa932310)), closes [#8489](https://github.com/typeorm/typeorm/issues/8489) +- allow special keyword as column name for simple-enum type on sqlite ([#8645](https://github.com/typeorm/typeorm/issues/8645)) ([93bf96e](https://github.com/typeorm/typeorm/commit/93bf96ea635823c7933ea8ef7326be62ccdd6ea7)) +- correctly handle multiple-row insert for SAP HANA driver ([#7957](https://github.com/typeorm/typeorm/issues/7957)) ([8f2ae71](https://github.com/typeorm/typeorm/commit/8f2ae71201e7738fe3c1efd5bbc4584dfe62dcc0)) +- disable SQLite FK checks in synchronize / migrations ([#7922](https://github.com/typeorm/typeorm/issues/7922)) ([f24822e](https://github.com/typeorm/typeorm/commit/f24822ef9cb3051fbe9f3fd5d9e669788852c5a5)) +- find descendants of a non-existing tree parent ([#8557](https://github.com/typeorm/typeorm/issues/8557)) ([cbb61eb](https://github.com/typeorm/typeorm/commit/cbb61eb08139204479110c88d7d1849a24080d11)), closes [#8556](https://github.com/typeorm/typeorm/issues/8556) +- For MS SQL Server use lowercase "sys"."columns" reference. ([#8400](https://github.com/typeorm/typeorm/issues/8400)) ([#8401](https://github.com/typeorm/typeorm/issues/8401)) ([e8a0f92](https://github.com/typeorm/typeorm/commit/e8a0f921b4baa7aa7e55ac1fd34c449dfa1e3229)) +- improve DeepPartial type ([#8187](https://github.com/typeorm/typeorm/issues/8187)) ([b93416d](https://github.com/typeorm/typeorm/commit/b93416d7bc25006b34a90c14c497cc7e6e57e28c)) +- Lock peer dependencies versions ([#8597](https://github.com/typeorm/typeorm/issues/8597)) ([600bd4e](https://github.com/typeorm/typeorm/commit/600bd4e5da74b012409d1fdf411a0a0b5265466b)) +- make EntityMetadataValidator comply with entitySkipConstructor, cover with test ([#8445](https://github.com/typeorm/typeorm/issues/8445)) ([3d6c5da](https://github.com/typeorm/typeorm/commit/3d6c5dae76ad0e0640650058ae58fe0addda2ae6)), closes [#8444](https://github.com/typeorm/typeorm/issues/8444) +- materialized path being computed as "undefined1." ([#8526](https://github.com/typeorm/typeorm/issues/8526)) ([09f54e0](https://github.com/typeorm/typeorm/commit/09f54e0273be4dc836824a38e9c78b50ad21bba6)) +- MongoConnectionOptions sslCA type mismatch ([#8628](https://github.com/typeorm/typeorm/issues/8628)) ([02400da](https://github.com/typeorm/typeorm/commit/02400dab662aceca9a722c4aa0dd74a9fa2cb90d)) +- mongodb repository.find filters soft deleted rows ([#8581](https://github.com/typeorm/typeorm/issues/8581)) ([f7c1f7d](https://github.com/typeorm/typeorm/commit/f7c1f7d7c0481f4ada506e5b811a3219519eadf9)), closes [#7113](https://github.com/typeorm/typeorm/issues/7113) +- mongodb@4 compatibility support ([#8412](https://github.com/typeorm/typeorm/issues/8412)) ([531013b](https://github.com/typeorm/typeorm/commit/531013b2f8dfb8d04b0bfb844dc83a5ba6404569)) +- must invoke key pragma before any other interaction if SEE setted ([#8478](https://github.com/typeorm/typeorm/issues/8478)) ([546b3ed](https://github.com/typeorm/typeorm/commit/546b3ed8886c44fbe3d9e167d1904cb9e5961df7)), closes [#8475](https://github.com/typeorm/typeorm/issues/8475) +- nested eager relations in a lazy-loaded entity are not loaded ([#8564](https://github.com/typeorm/typeorm/issues/8564)) ([1cfd7b9](https://github.com/typeorm/typeorm/commit/1cfd7b98ba27032dd0e9429a245c40cea47900f7)) +- QueryFailedError when tree entity with JoinColumn ([#8443](https://github.com/typeorm/typeorm/issues/8443)) ([#8447](https://github.com/typeorm/typeorm/issues/8447)) ([a11c50d](https://github.com/typeorm/typeorm/commit/a11c50d5519bda1410ab9ccf67bfcb12ef109c61)) +- relation id and afterAll hook performance fixes ([#8169](https://github.com/typeorm/typeorm/issues/8169)) ([31f0b55](https://github.com/typeorm/typeorm/commit/31f0b5535aa0cc49ff23610b1924c03432f5461f)) +- replaced custom uuid generator with `uuid` library ([#8642](https://github.com/typeorm/typeorm/issues/8642)) ([8898a71](https://github.com/typeorm/typeorm/commit/8898a7175f481f1c171acefef61dc089bc3f8a8e)) +- single table inheritance returns the same discriminator value error for unrelated tables where their parents extend from the same entity ([#8525](https://github.com/typeorm/typeorm/issues/8525)) ([6523fcc](https://github.com/typeorm/typeorm/commit/6523fccda1147dc697afbba57792e5cb4165fbf2)), closes [#8522](https://github.com/typeorm/typeorm/issues/8522) +- updating with only `update: false` columns shouldn't trigger @UpdateDateColumn column updation ([2834729](https://github.com/typeorm/typeorm/commit/2834729e80577bd30f09c2c0e4c949cde173bba3)), closes [#8394](https://github.com/typeorm/typeorm/issues/8394) [#8394](https://github.com/typeorm/typeorm/issues/8394) [#8394](https://github.com/typeorm/typeorm/issues/8394) +- upsert should find unique index created by one-to-one relation ([#8618](https://github.com/typeorm/typeorm/issues/8618)) ([c8c00ba](https://github.com/typeorm/typeorm/commit/c8c00baf9351973be5780687418303dd87de2077)) ### Features -* add comment param to FindOptions ([#8545](https://github.com/typeorm/typeorm/issues/8545)) ([ece0da0](https://github.com/typeorm/typeorm/commit/ece0da027dfce4357764dda4b810598ad64af9d9)) -* add custom timestamp option in migration creation ([#8501](https://github.com/typeorm/typeorm/issues/8501)) ([4a7f242](https://github.com/typeorm/typeorm/commit/4a7f2420f1b498465b2a5913b7d848b3eaafb113)), closes [#8500](https://github.com/typeorm/typeorm/issues/8500) [#8500](https://github.com/typeorm/typeorm/issues/8500) -* add support for node-redis v4.0.0 and newer ([#8425](https://github.com/typeorm/typeorm/issues/8425)) ([0626ed1](https://github.com/typeorm/typeorm/commit/0626ed1f0bd75fb8e72a462593f33813d85faee8)) -* add support for Postgres 10+ GENERATED ALWAYS AS IDENTITY ([#8371](https://github.com/typeorm/typeorm/issues/8371)) ([a0f09de](https://github.com/typeorm/typeorm/commit/a0f09de8400ac7c94df33f8213ef0eec79b9239d)), closes [#8370](https://github.com/typeorm/typeorm/issues/8370) -* add WITH (lock) clause for MSSQL select with join queries ([#8507](https://github.com/typeorm/typeorm/issues/8507)) ([3284808](https://github.com/typeorm/typeorm/commit/3284808b63552d81456752187c0d130db76007ed)), closes [#4764](https://github.com/typeorm/typeorm/issues/4764) -* adds entity-schema support for withoutRowid ([#8432](https://github.com/typeorm/typeorm/issues/8432)) ([bd22dc3](https://github.com/typeorm/typeorm/commit/bd22dc3b8175ef82967b8265a2388ce16cc08623)), closes [#8429](https://github.com/typeorm/typeorm/issues/8429) -* allow soft-deletion of orphaned relation rows using orphanedRow… ([#8414](https://github.com/typeorm/typeorm/issues/8414)) ([cefddd9](https://github.com/typeorm/typeorm/commit/cefddd95c550191d6a18cb53c8ea4995d0c219ca)) -* custom name for typeorm_metadata table ([#8528](https://github.com/typeorm/typeorm/issues/8528)) ([f8154eb](https://github.com/typeorm/typeorm/commit/f8154eb4c5089a1a0d2c2073f0ea5d64b3252e08)), closes [#7266](https://github.com/typeorm/typeorm/issues/7266) -* deferrable option for Unique constraints (Postgres) ([#8356](https://github.com/typeorm/typeorm/issues/8356)) ([e52b26c](https://github.com/typeorm/typeorm/commit/e52b26c910047d22aa3ea003b62d11c2bf352249)) -* ESM support ([#8536](https://github.com/typeorm/typeorm/issues/8536)) ([3a694dd](https://github.com/typeorm/typeorm/commit/3a694dd3e99699e7284709c53967a5dfcb1e1806)), closes [#6974](https://github.com/typeorm/typeorm/issues/6974) [#6941](https://github.com/typeorm/typeorm/issues/6941) [#7516](https://github.com/typeorm/typeorm/issues/7516) [#7159](https://github.com/typeorm/typeorm/issues/7159) -* query builder negating with "NotBrackets" for complex expressions ([#8476](https://github.com/typeorm/typeorm/issues/8476)) ([fe7f328](https://github.com/typeorm/typeorm/commit/fe7f328fd5b918cab2e7301d57c62e81d9ff34f3)) -* separate update events into update, soft-remove, and recover ([#8403](https://github.com/typeorm/typeorm/issues/8403)) ([93383bd](https://github.com/typeorm/typeorm/commit/93383bd2ee6dc8c22a5cfc0021334fe199da81dc)), closes [#8398](https://github.com/typeorm/typeorm/issues/8398) -* soft delete recursive cascade ([#8436](https://github.com/typeorm/typeorm/issues/8436)) ([d0f32b3](https://github.com/typeorm/typeorm/commit/d0f32b3a17be9ffe9fbc6112e5731bbac91c3691)) -* sqlite attach ([#8396](https://github.com/typeorm/typeorm/issues/8396)) ([9e844d9](https://github.com/typeorm/typeorm/commit/9e844d9ff72fae72578399e24464cd7912c0fe5e)) +- add comment param to FindOptions ([#8545](https://github.com/typeorm/typeorm/issues/8545)) ([ece0da0](https://github.com/typeorm/typeorm/commit/ece0da027dfce4357764dda4b810598ad64af9d9)) +- add custom timestamp option in migration creation ([#8501](https://github.com/typeorm/typeorm/issues/8501)) ([4a7f242](https://github.com/typeorm/typeorm/commit/4a7f2420f1b498465b2a5913b7d848b3eaafb113)), closes [#8500](https://github.com/typeorm/typeorm/issues/8500) [#8500](https://github.com/typeorm/typeorm/issues/8500) +- add support for node-redis v4.0.0 and newer ([#8425](https://github.com/typeorm/typeorm/issues/8425)) ([0626ed1](https://github.com/typeorm/typeorm/commit/0626ed1f0bd75fb8e72a462593f33813d85faee8)) +- add support for Postgres 10+ GENERATED ALWAYS AS IDENTITY ([#8371](https://github.com/typeorm/typeorm/issues/8371)) ([a0f09de](https://github.com/typeorm/typeorm/commit/a0f09de8400ac7c94df33f8213ef0eec79b9239d)), closes [#8370](https://github.com/typeorm/typeorm/issues/8370) +- add WITH (lock) clause for MSSQL select with join queries ([#8507](https://github.com/typeorm/typeorm/issues/8507)) ([3284808](https://github.com/typeorm/typeorm/commit/3284808b63552d81456752187c0d130db76007ed)), closes [#4764](https://github.com/typeorm/typeorm/issues/4764) +- adds entity-schema support for withoutRowid ([#8432](https://github.com/typeorm/typeorm/issues/8432)) ([bd22dc3](https://github.com/typeorm/typeorm/commit/bd22dc3b8175ef82967b8265a2388ce16cc08623)), closes [#8429](https://github.com/typeorm/typeorm/issues/8429) +- allow soft-deletion of orphaned relation rows using orphanedRow… ([#8414](https://github.com/typeorm/typeorm/issues/8414)) ([cefddd9](https://github.com/typeorm/typeorm/commit/cefddd95c550191d6a18cb53c8ea4995d0c219ca)) +- custom name for typeorm_metadata table ([#8528](https://github.com/typeorm/typeorm/issues/8528)) ([f8154eb](https://github.com/typeorm/typeorm/commit/f8154eb4c5089a1a0d2c2073f0ea5d64b3252e08)), closes [#7266](https://github.com/typeorm/typeorm/issues/7266) +- deferrable option for Unique constraints (Postgres) ([#8356](https://github.com/typeorm/typeorm/issues/8356)) ([e52b26c](https://github.com/typeorm/typeorm/commit/e52b26c910047d22aa3ea003b62d11c2bf352249)) +- ESM support ([#8536](https://github.com/typeorm/typeorm/issues/8536)) ([3a694dd](https://github.com/typeorm/typeorm/commit/3a694dd3e99699e7284709c53967a5dfcb1e1806)), closes [#6974](https://github.com/typeorm/typeorm/issues/6974) [#6941](https://github.com/typeorm/typeorm/issues/6941) [#7516](https://github.com/typeorm/typeorm/issues/7516) [#7159](https://github.com/typeorm/typeorm/issues/7159) +- query builder negating with "NotBrackets" for complex expressions ([#8476](https://github.com/typeorm/typeorm/issues/8476)) ([fe7f328](https://github.com/typeorm/typeorm/commit/fe7f328fd5b918cab2e7301d57c62e81d9ff34f3)) +- separate update events into update, soft-remove, and recover ([#8403](https://github.com/typeorm/typeorm/issues/8403)) ([93383bd](https://github.com/typeorm/typeorm/commit/93383bd2ee6dc8c22a5cfc0021334fe199da81dc)), closes [#8398](https://github.com/typeorm/typeorm/issues/8398) +- soft delete recursive cascade ([#8436](https://github.com/typeorm/typeorm/issues/8436)) ([d0f32b3](https://github.com/typeorm/typeorm/commit/d0f32b3a17be9ffe9fbc6112e5731bbac91c3691)) +- sqlite attach ([#8396](https://github.com/typeorm/typeorm/issues/8396)) ([9e844d9](https://github.com/typeorm/typeorm/commit/9e844d9ff72fae72578399e24464cd7912c0fe5e)) ### Reverts -* migration:show command must exist with zero status code (Fixes [#7349](https://github.com/typeorm/typeorm/issues/7349)) ([#8185](https://github.com/typeorm/typeorm/issues/8185)) ([e0adeee](https://github.com/typeorm/typeorm/commit/e0adeee48eeb0d5412aa5c0258f7c12e6b1c38ed)) +- migration:show command must exist with zero status code (Fixes [#7349](https://github.com/typeorm/typeorm/issues/7349)) ([#8185](https://github.com/typeorm/typeorm/issues/8185)) ([e0adeee](https://github.com/typeorm/typeorm/commit/e0adeee48eeb0d5412aa5c0258f7c12e6b1c38ed)) ### BREAKING CHANGES -* update listeners and subscriber no longer triggered by soft-remove and recover +- update listeners and subscriber no longer triggered by soft-remove and recover ## [0.2.41](https://github.com/typeorm/typeorm/compare/0.2.40...0.2.41) (2021-11-18) ### Bug Fixes -* add `retryWrites` to `MongoConnectionOptions` ([#8354](https://github.com/typeorm/typeorm/issues/8354)) ([c895680](https://github.com/typeorm/typeorm/commit/c895680dce35f0550f48d92d7dd1a5fb48ab4135)), closes [#7869](https://github.com/typeorm/typeorm/issues/7869) -* create typeorm_metadata table when running migrations ([#4956](https://github.com/typeorm/typeorm/issues/4956)) ([b2c8168](https://github.com/typeorm/typeorm/commit/b2c8168514b23671080e6d384e381e997fbaa11e)) -* db caching won't work with replication enabled ([#7694](https://github.com/typeorm/typeorm/issues/7694)) ([2d0abe7](https://github.com/typeorm/typeorm/commit/2d0abe7140a0aec40d50c15acd98633483db3e29)), closes [#5919](https://github.com/typeorm/typeorm/issues/5919) -* incorrect composite `UNIQUE` constraints detection ([#8364](https://github.com/typeorm/typeorm/issues/8364)) ([29cb891](https://github.com/typeorm/typeorm/commit/29cb89123aaf705437927a8c6ed23204422b71cc)), closes [#8158](https://github.com/typeorm/typeorm/issues/8158) -* Postgres enum generates unnecessary queries on schema sync ([#8268](https://github.com/typeorm/typeorm/issues/8268)) ([98d5f39](https://github.com/typeorm/typeorm/commit/98d5f39e35b6e5dd77ae2aa60f80f4ac98249379)) -* resolve issue delete column null on after update event subscriber ([#8318](https://github.com/typeorm/typeorm/issues/8318)) ([8a5e671](https://github.com/typeorm/typeorm/commit/8a5e6715e2d32da22c2fa71a14a7cf1fe897a159)), closes [#6327](https://github.com/typeorm/typeorm/issues/6327) +- add `retryWrites` to `MongoConnectionOptions` ([#8354](https://github.com/typeorm/typeorm/issues/8354)) ([c895680](https://github.com/typeorm/typeorm/commit/c895680dce35f0550f48d92d7dd1a5fb48ab4135)), closes [#7869](https://github.com/typeorm/typeorm/issues/7869) +- create typeorm_metadata table when running migrations ([#4956](https://github.com/typeorm/typeorm/issues/4956)) ([b2c8168](https://github.com/typeorm/typeorm/commit/b2c8168514b23671080e6d384e381e997fbaa11e)) +- db caching won't work with replication enabled ([#7694](https://github.com/typeorm/typeorm/issues/7694)) ([2d0abe7](https://github.com/typeorm/typeorm/commit/2d0abe7140a0aec40d50c15acd98633483db3e29)), closes [#5919](https://github.com/typeorm/typeorm/issues/5919) +- incorrect composite `UNIQUE` constraints detection ([#8364](https://github.com/typeorm/typeorm/issues/8364)) ([29cb891](https://github.com/typeorm/typeorm/commit/29cb89123aaf705437927a8c6ed23204422b71cc)), closes [#8158](https://github.com/typeorm/typeorm/issues/8158) +- Postgres enum generates unnecessary queries on schema sync ([#8268](https://github.com/typeorm/typeorm/issues/8268)) ([98d5f39](https://github.com/typeorm/typeorm/commit/98d5f39e35b6e5dd77ae2aa60f80f4ac98249379)) +- resolve issue delete column null on after update event subscriber ([#8318](https://github.com/typeorm/typeorm/issues/8318)) ([8a5e671](https://github.com/typeorm/typeorm/commit/8a5e6715e2d32da22c2fa71a14a7cf1fe897a159)), closes [#6327](https://github.com/typeorm/typeorm/issues/6327) ### Features -* export interfaces from schema-builder/options ([#8383](https://github.com/typeorm/typeorm/issues/8383)) ([7b8a1e3](https://github.com/typeorm/typeorm/commit/7b8a1e38f269ba329a153135e12e1a21274b3a18)) -* implement generated columns for postgres 12 driver ([#6469](https://github.com/typeorm/typeorm/issues/6469)) ([91080be](https://github.com/typeorm/typeorm/commit/91080be0cd35a5ee9467d4b50b6b7fb5421ac800)) -* lock modes in cockroachdb ([#8250](https://github.com/typeorm/typeorm/issues/8250)) ([d494fcc](https://github.com/typeorm/typeorm/commit/d494fccc9c6a2d773bcb411ba746a74539373eff)), closes [#8249](https://github.com/typeorm/typeorm/issues/8249) - +- export interfaces from schema-builder/options ([#8383](https://github.com/typeorm/typeorm/issues/8383)) ([7b8a1e3](https://github.com/typeorm/typeorm/commit/7b8a1e38f269ba329a153135e12e1a21274b3a18)) +- implement generated columns for postgres 12 driver ([#6469](https://github.com/typeorm/typeorm/issues/6469)) ([91080be](https://github.com/typeorm/typeorm/commit/91080be0cd35a5ee9467d4b50b6b7fb5421ac800)) +- lock modes in cockroachdb ([#8250](https://github.com/typeorm/typeorm/issues/8250)) ([d494fcc](https://github.com/typeorm/typeorm/commit/d494fccc9c6a2d773bcb411ba746a74539373eff)), closes [#8249](https://github.com/typeorm/typeorm/issues/8249) ## [0.2.40](https://github.com/typeorm/typeorm/compare/0.2.39...0.2.40) (2021-11-11) ### Bug Fixes -* BaseEntity finder methods to properly type-check lazy relations conditions ([#5710](https://github.com/typeorm/typeorm/issues/5710)) ([0665ff5](https://github.com/typeorm/typeorm/commit/0665ff5473d075e442f3a93f665bbe087bdf29de)) +- BaseEntity finder methods to properly type-check lazy relations conditions ([#5710](https://github.com/typeorm/typeorm/issues/5710)) ([0665ff5](https://github.com/typeorm/typeorm/commit/0665ff5473d075e442f3a93f665bbe087bdf29de)) ### Features -* add depth limiter optional parameter when loading nested trees using TreeRepository's findTrees() and findDescendantsTree() ([#7926](https://github.com/typeorm/typeorm/issues/7926)) ([0c44629](https://github.com/typeorm/typeorm/commit/0c44629c83c48c27448e7e3cb39faf26994e6e56)), closes [#3909](https://github.com/typeorm/typeorm/issues/3909) -* add upsert methods for the drivers that support onUpdate ([#8104](https://github.com/typeorm/typeorm/issues/8104)) ([3f98197](https://github.com/typeorm/typeorm/commit/3f981975d4347483937547feaa8fa4f63b81a83c)), closes [#2363](https://github.com/typeorm/typeorm/issues/2363) -* Postgres IDENTITY Column support ([#7741](https://github.com/typeorm/typeorm/issues/7741)) ([969af95](https://github.com/typeorm/typeorm/commit/969af958ba27282b9594140a7e2d58dba1192830)) +- add depth limiter optional parameter when loading nested trees using TreeRepository's findTrees() and findDescendantsTree() ([#7926](https://github.com/typeorm/typeorm/issues/7926)) ([0c44629](https://github.com/typeorm/typeorm/commit/0c44629c83c48c27448e7e3cb39faf26994e6e56)), closes [#3909](https://github.com/typeorm/typeorm/issues/3909) +- add upsert methods for the drivers that support onUpdate ([#8104](https://github.com/typeorm/typeorm/issues/8104)) ([3f98197](https://github.com/typeorm/typeorm/commit/3f981975d4347483937547feaa8fa4f63b81a83c)), closes [#2363](https://github.com/typeorm/typeorm/issues/2363) +- Postgres IDENTITY Column support ([#7741](https://github.com/typeorm/typeorm/issues/7741)) ([969af95](https://github.com/typeorm/typeorm/commit/969af958ba27282b9594140a7e2d58dba1192830)) ### Reverts -* "feat: use char(36) for uuid representation in mysql ([#7853](https://github.com/typeorm/typeorm/issues/7853))" ([#8343](https://github.com/typeorm/typeorm/issues/8343)) ([1588c58](https://github.com/typeorm/typeorm/commit/1588c58539e5121dad6b7120f0b5f83f43f1532f)) -* regression in ordering by the relation property ([#8346](https://github.com/typeorm/typeorm/issues/8346)) ([#8352](https://github.com/typeorm/typeorm/issues/8352)) ([0334d10](https://github.com/typeorm/typeorm/commit/0334d104d9ce93c8cb079449ce98ffbdc64219c2)), closes [#3736](https://github.com/typeorm/typeorm/issues/3736) [#8118](https://github.com/typeorm/typeorm/issues/8118) +- "feat: use char(36) for uuid representation in mysql ([#7853](https://github.com/typeorm/typeorm/issues/7853))" ([#8343](https://github.com/typeorm/typeorm/issues/8343)) ([1588c58](https://github.com/typeorm/typeorm/commit/1588c58539e5121dad6b7120f0b5f83f43f1532f)) +- regression in ordering by the relation property ([#8346](https://github.com/typeorm/typeorm/issues/8346)) ([#8352](https://github.com/typeorm/typeorm/issues/8352)) ([0334d10](https://github.com/typeorm/typeorm/commit/0334d104d9ce93c8cb079449ce98ffbdc64219c2)), closes [#3736](https://github.com/typeorm/typeorm/issues/3736) [#8118](https://github.com/typeorm/typeorm/issues/8118) ## [0.2.39](https://github.com/typeorm/typeorm/compare/0.2.38...0.2.39) (2021-11-09) ### Bug Fixes -* attach FOR NO KEY UPDATE lock to query if required ([#8008](https://github.com/typeorm/typeorm/issues/8008)) ([9692930](https://github.com/typeorm/typeorm/commit/96929302a4dc27a19e94c5532a3ae76951e52552)), closes [#7717](https://github.com/typeorm/typeorm/issues/7717) -* cli should accept absolute paths for --config ([4ad3a61](https://github.com/typeorm/typeorm/commit/4ad3a61037ad9ead998665d2857d6e4725d7b718)) -* create a different cacheId if present for count query in getManyAndCount ([#8283](https://github.com/typeorm/typeorm/issues/8283)) ([9f14e48](https://github.com/typeorm/typeorm/commit/9f14e488281fb08d8ea1a95c6cc363e1234fa307)), closes [#4277](https://github.com/typeorm/typeorm/issues/4277) -* defaults type cast filtering in Cockroachdb ([#8144](https://github.com/typeorm/typeorm/issues/8144)) ([28c183e](https://github.com/typeorm/typeorm/commit/28c183e9df562e2eb1e3c93afbd1d4687b1b0846)), closes [#7110](https://github.com/typeorm/typeorm/issues/7110) [#7110](https://github.com/typeorm/typeorm/issues/7110) -* do not generate migration for unchanged enum column ([#8161](https://github.com/typeorm/typeorm/issues/8161)) ([#8164](https://github.com/typeorm/typeorm/issues/8164)) ([4638dea](https://github.com/typeorm/typeorm/commit/4638dea55d0e9239a62fb3143cd96988bf07bc68)) -* NativescriptQueryRunner's query method fails when targeting es2017 ([#8182](https://github.com/typeorm/typeorm/issues/8182)) ([8615733](https://github.com/typeorm/typeorm/commit/861573377bb33b73232399c21b1b3a5c07b58036)) -* OneToManySubjectBuilder bug with multiple primary keys ([#8221](https://github.com/typeorm/typeorm/issues/8221)) ([6558295](https://github.com/typeorm/typeorm/commit/655829592ee10aaa5d28a96691ada0d5510899ea)) -* ordering by joined columns for PostgreSQL ([#3736](https://github.com/typeorm/typeorm/issues/3736)) ([#8118](https://github.com/typeorm/typeorm/issues/8118)) ([1649882](https://github.com/typeorm/typeorm/commit/1649882d335587ac78d2203db3a7ab492a942374)) -* support DeleteResult in SQLiteDriver ([#8237](https://github.com/typeorm/typeorm/issues/8237)) ([b678807](https://github.com/typeorm/typeorm/commit/b6788072c20b5f235df9272625c3d1d7522d27e0)) +- attach FOR NO KEY UPDATE lock to query if required ([#8008](https://github.com/typeorm/typeorm/issues/8008)) ([9692930](https://github.com/typeorm/typeorm/commit/96929302a4dc27a19e94c5532a3ae76951e52552)), closes [#7717](https://github.com/typeorm/typeorm/issues/7717) +- cli should accept absolute paths for --config ([4ad3a61](https://github.com/typeorm/typeorm/commit/4ad3a61037ad9ead998665d2857d6e4725d7b718)) +- create a different cacheId if present for count query in getManyAndCount ([#8283](https://github.com/typeorm/typeorm/issues/8283)) ([9f14e48](https://github.com/typeorm/typeorm/commit/9f14e488281fb08d8ea1a95c6cc363e1234fa307)), closes [#4277](https://github.com/typeorm/typeorm/issues/4277) +- defaults type cast filtering in Cockroachdb ([#8144](https://github.com/typeorm/typeorm/issues/8144)) ([28c183e](https://github.com/typeorm/typeorm/commit/28c183e9df562e2eb1e3c93afbd1d4687b1b0846)), closes [#7110](https://github.com/typeorm/typeorm/issues/7110) [#7110](https://github.com/typeorm/typeorm/issues/7110) +- do not generate migration for unchanged enum column ([#8161](https://github.com/typeorm/typeorm/issues/8161)) ([#8164](https://github.com/typeorm/typeorm/issues/8164)) ([4638dea](https://github.com/typeorm/typeorm/commit/4638dea55d0e9239a62fb3143cd96988bf07bc68)) +- NativescriptQueryRunner's query method fails when targeting es2017 ([#8182](https://github.com/typeorm/typeorm/issues/8182)) ([8615733](https://github.com/typeorm/typeorm/commit/861573377bb33b73232399c21b1b3a5c07b58036)) +- OneToManySubjectBuilder bug with multiple primary keys ([#8221](https://github.com/typeorm/typeorm/issues/8221)) ([6558295](https://github.com/typeorm/typeorm/commit/655829592ee10aaa5d28a96691ada0d5510899ea)) +- ordering by joined columns for PostgreSQL ([#3736](https://github.com/typeorm/typeorm/issues/3736)) ([#8118](https://github.com/typeorm/typeorm/issues/8118)) ([1649882](https://github.com/typeorm/typeorm/commit/1649882d335587ac78d2203db3a7ab492a942374)) +- support DeleteResult in SQLiteDriver ([#8237](https://github.com/typeorm/typeorm/issues/8237)) ([b678807](https://github.com/typeorm/typeorm/commit/b6788072c20b5f235df9272625c3d1d7522d27e0)) ### Features -* add `typeorm` command wrapper to package.json in project template ([#8081](https://github.com/typeorm/typeorm/issues/8081)) ([19d4a91](https://github.com/typeorm/typeorm/commit/19d4a914a5da2c28f1eb4ed1c28a52db7dc809d0)) -* add dependency configuraiton for views [#8240](https://github.com/typeorm/typeorm/issues/8240) ([#8261](https://github.com/typeorm/typeorm/issues/8261)) ([2c861af](https://github.com/typeorm/typeorm/commit/2c861afaef839f33b5cf1cc2b3bcf8b6e4a0be4f)) -* add relation options to all tree queries ([#8080](https://github.com/typeorm/typeorm/issues/8080)) ([e4d4636](https://github.com/typeorm/typeorm/commit/e4d46363917db57a9107048b973b6a12be8d61fd)), closes [#8076](https://github.com/typeorm/typeorm/issues/8076) -* add the ability to pass the driver into all database types ([#8259](https://github.com/typeorm/typeorm/issues/8259)) ([2133ffe](https://github.com/typeorm/typeorm/commit/2133ffea9c678841bf3537838777d9a5fec3a00e)) -* more informative logging in case of migration failure ([#8307](https://github.com/typeorm/typeorm/issues/8307)) ([dc6f1c9](https://github.com/typeorm/typeorm/commit/dc6f1c91be29e88466614eb8b8d21a92659cfd0b)) -* support using custom index with SelectQueryBuilder in MySQL ([#7755](https://github.com/typeorm/typeorm/issues/7755)) ([f79ae58](https://github.com/typeorm/typeorm/commit/f79ae589cd1a658fea553cb57abc2a41a46523f8)) +- add `typeorm` command wrapper to package.json in project template ([#8081](https://github.com/typeorm/typeorm/issues/8081)) ([19d4a91](https://github.com/typeorm/typeorm/commit/19d4a914a5da2c28f1eb4ed1c28a52db7dc809d0)) +- add dependency configuraiton for views [#8240](https://github.com/typeorm/typeorm/issues/8240) ([#8261](https://github.com/typeorm/typeorm/issues/8261)) ([2c861af](https://github.com/typeorm/typeorm/commit/2c861afaef839f33b5cf1cc2b3bcf8b6e4a0be4f)) +- add relation options to all tree queries ([#8080](https://github.com/typeorm/typeorm/issues/8080)) ([e4d4636](https://github.com/typeorm/typeorm/commit/e4d46363917db57a9107048b973b6a12be8d61fd)), closes [#8076](https://github.com/typeorm/typeorm/issues/8076) +- add the ability to pass the driver into all database types ([#8259](https://github.com/typeorm/typeorm/issues/8259)) ([2133ffe](https://github.com/typeorm/typeorm/commit/2133ffea9c678841bf3537838777d9a5fec3a00e)) +- more informative logging in case of migration failure ([#8307](https://github.com/typeorm/typeorm/issues/8307)) ([dc6f1c9](https://github.com/typeorm/typeorm/commit/dc6f1c91be29e88466614eb8b8d21a92659cfd0b)) +- support using custom index with SelectQueryBuilder in MySQL ([#7755](https://github.com/typeorm/typeorm/issues/7755)) ([f79ae58](https://github.com/typeorm/typeorm/commit/f79ae589cd1a658fea553cb57abc2a41a46523f8)) ### Reverts -* Revert "fix: STI types on children in joins (#3160)" (#8309) ([0adad88](https://github.com/typeorm/typeorm/commit/0adad8810e15b8d00259a2635e1c50e85598e1ed)), closes [#3160](https://github.com/typeorm/typeorm/issues/3160) [#8309](https://github.com/typeorm/typeorm/issues/8309) +- Revert "fix: STI types on children in joins (#3160)" (#8309) ([0adad88](https://github.com/typeorm/typeorm/commit/0adad8810e15b8d00259a2635e1c50e85598e1ed)), closes [#3160](https://github.com/typeorm/typeorm/issues/3160) [#8309](https://github.com/typeorm/typeorm/issues/8309) ## [0.2.38](https://github.com/typeorm/typeorm/compare/0.2.37...0.2.38) (2021-10-02) ### Bug Fixes -* prevent using absolute table path in migrations unless required ([#8038](https://github.com/typeorm/typeorm/issues/8038)) ([e9366b3](https://github.com/typeorm/typeorm/commit/e9366b33ddff296de1254019589b85e40aa53e12)) -* snakecase conversion for strings with numbers ([#8111](https://github.com/typeorm/typeorm/issues/8111)) ([749511d](https://github.com/typeorm/typeorm/commit/749511d981f6b9a1a08113b23e8779a91cda78f8)) -* use full path for table lookups ([#8097](https://github.com/typeorm/typeorm/issues/8097)) ([22676a0](https://github.com/typeorm/typeorm/commit/22676a04c30b3b49a61003320dfad3ecad3791e8)) +- prevent using absolute table path in migrations unless required ([#8038](https://github.com/typeorm/typeorm/issues/8038)) ([e9366b3](https://github.com/typeorm/typeorm/commit/e9366b33ddff296de1254019589b85e40aa53e12)) +- snakecase conversion for strings with numbers ([#8111](https://github.com/typeorm/typeorm/issues/8111)) ([749511d](https://github.com/typeorm/typeorm/commit/749511d981f6b9a1a08113b23e8779a91cda78f8)) +- use full path for table lookups ([#8097](https://github.com/typeorm/typeorm/issues/8097)) ([22676a0](https://github.com/typeorm/typeorm/commit/22676a04c30b3b49a61003320dfad3ecad3791e8)) ### Features -* support QueryRunner.stream with Oracle ([#8086](https://github.com/typeorm/typeorm/issues/8086)) ([b858f84](https://github.com/typeorm/typeorm/commit/b858f84e6fb15f801f2564088428d250d1c59e18)) +- support QueryRunner.stream with Oracle ([#8086](https://github.com/typeorm/typeorm/issues/8086)) ([b858f84](https://github.com/typeorm/typeorm/commit/b858f84e6fb15f801f2564088428d250d1c59e18)) ## [0.2.37](https://github.com/typeorm/typeorm/compare/0.2.36...0.2.37) (2021-08-13) ### Bug Fixes -* allow periods in parameter identifiers ([#8022](https://github.com/typeorm/typeorm/issues/8022)) ([4201938](https://github.com/typeorm/typeorm/commit/420193892ffe857c532130c0c7b18dcc4c8d38e2)) -* ConnectionManager `connections` property should include list of `Connection`s ([#8004](https://github.com/typeorm/typeorm/issues/8004)) ([2344db6](https://github.com/typeorm/typeorm/commit/2344db60c4314da31885f5686e94bb6dcb203a96)) -* entity value for date columns that are related ([#8027](https://github.com/typeorm/typeorm/issues/8027)) ([5a3767f](https://github.com/typeorm/typeorm/commit/5a3767f58f6ef355b01cf6e92342401a051a369c)) -* handle brackets when only one condition is passed ([#8048](https://github.com/typeorm/typeorm/issues/8048)) ([ab39066](https://github.com/typeorm/typeorm/commit/ab39066f182d357fcc999cd976510c0e2a61d6de)) -* handle enums with multiple apostrophes in MySQL ([#8013](https://github.com/typeorm/typeorm/issues/8013)) ([37c40a6](https://github.com/typeorm/typeorm/commit/37c40a610caecfc3b27b48a87b0e98d715f23395)), closes [#8011](https://github.com/typeorm/typeorm/issues/8011) -* include all drivers in driverfactory error message ([#8061](https://github.com/typeorm/typeorm/issues/8061)) ([fbd1ef7](https://github.com/typeorm/typeorm/commit/fbd1ef74e84b59ef0b8d99e311f0aced902190e6)) -* resolve not returning soft deleted relations with withDeleted find option ([#8017](https://github.com/typeorm/typeorm/issues/8017)) ([65cbcc7](https://github.com/typeorm/typeorm/commit/65cbcc79bceac4cf8d15dec8c558dcbc9a037220)) -* SAP HANA inserts used incorrect value for returning query ([#8072](https://github.com/typeorm/typeorm/issues/8072)) ([36398db](https://github.com/typeorm/typeorm/commit/36398dbe467274a9ac08a013ed4daaf307ee2de2)) -* some drivers set the wrong database name when defined from url ([#8058](https://github.com/typeorm/typeorm/issues/8058)) ([a3a3284](https://github.com/typeorm/typeorm/commit/a3a32849c04a83adbf775fcf07843a934551dbfb)) -* throw error when not connected in drivers ([#7995](https://github.com/typeorm/typeorm/issues/7995)) ([cd71f62](https://github.com/typeorm/typeorm/commit/cd71f62cb8125d1bbd92b341aa2eea1de0ac3537)) +- allow periods in parameter identifiers ([#8022](https://github.com/typeorm/typeorm/issues/8022)) ([4201938](https://github.com/typeorm/typeorm/commit/420193892ffe857c532130c0c7b18dcc4c8d38e2)) +- ConnectionManager `connections` property should include list of `Connection`s ([#8004](https://github.com/typeorm/typeorm/issues/8004)) ([2344db6](https://github.com/typeorm/typeorm/commit/2344db60c4314da31885f5686e94bb6dcb203a96)) +- entity value for date columns that are related ([#8027](https://github.com/typeorm/typeorm/issues/8027)) ([5a3767f](https://github.com/typeorm/typeorm/commit/5a3767f58f6ef355b01cf6e92342401a051a369c)) +- handle brackets when only one condition is passed ([#8048](https://github.com/typeorm/typeorm/issues/8048)) ([ab39066](https://github.com/typeorm/typeorm/commit/ab39066f182d357fcc999cd976510c0e2a61d6de)) +- handle enums with multiple apostrophes in MySQL ([#8013](https://github.com/typeorm/typeorm/issues/8013)) ([37c40a6](https://github.com/typeorm/typeorm/commit/37c40a610caecfc3b27b48a87b0e98d715f23395)), closes [#8011](https://github.com/typeorm/typeorm/issues/8011) +- include all drivers in driverfactory error message ([#8061](https://github.com/typeorm/typeorm/issues/8061)) ([fbd1ef7](https://github.com/typeorm/typeorm/commit/fbd1ef74e84b59ef0b8d99e311f0aced902190e6)) +- resolve not returning soft deleted relations with withDeleted find option ([#8017](https://github.com/typeorm/typeorm/issues/8017)) ([65cbcc7](https://github.com/typeorm/typeorm/commit/65cbcc79bceac4cf8d15dec8c558dcbc9a037220)) +- SAP HANA inserts used incorrect value for returning query ([#8072](https://github.com/typeorm/typeorm/issues/8072)) ([36398db](https://github.com/typeorm/typeorm/commit/36398dbe467274a9ac08a013ed4daaf307ee2de2)) +- some drivers set the wrong database name when defined from url ([#8058](https://github.com/typeorm/typeorm/issues/8058)) ([a3a3284](https://github.com/typeorm/typeorm/commit/a3a32849c04a83adbf775fcf07843a934551dbfb)) +- throw error when not connected in drivers ([#7995](https://github.com/typeorm/typeorm/issues/7995)) ([cd71f62](https://github.com/typeorm/typeorm/commit/cd71f62cb8125d1bbd92b341aa2eea1de0ac3537)) ### Features -* add relations option to tree queries ([#7981](https://github.com/typeorm/typeorm/issues/7981)) ([ca26297](https://github.com/typeorm/typeorm/commit/ca26297484542498b8f622f540ca354360d53ed0)), closes [#7974](https://github.com/typeorm/typeorm/issues/7974) [#4564](https://github.com/typeorm/typeorm/issues/4564) -* add serviceName option for oracle connections ([#8021](https://github.com/typeorm/typeorm/issues/8021)) ([37bd012](https://github.com/typeorm/typeorm/commit/37bd0124dc81c957b2a036436594ae8c4606eb6c)) -* add support to string array on dropColumns ([#7654](https://github.com/typeorm/typeorm/issues/7654)) ([91d5b2f](https://github.com/typeorm/typeorm/commit/91d5b2fc374c2f7b1545d40ee76577272de21436)) -* support Oracle Implicit Results ([#8050](https://github.com/typeorm/typeorm/issues/8050)) ([fe78bee](https://github.com/typeorm/typeorm/commit/fe78bee3725efef47d5be6f924b9caf13f3299a7)) +- add relations option to tree queries ([#7981](https://github.com/typeorm/typeorm/issues/7981)) ([ca26297](https://github.com/typeorm/typeorm/commit/ca26297484542498b8f622f540ca354360d53ed0)), closes [#7974](https://github.com/typeorm/typeorm/issues/7974) [#4564](https://github.com/typeorm/typeorm/issues/4564) +- add serviceName option for oracle connections ([#8021](https://github.com/typeorm/typeorm/issues/8021)) ([37bd012](https://github.com/typeorm/typeorm/commit/37bd0124dc81c957b2a036436594ae8c4606eb6c)) +- add support to string array on dropColumns ([#7654](https://github.com/typeorm/typeorm/issues/7654)) ([91d5b2f](https://github.com/typeorm/typeorm/commit/91d5b2fc374c2f7b1545d40ee76577272de21436)) +- support Oracle Implicit Results ([#8050](https://github.com/typeorm/typeorm/issues/8050)) ([fe78bee](https://github.com/typeorm/typeorm/commit/fe78bee3725efef47d5be6f924b9caf13f3299a7)) ## [0.2.36](https://github.com/typeorm/typeorm/compare/0.2.35...0.2.36) (2021-07-31) ### Bug Fixes -* add deprecated `WhereExpression` alias for `WhereExpressionBuilder` ([#7980](https://github.com/typeorm/typeorm/issues/7980)) ([76e7ed9](https://github.com/typeorm/typeorm/commit/76e7ed943779b940212c4e453d97028b5ffed7d0)) -* always generate migrations with template string literals ([#7971](https://github.com/typeorm/typeorm/issues/7971)) ([e9c2af6](https://github.com/typeorm/typeorm/commit/e9c2af610a1c9a632605b71d67b97e048be2e29e)) -* use js rather than ts in all `browser` package manifests ([#7982](https://github.com/typeorm/typeorm/issues/7982)) ([0d90bcd](https://github.com/typeorm/typeorm/commit/0d90bcdc8c77f2080aa200fe9f4f962b7b01c9ee)) -* use nvarchar/ntext during transit for SQLServer queries ([#7933](https://github.com/typeorm/typeorm/issues/7933)) ([62d7976](https://github.com/typeorm/typeorm/commit/62d79762dbfe58219a5673ba4d404fe9f2e40436)) +- add deprecated `WhereExpression` alias for `WhereExpressionBuilder` ([#7980](https://github.com/typeorm/typeorm/issues/7980)) ([76e7ed9](https://github.com/typeorm/typeorm/commit/76e7ed943779b940212c4e453d97028b5ffed7d0)) +- always generate migrations with template string literals ([#7971](https://github.com/typeorm/typeorm/issues/7971)) ([e9c2af6](https://github.com/typeorm/typeorm/commit/e9c2af610a1c9a632605b71d67b97e048be2e29e)) +- use js rather than ts in all `browser` package manifests ([#7982](https://github.com/typeorm/typeorm/issues/7982)) ([0d90bcd](https://github.com/typeorm/typeorm/commit/0d90bcdc8c77f2080aa200fe9f4f962b7b01c9ee)) +- use nvarchar/ntext during transit for SQLServer queries ([#7933](https://github.com/typeorm/typeorm/issues/7933)) ([62d7976](https://github.com/typeorm/typeorm/commit/62d79762dbfe58219a5673ba4d404fe9f2e40436)) ### Features -* add postgres connection option `applicationName` ([#7989](https://github.com/typeorm/typeorm/issues/7989)) ([d365acc](https://github.com/typeorm/typeorm/commit/d365acca68069d0bd9acea5b45a73d7f4c1f4d8f)) +- add postgres connection option `applicationName` ([#7989](https://github.com/typeorm/typeorm/issues/7989)) ([d365acc](https://github.com/typeorm/typeorm/commit/d365acca68069d0bd9acea5b45a73d7f4c1f4d8f)) ## [0.2.35](https://github.com/typeorm/typeorm/compare/0.2.34...0.2.35) (2021-07-28) ### Bug Fixes -* `entity` to be `Partial` | `undefined` in `UpdateEvent` ([#7783](https://github.com/typeorm/typeorm/issues/7783)) ([f033045](https://github.com/typeorm/typeorm/commit/f033045dd6d1dac4f6f7e528997a2c5f8892d763)) -* actually return a working ReadStream from SQL Server query runner ([#7893](https://github.com/typeorm/typeorm/issues/7893)) ([e80985f](https://github.com/typeorm/typeorm/commit/e80985fabbafcb4f5409d72840c3902e1619b8a6)) -* added version check before dropping materialized views to keep backward compatibility ([#7716](https://github.com/typeorm/typeorm/issues/7716)) ([29f1f86](https://github.com/typeorm/typeorm/commit/29f1f86ae2a2dafd70fd958b1980b9f059f42f7a)) -* allow for string id in mongo.findByIds call ([#7838](https://github.com/typeorm/typeorm/issues/7838)) ([4b45ae1](https://github.com/typeorm/typeorm/commit/4b45ae1e8174cf438f9fca92c635957513bff8f8)) -* better support of relation-based properties in where clauses ([#7805](https://github.com/typeorm/typeorm/issues/7805)) ([3221c50](https://github.com/typeorm/typeorm/commit/3221c50d878505b1b8435b07451ec94cd8d04fce)) -* Buffer in primary columns causes bugs with relations ([#7952](https://github.com/typeorm/typeorm/issues/7952)) ([37e08a7](https://github.com/typeorm/typeorm/commit/37e08a7848a92cd4f98fec8f33f120cee739352f)), closes [#4060](https://github.com/typeorm/typeorm/issues/4060) -* capacitor does not correctly set journal mode ([#7873](https://github.com/typeorm/typeorm/issues/7873)) ([5f20eb7](https://github.com/typeorm/typeorm/commit/5f20eb791a3c51410d6759548ec11c9a919659ff)) -* Capacitor driver PRAGMA requests failing on Android ([#7728](https://github.com/typeorm/typeorm/issues/7728)) ([9620a26](https://github.com/typeorm/typeorm/commit/9620a26c4eeb34baddce3a841ffd686d82cd87af)) -* condition is optional in SelectQueryBuilder joins ([#7888](https://github.com/typeorm/typeorm/issues/7888)) ([2deaa0e](https://github.com/typeorm/typeorm/commit/2deaa0e948d7b797c0e4d3ccbc3c9c2f0f253caf)) -* correctly handle mongo replica set driver option ([#7908](https://github.com/typeorm/typeorm/issues/7908)) ([9212df4](https://github.com/typeorm/typeorm/commit/9212df45e3899370efdf9ec67f1a6418ce4ac838)) -* correctly load yml in ConnectionOptionsYmlReader ([#7743](https://github.com/typeorm/typeorm/issues/7743)) ([57f9254](https://github.com/typeorm/typeorm/commit/57f9254499ef07500f5e59df20e778ee0f27b9aa)) -* craft oracle connectString as a descriptor with SID ([#7878](https://github.com/typeorm/typeorm/issues/7878)) ([b05d093](https://github.com/typeorm/typeorm/commit/b05d0936ddabae179a42c9c0f67779a6bec3d5b1)) -* delete operation in MongoDB impact all matched documents ([#7811](https://github.com/typeorm/typeorm/issues/7811)) ([0fbae53](https://github.com/typeorm/typeorm/commit/0fbae53bdd83f5da94ac8a468e1506c2852eed02)), closes [#7809](https://github.com/typeorm/typeorm/issues/7809) -* Do not add NULL/NOT NULL for stored columns ([#7708](https://github.com/typeorm/typeorm/issues/7708)) ([3c33e9f](https://github.com/typeorm/typeorm/commit/3c33e9f54541a12b0d0fd37177c6afebf7a5349f)), closes [#7698](https://github.com/typeorm/typeorm/issues/7698) -* do OBJECT_ID lookup for column constraint instead of name in mssql ([#7916](https://github.com/typeorm/typeorm/issues/7916)) ([fa8c1b0](https://github.com/typeorm/typeorm/commit/fa8c1b088a9a6a2a1ffaec1b1a681be99cf2db3c)) -* drop pool.autostart from mssql options because it's unused ([#7877](https://github.com/typeorm/typeorm/issues/7877)) ([0d21a4d](https://github.com/typeorm/typeorm/commit/0d21a4d07ec275a295df6f78b85c4814c027258a)) -* drop SAP statement after `prepare` per Hana client docs ([#7748](https://github.com/typeorm/typeorm/issues/7748)) ([8ca05b1](https://github.com/typeorm/typeorm/commit/8ca05b11db3ba083c7395cca09a4aa98c70e3d8f)) -* eager relation respects children relations ([#5685](https://github.com/typeorm/typeorm/issues/5685)) ([e7e887a](https://github.com/typeorm/typeorm/commit/e7e887a582cce66bd21044472f4a5288894650c9)) -* enable returning additional columns with MSSQL ([#7864](https://github.com/typeorm/typeorm/issues/7864)) ([e1db48d](https://github.com/typeorm/typeorm/commit/e1db48d8391728455744c91ea7976a334300f77d)) -* entity object undefined in `afterUpdate` subscriber ([#7724](https://github.com/typeorm/typeorm/issues/7724)) ([d25304d](https://github.com/typeorm/typeorm/commit/d25304d9e319157c6b8999932fb9144a67bd84cf)) -* find operation in MongoDB do not include nullable values from documents ([#7820](https://github.com/typeorm/typeorm/issues/7820)) ([98c13cf](https://github.com/typeorm/typeorm/commit/98c13cf710de83783bc5b5576a64327b26d26262)), closes [#7760](https://github.com/typeorm/typeorm/issues/7760) -* fix table loading when schemas are used ([3a106a3](https://github.com/typeorm/typeorm/commit/3a106a3cca223dadca58af1244c6dda79c60b43c)) -* foreign keys in SAP were loading from the wrong table ([#7914](https://github.com/typeorm/typeorm/issues/7914)) ([4777a79](https://github.com/typeorm/typeorm/commit/4777a795210c3a93a4171a17dbdce248e25b21da)) -* handle postgres default when tableColumn.default is not string ([#7816](https://github.com/typeorm/typeorm/issues/7816)) ([0463855](https://github.com/typeorm/typeorm/commit/0463855223100028e62f7cb2e84319770f54449e)) -* handle snake case of ABcD which should become a_bc_d ([#7883](https://github.com/typeorm/typeorm/issues/7883)) ([eb680f9](https://github.com/typeorm/typeorm/commit/eb680f99b74c335556d23016264fcf1ea6ce1d6f)) -* improve query for MSSQL to fetch foreign keys and tables ([#7935](https://github.com/typeorm/typeorm/issues/7935)) ([f6af01a](https://github.com/typeorm/typeorm/commit/f6af01ad1b20ce67dc03448f050de3127227758c)) -* make `OracleQueryRunner` createDatabase if-not-exists not fail ([f5a80ef](https://github.com/typeorm/typeorm/commit/f5a80ef3df82120fee8f68e02f320dacbc856607)) -* only pass `data` from SaveOptions during that query ([#7886](https://github.com/typeorm/typeorm/issues/7886)) ([1de2e13](https://github.com/typeorm/typeorm/commit/1de2e13cfe442af99c2cf017f48127e1de3a08d9)) -* oracle cannot support DB in table identifiers ([#7954](https://github.com/typeorm/typeorm/issues/7954)) ([8c60d91](https://github.com/typeorm/typeorm/commit/8c60d917ef5fbfdc11b7c3ad8e2901eba3f9fa4b)) -* pass table to namingstrategy when we can instead of table name ([#7925](https://github.com/typeorm/typeorm/issues/7925)) ([140002d](https://github.com/typeorm/typeorm/commit/140002d1ebc4837071dab83a7bb164a02a7a2732)) -* prevent modification of the FindOptions.relations ([#7887](https://github.com/typeorm/typeorm/issues/7887)) ([a2fcad6](https://github.com/typeorm/typeorm/commit/a2fcad6ef963c3e444765d6a7b4fa1e0e89a72e6)) -* prevent reuse of broken connections in postgres pool ([#7792](https://github.com/typeorm/typeorm/issues/7792)) ([5cf368a](https://github.com/typeorm/typeorm/commit/5cf368a23fa78b9e97dd12b54616f17b8431ffee)) -* prevent transactions in the Cordova driver ([#7771](https://github.com/typeorm/typeorm/issues/7771)) ([fc4133c](https://github.com/typeorm/typeorm/commit/fc4133cf621874c616bf7643c79112b9f68a1e09)) -* properly escape oracle table paths ([#7917](https://github.com/typeorm/typeorm/issues/7917)) ([7e8687c](https://github.com/typeorm/typeorm/commit/7e8687c45283cdb2caffa53ed5ebab527797c3e8)) -* regression when making `join` conditions `undefined`-able ([#7892](https://github.com/typeorm/typeorm/issues/7892)) ([b0c1cc6](https://github.com/typeorm/typeorm/commit/b0c1cc6d6820e93bc7b986d4f18db4020195e170)) -* restored `buildColumnAlias` for backward compatibility ([#7706](https://github.com/typeorm/typeorm/issues/7706)) ([36ceefa](https://github.com/typeorm/typeorm/commit/36ceefa710c0994e054c8e267a1fb1bdf4b25c39)) -* return correct DeleteResult and UpdateResult for mongo ([#7884](https://github.com/typeorm/typeorm/issues/7884)) ([7a646a2](https://github.com/typeorm/typeorm/commit/7a646a212815e6b9c2dda752442075624f9f552d)) -* support fully qualified schema in createSchema ([#7934](https://github.com/typeorm/typeorm/issues/7934)) ([94edd12](https://github.com/typeorm/typeorm/commit/94edd12ca450d4dbcd2e4902e1009fcd27136490)) -* support table names between schemas in oracle ([#7951](https://github.com/typeorm/typeorm/issues/7951)) ([aa45b93](https://github.com/typeorm/typeorm/commit/aa45b935ff33915a86199307c86aabf904d67e28)) -* typing so SelectQueryBuilder.getRawOne may return undefined ([#7863](https://github.com/typeorm/typeorm/issues/7863)) ([36e5a0c](https://github.com/typeorm/typeorm/commit/36e5a0cf09a25dfe98ffa130f35005a8eacc4155)), closes [#7449](https://github.com/typeorm/typeorm/issues/7449) -* typo prevented us from pulling the schema correctly in some cases ([c7f2db8](https://github.com/typeorm/typeorm/commit/c7f2db8d6999b990308787681a2767e41ad2bdd6)) -* update operation in MongoDB impact all matched documents ([#7803](https://github.com/typeorm/typeorm/issues/7803)) ([052014c](https://github.com/typeorm/typeorm/commit/052014cdba844b1a7867f46606045a494cffc907)), closes [#7788](https://github.com/typeorm/typeorm/issues/7788) -* use correct query for cross-database mssql identity check ([#7911](https://github.com/typeorm/typeorm/issues/7911)) ([7869fb1](https://github.com/typeorm/typeorm/commit/7869fb143c2b3ec019507a79e80eb2e29c270338)) -* use fully qualified and escaped table names for oracle ([#7857](https://github.com/typeorm/typeorm/issues/7857)) ([2b90725](https://github.com/typeorm/typeorm/commit/2b90725a080c7ea9140464a68c8c8c9475fd73f9)), closes [#7779](https://github.com/typeorm/typeorm/issues/7779) -* use ObjectLiteral in UpdateEvent rather than `Entity` ([#7910](https://github.com/typeorm/typeorm/issues/7910)) ([78fbc14](https://github.com/typeorm/typeorm/commit/78fbc14b3ee915ce035cb1546c92142eab6a899e)) -* use only table name in constraint naming strategy ([5dc777f](https://github.com/typeorm/typeorm/commit/5dc777f17ec238c3f3303aa9379fe855727220b1)) - +- `entity` to be `Partial` | `undefined` in `UpdateEvent` ([#7783](https://github.com/typeorm/typeorm/issues/7783)) ([f033045](https://github.com/typeorm/typeorm/commit/f033045dd6d1dac4f6f7e528997a2c5f8892d763)) +- actually return a working ReadStream from SQL Server query runner ([#7893](https://github.com/typeorm/typeorm/issues/7893)) ([e80985f](https://github.com/typeorm/typeorm/commit/e80985fabbafcb4f5409d72840c3902e1619b8a6)) +- added version check before dropping materialized views to keep backward compatibility ([#7716](https://github.com/typeorm/typeorm/issues/7716)) ([29f1f86](https://github.com/typeorm/typeorm/commit/29f1f86ae2a2dafd70fd958b1980b9f059f42f7a)) +- allow for string id in mongo.findByIds call ([#7838](https://github.com/typeorm/typeorm/issues/7838)) ([4b45ae1](https://github.com/typeorm/typeorm/commit/4b45ae1e8174cf438f9fca92c635957513bff8f8)) +- better support of relation-based properties in where clauses ([#7805](https://github.com/typeorm/typeorm/issues/7805)) ([3221c50](https://github.com/typeorm/typeorm/commit/3221c50d878505b1b8435b07451ec94cd8d04fce)) +- Buffer in primary columns causes bugs with relations ([#7952](https://github.com/typeorm/typeorm/issues/7952)) ([37e08a7](https://github.com/typeorm/typeorm/commit/37e08a7848a92cd4f98fec8f33f120cee739352f)), closes [#4060](https://github.com/typeorm/typeorm/issues/4060) +- capacitor does not correctly set journal mode ([#7873](https://github.com/typeorm/typeorm/issues/7873)) ([5f20eb7](https://github.com/typeorm/typeorm/commit/5f20eb791a3c51410d6759548ec11c9a919659ff)) +- Capacitor driver PRAGMA requests failing on Android ([#7728](https://github.com/typeorm/typeorm/issues/7728)) ([9620a26](https://github.com/typeorm/typeorm/commit/9620a26c4eeb34baddce3a841ffd686d82cd87af)) +- condition is optional in SelectQueryBuilder joins ([#7888](https://github.com/typeorm/typeorm/issues/7888)) ([2deaa0e](https://github.com/typeorm/typeorm/commit/2deaa0e948d7b797c0e4d3ccbc3c9c2f0f253caf)) +- correctly handle mongo replica set driver option ([#7908](https://github.com/typeorm/typeorm/issues/7908)) ([9212df4](https://github.com/typeorm/typeorm/commit/9212df45e3899370efdf9ec67f1a6418ce4ac838)) +- correctly load yml in ConnectionOptionsYmlReader ([#7743](https://github.com/typeorm/typeorm/issues/7743)) ([57f9254](https://github.com/typeorm/typeorm/commit/57f9254499ef07500f5e59df20e778ee0f27b9aa)) +- craft oracle connectString as a descriptor with SID ([#7878](https://github.com/typeorm/typeorm/issues/7878)) ([b05d093](https://github.com/typeorm/typeorm/commit/b05d0936ddabae179a42c9c0f67779a6bec3d5b1)) +- delete operation in MongoDB impact all matched documents ([#7811](https://github.com/typeorm/typeorm/issues/7811)) ([0fbae53](https://github.com/typeorm/typeorm/commit/0fbae53bdd83f5da94ac8a468e1506c2852eed02)), closes [#7809](https://github.com/typeorm/typeorm/issues/7809) +- Do not add NULL/NOT NULL for stored columns ([#7708](https://github.com/typeorm/typeorm/issues/7708)) ([3c33e9f](https://github.com/typeorm/typeorm/commit/3c33e9f54541a12b0d0fd37177c6afebf7a5349f)), closes [#7698](https://github.com/typeorm/typeorm/issues/7698) +- do OBJECT_ID lookup for column constraint instead of name in mssql ([#7916](https://github.com/typeorm/typeorm/issues/7916)) ([fa8c1b0](https://github.com/typeorm/typeorm/commit/fa8c1b088a9a6a2a1ffaec1b1a681be99cf2db3c)) +- drop pool.autostart from mssql options because it's unused ([#7877](https://github.com/typeorm/typeorm/issues/7877)) ([0d21a4d](https://github.com/typeorm/typeorm/commit/0d21a4d07ec275a295df6f78b85c4814c027258a)) +- drop SAP statement after `prepare` per Hana client docs ([#7748](https://github.com/typeorm/typeorm/issues/7748)) ([8ca05b1](https://github.com/typeorm/typeorm/commit/8ca05b11db3ba083c7395cca09a4aa98c70e3d8f)) +- eager relation respects children relations ([#5685](https://github.com/typeorm/typeorm/issues/5685)) ([e7e887a](https://github.com/typeorm/typeorm/commit/e7e887a582cce66bd21044472f4a5288894650c9)) +- enable returning additional columns with MSSQL ([#7864](https://github.com/typeorm/typeorm/issues/7864)) ([e1db48d](https://github.com/typeorm/typeorm/commit/e1db48d8391728455744c91ea7976a334300f77d)) +- entity object undefined in `afterUpdate` subscriber ([#7724](https://github.com/typeorm/typeorm/issues/7724)) ([d25304d](https://github.com/typeorm/typeorm/commit/d25304d9e319157c6b8999932fb9144a67bd84cf)) +- find operation in MongoDB do not include nullable values from documents ([#7820](https://github.com/typeorm/typeorm/issues/7820)) ([98c13cf](https://github.com/typeorm/typeorm/commit/98c13cf710de83783bc5b5576a64327b26d26262)), closes [#7760](https://github.com/typeorm/typeorm/issues/7760) +- fix table loading when schemas are used ([3a106a3](https://github.com/typeorm/typeorm/commit/3a106a3cca223dadca58af1244c6dda79c60b43c)) +- foreign keys in SAP were loading from the wrong table ([#7914](https://github.com/typeorm/typeorm/issues/7914)) ([4777a79](https://github.com/typeorm/typeorm/commit/4777a795210c3a93a4171a17dbdce248e25b21da)) +- handle postgres default when tableColumn.default is not string ([#7816](https://github.com/typeorm/typeorm/issues/7816)) ([0463855](https://github.com/typeorm/typeorm/commit/0463855223100028e62f7cb2e84319770f54449e)) +- handle snake case of ABcD which should become a_bc_d ([#7883](https://github.com/typeorm/typeorm/issues/7883)) ([eb680f9](https://github.com/typeorm/typeorm/commit/eb680f99b74c335556d23016264fcf1ea6ce1d6f)) +- improve query for MSSQL to fetch foreign keys and tables ([#7935](https://github.com/typeorm/typeorm/issues/7935)) ([f6af01a](https://github.com/typeorm/typeorm/commit/f6af01ad1b20ce67dc03448f050de3127227758c)) +- make `OracleQueryRunner` createDatabase if-not-exists not fail ([f5a80ef](https://github.com/typeorm/typeorm/commit/f5a80ef3df82120fee8f68e02f320dacbc856607)) +- only pass `data` from SaveOptions during that query ([#7886](https://github.com/typeorm/typeorm/issues/7886)) ([1de2e13](https://github.com/typeorm/typeorm/commit/1de2e13cfe442af99c2cf017f48127e1de3a08d9)) +- oracle cannot support DB in table identifiers ([#7954](https://github.com/typeorm/typeorm/issues/7954)) ([8c60d91](https://github.com/typeorm/typeorm/commit/8c60d917ef5fbfdc11b7c3ad8e2901eba3f9fa4b)) +- pass table to namingstrategy when we can instead of table name ([#7925](https://github.com/typeorm/typeorm/issues/7925)) ([140002d](https://github.com/typeorm/typeorm/commit/140002d1ebc4837071dab83a7bb164a02a7a2732)) +- prevent modification of the FindOptions.relations ([#7887](https://github.com/typeorm/typeorm/issues/7887)) ([a2fcad6](https://github.com/typeorm/typeorm/commit/a2fcad6ef963c3e444765d6a7b4fa1e0e89a72e6)) +- prevent reuse of broken connections in postgres pool ([#7792](https://github.com/typeorm/typeorm/issues/7792)) ([5cf368a](https://github.com/typeorm/typeorm/commit/5cf368a23fa78b9e97dd12b54616f17b8431ffee)) +- prevent transactions in the Cordova driver ([#7771](https://github.com/typeorm/typeorm/issues/7771)) ([fc4133c](https://github.com/typeorm/typeorm/commit/fc4133cf621874c616bf7643c79112b9f68a1e09)) +- properly escape oracle table paths ([#7917](https://github.com/typeorm/typeorm/issues/7917)) ([7e8687c](https://github.com/typeorm/typeorm/commit/7e8687c45283cdb2caffa53ed5ebab527797c3e8)) +- regression when making `join` conditions `undefined`-able ([#7892](https://github.com/typeorm/typeorm/issues/7892)) ([b0c1cc6](https://github.com/typeorm/typeorm/commit/b0c1cc6d6820e93bc7b986d4f18db4020195e170)) +- restored `buildColumnAlias` for backward compatibility ([#7706](https://github.com/typeorm/typeorm/issues/7706)) ([36ceefa](https://github.com/typeorm/typeorm/commit/36ceefa710c0994e054c8e267a1fb1bdf4b25c39)) +- return correct DeleteResult and UpdateResult for mongo ([#7884](https://github.com/typeorm/typeorm/issues/7884)) ([7a646a2](https://github.com/typeorm/typeorm/commit/7a646a212815e6b9c2dda752442075624f9f552d)) +- support fully qualified schema in createSchema ([#7934](https://github.com/typeorm/typeorm/issues/7934)) ([94edd12](https://github.com/typeorm/typeorm/commit/94edd12ca450d4dbcd2e4902e1009fcd27136490)) +- support table names between schemas in oracle ([#7951](https://github.com/typeorm/typeorm/issues/7951)) ([aa45b93](https://github.com/typeorm/typeorm/commit/aa45b935ff33915a86199307c86aabf904d67e28)) +- typing so SelectQueryBuilder.getRawOne may return undefined ([#7863](https://github.com/typeorm/typeorm/issues/7863)) ([36e5a0c](https://github.com/typeorm/typeorm/commit/36e5a0cf09a25dfe98ffa130f35005a8eacc4155)), closes [#7449](https://github.com/typeorm/typeorm/issues/7449) +- typo prevented us from pulling the schema correctly in some cases ([c7f2db8](https://github.com/typeorm/typeorm/commit/c7f2db8d6999b990308787681a2767e41ad2bdd6)) +- update operation in MongoDB impact all matched documents ([#7803](https://github.com/typeorm/typeorm/issues/7803)) ([052014c](https://github.com/typeorm/typeorm/commit/052014cdba844b1a7867f46606045a494cffc907)), closes [#7788](https://github.com/typeorm/typeorm/issues/7788) +- use correct query for cross-database mssql identity check ([#7911](https://github.com/typeorm/typeorm/issues/7911)) ([7869fb1](https://github.com/typeorm/typeorm/commit/7869fb143c2b3ec019507a79e80eb2e29c270338)) +- use fully qualified and escaped table names for oracle ([#7857](https://github.com/typeorm/typeorm/issues/7857)) ([2b90725](https://github.com/typeorm/typeorm/commit/2b90725a080c7ea9140464a68c8c8c9475fd73f9)), closes [#7779](https://github.com/typeorm/typeorm/issues/7779) +- use ObjectLiteral in UpdateEvent rather than `Entity` ([#7910](https://github.com/typeorm/typeorm/issues/7910)) ([78fbc14](https://github.com/typeorm/typeorm/commit/78fbc14b3ee915ce035cb1546c92142eab6a899e)) +- use only table name in constraint naming strategy ([5dc777f](https://github.com/typeorm/typeorm/commit/5dc777f17ec238c3f3303aa9379fe855727220b1)) ### Features -* add `retryWrites` to allowed mongo `extra` options ([#7869](https://github.com/typeorm/typeorm/issues/7869)) ([dcdaaca](https://github.com/typeorm/typeorm/commit/dcdaacacaf122c7579d31a700e93c5357a9e0a16)) -* add capacitor driver options for encryption & version ([#7868](https://github.com/typeorm/typeorm/issues/7868)) ([a2bd94b](https://github.com/typeorm/typeorm/commit/a2bd94b146738a2aa637f52011c1fd5e92ed38e1)) -* add connection option `entitySkipConstructor` ([f43d561](https://github.com/typeorm/typeorm/commit/f43d56110fd41c23d80e32021adf4ade7648ce97)) -* add ObjectLiteral typing to andWhere / orWhere ([#7786](https://github.com/typeorm/typeorm/issues/7786)) ([525381d](https://github.com/typeorm/typeorm/commit/525381d91e15d1d9b9dd7bd36beaac35646ee3b0)) -* add parseTableName to Driver interface ([#7956](https://github.com/typeorm/typeorm/issues/7956)) ([cffbf43](https://github.com/typeorm/typeorm/commit/cffbf43b291e59a45c5b8e3685a1d1153dfeaeb1)) -* add path, database, and schema to Table ([#7913](https://github.com/typeorm/typeorm/issues/7913)) ([444e38b](https://github.com/typeorm/typeorm/commit/444e38bffd7f3ff962282d01bf980a554a94b3fa)) -* add property for database and schema in views ([#7953](https://github.com/typeorm/typeorm/issues/7953)) ([4c5bbd9](https://github.com/typeorm/typeorm/commit/4c5bbd9e1c92219712efaff061d6501c473193dd)) -* add referenced database & schema to TableForeignKey ([fff6b11](https://github.com/typeorm/typeorm/commit/fff6b11cd3c369f9f95c99decba84213847e76e3)) -* add writeConcern option as a possible `extras` for mongodb ([#7801](https://github.com/typeorm/typeorm/issues/7801)) ([90894c7](https://github.com/typeorm/typeorm/commit/90894c7fd39c5237ddb26690082ca4c2443b2fd4)) -* consistent parsing and escaping of table names in QueryRunners ([bd9e767](https://github.com/typeorm/typeorm/commit/bd9e767ffaafe9381630787fa860d0904b8d3e49)) -* implement OracleQueryRunner.hasDatabase ([128b982](https://github.com/typeorm/typeorm/commit/128b9825f2b9fd81c4ee5ba36e554ef86eb64865)) -* make parameter to getTables optional ([#7901](https://github.com/typeorm/typeorm/issues/7901)) ([ba86602](https://github.com/typeorm/typeorm/commit/ba866026ec7d0ce44f68f9b585bc094c82e32dcd)) -* make postgres extensions install optional ([#7725](https://github.com/typeorm/typeorm/issues/7725)) ([92b96a5](https://github.com/typeorm/typeorm/commit/92b96a550512bb218e1c6691e2f5908007d0b6e6)), closes [#7662](https://github.com/typeorm/typeorm/issues/7662) -* publicly export `Transaction*Event` types ([#7949](https://github.com/typeorm/typeorm/issues/7949)) ([2436a66](https://github.com/typeorm/typeorm/commit/2436a66b499c81e1d2394b19f3b158258f31d899)), closes [/github.com/typeorm/typeorm/blob/master/src/subscriber/EntitySubscriberInterface.ts#L12](https://github.com//github.com/typeorm/typeorm/blob/master/src/subscriber/EntitySubscriberInterface.ts/issues/L12) -* set `enableArithAbort` for SQLServerDriver ([#7894](https://github.com/typeorm/typeorm/issues/7894)) ([1f64da2](https://github.com/typeorm/typeorm/commit/1f64da2c49b21b678a0f2faf0805dbeb763b0f4a)) -* support absolute path in migration:generate ([#7720](https://github.com/typeorm/typeorm/issues/7720)) ([b690c27](https://github.com/typeorm/typeorm/commit/b690c270cd2e9886329e520cab5ee31eaeae77a4)) -* use char(36) for uuid representation in mysql ([#7853](https://github.com/typeorm/typeorm/issues/7853)) ([063aafa](https://github.com/typeorm/typeorm/commit/063aafa34408dd9b1ed3802bb43be6f772523277)) -* use column length from driver when creating columns ([#7858](https://github.com/typeorm/typeorm/issues/7858)) ([b107ad9](https://github.com/typeorm/typeorm/commit/b107ad95164627b6e959b4e476eb82f3dded972c)) +- add `retryWrites` to allowed mongo `extra` options ([#7869](https://github.com/typeorm/typeorm/issues/7869)) ([dcdaaca](https://github.com/typeorm/typeorm/commit/dcdaacacaf122c7579d31a700e93c5357a9e0a16)) +- add capacitor driver options for encryption & version ([#7868](https://github.com/typeorm/typeorm/issues/7868)) ([a2bd94b](https://github.com/typeorm/typeorm/commit/a2bd94b146738a2aa637f52011c1fd5e92ed38e1)) +- add connection option `entitySkipConstructor` ([f43d561](https://github.com/typeorm/typeorm/commit/f43d56110fd41c23d80e32021adf4ade7648ce97)) +- add ObjectLiteral typing to andWhere / orWhere ([#7786](https://github.com/typeorm/typeorm/issues/7786)) ([525381d](https://github.com/typeorm/typeorm/commit/525381d91e15d1d9b9dd7bd36beaac35646ee3b0)) +- add parseTableName to Driver interface ([#7956](https://github.com/typeorm/typeorm/issues/7956)) ([cffbf43](https://github.com/typeorm/typeorm/commit/cffbf43b291e59a45c5b8e3685a1d1153dfeaeb1)) +- add path, database, and schema to Table ([#7913](https://github.com/typeorm/typeorm/issues/7913)) ([444e38b](https://github.com/typeorm/typeorm/commit/444e38bffd7f3ff962282d01bf980a554a94b3fa)) +- add property for database and schema in views ([#7953](https://github.com/typeorm/typeorm/issues/7953)) ([4c5bbd9](https://github.com/typeorm/typeorm/commit/4c5bbd9e1c92219712efaff061d6501c473193dd)) +- add referenced database & schema to TableForeignKey ([fff6b11](https://github.com/typeorm/typeorm/commit/fff6b11cd3c369f9f95c99decba84213847e76e3)) +- add writeConcern option as a possible `extras` for mongodb ([#7801](https://github.com/typeorm/typeorm/issues/7801)) ([90894c7](https://github.com/typeorm/typeorm/commit/90894c7fd39c5237ddb26690082ca4c2443b2fd4)) +- consistent parsing and escaping of table names in QueryRunners ([bd9e767](https://github.com/typeorm/typeorm/commit/bd9e767ffaafe9381630787fa860d0904b8d3e49)) +- implement OracleQueryRunner.hasDatabase ([128b982](https://github.com/typeorm/typeorm/commit/128b9825f2b9fd81c4ee5ba36e554ef86eb64865)) +- make parameter to getTables optional ([#7901](https://github.com/typeorm/typeorm/issues/7901)) ([ba86602](https://github.com/typeorm/typeorm/commit/ba866026ec7d0ce44f68f9b585bc094c82e32dcd)) +- make postgres extensions install optional ([#7725](https://github.com/typeorm/typeorm/issues/7725)) ([92b96a5](https://github.com/typeorm/typeorm/commit/92b96a550512bb218e1c6691e2f5908007d0b6e6)), closes [#7662](https://github.com/typeorm/typeorm/issues/7662) +- publicly export `Transaction*Event` types ([#7949](https://github.com/typeorm/typeorm/issues/7949)) ([2436a66](https://github.com/typeorm/typeorm/commit/2436a66b499c81e1d2394b19f3b158258f31d899)), closes [/github.com/typeorm/typeorm/blob/master/src/subscriber/EntitySubscriberInterface.ts#L12](https://github.com//github.com/typeorm/typeorm/blob/master/src/subscriber/EntitySubscriberInterface.ts/issues/L12) +- set `enableArithAbort` for SQLServerDriver ([#7894](https://github.com/typeorm/typeorm/issues/7894)) ([1f64da2](https://github.com/typeorm/typeorm/commit/1f64da2c49b21b678a0f2faf0805dbeb763b0f4a)) +- support absolute path in migration:generate ([#7720](https://github.com/typeorm/typeorm/issues/7720)) ([b690c27](https://github.com/typeorm/typeorm/commit/b690c270cd2e9886329e520cab5ee31eaeae77a4)) +- use char(36) for uuid representation in mysql ([#7853](https://github.com/typeorm/typeorm/issues/7853)) ([063aafa](https://github.com/typeorm/typeorm/commit/063aafa34408dd9b1ed3802bb43be6f772523277)) +- use column length from driver when creating columns ([#7858](https://github.com/typeorm/typeorm/issues/7858)) ([b107ad9](https://github.com/typeorm/typeorm/commit/b107ad95164627b6e959b4e476eb82f3dded972c)) ## [0.2.34](https://github.com/typeorm/typeorm/compare/0.2.33...0.2.34) (2021-06-03) ### Bug Fixes -* restored `buildColumnAlias` for backward compatibility ([#7706](https://github.com/typeorm/typeorm/issues/7706)) ([36ceefa](https://github.com/typeorm/typeorm/commit/36ceefa710c0994e054c8e267a1fb1bdf4b25c39)) +- restored `buildColumnAlias` for backward compatibility ([#7706](https://github.com/typeorm/typeorm/issues/7706)) ([36ceefa](https://github.com/typeorm/typeorm/commit/36ceefa710c0994e054c8e267a1fb1bdf4b25c39)) ## [0.2.33](https://github.com/typeorm/typeorm/compare/0.2.32...0.2.33) (2021-06-01) ### Bug Fixes -* @Unique constraint is not created with specified name ([beea2e1](https://github.com/typeorm/typeorm/commit/beea2e1e4429d13d7864ebc23aa6e58fa01647ea)) -* `MATERIALIZED VIEW` is treated as a regular `VIEW` which causes issues on sync ([#7592](https://github.com/typeorm/typeorm/issues/7592)) ([f85f436](https://github.com/typeorm/typeorm/commit/f85f436f51fb000cd9959b44e8d7a79bf0cd10ab)) -* added error handler for slave connections in MySQL and AuroraDataApi drivers ([#7641](https://github.com/typeorm/typeorm/issues/7641)) ([882a740](https://github.com/typeorm/typeorm/commit/882a7409e5bd018fad6c04925ff5ccaa7e9e7db2)) -* call listeners for array embeddeds in MongoDB ([#4260](https://github.com/typeorm/typeorm/issues/4260)) ([2dc355b](https://github.com/typeorm/typeorm/commit/2dc355b50179a18fe690924797f5c69f2fe23c1f)) -* closing pool incorrectly works on Postgres ([#7596](https://github.com/typeorm/typeorm/issues/7596)) ([1310c97](https://github.com/typeorm/typeorm/commit/1310c97ff3092b9ff23b2fe83d6b7763beb4316b)), closes [#6958](https://github.com/typeorm/typeorm/issues/6958) [#6958](https://github.com/typeorm/typeorm/issues/6958) [#6958](https://github.com/typeorm/typeorm/issues/6958) -* column name with empty spaces causes bug in Index/Unique decorators [#7534](https://github.com/typeorm/typeorm/issues/7534) ([a3a6e06](https://github.com/typeorm/typeorm/commit/a3a6e063a37fbe1444ffd0c8b1d93bf3ea90e75d)) -* correctly strip type conversion in postgres for default values ([#7681](https://github.com/typeorm/typeorm/issues/7681)) ([069b8b6](https://github.com/typeorm/typeorm/commit/069b8b6888c389d93ff44ca6ed964fb5913d9840)), closes [#1532](https://github.com/typeorm/typeorm/issues/1532) [#7647](https://github.com/typeorm/typeorm/issues/7647) [#5132](https://github.com/typeorm/typeorm/issues/5132) -* datetime functions in column "default" leads to unnecessary queries during synchronization ([#7517](https://github.com/typeorm/typeorm/issues/7517)) ([03f3285](https://github.com/typeorm/typeorm/commit/03f328583750ed08272fc1a640adcd13e82f09af)), closes [#3991](https://github.com/typeorm/typeorm/issues/3991) [#3991](https://github.com/typeorm/typeorm/issues/3991) [#2737](https://github.com/typeorm/typeorm/issues/2737) [#2737](https://github.com/typeorm/typeorm/issues/2737) [#6412](https://github.com/typeorm/typeorm/issues/6412) [#4281](https://github.com/typeorm/typeorm/issues/4281) [#4658](https://github.com/typeorm/typeorm/issues/4658) [#3991](https://github.com/typeorm/typeorm/issues/3991) [#2333](https://github.com/typeorm/typeorm/issues/2333) [#7381](https://github.com/typeorm/typeorm/issues/7381) [#4658](https://github.com/typeorm/typeorm/issues/4658) [#3991](https://github.com/typeorm/typeorm/issues/3991) [#3991](https://github.com/typeorm/typeorm/issues/3991) [#3991](https://github.com/typeorm/typeorm/issues/3991) [#3991](https://github.com/typeorm/typeorm/issues/3991) -* default `schema` defined in entity/connection leads to unnecessary queries during schema sync ([#7575](https://github.com/typeorm/typeorm/issues/7575)) ([7eb0327](https://github.com/typeorm/typeorm/commit/7eb032705912cbf4ee340ed9e49970d0f6e23714)), closes [#7276](https://github.com/typeorm/typeorm/issues/7276) [#7276](https://github.com/typeorm/typeorm/issues/7276) -* do a deep comparison to see if the default value has changed for `json` types in Postgres ([#7650](https://github.com/typeorm/typeorm/issues/7650)) ([a471c1b](https://github.com/typeorm/typeorm/commit/a471c1b689848e7cd9203dcef5edd192019ea456)) -* Incorrect migration generated when multiple views are updated in a single migration ([#7587](https://github.com/typeorm/typeorm/issues/7587)) ([0b103dd](https://github.com/typeorm/typeorm/commit/0b103dd0347737c91510c7ed4719a289dacf8d3b)), closes [#7586](https://github.com/typeorm/typeorm/issues/7586) -* issues with custom enum name in Postgres ([#7661](https://github.com/typeorm/typeorm/issues/7661)) ([ad0262a](https://github.com/typeorm/typeorm/commit/ad0262a116e5366b562e70a1bbc60246add78d83)), closes [#7614](https://github.com/typeorm/typeorm/issues/7614) [#7541](https://github.com/typeorm/typeorm/issues/7541) [#7647](https://github.com/typeorm/typeorm/issues/7647) [#6540](https://github.com/typeorm/typeorm/issues/6540) -* mongodb connectionURL parse options ([#7560](https://github.com/typeorm/typeorm/issues/7560)) ([b2ac41a](https://github.com/typeorm/typeorm/commit/b2ac41a706635aba37b204eaf7ebf52aaee91104)) -* mongodb typings for Cursor ([#7526](https://github.com/typeorm/typeorm/issues/7526)) ([daf3991](https://github.com/typeorm/typeorm/commit/daf399171996d578f0607dd0631647bed59ff212)) -* only first \0 is removed in comments, only first \\ is escaped etc. ([#7532](https://github.com/typeorm/typeorm/issues/7532)) ([36b14cb](https://github.com/typeorm/typeorm/commit/36b14cbd808d73c61c9308d66291cf06e860419a)) -* pass `ManyToMany` `onUpdate` option to foreign key metadata ([#5714](https://github.com/typeorm/typeorm/issues/5714)) ([198d2c5](https://github.com/typeorm/typeorm/commit/198d2c50acab9d0d748194506970415866247da4)), closes [#4980](https://github.com/typeorm/typeorm/issues/4980) -* Postgres identifier exceeds limit on eager relations ([#7508](https://github.com/typeorm/typeorm/issues/7508)) ([#7509](https://github.com/typeorm/typeorm/issues/7509)) ([e4ec429](https://github.com/typeorm/typeorm/commit/e4ec429fe518c26f4c95175a482bde143d508254)) -* remove `enableExtension` for slave connections in Postgres ([#7693](https://github.com/typeorm/typeorm/issues/7693)) ([620aac9](https://github.com/typeorm/typeorm/commit/620aac9e0f2c089f78c7a055b2fb844a475a7eb5)), closes [#7691](https://github.com/typeorm/typeorm/issues/7691) -* replaced deprecated `insert` method with `insertOne` for MongoDriver in MigrationExecutor. ([#7594](https://github.com/typeorm/typeorm/issues/7594)) ([83fed60](https://github.com/typeorm/typeorm/commit/83fed60cccc498d1c5776c05a5aa3ad47c50453e)) -* resolve issue when enum that has functions is used in entity ([#7653](https://github.com/typeorm/typeorm/issues/7653)) ([dba327d](https://github.com/typeorm/typeorm/commit/dba327d426f591317f8210302107b95be1a5b420)), closes [#7651](https://github.com/typeorm/typeorm/issues/7651) -* Silent failure in createDatabase and dropDatabase with Postgres ([#7590](https://github.com/typeorm/typeorm/issues/7590)) ([974d2d4](https://github.com/typeorm/typeorm/commit/974d2d4efb0bdcf57e0522b4da3c94ab2937427b)), closes [#6867](https://github.com/typeorm/typeorm/issues/6867) -* STI types on children in joins ([#3160](https://github.com/typeorm/typeorm/issues/3160)) ([60a6c5d](https://github.com/typeorm/typeorm/commit/60a6c5d9607e06bfb2ff842d733ff90ce8b279ea)) -* use `host` if `hostReplicaSet` is not provided in MongoDriver ([#7559](https://github.com/typeorm/typeorm/issues/7559)) ([9b6d7bc](https://github.com/typeorm/typeorm/commit/9b6d7bc4189f7741f0f823d65fc5c8ba4fbc2d94)) -* use migrationsTransactionMode while running migration from cli ([#7576](https://github.com/typeorm/typeorm/issues/7576)) ([7953ebb](https://github.com/typeorm/typeorm/commit/7953ebb40f2b685f3d578bcf2be403f61e544205)) -* use most specific matching relation type ([#2967](https://github.com/typeorm/typeorm/issues/2967)) ([ee3c00a](https://github.com/typeorm/typeorm/commit/ee3c00a686f1296bbe3bc3d0b7e1bd29333b358f)) - +- @Unique constraint is not created with specified name ([beea2e1](https://github.com/typeorm/typeorm/commit/beea2e1e4429d13d7864ebc23aa6e58fa01647ea)) +- `MATERIALIZED VIEW` is treated as a regular `VIEW` which causes issues on sync ([#7592](https://github.com/typeorm/typeorm/issues/7592)) ([f85f436](https://github.com/typeorm/typeorm/commit/f85f436f51fb000cd9959b44e8d7a79bf0cd10ab)) +- added error handler for slave connections in MySQL and AuroraDataApi drivers ([#7641](https://github.com/typeorm/typeorm/issues/7641)) ([882a740](https://github.com/typeorm/typeorm/commit/882a7409e5bd018fad6c04925ff5ccaa7e9e7db2)) +- call listeners for array embeddeds in MongoDB ([#4260](https://github.com/typeorm/typeorm/issues/4260)) ([2dc355b](https://github.com/typeorm/typeorm/commit/2dc355b50179a18fe690924797f5c69f2fe23c1f)) +- closing pool incorrectly works on Postgres ([#7596](https://github.com/typeorm/typeorm/issues/7596)) ([1310c97](https://github.com/typeorm/typeorm/commit/1310c97ff3092b9ff23b2fe83d6b7763beb4316b)), closes [#6958](https://github.com/typeorm/typeorm/issues/6958) [#6958](https://github.com/typeorm/typeorm/issues/6958) [#6958](https://github.com/typeorm/typeorm/issues/6958) +- column name with empty spaces causes bug in Index/Unique decorators [#7534](https://github.com/typeorm/typeorm/issues/7534) ([a3a6e06](https://github.com/typeorm/typeorm/commit/a3a6e063a37fbe1444ffd0c8b1d93bf3ea90e75d)) +- correctly strip type conversion in postgres for default values ([#7681](https://github.com/typeorm/typeorm/issues/7681)) ([069b8b6](https://github.com/typeorm/typeorm/commit/069b8b6888c389d93ff44ca6ed964fb5913d9840)), closes [#1532](https://github.com/typeorm/typeorm/issues/1532) [#7647](https://github.com/typeorm/typeorm/issues/7647) [#5132](https://github.com/typeorm/typeorm/issues/5132) +- datetime functions in column "default" leads to unnecessary queries during synchronization ([#7517](https://github.com/typeorm/typeorm/issues/7517)) ([03f3285](https://github.com/typeorm/typeorm/commit/03f328583750ed08272fc1a640adcd13e82f09af)), closes [#3991](https://github.com/typeorm/typeorm/issues/3991) [#3991](https://github.com/typeorm/typeorm/issues/3991) [#2737](https://github.com/typeorm/typeorm/issues/2737) [#2737](https://github.com/typeorm/typeorm/issues/2737) [#6412](https://github.com/typeorm/typeorm/issues/6412) [#4281](https://github.com/typeorm/typeorm/issues/4281) [#4658](https://github.com/typeorm/typeorm/issues/4658) [#3991](https://github.com/typeorm/typeorm/issues/3991) [#2333](https://github.com/typeorm/typeorm/issues/2333) [#7381](https://github.com/typeorm/typeorm/issues/7381) [#4658](https://github.com/typeorm/typeorm/issues/4658) [#3991](https://github.com/typeorm/typeorm/issues/3991) [#3991](https://github.com/typeorm/typeorm/issues/3991) [#3991](https://github.com/typeorm/typeorm/issues/3991) [#3991](https://github.com/typeorm/typeorm/issues/3991) +- default `schema` defined in entity/connection leads to unnecessary queries during schema sync ([#7575](https://github.com/typeorm/typeorm/issues/7575)) ([7eb0327](https://github.com/typeorm/typeorm/commit/7eb032705912cbf4ee340ed9e49970d0f6e23714)), closes [#7276](https://github.com/typeorm/typeorm/issues/7276) [#7276](https://github.com/typeorm/typeorm/issues/7276) +- do a deep comparison to see if the default value has changed for `json` types in Postgres ([#7650](https://github.com/typeorm/typeorm/issues/7650)) ([a471c1b](https://github.com/typeorm/typeorm/commit/a471c1b689848e7cd9203dcef5edd192019ea456)) +- Incorrect migration generated when multiple views are updated in a single migration ([#7587](https://github.com/typeorm/typeorm/issues/7587)) ([0b103dd](https://github.com/typeorm/typeorm/commit/0b103dd0347737c91510c7ed4719a289dacf8d3b)), closes [#7586](https://github.com/typeorm/typeorm/issues/7586) +- issues with custom enum name in Postgres ([#7661](https://github.com/typeorm/typeorm/issues/7661)) ([ad0262a](https://github.com/typeorm/typeorm/commit/ad0262a116e5366b562e70a1bbc60246add78d83)), closes [#7614](https://github.com/typeorm/typeorm/issues/7614) [#7541](https://github.com/typeorm/typeorm/issues/7541) [#7647](https://github.com/typeorm/typeorm/issues/7647) [#6540](https://github.com/typeorm/typeorm/issues/6540) +- mongodb connectionURL parse options ([#7560](https://github.com/typeorm/typeorm/issues/7560)) ([b2ac41a](https://github.com/typeorm/typeorm/commit/b2ac41a706635aba37b204eaf7ebf52aaee91104)) +- mongodb typings for Cursor ([#7526](https://github.com/typeorm/typeorm/issues/7526)) ([daf3991](https://github.com/typeorm/typeorm/commit/daf399171996d578f0607dd0631647bed59ff212)) +- only first \0 is removed in comments, only first \\ is escaped etc. ([#7532](https://github.com/typeorm/typeorm/issues/7532)) ([36b14cb](https://github.com/typeorm/typeorm/commit/36b14cbd808d73c61c9308d66291cf06e860419a)) +- pass `ManyToMany` `onUpdate` option to foreign key metadata ([#5714](https://github.com/typeorm/typeorm/issues/5714)) ([198d2c5](https://github.com/typeorm/typeorm/commit/198d2c50acab9d0d748194506970415866247da4)), closes [#4980](https://github.com/typeorm/typeorm/issues/4980) +- Postgres identifier exceeds limit on eager relations ([#7508](https://github.com/typeorm/typeorm/issues/7508)) ([#7509](https://github.com/typeorm/typeorm/issues/7509)) ([e4ec429](https://github.com/typeorm/typeorm/commit/e4ec429fe518c26f4c95175a482bde143d508254)) +- remove `enableExtension` for slave connections in Postgres ([#7693](https://github.com/typeorm/typeorm/issues/7693)) ([620aac9](https://github.com/typeorm/typeorm/commit/620aac9e0f2c089f78c7a055b2fb844a475a7eb5)), closes [#7691](https://github.com/typeorm/typeorm/issues/7691) +- replaced deprecated `insert` method with `insertOne` for MongoDriver in MigrationExecutor. ([#7594](https://github.com/typeorm/typeorm/issues/7594)) ([83fed60](https://github.com/typeorm/typeorm/commit/83fed60cccc498d1c5776c05a5aa3ad47c50453e)) +- resolve issue when enum that has functions is used in entity ([#7653](https://github.com/typeorm/typeorm/issues/7653)) ([dba327d](https://github.com/typeorm/typeorm/commit/dba327d426f591317f8210302107b95be1a5b420)), closes [#7651](https://github.com/typeorm/typeorm/issues/7651) +- Silent failure in createDatabase and dropDatabase with Postgres ([#7590](https://github.com/typeorm/typeorm/issues/7590)) ([974d2d4](https://github.com/typeorm/typeorm/commit/974d2d4efb0bdcf57e0522b4da3c94ab2937427b)), closes [#6867](https://github.com/typeorm/typeorm/issues/6867) +- STI types on children in joins ([#3160](https://github.com/typeorm/typeorm/issues/3160)) ([60a6c5d](https://github.com/typeorm/typeorm/commit/60a6c5d9607e06bfb2ff842d733ff90ce8b279ea)) +- use `host` if `hostReplicaSet` is not provided in MongoDriver ([#7559](https://github.com/typeorm/typeorm/issues/7559)) ([9b6d7bc](https://github.com/typeorm/typeorm/commit/9b6d7bc4189f7741f0f823d65fc5c8ba4fbc2d94)) +- use migrationsTransactionMode while running migration from cli ([#7576](https://github.com/typeorm/typeorm/issues/7576)) ([7953ebb](https://github.com/typeorm/typeorm/commit/7953ebb40f2b685f3d578bcf2be403f61e544205)) +- use most specific matching relation type ([#2967](https://github.com/typeorm/typeorm/issues/2967)) ([ee3c00a](https://github.com/typeorm/typeorm/commit/ee3c00a686f1296bbe3bc3d0b7e1bd29333b358f)) ### Features -* add `orphanedRowAction` option to EntitySchemaRelationOptions ([#7625](https://github.com/typeorm/typeorm/issues/7625)) ([a8eb49a](https://github.com/typeorm/typeorm/commit/a8eb49a3647d601531a6c3cb8404e1941a9d1f9c)), closes [#7417](https://github.com/typeorm/typeorm/issues/7417) -* add `set` datatype support for aurora-data-api ([#7665](https://github.com/typeorm/typeorm/issues/7665)) ([b6c1836](https://github.com/typeorm/typeorm/commit/b6c18366c3fe294f864ab4cd97c0bfc91e9d1f9d)) -* add support for specifying `ioredis` cache with a URL ([#7689](https://github.com/typeorm/typeorm/issues/7689)) ([e017f9b](https://github.com/typeorm/typeorm/commit/e017f9b4683e12feb485b878ab002c42c1d63ffb)), closes [#7631](https://github.com/typeorm/typeorm/issues/7631) -* add tree entities update and delete logic ([#7156](https://github.com/typeorm/typeorm/issues/7156)) ([9c8a3fb](https://github.com/typeorm/typeorm/commit/9c8a3fbad7cf737ee514924ed8871a703768fddc)), closes [#7155](https://github.com/typeorm/typeorm/issues/7155) -* added Capacitor driver ([#7695](https://github.com/typeorm/typeorm/issues/7695)) ([0f7a778](https://github.com/typeorm/typeorm/commit/0f7a7783984c680350dd7560f47b78733a3ff3c5)) -* cache option to ignore errors ([#7630](https://github.com/typeorm/typeorm/issues/7630)) ([5fde0ea](https://github.com/typeorm/typeorm/commit/5fde0ea89fb7c4942d7bbbe21f6bfbbe620347e5)), closes [#926](https://github.com/typeorm/typeorm/issues/926) -* define class properties for QueryFailedError to allow users to access a typed error ([#7529](https://github.com/typeorm/typeorm/issues/7529)) ([b43dcba](https://github.com/typeorm/typeorm/commit/b43dcba84e5bfa55baa7426a5059448207437f2d)) -* support `MAX_EXECUTION_TIME ` for MySQL driver. ([#7638](https://github.com/typeorm/typeorm/issues/7638)) ([0564c34](https://github.com/typeorm/typeorm/commit/0564c348b9bd779e9f24cbf340ea48b6badc9f7e)) +- add `orphanedRowAction` option to EntitySchemaRelationOptions ([#7625](https://github.com/typeorm/typeorm/issues/7625)) ([a8eb49a](https://github.com/typeorm/typeorm/commit/a8eb49a3647d601531a6c3cb8404e1941a9d1f9c)), closes [#7417](https://github.com/typeorm/typeorm/issues/7417) +- add `set` datatype support for aurora-data-api ([#7665](https://github.com/typeorm/typeorm/issues/7665)) ([b6c1836](https://github.com/typeorm/typeorm/commit/b6c18366c3fe294f864ab4cd97c0bfc91e9d1f9d)) +- add support for specifying `ioredis` cache with a URL ([#7689](https://github.com/typeorm/typeorm/issues/7689)) ([e017f9b](https://github.com/typeorm/typeorm/commit/e017f9b4683e12feb485b878ab002c42c1d63ffb)), closes [#7631](https://github.com/typeorm/typeorm/issues/7631) +- add tree entities update and delete logic ([#7156](https://github.com/typeorm/typeorm/issues/7156)) ([9c8a3fb](https://github.com/typeorm/typeorm/commit/9c8a3fbad7cf737ee514924ed8871a703768fddc)), closes [#7155](https://github.com/typeorm/typeorm/issues/7155) +- added Capacitor driver ([#7695](https://github.com/typeorm/typeorm/issues/7695)) ([0f7a778](https://github.com/typeorm/typeorm/commit/0f7a7783984c680350dd7560f47b78733a3ff3c5)) +- cache option to ignore errors ([#7630](https://github.com/typeorm/typeorm/issues/7630)) ([5fde0ea](https://github.com/typeorm/typeorm/commit/5fde0ea89fb7c4942d7bbbe21f6bfbbe620347e5)), closes [#926](https://github.com/typeorm/typeorm/issues/926) +- define class properties for QueryFailedError to allow users to access a typed error ([#7529](https://github.com/typeorm/typeorm/issues/7529)) ([b43dcba](https://github.com/typeorm/typeorm/commit/b43dcba84e5bfa55baa7426a5059448207437f2d)) +- support `MAX_EXECUTION_TIME ` for MySQL driver. ([#7638](https://github.com/typeorm/typeorm/issues/7638)) ([0564c34](https://github.com/typeorm/typeorm/commit/0564c348b9bd779e9f24cbf340ea48b6badc9f7e)) ## [0.2.32](https://github.com/typeorm/typeorm/compare/0.2.31...0.2.32) (2021-03-30) ### Bug Fixes -* aurora-data-api get correct increment primary key for multiple entities inserted ([#7434](https://github.com/typeorm/typeorm/issues/7434)) ([fc8af5f](https://github.com/typeorm/typeorm/commit/fc8af5f5289ea13d3f152efbd0b800917ca0306a)), closes [#7385](https://github.com/typeorm/typeorm/issues/7385) -* aurora-data-api return number of affected rows in UpdatedResult and DeleteResult ([#7433](https://github.com/typeorm/typeorm/issues/7433)) ([46aba1d](https://github.com/typeorm/typeorm/commit/46aba1d1b947c9b03ba2661367427a818be46324)), closes [#7386](https://github.com/typeorm/typeorm/issues/7386) -* RelationLoader load with existing queryRunner ([#7471](https://github.com/typeorm/typeorm/issues/7471)) ([2dcb493](https://github.com/typeorm/typeorm/commit/2dcb493d55d95536ba4c2085c8f7af740be9ec72)), closes [#5338](https://github.com/typeorm/typeorm/issues/5338) -* Array type default value should not generate SQL commands without change ([#7409](https://github.com/typeorm/typeorm/issues/7409)) ([7f06e44](https://github.com/typeorm/typeorm/commit/7f06e447c60846c1aa28f2561b3f77a22e012f9a)) -* correctly get referenceColumn value in `getEntityValueMap` ([#7005](https://github.com/typeorm/typeorm/issues/7005)) ([7fe723b](https://github.com/typeorm/typeorm/commit/7fe723b23b74a4c81608a856a82b8aa85fe1b385)), closes [#7002](https://github.com/typeorm/typeorm/issues/7002) -* don't transform json(b) column value when computing update changes ([#6929](https://github.com/typeorm/typeorm/issues/6929)) ([6be54d4](https://github.com/typeorm/typeorm/commit/6be54d46ac812487242ceffeda2922aff783b235)) -* empty entity when query with nested relations ([#7450](https://github.com/typeorm/typeorm/issues/7450)) ([9abf727](https://github.com/typeorm/typeorm/commit/9abf727691d98351f49aa523c5ea03ec2b1ac620)), closes [#7041](https://github.com/typeorm/typeorm/issues/7041) [#7041](https://github.com/typeorm/typeorm/issues/7041) [#7041](https://github.com/typeorm/typeorm/issues/7041) -* fixed all known enum issues ([#7419](https://github.com/typeorm/typeorm/issues/7419)) ([724d80b](https://github.com/typeorm/typeorm/commit/724d80bf1aacedfc139ad09fe5842cad8fdb2893)), closes [#5371](https://github.com/typeorm/typeorm/issues/5371) [#6471](https://github.com/typeorm/typeorm/issues/6471) [#7217](https://github.com/typeorm/typeorm/issues/7217) [#6047](https://github.com/typeorm/typeorm/issues/6047) [#7283](https://github.com/typeorm/typeorm/issues/7283) [#5871](https://github.com/typeorm/typeorm/issues/5871) [#5729](https://github.com/typeorm/typeorm/issues/5729) [#5478](https://github.com/typeorm/typeorm/issues/5478) [#5882](https://github.com/typeorm/typeorm/issues/5882) [#5275](https://github.com/typeorm/typeorm/issues/5275) [#2233](https://github.com/typeorm/typeorm/issues/2233) [#5648](https://github.com/typeorm/typeorm/issues/5648) [#4897](https://github.com/typeorm/typeorm/issues/4897) [#6376](https://github.com/typeorm/typeorm/issues/6376) [#6115](https://github.com/typeorm/typeorm/issues/6115) -* improve EntityManager.save() return type ([#7391](https://github.com/typeorm/typeorm/issues/7391)) ([66fbfda](https://github.com/typeorm/typeorm/commit/66fbfdaaa6e03114607671103fe0df7ab1d781a8)) -* Only first single quote in comments is escaped ([#7514](https://github.com/typeorm/typeorm/issues/7514)) ([e1e9423](https://github.com/typeorm/typeorm/commit/e1e94236e71c14a4682356ada7774d657eba8936)) -* performance issues of `RelationId`. ([#7318](https://github.com/typeorm/typeorm/issues/7318)) ([01a215a](https://github.com/typeorm/typeorm/commit/01a215a32b47a03af9301c0e6e68f943a24919c4)), closes [#5691](https://github.com/typeorm/typeorm/issues/5691) -* rename a sequence related to generated primary key when a table is renamed ([#5406](https://github.com/typeorm/typeorm/issues/5406)) ([25b457f](https://github.com/typeorm/typeorm/commit/25b457f7e8d6cdeee146ba60a280f1a65bcec9eb)) -* resolve issue building tree entities with embeded primary column ([#7416](https://github.com/typeorm/typeorm/issues/7416)) ([dc81814](https://github.com/typeorm/typeorm/commit/dc81814056071ee3557043e5e6be06c431314634)), closes [#7415](https://github.com/typeorm/typeorm/issues/7415) -* wrong migration generation when column default value is set to null [#6950](https://github.com/typeorm/typeorm/issues/6950) ([#7356](https://github.com/typeorm/typeorm/issues/7356)) ([5a3f9ff](https://github.com/typeorm/typeorm/commit/5a3f9ff3d6ff5ec1bf704c836bef5a7529ff7f5a)) +- aurora-data-api get correct increment primary key for multiple entities inserted ([#7434](https://github.com/typeorm/typeorm/issues/7434)) ([fc8af5f](https://github.com/typeorm/typeorm/commit/fc8af5f5289ea13d3f152efbd0b800917ca0306a)), closes [#7385](https://github.com/typeorm/typeorm/issues/7385) +- aurora-data-api return number of affected rows in UpdatedResult and DeleteResult ([#7433](https://github.com/typeorm/typeorm/issues/7433)) ([46aba1d](https://github.com/typeorm/typeorm/commit/46aba1d1b947c9b03ba2661367427a818be46324)), closes [#7386](https://github.com/typeorm/typeorm/issues/7386) +- RelationLoader load with existing queryRunner ([#7471](https://github.com/typeorm/typeorm/issues/7471)) ([2dcb493](https://github.com/typeorm/typeorm/commit/2dcb493d55d95536ba4c2085c8f7af740be9ec72)), closes [#5338](https://github.com/typeorm/typeorm/issues/5338) +- Array type default value should not generate SQL commands without change ([#7409](https://github.com/typeorm/typeorm/issues/7409)) ([7f06e44](https://github.com/typeorm/typeorm/commit/7f06e447c60846c1aa28f2561b3f77a22e012f9a)) +- correctly get referenceColumn value in `getEntityValueMap` ([#7005](https://github.com/typeorm/typeorm/issues/7005)) ([7fe723b](https://github.com/typeorm/typeorm/commit/7fe723b23b74a4c81608a856a82b8aa85fe1b385)), closes [#7002](https://github.com/typeorm/typeorm/issues/7002) +- don't transform json(b) column value when computing update changes ([#6929](https://github.com/typeorm/typeorm/issues/6929)) ([6be54d4](https://github.com/typeorm/typeorm/commit/6be54d46ac812487242ceffeda2922aff783b235)) +- empty entity when query with nested relations ([#7450](https://github.com/typeorm/typeorm/issues/7450)) ([9abf727](https://github.com/typeorm/typeorm/commit/9abf727691d98351f49aa523c5ea03ec2b1ac620)), closes [#7041](https://github.com/typeorm/typeorm/issues/7041) [#7041](https://github.com/typeorm/typeorm/issues/7041) [#7041](https://github.com/typeorm/typeorm/issues/7041) +- fixed all known enum issues ([#7419](https://github.com/typeorm/typeorm/issues/7419)) ([724d80b](https://github.com/typeorm/typeorm/commit/724d80bf1aacedfc139ad09fe5842cad8fdb2893)), closes [#5371](https://github.com/typeorm/typeorm/issues/5371) [#6471](https://github.com/typeorm/typeorm/issues/6471) [#7217](https://github.com/typeorm/typeorm/issues/7217) [#6047](https://github.com/typeorm/typeorm/issues/6047) [#7283](https://github.com/typeorm/typeorm/issues/7283) [#5871](https://github.com/typeorm/typeorm/issues/5871) [#5729](https://github.com/typeorm/typeorm/issues/5729) [#5478](https://github.com/typeorm/typeorm/issues/5478) [#5882](https://github.com/typeorm/typeorm/issues/5882) [#5275](https://github.com/typeorm/typeorm/issues/5275) [#2233](https://github.com/typeorm/typeorm/issues/2233) [#5648](https://github.com/typeorm/typeorm/issues/5648) [#4897](https://github.com/typeorm/typeorm/issues/4897) [#6376](https://github.com/typeorm/typeorm/issues/6376) [#6115](https://github.com/typeorm/typeorm/issues/6115) +- improve EntityManager.save() return type ([#7391](https://github.com/typeorm/typeorm/issues/7391)) ([66fbfda](https://github.com/typeorm/typeorm/commit/66fbfdaaa6e03114607671103fe0df7ab1d781a8)) +- Only first single quote in comments is escaped ([#7514](https://github.com/typeorm/typeorm/issues/7514)) ([e1e9423](https://github.com/typeorm/typeorm/commit/e1e94236e71c14a4682356ada7774d657eba8936)) +- performance issues of `RelationId`. ([#7318](https://github.com/typeorm/typeorm/issues/7318)) ([01a215a](https://github.com/typeorm/typeorm/commit/01a215a32b47a03af9301c0e6e68f943a24919c4)), closes [#5691](https://github.com/typeorm/typeorm/issues/5691) +- rename a sequence related to generated primary key when a table is renamed ([#5406](https://github.com/typeorm/typeorm/issues/5406)) ([25b457f](https://github.com/typeorm/typeorm/commit/25b457f7e8d6cdeee146ba60a280f1a65bcec9eb)) +- resolve issue building tree entities with embeded primary column ([#7416](https://github.com/typeorm/typeorm/issues/7416)) ([dc81814](https://github.com/typeorm/typeorm/commit/dc81814056071ee3557043e5e6be06c431314634)), closes [#7415](https://github.com/typeorm/typeorm/issues/7415) +- wrong migration generation when column default value is set to null [#6950](https://github.com/typeorm/typeorm/issues/6950) ([#7356](https://github.com/typeorm/typeorm/issues/7356)) ([5a3f9ff](https://github.com/typeorm/typeorm/commit/5a3f9ff3d6ff5ec1bf704c836bef5a7529ff7f5a)) ### Features -* add check and dry-run to migration generate ([#7275](https://github.com/typeorm/typeorm/issues/7275)) ([d6df200](https://github.com/typeorm/typeorm/commit/d6df200772604103279502dfc61340475131d4e1)), closes [#3037](https://github.com/typeorm/typeorm/issues/3037) [#6978](https://github.com/typeorm/typeorm/issues/6978) -* add option for installing package using CLI ([#6889](https://github.com/typeorm/typeorm/issues/6889)) ([3d876c6](https://github.com/typeorm/typeorm/commit/3d876c61fafc815e429c68f4f4e1ab79e47c7b9c)) -* Add support for Access Token Authentication for SQL Server Driver (mssql) ([#7477](https://github.com/typeorm/typeorm/issues/7477)) ([e639772](https://github.com/typeorm/typeorm/commit/e639772e3b5aa5fa2f40fd6cda984b13e4bf9c90)) -* added socketPath support for replicas in MySQL driver ([#7459](https://github.com/typeorm/typeorm/issues/7459)) ([8d7afaf](https://github.com/typeorm/typeorm/commit/8d7afaf78df8974ebbe00219716af8da738a6fe7)) -* allow to pass the given table name as string in RelationDecorators ([#7448](https://github.com/typeorm/typeorm/issues/7448)) ([4dbb10e](https://github.com/typeorm/typeorm/commit/4dbb10e11ff3fdd58fdaac87337aa0d3237002ba)) -* implement "FOR UPDATE OF" for postgres driver ([#7040](https://github.com/typeorm/typeorm/issues/7040)) ([fde9f07](https://github.com/typeorm/typeorm/commit/fde9f0772eef69836ff4d85816cfe4fd6f7028b4)) -* introduced a new configuration option "formatOptions.castParameters" to delegate the prepare/hydrate parameters to the driver which will result in casting the parameters to their respective column type ([#7483](https://github.com/typeorm/typeorm/issues/7483)) ([7793b3f](https://github.com/typeorm/typeorm/commit/7793b3f992d928b4db6bff6a5ad1b4cbe377a167)) -* output Javascript Migrations instead of TypeScript ([#7294](https://github.com/typeorm/typeorm/issues/7294)) ([b97cc4f](https://github.com/typeorm/typeorm/commit/b97cc4ff955de8be39258add958c2885d0bcdfe6)) +- add check and dry-run to migration generate ([#7275](https://github.com/typeorm/typeorm/issues/7275)) ([d6df200](https://github.com/typeorm/typeorm/commit/d6df200772604103279502dfc61340475131d4e1)), closes [#3037](https://github.com/typeorm/typeorm/issues/3037) [#6978](https://github.com/typeorm/typeorm/issues/6978) +- add option for installing package using CLI ([#6889](https://github.com/typeorm/typeorm/issues/6889)) ([3d876c6](https://github.com/typeorm/typeorm/commit/3d876c61fafc815e429c68f4f4e1ab79e47c7b9c)) +- Add support for Access Token Authentication for SQL Server Driver (mssql) ([#7477](https://github.com/typeorm/typeorm/issues/7477)) ([e639772](https://github.com/typeorm/typeorm/commit/e639772e3b5aa5fa2f40fd6cda984b13e4bf9c90)) +- added socketPath support for replicas in MySQL driver ([#7459](https://github.com/typeorm/typeorm/issues/7459)) ([8d7afaf](https://github.com/typeorm/typeorm/commit/8d7afaf78df8974ebbe00219716af8da738a6fe7)) +- allow to pass the given table name as string in RelationDecorators ([#7448](https://github.com/typeorm/typeorm/issues/7448)) ([4dbb10e](https://github.com/typeorm/typeorm/commit/4dbb10e11ff3fdd58fdaac87337aa0d3237002ba)) +- implement "FOR UPDATE OF" for postgres driver ([#7040](https://github.com/typeorm/typeorm/issues/7040)) ([fde9f07](https://github.com/typeorm/typeorm/commit/fde9f0772eef69836ff4d85816cfe4fd6f7028b4)) +- introduced a new configuration option "formatOptions.castParameters" to delegate the prepare/hydrate parameters to the driver which will result in casting the parameters to their respective column type ([#7483](https://github.com/typeorm/typeorm/issues/7483)) ([7793b3f](https://github.com/typeorm/typeorm/commit/7793b3f992d928b4db6bff6a5ad1b4cbe377a167)) +- output Javascript Migrations instead of TypeScript ([#7294](https://github.com/typeorm/typeorm/issues/7294)) ([b97cc4f](https://github.com/typeorm/typeorm/commit/b97cc4ff955de8be39258add958c2885d0bcdfe6)) ## [0.2.31](https://github.com/typeorm/typeorm/compare/0.2.30...0.2.31) (2021-02-08) ### Bug Fixes -* append condition to STI child entity join ([#7339](https://github.com/typeorm/typeorm/issues/7339)) ([68bb82e](https://github.com/typeorm/typeorm/commit/68bb82e5de639ef746f8ddc699e3ee2ca051bdbe)) -* avoid regex lookbehind for compatibility ([#7270](https://github.com/typeorm/typeorm/issues/7270)) ([063d27f](https://github.com/typeorm/typeorm/commit/063d27fe338abf2929e45a8a8d4a0e4f292111c4)), closes [#7026](https://github.com/typeorm/typeorm/issues/7026) -* cache from ENV - add ioredis support ([#7332](https://github.com/typeorm/typeorm/issues/7332)) ([5e2117c](https://github.com/typeorm/typeorm/commit/5e2117cdffeb31691dbe7fbd8f56e0f9256d1d47)) -* datetime2 rounding in mssql ([#7264](https://github.com/typeorm/typeorm/issues/7264)) ([4711a71](https://github.com/typeorm/typeorm/commit/4711a7189b4a852a467fa83f26f9827b3249aba4)), closes [#3202](https://github.com/typeorm/typeorm/issues/3202) -* escape columns in InsertQueryBuilder.orUpdate ([#6316](https://github.com/typeorm/typeorm/issues/6316)) ([ab56e07](https://github.com/typeorm/typeorm/commit/ab56e07de162771b0a42bc4074f089ca6f52cd2b)) -* incorrect postgres uuid type in PrimaryGeneratedColumnType ([#7298](https://github.com/typeorm/typeorm/issues/7298)) ([2758502](https://github.com/typeorm/typeorm/commit/2758502c83a9e8f8c6b18e19530366f45073755f)) -* MariaDB VIRTUAL + [NOT NULL|NULL] error ([#7022](https://github.com/typeorm/typeorm/issues/7022)) ([82f2b75](https://github.com/typeorm/typeorm/commit/82f2b75013e50c9cce9468f03e886639d4943a9a)), closes [#2691](https://github.com/typeorm/typeorm/issues/2691) -* reject nullable primary key columns ([#7001](https://github.com/typeorm/typeorm/issues/7001)) ([cdace6e](https://github.com/typeorm/typeorm/commit/cdace6e5fa09e823bddd3f076c318ce1903d48dc)) -* resolve issue with find with relations returns soft-deleted entities ([#7296](https://github.com/typeorm/typeorm/issues/7296)) ([d7cb338](https://github.com/typeorm/typeorm/commit/d7cb338145f2c3e009c4934a2aa882df74bc7dc8)), closes [#6265](https://github.com/typeorm/typeorm/issues/6265) -* save does not return id, save does not return generated ([#7336](https://github.com/typeorm/typeorm/issues/7336)) ([01a6aee](https://github.com/typeorm/typeorm/commit/01a6aee75edfc3d74ce0f6626258360458960363)) +- append condition to STI child entity join ([#7339](https://github.com/typeorm/typeorm/issues/7339)) ([68bb82e](https://github.com/typeorm/typeorm/commit/68bb82e5de639ef746f8ddc699e3ee2ca051bdbe)) +- avoid regex lookbehind for compatibility ([#7270](https://github.com/typeorm/typeorm/issues/7270)) ([063d27f](https://github.com/typeorm/typeorm/commit/063d27fe338abf2929e45a8a8d4a0e4f292111c4)), closes [#7026](https://github.com/typeorm/typeorm/issues/7026) +- cache from ENV - add ioredis support ([#7332](https://github.com/typeorm/typeorm/issues/7332)) ([5e2117c](https://github.com/typeorm/typeorm/commit/5e2117cdffeb31691dbe7fbd8f56e0f9256d1d47)) +- datetime2 rounding in mssql ([#7264](https://github.com/typeorm/typeorm/issues/7264)) ([4711a71](https://github.com/typeorm/typeorm/commit/4711a7189b4a852a467fa83f26f9827b3249aba4)), closes [#3202](https://github.com/typeorm/typeorm/issues/3202) +- escape columns in InsertQueryBuilder.orUpdate ([#6316](https://github.com/typeorm/typeorm/issues/6316)) ([ab56e07](https://github.com/typeorm/typeorm/commit/ab56e07de162771b0a42bc4074f089ca6f52cd2b)) +- incorrect postgres uuid type in PrimaryGeneratedColumnType ([#7298](https://github.com/typeorm/typeorm/issues/7298)) ([2758502](https://github.com/typeorm/typeorm/commit/2758502c83a9e8f8c6b18e19530366f45073755f)) +- MariaDB VIRTUAL + [NOT NULL|NULL] error ([#7022](https://github.com/typeorm/typeorm/issues/7022)) ([82f2b75](https://github.com/typeorm/typeorm/commit/82f2b75013e50c9cce9468f03e886639d4943a9a)), closes [#2691](https://github.com/typeorm/typeorm/issues/2691) +- reject nullable primary key columns ([#7001](https://github.com/typeorm/typeorm/issues/7001)) ([cdace6e](https://github.com/typeorm/typeorm/commit/cdace6e5fa09e823bddd3f076c318ce1903d48dc)) +- resolve issue with find with relations returns soft-deleted entities ([#7296](https://github.com/typeorm/typeorm/issues/7296)) ([d7cb338](https://github.com/typeorm/typeorm/commit/d7cb338145f2c3e009c4934a2aa882df74bc7dc8)), closes [#6265](https://github.com/typeorm/typeorm/issues/6265) +- save does not return id, save does not return generated ([#7336](https://github.com/typeorm/typeorm/issues/7336)) ([01a6aee](https://github.com/typeorm/typeorm/commit/01a6aee75edfc3d74ce0f6626258360458960363)) ### Features -* enable explicitly inserting IDENTITY values into mssql ([#6199](https://github.com/typeorm/typeorm/issues/6199)) ([4abbd46](https://github.com/typeorm/typeorm/commit/4abbd46af347ff7d1b38f073715155b186437512)), closes [#2199](https://github.com/typeorm/typeorm/issues/2199) -* export all errors ([#7006](https://github.com/typeorm/typeorm/issues/7006)) ([56300d8](https://github.com/typeorm/typeorm/commit/56300d810e3e6c200a933261c2b78f442751b842)) -* option to disable foreign keys creation ([#7277](https://github.com/typeorm/typeorm/issues/7277)) ([cb17b95](https://github.com/typeorm/typeorm/commit/cb17b959e5ab6170df8b3fcac115521516b77848)), closes [#3120](https://github.com/typeorm/typeorm/issues/3120) [#3120](https://github.com/typeorm/typeorm/issues/3120) -* support maxdecimaldigits option by geometry type ([#7166](https://github.com/typeorm/typeorm/issues/7166)) ([d749008](https://github.com/typeorm/typeorm/commit/d74900830729c8b9b32226d42d304576e573c744)) -* useUTC connection option for oracle and postgres ([#7295](https://github.com/typeorm/typeorm/issues/7295)) ([e06a442](https://github.com/typeorm/typeorm/commit/e06a4423c83ae78a771cc239ee1135e70c98c899)) +- enable explicitly inserting IDENTITY values into mssql ([#6199](https://github.com/typeorm/typeorm/issues/6199)) ([4abbd46](https://github.com/typeorm/typeorm/commit/4abbd46af347ff7d1b38f073715155b186437512)), closes [#2199](https://github.com/typeorm/typeorm/issues/2199) +- export all errors ([#7006](https://github.com/typeorm/typeorm/issues/7006)) ([56300d8](https://github.com/typeorm/typeorm/commit/56300d810e3e6c200a933261c2b78f442751b842)) +- option to disable foreign keys creation ([#7277](https://github.com/typeorm/typeorm/issues/7277)) ([cb17b95](https://github.com/typeorm/typeorm/commit/cb17b959e5ab6170df8b3fcac115521516b77848)), closes [#3120](https://github.com/typeorm/typeorm/issues/3120) [#3120](https://github.com/typeorm/typeorm/issues/3120) +- support maxdecimaldigits option by geometry type ([#7166](https://github.com/typeorm/typeorm/issues/7166)) ([d749008](https://github.com/typeorm/typeorm/commit/d74900830729c8b9b32226d42d304576e573c744)) +- useUTC connection option for oracle and postgres ([#7295](https://github.com/typeorm/typeorm/issues/7295)) ([e06a442](https://github.com/typeorm/typeorm/commit/e06a4423c83ae78a771cc239ee1135e70c98c899)) ### BREAKING CHANGES -* passing `ColumnOptions` to `@PrimaryColumn` does not function anymore. One must use `PrimaryColumnOptions` instead. -* minor breaking change on "conflict*" options - column names used are now automatically escaped. - +- passing `ColumnOptions` to `@PrimaryColumn` does not function anymore. One must use `PrimaryColumnOptions` instead. +- minor breaking change on "conflict\*" options - column names used are now automatically escaped. ## [0.2.30](https://github.com/typeorm/typeorm/compare/0.2.29...0.2.30) (2021-01-12) ### Bug Fixes -* add missing "comment" field to QB clone method ([#7205](https://github.com/typeorm/typeorm/issues/7205)) ([f019771](https://github.com/typeorm/typeorm/commit/f0197710ab986b474ce0b6c260d57e8234a5bb4f)), closes [#7203](https://github.com/typeorm/typeorm/issues/7203) -* avoid early release of PostgresQueryRunner ([#7109](https://github.com/typeorm/typeorm/issues/7109)) ([#7185](https://github.com/typeorm/typeorm/issues/7185)) ([9abe007](https://github.com/typeorm/typeorm/commit/9abe0076f65afba9034fb48ba3ebd43be7e7557a)) -* Error when sorting by an embedded entity while using join and skip/take ([#7082](https://github.com/typeorm/typeorm/issues/7082)) ([d27dd2a](https://github.com/typeorm/typeorm/commit/d27dd2af2ca320e74a17b3ab273cd3bf55d01923)), closes [#7079](https://github.com/typeorm/typeorm/issues/7079) -* Fix CLI query command TypeError ([#7043](https://github.com/typeorm/typeorm/issues/7043)) ([b35397e](https://github.com/typeorm/typeorm/commit/b35397ea07982a21d3b263cb0b7c04d5aa057d1a)) -* get length attribute of postgres array columns ([#7239](https://github.com/typeorm/typeorm/issues/7239)) ([eb82f78](https://github.com/typeorm/typeorm/commit/eb82f786cbe3244351d5860289dace3169cf473b)), closes [#6990](https://github.com/typeorm/typeorm/issues/6990) -* handle overlapping property / database names in querybuilder ([#7042](https://github.com/typeorm/typeorm/issues/7042)) ([b518fa1](https://github.com/typeorm/typeorm/commit/b518fa15f9b2183545b3c0daa2447ecd38ecc859)), closes [#7030](https://github.com/typeorm/typeorm/issues/7030) -* improve stack traces when using persist executor ([#7218](https://github.com/typeorm/typeorm/issues/7218)) ([0dfe5b8](https://github.com/typeorm/typeorm/commit/0dfe5b83f584c3960cdef28e53d2f0ded3f829ce)) -* order should allow only model fields, not methods ([#7188](https://github.com/typeorm/typeorm/issues/7188)) ([0194193](https://github.com/typeorm/typeorm/commit/01941937df11abd63fad9da082e1b5cf6a1300ce)), closes [#7178](https://github.com/typeorm/typeorm/issues/7178) -* resolve migration for UpdateDateColumn without ON UPDATE clause ([#7057](https://github.com/typeorm/typeorm/issues/7057)) ([ddd8cbc](https://github.com/typeorm/typeorm/commit/ddd8cbcdf6d67b6b1425de581c3da5d264a01167)), closes [#6995](https://github.com/typeorm/typeorm/issues/6995) -* resolves Postgres sequence identifier length error ([#7115](https://github.com/typeorm/typeorm/issues/7115)) ([568ef35](https://github.com/typeorm/typeorm/commit/568ef3546e6da6e73f68437fff418901d6232c51)), closes [#7106](https://github.com/typeorm/typeorm/issues/7106) -* return 'null' (instead of 'undefined') on lazy relations that have no results ([#7146](https://github.com/typeorm/typeorm/issues/7146)) ([#7147](https://github.com/typeorm/typeorm/issues/7147)) ([9b278c9](https://github.com/typeorm/typeorm/commit/9b278c99e52bbcdf0d36ece29168785ee8641687)) -* support MongoDB DNS seed list connection ([#7136](https://github.com/typeorm/typeorm/issues/7136)) ([f730bb9](https://github.com/typeorm/typeorm/commit/f730bb9fc1908a65edacc07e5e364648efb48768)), closes [#3347](https://github.com/typeorm/typeorm/issues/3347) [#3133](https://github.com/typeorm/typeorm/issues/3133) -* **data-api:** Fixed how data api driver uses and reuses a client ([#6869](https://github.com/typeorm/typeorm/issues/6869)) ([6ce65fb](https://github.com/typeorm/typeorm/commit/6ce65fbf6be5e696c3ae907d3f8e63b1e7332a1e)) -* use default import of yargs for --help ([#6986](https://github.com/typeorm/typeorm/issues/6986)) ([6ef8ffe](https://github.com/typeorm/typeorm/commit/6ef8ffe387980c51f9f20e9cc03d6199c7068ac5)) - +- add missing "comment" field to QB clone method ([#7205](https://github.com/typeorm/typeorm/issues/7205)) ([f019771](https://github.com/typeorm/typeorm/commit/f0197710ab986b474ce0b6c260d57e8234a5bb4f)), closes [#7203](https://github.com/typeorm/typeorm/issues/7203) +- avoid early release of PostgresQueryRunner ([#7109](https://github.com/typeorm/typeorm/issues/7109)) ([#7185](https://github.com/typeorm/typeorm/issues/7185)) ([9abe007](https://github.com/typeorm/typeorm/commit/9abe0076f65afba9034fb48ba3ebd43be7e7557a)) +- Error when sorting by an embedded entity while using join and skip/take ([#7082](https://github.com/typeorm/typeorm/issues/7082)) ([d27dd2a](https://github.com/typeorm/typeorm/commit/d27dd2af2ca320e74a17b3ab273cd3bf55d01923)), closes [#7079](https://github.com/typeorm/typeorm/issues/7079) +- Fix CLI query command TypeError ([#7043](https://github.com/typeorm/typeorm/issues/7043)) ([b35397e](https://github.com/typeorm/typeorm/commit/b35397ea07982a21d3b263cb0b7c04d5aa057d1a)) +- get length attribute of postgres array columns ([#7239](https://github.com/typeorm/typeorm/issues/7239)) ([eb82f78](https://github.com/typeorm/typeorm/commit/eb82f786cbe3244351d5860289dace3169cf473b)), closes [#6990](https://github.com/typeorm/typeorm/issues/6990) +- handle overlapping property / database names in querybuilder ([#7042](https://github.com/typeorm/typeorm/issues/7042)) ([b518fa1](https://github.com/typeorm/typeorm/commit/b518fa15f9b2183545b3c0daa2447ecd38ecc859)), closes [#7030](https://github.com/typeorm/typeorm/issues/7030) +- improve stack traces when using persist executor ([#7218](https://github.com/typeorm/typeorm/issues/7218)) ([0dfe5b8](https://github.com/typeorm/typeorm/commit/0dfe5b83f584c3960cdef28e53d2f0ded3f829ce)) +- order should allow only model fields, not methods ([#7188](https://github.com/typeorm/typeorm/issues/7188)) ([0194193](https://github.com/typeorm/typeorm/commit/01941937df11abd63fad9da082e1b5cf6a1300ce)), closes [#7178](https://github.com/typeorm/typeorm/issues/7178) +- resolve migration for UpdateDateColumn without ON UPDATE clause ([#7057](https://github.com/typeorm/typeorm/issues/7057)) ([ddd8cbc](https://github.com/typeorm/typeorm/commit/ddd8cbcdf6d67b6b1425de581c3da5d264a01167)), closes [#6995](https://github.com/typeorm/typeorm/issues/6995) +- resolves Postgres sequence identifier length error ([#7115](https://github.com/typeorm/typeorm/issues/7115)) ([568ef35](https://github.com/typeorm/typeorm/commit/568ef3546e6da6e73f68437fff418901d6232c51)), closes [#7106](https://github.com/typeorm/typeorm/issues/7106) +- return 'null' (instead of 'undefined') on lazy relations that have no results ([#7146](https://github.com/typeorm/typeorm/issues/7146)) ([#7147](https://github.com/typeorm/typeorm/issues/7147)) ([9b278c9](https://github.com/typeorm/typeorm/commit/9b278c99e52bbcdf0d36ece29168785ee8641687)) +- support MongoDB DNS seed list connection ([#7136](https://github.com/typeorm/typeorm/issues/7136)) ([f730bb9](https://github.com/typeorm/typeorm/commit/f730bb9fc1908a65edacc07e5e364648efb48768)), closes [#3347](https://github.com/typeorm/typeorm/issues/3347) [#3133](https://github.com/typeorm/typeorm/issues/3133) +- **data-api:** Fixed how data api driver uses and reuses a client ([#6869](https://github.com/typeorm/typeorm/issues/6869)) ([6ce65fb](https://github.com/typeorm/typeorm/commit/6ce65fbf6be5e696c3ae907d3f8e63b1e7332a1e)) +- use default import of yargs for --help ([#6986](https://github.com/typeorm/typeorm/issues/6986)) ([6ef8ffe](https://github.com/typeorm/typeorm/commit/6ef8ffe387980c51f9f20e9cc03d6199c7068ac5)) ### Features -* add NOWAIT and SKIP LOCKED lock support for MySQL ([#7236](https://github.com/typeorm/typeorm/issues/7236)) ([9407507](https://github.com/typeorm/typeorm/commit/9407507a742a3fe0ea2a836417d6851cad72e74c)), closes [#6530](https://github.com/typeorm/typeorm/issues/6530) -* closure table custom naming ([#7120](https://github.com/typeorm/typeorm/issues/7120)) ([bcd998b](https://github.com/typeorm/typeorm/commit/bcd998b4f384893679e60914d3c52b3d68e7792e)) -* JavaScript file migrations output ([#7253](https://github.com/typeorm/typeorm/issues/7253)) ([ce9cb87](https://github.com/typeorm/typeorm/commit/ce9cb8732cb70458f29c0976d980d34b0f4fa3d7)) -* relations: Orphaned row action ([#7105](https://github.com/typeorm/typeorm/issues/7105)) ([efc2837](https://github.com/typeorm/typeorm/commit/efc283769ed972d022980e681e294d695087a807)) +- add NOWAIT and SKIP LOCKED lock support for MySQL ([#7236](https://github.com/typeorm/typeorm/issues/7236)) ([9407507](https://github.com/typeorm/typeorm/commit/9407507a742a3fe0ea2a836417d6851cad72e74c)), closes [#6530](https://github.com/typeorm/typeorm/issues/6530) +- closure table custom naming ([#7120](https://github.com/typeorm/typeorm/issues/7120)) ([bcd998b](https://github.com/typeorm/typeorm/commit/bcd998b4f384893679e60914d3c52b3d68e7792e)) +- JavaScript file migrations output ([#7253](https://github.com/typeorm/typeorm/issues/7253)) ([ce9cb87](https://github.com/typeorm/typeorm/commit/ce9cb8732cb70458f29c0976d980d34b0f4fa3d7)) +- relations: Orphaned row action ([#7105](https://github.com/typeorm/typeorm/issues/7105)) ([efc2837](https://github.com/typeorm/typeorm/commit/efc283769ed972d022980e681e294d695087a807)) ## [0.2.29](https://github.com/typeorm/typeorm/compare/0.2.28...0.2.29) (2020-11-02) ### Bug Fixes -* allow falsey discriminator values ([#6973](https://github.com/typeorm/typeorm/issues/6973)) ([f3ba242](https://github.com/typeorm/typeorm/commit/f3ba2420396341ad3b808ea8540ea6a2272ff916)), closes [#3891](https://github.com/typeorm/typeorm/issues/3891) -* allow for complex jsonb primary key columns ([#6834](https://github.com/typeorm/typeorm/issues/6834)) ([f95e9d8](https://github.com/typeorm/typeorm/commit/f95e9d8f9a6c7a1117564b3e3f65b5294f8d5ff5)), closes [#6833](https://github.com/typeorm/typeorm/issues/6833) -* Allows valid non-object JSON to be retrieved in simple-json columns ([#6574](https://github.com/typeorm/typeorm/issues/6574)) ([0aedf43](https://github.com/typeorm/typeorm/commit/0aedf43874a6f950614134967bf4b173e4513ba0)), closes [#5501](https://github.com/typeorm/typeorm/issues/5501) -* Cannot read property 'hasMetadata' of undefined ([#5659](https://github.com/typeorm/typeorm/issues/5659)) ([0280cdc](https://github.com/typeorm/typeorm/commit/0280cdc451c35ef73c830eb1191c95d34f6ce06e)), closes [#3685](https://github.com/typeorm/typeorm/issues/3685) -* check if the connection is closed before executing a query. This prevents SQLITE_MISUSE errors (https://sqlite.org/rescode.html#misuse) originating from sqlite itself ([#6975](https://github.com/typeorm/typeorm/issues/6975)) ([5f6bbec](https://github.com/typeorm/typeorm/commit/5f6bbecd6166f1e80ed87d7e6c2c181fe463bdef)) -* check mysql constraint schema on join ([#6851](https://github.com/typeorm/typeorm/issues/6851)) ([d2b914d](https://github.com/typeorm/typeorm/commit/d2b914da6a425d47916c72ac50bfa69bea4847fb)), closes [#6169](https://github.com/typeorm/typeorm/issues/6169) [#6169](https://github.com/typeorm/typeorm/issues/6169) -* correct reading of custom ormconfig.env files ([#6922](https://github.com/typeorm/typeorm/issues/6922)) ([a09fb7f](https://github.com/typeorm/typeorm/commit/a09fb7fb919e7ebb1c174ba4b0abe09b245e0442)) -* explicitly define `query` command's param ([#6899](https://github.com/typeorm/typeorm/issues/6899)) ([4475d80](https://github.com/typeorm/typeorm/commit/4475d8067592b91b857f2b456dc31c5850a21081)), closes [#6896](https://github.com/typeorm/typeorm/issues/6896) -* findRoots should get the defined primary key column ([#6982](https://github.com/typeorm/typeorm/issues/6982)) ([f2ba901](https://github.com/typeorm/typeorm/commit/f2ba9012fe4e851bc667dfdfedc3fd4af665d52b)), closes [#6948](https://github.com/typeorm/typeorm/issues/6948) [#6948](https://github.com/typeorm/typeorm/issues/6948) -* Fix Mongodb delete by ObjectId. Closes [#6552](https://github.com/typeorm/typeorm/issues/6552) ([#6553](https://github.com/typeorm/typeorm/issues/6553)) ([e37eb1e](https://github.com/typeorm/typeorm/commit/e37eb1e8e8544f91c3d0a44b55322966e121b3af)) -* fixes the typescript errors in EntityCreateCommand & SubscriberCreateCommand ([#6824](https://github.com/typeorm/typeorm/issues/6824)) ([0221a93](https://github.com/typeorm/typeorm/commit/0221a933d19125cc0703a7fdd2a243b494ac5e72)) -* handle count multiple PK & edge cases more gracefully ([#6870](https://github.com/typeorm/typeorm/issues/6870)) ([4abfb34](https://github.com/typeorm/typeorm/commit/4abfb342aa390ab4643a1133daaf90c0996b61c2)), closes [#5989](https://github.com/typeorm/typeorm/issues/5989) [#5314](https://github.com/typeorm/typeorm/issues/5314) [#4550](https://github.com/typeorm/typeorm/issues/4550) -* Handle undefined querysets in QueryCommand ([#6910](https://github.com/typeorm/typeorm/issues/6910)) ([6f285dc](https://github.com/typeorm/typeorm/commit/6f285dce1ac315707fe01a892c1c74521a98aae2)), closes [#6612](https://github.com/typeorm/typeorm/issues/6612) -* handle Undefined values in driver URL options ([#6925](https://github.com/typeorm/typeorm/issues/6925)) ([6fa2df5](https://github.com/typeorm/typeorm/commit/6fa2df5ade71a3fee550e3c8fb7bcd7cd02080a8)) -* ILike operator generally available for any driver ([#6945](https://github.com/typeorm/typeorm/issues/6945)) ([37f0d8f](https://github.com/typeorm/typeorm/commit/37f0d8f7938ee5dbcf899a7f2855ea6dc6dc604e)) -* Only check for discriminator conflicts on STI entities ([#2985](https://github.com/typeorm/typeorm/issues/2985)) ([06903d1](https://github.com/typeorm/typeorm/commit/06903d1c914e8082620dbf16551caa302862d328)), closes [#2984](https://github.com/typeorm/typeorm/issues/2984) -* postgresql connection URL can use an UNIX Socket ([#2614](https://github.com/typeorm/typeorm/issues/2614)) ([#6042](https://github.com/typeorm/typeorm/issues/6042)) ([21c4166](https://github.com/typeorm/typeorm/commit/21c41663ccecfa5f2d94f94424f1a9a53e5d817c)) -* prevent create-type commands edge-case TypeErrors ([#6836](https://github.com/typeorm/typeorm/issues/6836)) ([08ec0a8](https://github.com/typeorm/typeorm/commit/08ec0a8ed922225ff529790ad5ff19c0e463954e)), closes [#6831](https://github.com/typeorm/typeorm/issues/6831) -* redundant migration with decimal default ([#6879](https://github.com/typeorm/typeorm/issues/6879)) ([6ff67f7](https://github.com/typeorm/typeorm/commit/6ff67f71fa7ad2bcf8a89c01ead7f54386e35f3a)), closes [#6140](https://github.com/typeorm/typeorm/issues/6140) [#5407](https://github.com/typeorm/typeorm/issues/5407) -* remove @DiscriminatorValue from error message ([#5256](https://github.com/typeorm/typeorm/issues/5256)) ([2bf15ca](https://github.com/typeorm/typeorm/commit/2bf15ca913016ad07080c38c9fc3ee848b60ca4f)), closes [#5255](https://github.com/typeorm/typeorm/issues/5255) -* resolves issue proto-less object validation ([#6884](https://github.com/typeorm/typeorm/issues/6884)) ([e08d9c6](https://github.com/typeorm/typeorm/commit/e08d9c61aab72f16ecd8bd790cb32bf0d164a5af)), closes [#2065](https://github.com/typeorm/typeorm/issues/2065) -* return null for nullable RelationId() column ([#6848](https://github.com/typeorm/typeorm/issues/6848)) ([7147a0d](https://github.com/typeorm/typeorm/commit/7147a0dbe7f2622a21c51edefa3b921f42e04b49)), closes [#6815](https://github.com/typeorm/typeorm/issues/6815) -* subscribers should use the subscribersDir ([5ef9450](https://github.com/typeorm/typeorm/commit/5ef94509b89f11f8337e18046c3f9d9632d234df)) -* support changing comments in MySQL columns ([#6903](https://github.com/typeorm/typeorm/issues/6903)) ([c5143aa](https://github.com/typeorm/typeorm/commit/c5143aab08a04e96aebb55996ed7683d48542bbd)) -* support combination of many-to-one/cacade/composte PK ([#6417](https://github.com/typeorm/typeorm/issues/6417)) ([9a0497b](https://github.com/typeorm/typeorm/commit/9a0497b533b2f6896b8e7d189b36dd3892e58007)) -* support empty `IN` clause across all dialects ([#6887](https://github.com/typeorm/typeorm/issues/6887)) ([9635080](https://github.com/typeorm/typeorm/commit/96350805fb9f02b8fb2c90b5528a15d5cdb9faeb)), closes [#4865](https://github.com/typeorm/typeorm/issues/4865) [#2195](https://github.com/typeorm/typeorm/issues/2195) -* support multiple row insert on oracle ([#6927](https://github.com/typeorm/typeorm/issues/6927)) ([a5eb946](https://github.com/typeorm/typeorm/commit/a5eb946117a18d94c0157188b6a39542c8d50756)), closes [#2434](https://github.com/typeorm/typeorm/issues/2434) -* sync the typeorm-model-shim ([#6891](https://github.com/typeorm/typeorm/issues/6891)) ([c72e48b](https://github.com/typeorm/typeorm/commit/c72e48b9c7b893f8a2483ba1ddaa7ded039fe349)), closes [#6288](https://github.com/typeorm/typeorm/issues/6288) [#5920](https://github.com/typeorm/typeorm/issues/5920) -* TreeRepository based entities primary column supports custom name. ([#6942](https://github.com/typeorm/typeorm/issues/6942)) ([7ec1b75](https://github.com/typeorm/typeorm/commit/7ec1b75f12832e4d99e1ed0cef40755f2b6d650a)) -* use `require` in `ReactNativeDriver` ([#6814](https://github.com/typeorm/typeorm/issues/6814)) ([1a6383c](https://github.com/typeorm/typeorm/commit/1a6383cecd74ee90388db313a74432f7ba12cfdf)), closes [#6811](https://github.com/typeorm/typeorm/issues/6811) -* use correct type for MongoQueryRunner.databaseConnection ([#6906](https://github.com/typeorm/typeorm/issues/6906)) ([da70b40](https://github.com/typeorm/typeorm/commit/da70b405498b142ecc29f7ff01e7a37f88227360)), closes [#6453](https://github.com/typeorm/typeorm/issues/6453) -* use pg ^8 in `init` command ([6ed9906](https://github.com/typeorm/typeorm/commit/6ed990666604ca9b8c0029d4fe972a039ef28570)) -* wrong FK loaded in multi-database environment ([#6828](https://github.com/typeorm/typeorm/issues/6828)) ([c060f95](https://github.com/typeorm/typeorm/commit/c060f95db0e261b02c4b28b19541cabcb1ac4a75)), closes [#6168](https://github.com/typeorm/typeorm/issues/6168) - +- allow falsey discriminator values ([#6973](https://github.com/typeorm/typeorm/issues/6973)) ([f3ba242](https://github.com/typeorm/typeorm/commit/f3ba2420396341ad3b808ea8540ea6a2272ff916)), closes [#3891](https://github.com/typeorm/typeorm/issues/3891) +- allow for complex jsonb primary key columns ([#6834](https://github.com/typeorm/typeorm/issues/6834)) ([f95e9d8](https://github.com/typeorm/typeorm/commit/f95e9d8f9a6c7a1117564b3e3f65b5294f8d5ff5)), closes [#6833](https://github.com/typeorm/typeorm/issues/6833) +- Allows valid non-object JSON to be retrieved in simple-json columns ([#6574](https://github.com/typeorm/typeorm/issues/6574)) ([0aedf43](https://github.com/typeorm/typeorm/commit/0aedf43874a6f950614134967bf4b173e4513ba0)), closes [#5501](https://github.com/typeorm/typeorm/issues/5501) +- Cannot read property 'hasMetadata' of undefined ([#5659](https://github.com/typeorm/typeorm/issues/5659)) ([0280cdc](https://github.com/typeorm/typeorm/commit/0280cdc451c35ef73c830eb1191c95d34f6ce06e)), closes [#3685](https://github.com/typeorm/typeorm/issues/3685) +- check if the connection is closed before executing a query. This prevents SQLITE_MISUSE errors (https://sqlite.org/rescode.html#misuse) originating from sqlite itself ([#6975](https://github.com/typeorm/typeorm/issues/6975)) ([5f6bbec](https://github.com/typeorm/typeorm/commit/5f6bbecd6166f1e80ed87d7e6c2c181fe463bdef)) +- check mysql constraint schema on join ([#6851](https://github.com/typeorm/typeorm/issues/6851)) ([d2b914d](https://github.com/typeorm/typeorm/commit/d2b914da6a425d47916c72ac50bfa69bea4847fb)), closes [#6169](https://github.com/typeorm/typeorm/issues/6169) [#6169](https://github.com/typeorm/typeorm/issues/6169) +- correct reading of custom ormconfig.env files ([#6922](https://github.com/typeorm/typeorm/issues/6922)) ([a09fb7f](https://github.com/typeorm/typeorm/commit/a09fb7fb919e7ebb1c174ba4b0abe09b245e0442)) +- explicitly define `query` command's param ([#6899](https://github.com/typeorm/typeorm/issues/6899)) ([4475d80](https://github.com/typeorm/typeorm/commit/4475d8067592b91b857f2b456dc31c5850a21081)), closes [#6896](https://github.com/typeorm/typeorm/issues/6896) +- findRoots should get the defined primary key column ([#6982](https://github.com/typeorm/typeorm/issues/6982)) ([f2ba901](https://github.com/typeorm/typeorm/commit/f2ba9012fe4e851bc667dfdfedc3fd4af665d52b)), closes [#6948](https://github.com/typeorm/typeorm/issues/6948) [#6948](https://github.com/typeorm/typeorm/issues/6948) +- Fix Mongodb delete by ObjectId. Closes [#6552](https://github.com/typeorm/typeorm/issues/6552) ([#6553](https://github.com/typeorm/typeorm/issues/6553)) ([e37eb1e](https://github.com/typeorm/typeorm/commit/e37eb1e8e8544f91c3d0a44b55322966e121b3af)) +- fixes the typescript errors in EntityCreateCommand & SubscriberCreateCommand ([#6824](https://github.com/typeorm/typeorm/issues/6824)) ([0221a93](https://github.com/typeorm/typeorm/commit/0221a933d19125cc0703a7fdd2a243b494ac5e72)) +- handle count multiple PK & edge cases more gracefully ([#6870](https://github.com/typeorm/typeorm/issues/6870)) ([4abfb34](https://github.com/typeorm/typeorm/commit/4abfb342aa390ab4643a1133daaf90c0996b61c2)), closes [#5989](https://github.com/typeorm/typeorm/issues/5989) [#5314](https://github.com/typeorm/typeorm/issues/5314) [#4550](https://github.com/typeorm/typeorm/issues/4550) +- Handle undefined querysets in QueryCommand ([#6910](https://github.com/typeorm/typeorm/issues/6910)) ([6f285dc](https://github.com/typeorm/typeorm/commit/6f285dce1ac315707fe01a892c1c74521a98aae2)), closes [#6612](https://github.com/typeorm/typeorm/issues/6612) +- handle Undefined values in driver URL options ([#6925](https://github.com/typeorm/typeorm/issues/6925)) ([6fa2df5](https://github.com/typeorm/typeorm/commit/6fa2df5ade71a3fee550e3c8fb7bcd7cd02080a8)) +- ILike operator generally available for any driver ([#6945](https://github.com/typeorm/typeorm/issues/6945)) ([37f0d8f](https://github.com/typeorm/typeorm/commit/37f0d8f7938ee5dbcf899a7f2855ea6dc6dc604e)) +- Only check for discriminator conflicts on STI entities ([#2985](https://github.com/typeorm/typeorm/issues/2985)) ([06903d1](https://github.com/typeorm/typeorm/commit/06903d1c914e8082620dbf16551caa302862d328)), closes [#2984](https://github.com/typeorm/typeorm/issues/2984) +- postgresql connection URL can use an UNIX Socket ([#2614](https://github.com/typeorm/typeorm/issues/2614)) ([#6042](https://github.com/typeorm/typeorm/issues/6042)) ([21c4166](https://github.com/typeorm/typeorm/commit/21c41663ccecfa5f2d94f94424f1a9a53e5d817c)) +- prevent create-type commands edge-case TypeErrors ([#6836](https://github.com/typeorm/typeorm/issues/6836)) ([08ec0a8](https://github.com/typeorm/typeorm/commit/08ec0a8ed922225ff529790ad5ff19c0e463954e)), closes [#6831](https://github.com/typeorm/typeorm/issues/6831) +- redundant migration with decimal default ([#6879](https://github.com/typeorm/typeorm/issues/6879)) ([6ff67f7](https://github.com/typeorm/typeorm/commit/6ff67f71fa7ad2bcf8a89c01ead7f54386e35f3a)), closes [#6140](https://github.com/typeorm/typeorm/issues/6140) [#5407](https://github.com/typeorm/typeorm/issues/5407) +- remove @DiscriminatorValue from error message ([#5256](https://github.com/typeorm/typeorm/issues/5256)) ([2bf15ca](https://github.com/typeorm/typeorm/commit/2bf15ca913016ad07080c38c9fc3ee848b60ca4f)), closes [#5255](https://github.com/typeorm/typeorm/issues/5255) +- resolves issue proto-less object validation ([#6884](https://github.com/typeorm/typeorm/issues/6884)) ([e08d9c6](https://github.com/typeorm/typeorm/commit/e08d9c61aab72f16ecd8bd790cb32bf0d164a5af)), closes [#2065](https://github.com/typeorm/typeorm/issues/2065) +- return null for nullable RelationId() column ([#6848](https://github.com/typeorm/typeorm/issues/6848)) ([7147a0d](https://github.com/typeorm/typeorm/commit/7147a0dbe7f2622a21c51edefa3b921f42e04b49)), closes [#6815](https://github.com/typeorm/typeorm/issues/6815) +- subscribers should use the subscribersDir ([5ef9450](https://github.com/typeorm/typeorm/commit/5ef94509b89f11f8337e18046c3f9d9632d234df)) +- support changing comments in MySQL columns ([#6903](https://github.com/typeorm/typeorm/issues/6903)) ([c5143aa](https://github.com/typeorm/typeorm/commit/c5143aab08a04e96aebb55996ed7683d48542bbd)) +- support combination of many-to-one/cacade/composte PK ([#6417](https://github.com/typeorm/typeorm/issues/6417)) ([9a0497b](https://github.com/typeorm/typeorm/commit/9a0497b533b2f6896b8e7d189b36dd3892e58007)) +- support empty `IN` clause across all dialects ([#6887](https://github.com/typeorm/typeorm/issues/6887)) ([9635080](https://github.com/typeorm/typeorm/commit/96350805fb9f02b8fb2c90b5528a15d5cdb9faeb)), closes [#4865](https://github.com/typeorm/typeorm/issues/4865) [#2195](https://github.com/typeorm/typeorm/issues/2195) +- support multiple row insert on oracle ([#6927](https://github.com/typeorm/typeorm/issues/6927)) ([a5eb946](https://github.com/typeorm/typeorm/commit/a5eb946117a18d94c0157188b6a39542c8d50756)), closes [#2434](https://github.com/typeorm/typeorm/issues/2434) +- sync the typeorm-model-shim ([#6891](https://github.com/typeorm/typeorm/issues/6891)) ([c72e48b](https://github.com/typeorm/typeorm/commit/c72e48b9c7b893f8a2483ba1ddaa7ded039fe349)), closes [#6288](https://github.com/typeorm/typeorm/issues/6288) [#5920](https://github.com/typeorm/typeorm/issues/5920) +- TreeRepository based entities primary column supports custom name. ([#6942](https://github.com/typeorm/typeorm/issues/6942)) ([7ec1b75](https://github.com/typeorm/typeorm/commit/7ec1b75f12832e4d99e1ed0cef40755f2b6d650a)) +- use `require` in `ReactNativeDriver` ([#6814](https://github.com/typeorm/typeorm/issues/6814)) ([1a6383c](https://github.com/typeorm/typeorm/commit/1a6383cecd74ee90388db313a74432f7ba12cfdf)), closes [#6811](https://github.com/typeorm/typeorm/issues/6811) +- use correct type for MongoQueryRunner.databaseConnection ([#6906](https://github.com/typeorm/typeorm/issues/6906)) ([da70b40](https://github.com/typeorm/typeorm/commit/da70b405498b142ecc29f7ff01e7a37f88227360)), closes [#6453](https://github.com/typeorm/typeorm/issues/6453) +- use pg ^8 in `init` command ([6ed9906](https://github.com/typeorm/typeorm/commit/6ed990666604ca9b8c0029d4fe972a039ef28570)) +- wrong FK loaded in multi-database environment ([#6828](https://github.com/typeorm/typeorm/issues/6828)) ([c060f95](https://github.com/typeorm/typeorm/commit/c060f95db0e261b02c4b28b19541cabcb1ac4a75)), closes [#6168](https://github.com/typeorm/typeorm/issues/6168) ### Features -* add ability for escaping for Raw() find operator ([#6850](https://github.com/typeorm/typeorm/issues/6850)) ([91b85bf](https://github.com/typeorm/typeorm/commit/91b85bfe6e73ff93db2684a13935b9bd6a9abcfd)) -* add absolute path support to other CLI commands ([#6807](https://github.com/typeorm/typeorm/issues/6807)) ([d9a76e9](https://github.com/typeorm/typeorm/commit/d9a76e91bed06037ff28ec132893f40c09004438)) -* Add SelectQueryBuilder.getOneOrFail() ([#6885](https://github.com/typeorm/typeorm/issues/6885)) ([920e781](https://github.com/typeorm/typeorm/commit/920e7812cd9d405df921f9ae9ce52ba0a9743bea)), closes [#6246](https://github.com/typeorm/typeorm/issues/6246) -* backport ilike from next ([#6862](https://github.com/typeorm/typeorm/issues/6862)) ([c8bf81e](https://github.com/typeorm/typeorm/commit/c8bf81ed2d47ba0822f8d6267ae1997180db2e31)) -* Exit with code 1 on empty migration:generate ([#6978](https://github.com/typeorm/typeorm/issues/6978)) ([8244ea1](https://github.com/typeorm/typeorm/commit/8244ea1371d5cf37e3f80e1b141f5945af38cb5e)) -* schema synchronization for partitioned tables with PostgreSQL 12+ ([#6780](https://github.com/typeorm/typeorm/issues/6780)) ([990442e](https://github.com/typeorm/typeorm/commit/990442e891e91cd829f9f34eff2114d4c623d24b)) -* support `autoEncryption` option for MongoDB ([#6865](https://github.com/typeorm/typeorm/issues/6865)) ([b22c27f](https://github.com/typeorm/typeorm/commit/b22c27feb2dd3892d47a9e82b0d7b11650d059b5)) -* Support column comments in Postgres and CockroachDB ([#6902](https://github.com/typeorm/typeorm/issues/6902)) ([bc623a4](https://github.com/typeorm/typeorm/commit/bc623a42a868eae7c988779abc4cdc0bbf775def)), closes [#3360](https://github.com/typeorm/typeorm/issues/3360) -* support ESM in ormconfig js & ts ([#6853](https://github.com/typeorm/typeorm/issues/6853)) ([7ebca2b](https://github.com/typeorm/typeorm/commit/7ebca2b9b1fd21e546b3a345a069637d6aab4b3e)), closes [#5003](https://github.com/typeorm/typeorm/issues/5003) -* support query comments in the query builder ([#6892](https://github.com/typeorm/typeorm/issues/6892)) ([84c18a9](https://github.com/typeorm/typeorm/commit/84c18a9cab2e87b28eb046b5688bfca4d3ce9da6)), closes [#3643](https://github.com/typeorm/typeorm/issues/3643) -* transactional events in subscriber interface + "transaction" option in FindOptions ([#6996](https://github.com/typeorm/typeorm/issues/6996)) ([0e4b239](https://github.com/typeorm/typeorm/commit/0e4b2397a6e62f5f2c35e5890bba53abe40a49ac)) +- add ability for escaping for Raw() find operator ([#6850](https://github.com/typeorm/typeorm/issues/6850)) ([91b85bf](https://github.com/typeorm/typeorm/commit/91b85bfe6e73ff93db2684a13935b9bd6a9abcfd)) +- add absolute path support to other CLI commands ([#6807](https://github.com/typeorm/typeorm/issues/6807)) ([d9a76e9](https://github.com/typeorm/typeorm/commit/d9a76e91bed06037ff28ec132893f40c09004438)) +- Add SelectQueryBuilder.getOneOrFail() ([#6885](https://github.com/typeorm/typeorm/issues/6885)) ([920e781](https://github.com/typeorm/typeorm/commit/920e7812cd9d405df921f9ae9ce52ba0a9743bea)), closes [#6246](https://github.com/typeorm/typeorm/issues/6246) +- backport ilike from next ([#6862](https://github.com/typeorm/typeorm/issues/6862)) ([c8bf81e](https://github.com/typeorm/typeorm/commit/c8bf81ed2d47ba0822f8d6267ae1997180db2e31)) +- Exit with code 1 on empty migration:generate ([#6978](https://github.com/typeorm/typeorm/issues/6978)) ([8244ea1](https://github.com/typeorm/typeorm/commit/8244ea1371d5cf37e3f80e1b141f5945af38cb5e)) +- schema synchronization for partitioned tables with PostgreSQL 12+ ([#6780](https://github.com/typeorm/typeorm/issues/6780)) ([990442e](https://github.com/typeorm/typeorm/commit/990442e891e91cd829f9f34eff2114d4c623d24b)) +- support `autoEncryption` option for MongoDB ([#6865](https://github.com/typeorm/typeorm/issues/6865)) ([b22c27f](https://github.com/typeorm/typeorm/commit/b22c27feb2dd3892d47a9e82b0d7b11650d059b5)) +- Support column comments in Postgres and CockroachDB ([#6902](https://github.com/typeorm/typeorm/issues/6902)) ([bc623a4](https://github.com/typeorm/typeorm/commit/bc623a42a868eae7c988779abc4cdc0bbf775def)), closes [#3360](https://github.com/typeorm/typeorm/issues/3360) +- support ESM in ormconfig js & ts ([#6853](https://github.com/typeorm/typeorm/issues/6853)) ([7ebca2b](https://github.com/typeorm/typeorm/commit/7ebca2b9b1fd21e546b3a345a069637d6aab4b3e)), closes [#5003](https://github.com/typeorm/typeorm/issues/5003) +- support query comments in the query builder ([#6892](https://github.com/typeorm/typeorm/issues/6892)) ([84c18a9](https://github.com/typeorm/typeorm/commit/84c18a9cab2e87b28eb046b5688bfca4d3ce9da6)), closes [#3643](https://github.com/typeorm/typeorm/issues/3643) +- transactional events in subscriber interface + "transaction" option in FindOptions ([#6996](https://github.com/typeorm/typeorm/issues/6996)) ([0e4b239](https://github.com/typeorm/typeorm/commit/0e4b2397a6e62f5f2c35e5890bba53abe40a49ac)) ### Performance Improvements -* Improve MySQL LoadTables Performance ([#6886](https://github.com/typeorm/typeorm/issues/6886)) ([0f0e0b6](https://github.com/typeorm/typeorm/commit/0f0e0b660c83409bb59f806b9f6e099ca8dbc61c)), closes [#6800](https://github.com/typeorm/typeorm/issues/6800) -* Improve replacePropertyNames ([#4760](https://github.com/typeorm/typeorm/issues/4760)) ([d86671c](https://github.com/typeorm/typeorm/commit/d86671cb179751730d0324b23d9f4bcb21010728)) +- Improve MySQL LoadTables Performance ([#6886](https://github.com/typeorm/typeorm/issues/6886)) ([0f0e0b6](https://github.com/typeorm/typeorm/commit/0f0e0b660c83409bb59f806b9f6e099ca8dbc61c)), closes [#6800](https://github.com/typeorm/typeorm/issues/6800) +- Improve replacePropertyNames ([#4760](https://github.com/typeorm/typeorm/issues/4760)) ([d86671c](https://github.com/typeorm/typeorm/commit/d86671cb179751730d0324b23d9f4bcb21010728)) ## [0.2.28](https://github.com/typeorm/typeorm/compare/0.2.27...0.2.28) (2020-09-30) ### Bug Fixes -* FindManyOptions order in parameter typing is important ([51608ae](https://github.com/typeorm/typeorm/commit/51608aebccd31570fc33ba0cd90c3147cdfc70b8)) -* lock Typescript to 3.6.0 ([#6810](https://github.com/typeorm/typeorm/issues/6810)) ([7f7e4d5](https://github.com/typeorm/typeorm/commit/7f7e4d53119506bdbb86999606707cd740859fe7)), closes [#6809](https://github.com/typeorm/typeorm/issues/6809) [#6805](https://github.com/typeorm/typeorm/issues/6805) +- FindManyOptions order in parameter typing is important ([51608ae](https://github.com/typeorm/typeorm/commit/51608aebccd31570fc33ba0cd90c3147cdfc70b8)) +- lock Typescript to 3.6.0 ([#6810](https://github.com/typeorm/typeorm/issues/6810)) ([7f7e4d5](https://github.com/typeorm/typeorm/commit/7f7e4d53119506bdbb86999606707cd740859fe7)), closes [#6809](https://github.com/typeorm/typeorm/issues/6809) [#6805](https://github.com/typeorm/typeorm/issues/6805) ## [0.2.27](https://github.com/typeorm/typeorm/compare/0.2.26...0.2.27) (2020-09-29) ### Bug Fixes -* add dummy for FileLogger, ConnectionOptionsReaders, and update gulpfile ([#6763](https://github.com/typeorm/typeorm/issues/6763)) ([180fbd4](https://github.com/typeorm/typeorm/commit/180fbd415da80ce383b426f6d38486aa3826296d)) -* backport FindOperator return types ([#6717](https://github.com/typeorm/typeorm/issues/6717)) ([2b37808](https://github.com/typeorm/typeorm/commit/2b3780836f5fd737fdc58fe4e0eb2ea4200cae66)) -* coerce port to number in ConnectionOptionsEnvReader ([#6786](https://github.com/typeorm/typeorm/issues/6786)) ([55fbb69](https://github.com/typeorm/typeorm/commit/55fbb696c6c2324a67a08061322dc5726844b7d1)), closes [#6781](https://github.com/typeorm/typeorm/issues/6781) -* count() method for multiple primary keys for cockroachdb ([#6745](https://github.com/typeorm/typeorm/issues/6745)) ([dfe8259](https://github.com/typeorm/typeorm/commit/dfe8259ef53a432f1c02607e6ffee662dd4fd8a9)) -* enforce name argument of migration generate command ([#2719](https://github.com/typeorm/typeorm/issues/2719)) ([#6690](https://github.com/typeorm/typeorm/issues/6690)) ([dfcb2db](https://github.com/typeorm/typeorm/commit/dfcb2db216d6ed33946dfa190e19eb14c0fed390)), closes [#4798](https://github.com/typeorm/typeorm/issues/4798) [#4805](https://github.com/typeorm/typeorm/issues/4805) [#4798](https://github.com/typeorm/typeorm/issues/4798) [#4805](https://github.com/typeorm/typeorm/issues/4805) -* ensure browser builds don't include any non-browser modules ([#6743](https://github.com/typeorm/typeorm/issues/6743)) ([c714867](https://github.com/typeorm/typeorm/commit/c714867d3d0c43ccbb7ca8fb3ce969207e4d5c04)), closes [#6739](https://github.com/typeorm/typeorm/issues/6739) -* hdb-pool is not namespaced under [@sap](https://github.com/sap) ([#6700](https://github.com/typeorm/typeorm/issues/6700)) ([9583430](https://github.com/typeorm/typeorm/commit/9583430e8282d1ad758724957971a5d5d9664f63)), closes [#6697](https://github.com/typeorm/typeorm/issues/6697) -* migration:generate issue with onUpdate using mariadb 10.4 ([#6714](https://github.com/typeorm/typeorm/issues/6714)) ([6e28322](https://github.com/typeorm/typeorm/commit/6e28322ca65ba739bf0d767075016bc0cae7a48c)) -* prevent multiple `release` listeners in PostgresQueryRunner ([#6708](https://github.com/typeorm/typeorm/issues/6708)) ([208cf6b](https://github.com/typeorm/typeorm/commit/208cf6b0511a2d565c7999837497bb6cf8f8e7c7)), closes [#6699](https://github.com/typeorm/typeorm/issues/6699) -* prevent wrong returned entity in ReturningResultsEntityUpdator ([#6440](https://github.com/typeorm/typeorm/issues/6440)) ([c1c8e88](https://github.com/typeorm/typeorm/commit/c1c8e88f8945bf6a03bde728de370f5c61c5bdb8)) -* resolve issues ora-00972:identifier is too long ([#6751](https://github.com/typeorm/typeorm/issues/6751)) ([b55a417](https://github.com/typeorm/typeorm/commit/b55a417ea4852ad2e66091cfa800534f7ccdd3c9)), closes [#5067](https://github.com/typeorm/typeorm/issues/5067) [#5067](https://github.com/typeorm/typeorm/issues/5067) -* sql.js v1.2+ don't support undefined parameters ([#6698](https://github.com/typeorm/typeorm/issues/6698)) ([ea59b8d](https://github.com/typeorm/typeorm/commit/ea59b8d46b2a36ac251f43c8a8fb98ff15ab4e2d)), closes [#5720](https://github.com/typeorm/typeorm/issues/5720) +- add dummy for FileLogger, ConnectionOptionsReaders, and update gulpfile ([#6763](https://github.com/typeorm/typeorm/issues/6763)) ([180fbd4](https://github.com/typeorm/typeorm/commit/180fbd415da80ce383b426f6d38486aa3826296d)) +- backport FindOperator return types ([#6717](https://github.com/typeorm/typeorm/issues/6717)) ([2b37808](https://github.com/typeorm/typeorm/commit/2b3780836f5fd737fdc58fe4e0eb2ea4200cae66)) +- coerce port to number in ConnectionOptionsEnvReader ([#6786](https://github.com/typeorm/typeorm/issues/6786)) ([55fbb69](https://github.com/typeorm/typeorm/commit/55fbb696c6c2324a67a08061322dc5726844b7d1)), closes [#6781](https://github.com/typeorm/typeorm/issues/6781) +- count() method for multiple primary keys for cockroachdb ([#6745](https://github.com/typeorm/typeorm/issues/6745)) ([dfe8259](https://github.com/typeorm/typeorm/commit/dfe8259ef53a432f1c02607e6ffee662dd4fd8a9)) +- enforce name argument of migration generate command ([#2719](https://github.com/typeorm/typeorm/issues/2719)) ([#6690](https://github.com/typeorm/typeorm/issues/6690)) ([dfcb2db](https://github.com/typeorm/typeorm/commit/dfcb2db216d6ed33946dfa190e19eb14c0fed390)), closes [#4798](https://github.com/typeorm/typeorm/issues/4798) [#4805](https://github.com/typeorm/typeorm/issues/4805) [#4798](https://github.com/typeorm/typeorm/issues/4798) [#4805](https://github.com/typeorm/typeorm/issues/4805) +- ensure browser builds don't include any non-browser modules ([#6743](https://github.com/typeorm/typeorm/issues/6743)) ([c714867](https://github.com/typeorm/typeorm/commit/c714867d3d0c43ccbb7ca8fb3ce969207e4d5c04)), closes [#6739](https://github.com/typeorm/typeorm/issues/6739) +- hdb-pool is not namespaced under [@sap](https://github.com/sap) ([#6700](https://github.com/typeorm/typeorm/issues/6700)) ([9583430](https://github.com/typeorm/typeorm/commit/9583430e8282d1ad758724957971a5d5d9664f63)), closes [#6697](https://github.com/typeorm/typeorm/issues/6697) +- migration:generate issue with onUpdate using mariadb 10.4 ([#6714](https://github.com/typeorm/typeorm/issues/6714)) ([6e28322](https://github.com/typeorm/typeorm/commit/6e28322ca65ba739bf0d767075016bc0cae7a48c)) +- prevent multiple `release` listeners in PostgresQueryRunner ([#6708](https://github.com/typeorm/typeorm/issues/6708)) ([208cf6b](https://github.com/typeorm/typeorm/commit/208cf6b0511a2d565c7999837497bb6cf8f8e7c7)), closes [#6699](https://github.com/typeorm/typeorm/issues/6699) +- prevent wrong returned entity in ReturningResultsEntityUpdator ([#6440](https://github.com/typeorm/typeorm/issues/6440)) ([c1c8e88](https://github.com/typeorm/typeorm/commit/c1c8e88f8945bf6a03bde728de370f5c61c5bdb8)) +- resolve issues ora-00972:identifier is too long ([#6751](https://github.com/typeorm/typeorm/issues/6751)) ([b55a417](https://github.com/typeorm/typeorm/commit/b55a417ea4852ad2e66091cfa800534f7ccdd3c9)), closes [#5067](https://github.com/typeorm/typeorm/issues/5067) [#5067](https://github.com/typeorm/typeorm/issues/5067) +- sql.js v1.2+ don't support undefined parameters ([#6698](https://github.com/typeorm/typeorm/issues/6698)) ([ea59b8d](https://github.com/typeorm/typeorm/commit/ea59b8d46b2a36ac251f43c8a8fb98ff15ab4e2d)), closes [#5720](https://github.com/typeorm/typeorm/issues/5720) ### Features -* add option to pass postgres server notices to client logger ([#6215](https://github.com/typeorm/typeorm/issues/6215)) ([5084e47](https://github.com/typeorm/typeorm/commit/5084e47be4fd42316ad47e6102645534fae45d9f)), closes [#2216](https://github.com/typeorm/typeorm/issues/2216) -* backport SQLite Busy handler & WAL mode enable ([#6588](https://github.com/typeorm/typeorm/issues/6588)) ([7a52f18](https://github.com/typeorm/typeorm/commit/7a52f18c86613292c3503484eac332f59141a6e3)) -* Beautify generated SQL for migrations ([#6685](https://github.com/typeorm/typeorm/issues/6685)) ([370442c](https://github.com/typeorm/typeorm/commit/370442c27a0aecd67eeb44f6077922dda16bcef8)), closes [#4415](https://github.com/typeorm/typeorm/issues/4415) -* create EntityTarget and use instead of EntitySchema / ObjectType / etc ([#6701](https://github.com/typeorm/typeorm/issues/6701)) ([8b68f40](https://github.com/typeorm/typeorm/commit/8b68f40a01b6cdc0e8d21492d988fe21cbef64de)) +- add option to pass postgres server notices to client logger ([#6215](https://github.com/typeorm/typeorm/issues/6215)) ([5084e47](https://github.com/typeorm/typeorm/commit/5084e47be4fd42316ad47e6102645534fae45d9f)), closes [#2216](https://github.com/typeorm/typeorm/issues/2216) +- backport SQLite Busy handler & WAL mode enable ([#6588](https://github.com/typeorm/typeorm/issues/6588)) ([7a52f18](https://github.com/typeorm/typeorm/commit/7a52f18c86613292c3503484eac332f59141a6e3)) +- Beautify generated SQL for migrations ([#6685](https://github.com/typeorm/typeorm/issues/6685)) ([370442c](https://github.com/typeorm/typeorm/commit/370442c27a0aecd67eeb44f6077922dda16bcef8)), closes [#4415](https://github.com/typeorm/typeorm/issues/4415) +- create EntityTarget and use instead of EntitySchema / ObjectType / etc ([#6701](https://github.com/typeorm/typeorm/issues/6701)) ([8b68f40](https://github.com/typeorm/typeorm/commit/8b68f40a01b6cdc0e8d21492d988fe21cbef64de)) ### Reverts -* Revert "fix: properly override database url properties (#6247)" (#6802) ([45b980c](https://github.com/typeorm/typeorm/commit/45b980cf7fd61b0ee2e9560d9aadb96ce331d5cb)), closes [#6247](https://github.com/typeorm/typeorm/issues/6247) [#6802](https://github.com/typeorm/typeorm/issues/6802) +- Revert "fix: properly override database url properties (#6247)" (#6802) ([45b980c](https://github.com/typeorm/typeorm/commit/45b980cf7fd61b0ee2e9560d9aadb96ce331d5cb)), closes [#6247](https://github.com/typeorm/typeorm/issues/6247) [#6802](https://github.com/typeorm/typeorm/issues/6802) ## [0.2.26](https://github.com/typeorm/typeorm/compare/0.2.25...0.2.26) (2020-09-10) ### Bug Fixes -* @JoinTable does not respect inverseJoinColumns referenced column width ([#6444](https://github.com/typeorm/typeorm/issues/6444)) ([f642a9e](https://github.com/typeorm/typeorm/commit/f642a9e)), closes [#6442](https://github.com/typeorm/typeorm/issues/6442) -* add missing schema for OracleDriver ([#6673](https://github.com/typeorm/typeorm/issues/6673)) ([8b8bc35](https://github.com/typeorm/typeorm/commit/8b8bc35)) -* change InsertQueryBuilder.values() with an empty array into a no-op ([#6584](https://github.com/typeorm/typeorm/issues/6584)) ([9d2df28](https://github.com/typeorm/typeorm/commit/9d2df28)), closes [#3111](https://github.com/typeorm/typeorm/issues/3111) -* Child entities not being saved correctly with cascade actions ([#6219](https://github.com/typeorm/typeorm/issues/6219)) ([16a2d80](https://github.com/typeorm/typeorm/commit/16a2d80)) -* correctly parse connection URI with query params ([#6390](https://github.com/typeorm/typeorm/issues/6390)) ([54a3a15](https://github.com/typeorm/typeorm/commit/54a3a15)), closes [#6389](https://github.com/typeorm/typeorm/issues/6389) -* decorators should implement the official TypeScript interface ([#6398](https://github.com/typeorm/typeorm/issues/6398)) ([c23c888](https://github.com/typeorm/typeorm/commit/c23c888)), closes [#5922](https://github.com/typeorm/typeorm/issues/5922) -* DeepPartial with any and {[k: string]: any} ([#6581](https://github.com/typeorm/typeorm/issues/6581)) ([8d90d40](https://github.com/typeorm/typeorm/commit/8d90d40)), closes [#6580](https://github.com/typeorm/typeorm/issues/6580) [#6580](https://github.com/typeorm/typeorm/issues/6580) -* exporting missing load event ([#6396](https://github.com/typeorm/typeorm/issues/6396)) ([c6336aa](https://github.com/typeorm/typeorm/commit/c6336aa)) -* get correct insert ids for multiple entities inserted ([#6668](https://github.com/typeorm/typeorm/issues/6668)) ([ef2011d](https://github.com/typeorm/typeorm/commit/ef2011d)), closes [#2131](https://github.com/typeorm/typeorm/issues/2131) [#5973](https://github.com/typeorm/typeorm/issues/5973) [#2131](https://github.com/typeorm/typeorm/issues/2131) -* getPendingMigrations isn't properly working ([#6372](https://github.com/typeorm/typeorm/issues/6372)) ([7c0da1c](https://github.com/typeorm/typeorm/commit/7c0da1c)) -* handle 'error' events from pool connection ([#6262](https://github.com/typeorm/typeorm/issues/6262)) ([ae3cf0e](https://github.com/typeorm/typeorm/commit/ae3cf0e)) -* insert IN(null) instead of IN() when In([]) empty array for mysqlDriver ([#6237](https://github.com/typeorm/typeorm/issues/6237)) ([6f6bdbd](https://github.com/typeorm/typeorm/commit/6f6bdbd)) -* make only a single SELECT to get inserted default and generated values of multiple entities ([#6669](https://github.com/typeorm/typeorm/issues/6669)) ([4fc4a1b](https://github.com/typeorm/typeorm/commit/4fc4a1b)), closes [#6266](https://github.com/typeorm/typeorm/issues/6266) [#6266](https://github.com/typeorm/typeorm/issues/6266) -* Migration issues with scale & precision in sqlite/sql.js ([#6638](https://github.com/typeorm/typeorm/issues/6638)) ([0397e44](https://github.com/typeorm/typeorm/commit/0397e44)), closes [#6636](https://github.com/typeorm/typeorm/issues/6636) -* mysql migration: make sure the indices sql which left-join be the same database ([#6426](https://github.com/typeorm/typeorm/issues/6426)) ([906d97f](https://github.com/typeorm/typeorm/commit/906d97f)) -* pass `ids_` to alias builder to prevent length overflow ([#6624](https://github.com/typeorm/typeorm/issues/6624)) ([cf3ad62](https://github.com/typeorm/typeorm/commit/cf3ad62)) -* pass formatOptions to Data API Client, fix extensions ([#6404](https://github.com/typeorm/typeorm/issues/6404)) ([9abab82](https://github.com/typeorm/typeorm/commit/9abab82)), closes [#1](https://github.com/typeorm/typeorm/issues/1) -* Query builder makes query with joins, without limit for inherited entities ([#6402](https://github.com/typeorm/typeorm/issues/6402)) ([874e573](https://github.com/typeorm/typeorm/commit/874e573)), closes [#6399](https://github.com/typeorm/typeorm/issues/6399) -* remove unnecessary optionality from Raw operator's columnAlias argument ([#6321](https://github.com/typeorm/typeorm/issues/6321)) ([0d99b46](https://github.com/typeorm/typeorm/commit/0d99b46)) -* resolve missing decorators on shim ([#6354](https://github.com/typeorm/typeorm/issues/6354)) ([8e2d97d](https://github.com/typeorm/typeorm/commit/8e2d97d)), closes [#6093](https://github.com/typeorm/typeorm/issues/6093) -* revert fix handle URL objects as column field values ([#6145](https://github.com/typeorm/typeorm/issues/6145)) ([e073e02](https://github.com/typeorm/typeorm/commit/e073e02)) -* SqlQueryRunner.hasColumn was not working ([#6146](https://github.com/typeorm/typeorm/issues/6146)) ([a595fed](https://github.com/typeorm/typeorm/commit/a595fed)), closes [#5718](https://github.com/typeorm/typeorm/issues/5718) -* support multiple `JoinColumn`s in EntitySchema ([#6397](https://github.com/typeorm/typeorm/issues/6397)) ([298a3b9](https://github.com/typeorm/typeorm/commit/298a3b9)), closes [#5444](https://github.com/typeorm/typeorm/issues/5444) -* Unnecessary migrations for fulltext indices ([#6634](https://github.com/typeorm/typeorm/issues/6634)) ([c81b405](https://github.com/typeorm/typeorm/commit/c81b405)), closes [#6633](https://github.com/typeorm/typeorm/issues/6633) -* unnecessary migrations for unsigned numeric types ([#6632](https://github.com/typeorm/typeorm/issues/6632)) ([7ddaf23](https://github.com/typeorm/typeorm/commit/7ddaf23)), closes [#2943](https://github.com/typeorm/typeorm/issues/2943) [/github.com/typeorm/typeorm/pull/6632#pullrequestreview-480932808](https://github.com//github.com/typeorm/typeorm/pull/6632/issues/pullrequestreview-480932808) -* update query deep partial TypeScript definition ([#6085](https://github.com/typeorm/typeorm/issues/6085)) ([23110d1](https://github.com/typeorm/typeorm/commit/23110d1)) +- @JoinTable does not respect inverseJoinColumns referenced column width ([#6444](https://github.com/typeorm/typeorm/issues/6444)) ([f642a9e](https://github.com/typeorm/typeorm/commit/f642a9e)), closes [#6442](https://github.com/typeorm/typeorm/issues/6442) +- add missing schema for OracleDriver ([#6673](https://github.com/typeorm/typeorm/issues/6673)) ([8b8bc35](https://github.com/typeorm/typeorm/commit/8b8bc35)) +- change InsertQueryBuilder.values() with an empty array into a no-op ([#6584](https://github.com/typeorm/typeorm/issues/6584)) ([9d2df28](https://github.com/typeorm/typeorm/commit/9d2df28)), closes [#3111](https://github.com/typeorm/typeorm/issues/3111) +- Child entities not being saved correctly with cascade actions ([#6219](https://github.com/typeorm/typeorm/issues/6219)) ([16a2d80](https://github.com/typeorm/typeorm/commit/16a2d80)) +- correctly parse connection URI with query params ([#6390](https://github.com/typeorm/typeorm/issues/6390)) ([54a3a15](https://github.com/typeorm/typeorm/commit/54a3a15)), closes [#6389](https://github.com/typeorm/typeorm/issues/6389) +- decorators should implement the official TypeScript interface ([#6398](https://github.com/typeorm/typeorm/issues/6398)) ([c23c888](https://github.com/typeorm/typeorm/commit/c23c888)), closes [#5922](https://github.com/typeorm/typeorm/issues/5922) +- DeepPartial with any and {[k: string]: any} ([#6581](https://github.com/typeorm/typeorm/issues/6581)) ([8d90d40](https://github.com/typeorm/typeorm/commit/8d90d40)), closes [#6580](https://github.com/typeorm/typeorm/issues/6580) [#6580](https://github.com/typeorm/typeorm/issues/6580) +- exporting missing load event ([#6396](https://github.com/typeorm/typeorm/issues/6396)) ([c6336aa](https://github.com/typeorm/typeorm/commit/c6336aa)) +- get correct insert ids for multiple entities inserted ([#6668](https://github.com/typeorm/typeorm/issues/6668)) ([ef2011d](https://github.com/typeorm/typeorm/commit/ef2011d)), closes [#2131](https://github.com/typeorm/typeorm/issues/2131) [#5973](https://github.com/typeorm/typeorm/issues/5973) [#2131](https://github.com/typeorm/typeorm/issues/2131) +- getPendingMigrations isn't properly working ([#6372](https://github.com/typeorm/typeorm/issues/6372)) ([7c0da1c](https://github.com/typeorm/typeorm/commit/7c0da1c)) +- handle 'error' events from pool connection ([#6262](https://github.com/typeorm/typeorm/issues/6262)) ([ae3cf0e](https://github.com/typeorm/typeorm/commit/ae3cf0e)) +- insert IN(null) instead of IN() when In([]) empty array for mysqlDriver ([#6237](https://github.com/typeorm/typeorm/issues/6237)) ([6f6bdbd](https://github.com/typeorm/typeorm/commit/6f6bdbd)) +- make only a single SELECT to get inserted default and generated values of multiple entities ([#6669](https://github.com/typeorm/typeorm/issues/6669)) ([4fc4a1b](https://github.com/typeorm/typeorm/commit/4fc4a1b)), closes [#6266](https://github.com/typeorm/typeorm/issues/6266) [#6266](https://github.com/typeorm/typeorm/issues/6266) +- Migration issues with scale & precision in sqlite/sql.js ([#6638](https://github.com/typeorm/typeorm/issues/6638)) ([0397e44](https://github.com/typeorm/typeorm/commit/0397e44)), closes [#6636](https://github.com/typeorm/typeorm/issues/6636) +- mysql migration: make sure the indices sql which left-join be the same database ([#6426](https://github.com/typeorm/typeorm/issues/6426)) ([906d97f](https://github.com/typeorm/typeorm/commit/906d97f)) +- pass `ids_` to alias builder to prevent length overflow ([#6624](https://github.com/typeorm/typeorm/issues/6624)) ([cf3ad62](https://github.com/typeorm/typeorm/commit/cf3ad62)) +- pass formatOptions to Data API Client, fix extensions ([#6404](https://github.com/typeorm/typeorm/issues/6404)) ([9abab82](https://github.com/typeorm/typeorm/commit/9abab82)), closes [#1](https://github.com/typeorm/typeorm/issues/1) +- Query builder makes query with joins, without limit for inherited entities ([#6402](https://github.com/typeorm/typeorm/issues/6402)) ([874e573](https://github.com/typeorm/typeorm/commit/874e573)), closes [#6399](https://github.com/typeorm/typeorm/issues/6399) +- remove unnecessary optionality from Raw operator's columnAlias argument ([#6321](https://github.com/typeorm/typeorm/issues/6321)) ([0d99b46](https://github.com/typeorm/typeorm/commit/0d99b46)) +- resolve missing decorators on shim ([#6354](https://github.com/typeorm/typeorm/issues/6354)) ([8e2d97d](https://github.com/typeorm/typeorm/commit/8e2d97d)), closes [#6093](https://github.com/typeorm/typeorm/issues/6093) +- revert fix handle URL objects as column field values ([#6145](https://github.com/typeorm/typeorm/issues/6145)) ([e073e02](https://github.com/typeorm/typeorm/commit/e073e02)) +- SqlQueryRunner.hasColumn was not working ([#6146](https://github.com/typeorm/typeorm/issues/6146)) ([a595fed](https://github.com/typeorm/typeorm/commit/a595fed)), closes [#5718](https://github.com/typeorm/typeorm/issues/5718) +- support multiple `JoinColumn`s in EntitySchema ([#6397](https://github.com/typeorm/typeorm/issues/6397)) ([298a3b9](https://github.com/typeorm/typeorm/commit/298a3b9)), closes [#5444](https://github.com/typeorm/typeorm/issues/5444) +- Unnecessary migrations for fulltext indices ([#6634](https://github.com/typeorm/typeorm/issues/6634)) ([c81b405](https://github.com/typeorm/typeorm/commit/c81b405)), closes [#6633](https://github.com/typeorm/typeorm/issues/6633) +- unnecessary migrations for unsigned numeric types ([#6632](https://github.com/typeorm/typeorm/issues/6632)) ([7ddaf23](https://github.com/typeorm/typeorm/commit/7ddaf23)), closes [#2943](https://github.com/typeorm/typeorm/issues/2943) [/github.com/typeorm/typeorm/pull/6632#pullrequestreview-480932808](https://github.com//github.com/typeorm/typeorm/pull/6632/issues/pullrequestreview-480932808) +- update query deep partial TypeScript definition ([#6085](https://github.com/typeorm/typeorm/issues/6085)) ([23110d1](https://github.com/typeorm/typeorm/commit/23110d1)) ### Features -* add AWS configurationOptions to aurora-postgres connector ([#6106](https://github.com/typeorm/typeorm/issues/6106)) ([203f51d](https://github.com/typeorm/typeorm/commit/203f51d)) -* add better-sqlite3 driver ([#6224](https://github.com/typeorm/typeorm/issues/6224)) ([2241451](https://github.com/typeorm/typeorm/commit/2241451)) -* add postgres connection timeout option ([#6160](https://github.com/typeorm/typeorm/issues/6160)) ([0072149](https://github.com/typeorm/typeorm/commit/0072149)) -* FileLogger accepts custom file path ([#6642](https://github.com/typeorm/typeorm/issues/6642)) ([c99ba40](https://github.com/typeorm/typeorm/commit/c99ba40)), closes [#4410](https://github.com/typeorm/typeorm/issues/4410) -* implement postgres ltree ([#6480](https://github.com/typeorm/typeorm/issues/6480)) ([43a7386](https://github.com/typeorm/typeorm/commit/43a7386)), closes [#4193](https://github.com/typeorm/typeorm/issues/4193) -* support absolute paths in migrationsDir for the CLI ([#6660](https://github.com/typeorm/typeorm/issues/6660)) ([2b5f139](https://github.com/typeorm/typeorm/commit/2b5f139)) -* support cjs extension for ormconfig ([#6285](https://github.com/typeorm/typeorm/issues/6285)) ([6eeb03a](https://github.com/typeorm/typeorm/commit/6eeb03a)) +- add AWS configurationOptions to aurora-postgres connector ([#6106](https://github.com/typeorm/typeorm/issues/6106)) ([203f51d](https://github.com/typeorm/typeorm/commit/203f51d)) +- add better-sqlite3 driver ([#6224](https://github.com/typeorm/typeorm/issues/6224)) ([2241451](https://github.com/typeorm/typeorm/commit/2241451)) +- add postgres connection timeout option ([#6160](https://github.com/typeorm/typeorm/issues/6160)) ([0072149](https://github.com/typeorm/typeorm/commit/0072149)) +- FileLogger accepts custom file path ([#6642](https://github.com/typeorm/typeorm/issues/6642)) ([c99ba40](https://github.com/typeorm/typeorm/commit/c99ba40)), closes [#4410](https://github.com/typeorm/typeorm/issues/4410) +- implement postgres ltree ([#6480](https://github.com/typeorm/typeorm/issues/6480)) ([43a7386](https://github.com/typeorm/typeorm/commit/43a7386)), closes [#4193](https://github.com/typeorm/typeorm/issues/4193) +- support absolute paths in migrationsDir for the CLI ([#6660](https://github.com/typeorm/typeorm/issues/6660)) ([2b5f139](https://github.com/typeorm/typeorm/commit/2b5f139)) +- support cjs extension for ormconfig ([#6285](https://github.com/typeorm/typeorm/issues/6285)) ([6eeb03a](https://github.com/typeorm/typeorm/commit/6eeb03a)) ## [0.2.25](https://github.com/typeorm/typeorm/compare/0.2.24...0.2.25) (2020-05-19) ### Bug Fixes -* 'in' clause case for ORACLE ([#5345](https://github.com/typeorm/typeorm/issues/5345)) ([8977365](https://github.com/typeorm/typeorm/commit/8977365)) -* calling EntityManager.insert() with an empty array of entities ([#5745](https://github.com/typeorm/typeorm/issues/5745)) ([f8c52f3](https://github.com/typeorm/typeorm/commit/f8c52f3)), closes [#5734](https://github.com/typeorm/typeorm/issues/5734) [#5734](https://github.com/typeorm/typeorm/issues/5734) [#5734](https://github.com/typeorm/typeorm/issues/5734) -* columns with transformer should be normalized for update ([#5700](https://github.com/typeorm/typeorm/issues/5700)) ([4ef6b65](https://github.com/typeorm/typeorm/commit/4ef6b65)), closes [#2703](https://github.com/typeorm/typeorm/issues/2703) -* escape column comment in mysql driver ([#6056](https://github.com/typeorm/typeorm/issues/6056)) ([5fc802d](https://github.com/typeorm/typeorm/commit/5fc802d)) -* expo sqlite driver disconnect() ([#6027](https://github.com/typeorm/typeorm/issues/6027)) ([61d59ca](https://github.com/typeorm/typeorm/commit/61d59ca)) -* HANA - SSL options, column delta detection mechanism ([#5938](https://github.com/typeorm/typeorm/issues/5938)) ([2fd0a8a](https://github.com/typeorm/typeorm/commit/2fd0a8a)) -* handle URL objects as column field values ([#5771](https://github.com/typeorm/typeorm/issues/5771)) ([50a0641](https://github.com/typeorm/typeorm/commit/50a0641)), closes [#5762](https://github.com/typeorm/typeorm/issues/5762) [#5762](https://github.com/typeorm/typeorm/issues/5762) -* insert and update query builder to handle mssql geometry column correctly ([#5947](https://github.com/typeorm/typeorm/issues/5947)) ([87cc6f4](https://github.com/typeorm/typeorm/commit/87cc6f4)) -* migrations being generated for FK even if there are no changes ([#5869](https://github.com/typeorm/typeorm/issues/5869)) ([416e419](https://github.com/typeorm/typeorm/commit/416e419)) -* multiple assignments to same column on UPDATE [#2651](https://github.com/typeorm/typeorm/issues/2651) ([#5598](https://github.com/typeorm/typeorm/issues/5598)) ([334e17e](https://github.com/typeorm/typeorm/commit/334e17e)) -* prevent TypeError when calling bind function with sql.js 1.2.X ([#5789](https://github.com/typeorm/typeorm/issues/5789)) ([c6cbddc](https://github.com/typeorm/typeorm/commit/c6cbddc)) -* prototype pollution issue ([#6096](https://github.com/typeorm/typeorm/issues/6096)) ([db9d0fa](https://github.com/typeorm/typeorm/commit/db9d0fa)) -* provide a default empty array for parameters. ([#5677](https://github.com/typeorm/typeorm/issues/5677)) ([9e8a8cf](https://github.com/typeorm/typeorm/commit/9e8a8cf)) -* redundant undefined parameters are not generated in migration files anymore ([#5690](https://github.com/typeorm/typeorm/issues/5690)) ([d5cde49](https://github.com/typeorm/typeorm/commit/d5cde49)) -* replacing instanceof Array checks to Array.isArray because instanceof Array seems to be problematic on some platforms ([#5606](https://github.com/typeorm/typeorm/issues/5606)) ([b99b4ad](https://github.com/typeorm/typeorm/commit/b99b4ad)) -* respect database from connection urls ([#5640](https://github.com/typeorm/typeorm/issues/5640)) ([ed75d59](https://github.com/typeorm/typeorm/commit/ed75d59)), closes [#2096](https://github.com/typeorm/typeorm/issues/2096) -* sha.js import ([#5728](https://github.com/typeorm/typeorm/issues/5728)) ([8c3f48a](https://github.com/typeorm/typeorm/commit/8c3f48a)) -* Unknown fields are stripped from WHERE clause (issue [#3416](https://github.com/typeorm/typeorm/issues/3416)) ([#5603](https://github.com/typeorm/typeorm/issues/5603)) ([215f106](https://github.com/typeorm/typeorm/commit/215f106)) -* update dependency mkdirp to 1.x ([#5748](https://github.com/typeorm/typeorm/issues/5748)) ([edeb561](https://github.com/typeorm/typeorm/commit/edeb561)) -* update Entity decorator return type to ClassDecorator ([#5776](https://github.com/typeorm/typeorm/issues/5776)) ([7d8a1ca](https://github.com/typeorm/typeorm/commit/7d8a1ca)) -* use an empty string enum as the type of a primary key column ([#6063](https://github.com/typeorm/typeorm/issues/6063)) ([8e0d817](https://github.com/typeorm/typeorm/commit/8e0d817)), closes [#3874](https://github.com/typeorm/typeorm/issues/3874) -* use correct typings for the result of `getUpsertedIds()` ([#5878](https://github.com/typeorm/typeorm/issues/5878)) ([2ab88c2](https://github.com/typeorm/typeorm/commit/2ab88c2)) -* wrong table name parameter when not using default schema ([#5801](https://github.com/typeorm/typeorm/issues/5801)) ([327144a](https://github.com/typeorm/typeorm/commit/327144a)) +- 'in' clause case for ORACLE ([#5345](https://github.com/typeorm/typeorm/issues/5345)) ([8977365](https://github.com/typeorm/typeorm/commit/8977365)) +- calling EntityManager.insert() with an empty array of entities ([#5745](https://github.com/typeorm/typeorm/issues/5745)) ([f8c52f3](https://github.com/typeorm/typeorm/commit/f8c52f3)), closes [#5734](https://github.com/typeorm/typeorm/issues/5734) [#5734](https://github.com/typeorm/typeorm/issues/5734) [#5734](https://github.com/typeorm/typeorm/issues/5734) +- columns with transformer should be normalized for update ([#5700](https://github.com/typeorm/typeorm/issues/5700)) ([4ef6b65](https://github.com/typeorm/typeorm/commit/4ef6b65)), closes [#2703](https://github.com/typeorm/typeorm/issues/2703) +- escape column comment in mysql driver ([#6056](https://github.com/typeorm/typeorm/issues/6056)) ([5fc802d](https://github.com/typeorm/typeorm/commit/5fc802d)) +- expo sqlite driver disconnect() ([#6027](https://github.com/typeorm/typeorm/issues/6027)) ([61d59ca](https://github.com/typeorm/typeorm/commit/61d59ca)) +- HANA - SSL options, column delta detection mechanism ([#5938](https://github.com/typeorm/typeorm/issues/5938)) ([2fd0a8a](https://github.com/typeorm/typeorm/commit/2fd0a8a)) +- handle URL objects as column field values ([#5771](https://github.com/typeorm/typeorm/issues/5771)) ([50a0641](https://github.com/typeorm/typeorm/commit/50a0641)), closes [#5762](https://github.com/typeorm/typeorm/issues/5762) [#5762](https://github.com/typeorm/typeorm/issues/5762) +- insert and update query builder to handle mssql geometry column correctly ([#5947](https://github.com/typeorm/typeorm/issues/5947)) ([87cc6f4](https://github.com/typeorm/typeorm/commit/87cc6f4)) +- migrations being generated for FK even if there are no changes ([#5869](https://github.com/typeorm/typeorm/issues/5869)) ([416e419](https://github.com/typeorm/typeorm/commit/416e419)) +- multiple assignments to same column on UPDATE [#2651](https://github.com/typeorm/typeorm/issues/2651) ([#5598](https://github.com/typeorm/typeorm/issues/5598)) ([334e17e](https://github.com/typeorm/typeorm/commit/334e17e)) +- prevent TypeError when calling bind function with sql.js 1.2.X ([#5789](https://github.com/typeorm/typeorm/issues/5789)) ([c6cbddc](https://github.com/typeorm/typeorm/commit/c6cbddc)) +- prototype pollution issue ([#6096](https://github.com/typeorm/typeorm/issues/6096)) ([db9d0fa](https://github.com/typeorm/typeorm/commit/db9d0fa)) +- provide a default empty array for parameters. ([#5677](https://github.com/typeorm/typeorm/issues/5677)) ([9e8a8cf](https://github.com/typeorm/typeorm/commit/9e8a8cf)) +- redundant undefined parameters are not generated in migration files anymore ([#5690](https://github.com/typeorm/typeorm/issues/5690)) ([d5cde49](https://github.com/typeorm/typeorm/commit/d5cde49)) +- replacing instanceof Array checks to Array.isArray because instanceof Array seems to be problematic on some platforms ([#5606](https://github.com/typeorm/typeorm/issues/5606)) ([b99b4ad](https://github.com/typeorm/typeorm/commit/b99b4ad)) +- respect database from connection urls ([#5640](https://github.com/typeorm/typeorm/issues/5640)) ([ed75d59](https://github.com/typeorm/typeorm/commit/ed75d59)), closes [#2096](https://github.com/typeorm/typeorm/issues/2096) +- sha.js import ([#5728](https://github.com/typeorm/typeorm/issues/5728)) ([8c3f48a](https://github.com/typeorm/typeorm/commit/8c3f48a)) +- Unknown fields are stripped from WHERE clause (issue [#3416](https://github.com/typeorm/typeorm/issues/3416)) ([#5603](https://github.com/typeorm/typeorm/issues/5603)) ([215f106](https://github.com/typeorm/typeorm/commit/215f106)) +- update dependency mkdirp to 1.x ([#5748](https://github.com/typeorm/typeorm/issues/5748)) ([edeb561](https://github.com/typeorm/typeorm/commit/edeb561)) +- update Entity decorator return type to ClassDecorator ([#5776](https://github.com/typeorm/typeorm/issues/5776)) ([7d8a1ca](https://github.com/typeorm/typeorm/commit/7d8a1ca)) +- use an empty string enum as the type of a primary key column ([#6063](https://github.com/typeorm/typeorm/issues/6063)) ([8e0d817](https://github.com/typeorm/typeorm/commit/8e0d817)), closes [#3874](https://github.com/typeorm/typeorm/issues/3874) +- use correct typings for the result of `getUpsertedIds()` ([#5878](https://github.com/typeorm/typeorm/issues/5878)) ([2ab88c2](https://github.com/typeorm/typeorm/commit/2ab88c2)) +- wrong table name parameter when not using default schema ([#5801](https://github.com/typeorm/typeorm/issues/5801)) ([327144a](https://github.com/typeorm/typeorm/commit/327144a)) ### Features -* add FOR NO KEY UPDATE lock mode for postgresql ([#5971](https://github.com/typeorm/typeorm/issues/5971)) ([360122f](https://github.com/typeorm/typeorm/commit/360122f)) -* add name option to view column ([#5962](https://github.com/typeorm/typeorm/issues/5962)) ([3cfcc50](https://github.com/typeorm/typeorm/commit/3cfcc50)), closes [#5708](https://github.com/typeorm/typeorm/issues/5708) -* Add soft remove and recover methods to entity ([#5854](https://github.com/typeorm/typeorm/issues/5854)) ([9d2b8e0](https://github.com/typeorm/typeorm/commit/9d2b8e0)) -* added support for NOWAIT & SKIP LOCKED in Postgres ([#5927](https://github.com/typeorm/typeorm/issues/5927)) ([2c90e1c](https://github.com/typeorm/typeorm/commit/2c90e1c)) -* Aurora Data API - Postgres Support ([#5651](https://github.com/typeorm/typeorm/issues/5651)) ([e584297](https://github.com/typeorm/typeorm/commit/e584297)) -* aurora Data API - Support for AWS configuration options through aurora driver ([#5754](https://github.com/typeorm/typeorm/issues/5754)) ([1829f96](https://github.com/typeorm/typeorm/commit/1829f96)) -* create-column, update-column, version-column column kinds now support user specified values ([#5867](https://github.com/typeorm/typeorm/issues/5867)) ([5a2eb30](https://github.com/typeorm/typeorm/commit/5a2eb30)), closes [#3271](https://github.com/typeorm/typeorm/issues/3271) -* names of extra columns for specific tree types moved to NamingStrategy ([#5737](https://github.com/typeorm/typeorm/issues/5737)) ([ec3be41](https://github.com/typeorm/typeorm/commit/ec3be41)) -* PG allow providing a function for password ([#5673](https://github.com/typeorm/typeorm/issues/5673)) ([265d1ae](https://github.com/typeorm/typeorm/commit/265d1ae)) -* update cli migration up and down from any to void ([#5630](https://github.com/typeorm/typeorm/issues/5630)) ([76e165d](https://github.com/typeorm/typeorm/commit/76e165d)) -* UpdateResult returns affected rows in mysql ([#5628](https://github.com/typeorm/typeorm/issues/5628)) ([17f2fff](https://github.com/typeorm/typeorm/commit/17f2fff)), closes [#1308](https://github.com/typeorm/typeorm/issues/1308) +- add FOR NO KEY UPDATE lock mode for postgresql ([#5971](https://github.com/typeorm/typeorm/issues/5971)) ([360122f](https://github.com/typeorm/typeorm/commit/360122f)) +- add name option to view column ([#5962](https://github.com/typeorm/typeorm/issues/5962)) ([3cfcc50](https://github.com/typeorm/typeorm/commit/3cfcc50)), closes [#5708](https://github.com/typeorm/typeorm/issues/5708) +- Add soft remove and recover methods to entity ([#5854](https://github.com/typeorm/typeorm/issues/5854)) ([9d2b8e0](https://github.com/typeorm/typeorm/commit/9d2b8e0)) +- added support for NOWAIT & SKIP LOCKED in Postgres ([#5927](https://github.com/typeorm/typeorm/issues/5927)) ([2c90e1c](https://github.com/typeorm/typeorm/commit/2c90e1c)) +- Aurora Data API - Postgres Support ([#5651](https://github.com/typeorm/typeorm/issues/5651)) ([e584297](https://github.com/typeorm/typeorm/commit/e584297)) +- aurora Data API - Support for AWS configuration options through aurora driver ([#5754](https://github.com/typeorm/typeorm/issues/5754)) ([1829f96](https://github.com/typeorm/typeorm/commit/1829f96)) +- create-column, update-column, version-column column kinds now support user specified values ([#5867](https://github.com/typeorm/typeorm/issues/5867)) ([5a2eb30](https://github.com/typeorm/typeorm/commit/5a2eb30)), closes [#3271](https://github.com/typeorm/typeorm/issues/3271) +- names of extra columns for specific tree types moved to NamingStrategy ([#5737](https://github.com/typeorm/typeorm/issues/5737)) ([ec3be41](https://github.com/typeorm/typeorm/commit/ec3be41)) +- PG allow providing a function for password ([#5673](https://github.com/typeorm/typeorm/issues/5673)) ([265d1ae](https://github.com/typeorm/typeorm/commit/265d1ae)) +- update cli migration up and down from any to void ([#5630](https://github.com/typeorm/typeorm/issues/5630)) ([76e165d](https://github.com/typeorm/typeorm/commit/76e165d)) +- UpdateResult returns affected rows in mysql ([#5628](https://github.com/typeorm/typeorm/issues/5628)) ([17f2fff](https://github.com/typeorm/typeorm/commit/17f2fff)), closes [#1308](https://github.com/typeorm/typeorm/issues/1308) ### Performance Improvements -* An optimized version of EntityMetadata#compareIds() for the common case ([#5419](https://github.com/typeorm/typeorm/issues/5419)) ([a9bdb37](https://github.com/typeorm/typeorm/commit/a9bdb37)) +- An optimized version of EntityMetadata#compareIds() for the common case ([#5419](https://github.com/typeorm/typeorm/issues/5419)) ([a9bdb37](https://github.com/typeorm/typeorm/commit/a9bdb37)) ## [0.2.23](https://github.com/typeorm/typeorm/compare/0.2.22...0.2.23), [0.2.24](https://github.com/typeorm/typeorm/compare/0.2.23...0.2.24) (2020-02-28) ### Bug Fixes -* .synchronize() drops json column on mariadb ([#5391](https://github.com/typeorm/typeorm/issues/5391)) ([e3c78c1](https://github.com/typeorm/typeorm/commit/e3c78c1)), closes [typeorm/typeorm#3636](https://github.com/typeorm/typeorm/issues/3636) -* (base-entity) set create return type to T[] ([#5400](https://github.com/typeorm/typeorm/issues/5400)) ([ceff897](https://github.com/typeorm/typeorm/commit/ceff897)) -* add the enableArithAbort option to the sql server connection option typings ([#5526](https://github.com/typeorm/typeorm/issues/5526)) ([d19dbc6](https://github.com/typeorm/typeorm/commit/d19dbc6)) -* bug when default value in mssql were not updated if previous default was already set ([9fc8329](https://github.com/typeorm/typeorm/commit/9fc8329)) -* change OrmUtils.mergeDeep to not merge RegExp objects ([#5182](https://github.com/typeorm/typeorm/issues/5182)) ([0f51836](https://github.com/typeorm/typeorm/commit/0f51836)), closes [#3534](https://github.com/typeorm/typeorm/issues/3534) -* fk on update should not use attributes of on delete ([2baa934](https://github.com/typeorm/typeorm/commit/2baa934)) -* load typeorm-aurora-data-api-driver correctly when using webpack ([#4788](https://github.com/typeorm/typeorm/issues/4788)) ([#5302](https://github.com/typeorm/typeorm/issues/5302)) ([9da0d34](https://github.com/typeorm/typeorm/commit/9da0d34)) -* not to make typeorm generate alter query on geometry column when that column was not changed ([#5525](https://github.com/typeorm/typeorm/issues/5525)) ([ee57557](https://github.com/typeorm/typeorm/commit/ee57557)) -* Oracle sql expression for date column ([#5305](https://github.com/typeorm/typeorm/issues/5305)) ([40e9d3a](https://github.com/typeorm/typeorm/commit/40e9d3a)), closes [#4452](https://github.com/typeorm/typeorm/issues/4452) [#4452](https://github.com/typeorm/typeorm/issues/4452) -* refactoring instance of with Array.isArray() ([#5539](https://github.com/typeorm/typeorm/issues/5539)) ([1e1595e](https://github.com/typeorm/typeorm/commit/1e1595e)) -* Return NULL when normalize default null value ([#5517](https://github.com/typeorm/typeorm/issues/5517)) ([1826b75](https://github.com/typeorm/typeorm/commit/1826b75)), closes [#5509](https://github.com/typeorm/typeorm/issues/5509) -* SAP HANA driver fixes ([#5445](https://github.com/typeorm/typeorm/issues/5445)) ([87b161f](https://github.com/typeorm/typeorm/commit/87b161f)) -* update foreign keys when table name changes ([#5482](https://github.com/typeorm/typeorm/issues/5482)) ([7157cb3](https://github.com/typeorm/typeorm/commit/7157cb3)) -* use OUTPUT INTO on SqlServer for returning columns ([#5361](https://github.com/typeorm/typeorm/issues/5361)) ([6bac3ca](https://github.com/typeorm/typeorm/commit/6bac3ca)), closes [#5160](https://github.com/typeorm/typeorm/issues/5160) [#5160](https://github.com/typeorm/typeorm/issues/5160) -* use sha.js instead of crypto for hash calculation ([#5270](https://github.com/typeorm/typeorm/issues/5270)) ([b380a7f](https://github.com/typeorm/typeorm/commit/b380a7f)) +- .synchronize() drops json column on mariadb ([#5391](https://github.com/typeorm/typeorm/issues/5391)) ([e3c78c1](https://github.com/typeorm/typeorm/commit/e3c78c1)), closes [typeorm/typeorm#3636](https://github.com/typeorm/typeorm/issues/3636) +- (base-entity) set create return type to T[] ([#5400](https://github.com/typeorm/typeorm/issues/5400)) ([ceff897](https://github.com/typeorm/typeorm/commit/ceff897)) +- add the enableArithAbort option to the sql server connection option typings ([#5526](https://github.com/typeorm/typeorm/issues/5526)) ([d19dbc6](https://github.com/typeorm/typeorm/commit/d19dbc6)) +- bug when default value in mssql were not updated if previous default was already set ([9fc8329](https://github.com/typeorm/typeorm/commit/9fc8329)) +- change OrmUtils.mergeDeep to not merge RegExp objects ([#5182](https://github.com/typeorm/typeorm/issues/5182)) ([0f51836](https://github.com/typeorm/typeorm/commit/0f51836)), closes [#3534](https://github.com/typeorm/typeorm/issues/3534) +- fk on update should not use attributes of on delete ([2baa934](https://github.com/typeorm/typeorm/commit/2baa934)) +- load typeorm-aurora-data-api-driver correctly when using webpack ([#4788](https://github.com/typeorm/typeorm/issues/4788)) ([#5302](https://github.com/typeorm/typeorm/issues/5302)) ([9da0d34](https://github.com/typeorm/typeorm/commit/9da0d34)) +- not to make typeorm generate alter query on geometry column when that column was not changed ([#5525](https://github.com/typeorm/typeorm/issues/5525)) ([ee57557](https://github.com/typeorm/typeorm/commit/ee57557)) +- Oracle sql expression for date column ([#5305](https://github.com/typeorm/typeorm/issues/5305)) ([40e9d3a](https://github.com/typeorm/typeorm/commit/40e9d3a)), closes [#4452](https://github.com/typeorm/typeorm/issues/4452) [#4452](https://github.com/typeorm/typeorm/issues/4452) +- refactoring instance of with Array.isArray() ([#5539](https://github.com/typeorm/typeorm/issues/5539)) ([1e1595e](https://github.com/typeorm/typeorm/commit/1e1595e)) +- Return NULL when normalize default null value ([#5517](https://github.com/typeorm/typeorm/issues/5517)) ([1826b75](https://github.com/typeorm/typeorm/commit/1826b75)), closes [#5509](https://github.com/typeorm/typeorm/issues/5509) +- SAP HANA driver fixes ([#5445](https://github.com/typeorm/typeorm/issues/5445)) ([87b161f](https://github.com/typeorm/typeorm/commit/87b161f)) +- update foreign keys when table name changes ([#5482](https://github.com/typeorm/typeorm/issues/5482)) ([7157cb3](https://github.com/typeorm/typeorm/commit/7157cb3)) +- use OUTPUT INTO on SqlServer for returning columns ([#5361](https://github.com/typeorm/typeorm/issues/5361)) ([6bac3ca](https://github.com/typeorm/typeorm/commit/6bac3ca)), closes [#5160](https://github.com/typeorm/typeorm/issues/5160) [#5160](https://github.com/typeorm/typeorm/issues/5160) +- use sha.js instead of crypto for hash calculation ([#5270](https://github.com/typeorm/typeorm/issues/5270)) ([b380a7f](https://github.com/typeorm/typeorm/commit/b380a7f)) ### Features -* Add basic support for custom cache providers ([#5309](https://github.com/typeorm/typeorm/issues/5309)) ([6c6bde7](https://github.com/typeorm/typeorm/commit/6c6bde7)) -* add fulltext parser option ([#5380](https://github.com/typeorm/typeorm/issues/5380)) ([dd73395](https://github.com/typeorm/typeorm/commit/dd73395)) +- Add basic support for custom cache providers ([#5309](https://github.com/typeorm/typeorm/issues/5309)) ([6c6bde7](https://github.com/typeorm/typeorm/commit/6c6bde7)) +- add fulltext parser option ([#5380](https://github.com/typeorm/typeorm/issues/5380)) ([dd73395](https://github.com/typeorm/typeorm/commit/dd73395)) ## [0.2.22](https://github.com/typeorm/typeorm/compare/0.2.21...0.2.22) (2019-12-23) ### Bug Fixes -* use a prefix on SelectQueryBuilder internal parameters ([#5178](https://github.com/typeorm/typeorm/issues/5178)) ([cacb08b](https://github.com/typeorm/typeorm/commit/cacb08b)), closes [#5174](https://github.com/typeorm/typeorm/issues/5174) [#5174](https://github.com/typeorm/typeorm/issues/5174) +- use a prefix on SelectQueryBuilder internal parameters ([#5178](https://github.com/typeorm/typeorm/issues/5178)) ([cacb08b](https://github.com/typeorm/typeorm/commit/cacb08b)), closes [#5174](https://github.com/typeorm/typeorm/issues/5174) [#5174](https://github.com/typeorm/typeorm/issues/5174) ### Features -* hash aliases to avoid conflicts ([#5227](https://github.com/typeorm/typeorm/issues/5227)) ([edc8e6d](https://github.com/typeorm/typeorm/commit/edc8e6d)) -* implement driver options for NativeScript ([#5217](https://github.com/typeorm/typeorm/issues/5217)) ([3e58426](https://github.com/typeorm/typeorm/commit/3e58426)) -* SAP Hana support ([#5246](https://github.com/typeorm/typeorm/issues/5246)) ([ec90341](https://github.com/typeorm/typeorm/commit/ec90341)) -* speed ​​up id search in buildChildrenEntityTree ([#5202](https://github.com/typeorm/typeorm/issues/5202)) ([2e628c3](https://github.com/typeorm/typeorm/commit/2e628c3)) +- hash aliases to avoid conflicts ([#5227](https://github.com/typeorm/typeorm/issues/5227)) ([edc8e6d](https://github.com/typeorm/typeorm/commit/edc8e6d)) +- implement driver options for NativeScript ([#5217](https://github.com/typeorm/typeorm/issues/5217)) ([3e58426](https://github.com/typeorm/typeorm/commit/3e58426)) +- SAP Hana support ([#5246](https://github.com/typeorm/typeorm/issues/5246)) ([ec90341](https://github.com/typeorm/typeorm/commit/ec90341)) +- speed ​​up id search in buildChildrenEntityTree ([#5202](https://github.com/typeorm/typeorm/issues/5202)) ([2e628c3](https://github.com/typeorm/typeorm/commit/2e628c3)) ### BREAKING CHANGES -* aliases for very long relation names may be replaced with hashed strings. +- aliases for very long relation names may be replaced with hashed strings. Fix: avoid collisions by using longest possible hash. Retain more entropy by not using only 8 characters of hashed aliases. ## [0.2.21](https://github.com/typeorm/typeorm/compare/0.2.20...0.2.21) (2019-12-05) - ### Bug Fixes -* allow expireAfterSeconds 0 in Index decorator (close [#5004](https://github.com/typeorm/typeorm/issues/5004)) ([#5005](https://github.com/typeorm/typeorm/issues/5005)) ([d05467c](https://github.com/typeorm/typeorm/commit/d05467c)) -* do not mutate connection options ([#5078](https://github.com/typeorm/typeorm/issues/5078)) ([1047989](https://github.com/typeorm/typeorm/commit/1047989)) -* mysql driver query streaming ([#5036](https://github.com/typeorm/typeorm/issues/5036)) ([aff2f56](https://github.com/typeorm/typeorm/commit/aff2f56)) -* remove consrc usage (postgres,cockroachdb) ([#4333](https://github.com/typeorm/typeorm/issues/4333)) ([ce7cb16](https://github.com/typeorm/typeorm/commit/ce7cb16)), closes [#4332](https://github.com/typeorm/typeorm/issues/4332) -* repo for app-root-path in lock file ([#5052](https://github.com/typeorm/typeorm/issues/5052)) ([f0fd192](https://github.com/typeorm/typeorm/commit/f0fd192)) -* resolve MySQL unique index check when bigNumberStrings is false ([#4822](https://github.com/typeorm/typeorm/issues/4822)) ([d205574](https://github.com/typeorm/typeorm/commit/d205574)), closes [#2737](https://github.com/typeorm/typeorm/issues/2737) -* resolve sorting bug for several mongo vesions with typeorm migration ([#5121](https://github.com/typeorm/typeorm/issues/5121)) ([cb771a1](https://github.com/typeorm/typeorm/commit/cb771a1)), closes [#5115](https://github.com/typeorm/typeorm/issues/5115) -* throwing error on duplicate migration names [#4701](https://github.com/typeorm/typeorm/issues/4701) ([#4704](https://github.com/typeorm/typeorm/issues/4704)) ([3e4dc9f](https://github.com/typeorm/typeorm/commit/3e4dc9f)) -* unescaped column name in order clause of "migrations" ([#5108](https://github.com/typeorm/typeorm/issues/5108)) ([c0c8566](https://github.com/typeorm/typeorm/commit/c0c8566)) -* upgrade app-root-path ([#5023](https://github.com/typeorm/typeorm/issues/5023)) ([7f87f0c](https://github.com/typeorm/typeorm/commit/7f87f0c)) - +- allow expireAfterSeconds 0 in Index decorator (close [#5004](https://github.com/typeorm/typeorm/issues/5004)) ([#5005](https://github.com/typeorm/typeorm/issues/5005)) ([d05467c](https://github.com/typeorm/typeorm/commit/d05467c)) +- do not mutate connection options ([#5078](https://github.com/typeorm/typeorm/issues/5078)) ([1047989](https://github.com/typeorm/typeorm/commit/1047989)) +- mysql driver query streaming ([#5036](https://github.com/typeorm/typeorm/issues/5036)) ([aff2f56](https://github.com/typeorm/typeorm/commit/aff2f56)) +- remove consrc usage (postgres,cockroachdb) ([#4333](https://github.com/typeorm/typeorm/issues/4333)) ([ce7cb16](https://github.com/typeorm/typeorm/commit/ce7cb16)), closes [#4332](https://github.com/typeorm/typeorm/issues/4332) +- repo for app-root-path in lock file ([#5052](https://github.com/typeorm/typeorm/issues/5052)) ([f0fd192](https://github.com/typeorm/typeorm/commit/f0fd192)) +- resolve MySQL unique index check when bigNumberStrings is false ([#4822](https://github.com/typeorm/typeorm/issues/4822)) ([d205574](https://github.com/typeorm/typeorm/commit/d205574)), closes [#2737](https://github.com/typeorm/typeorm/issues/2737) +- resolve sorting bug for several mongo vesions with typeorm migration ([#5121](https://github.com/typeorm/typeorm/issues/5121)) ([cb771a1](https://github.com/typeorm/typeorm/commit/cb771a1)), closes [#5115](https://github.com/typeorm/typeorm/issues/5115) +- throwing error on duplicate migration names [#4701](https://github.com/typeorm/typeorm/issues/4701) ([#4704](https://github.com/typeorm/typeorm/issues/4704)) ([3e4dc9f](https://github.com/typeorm/typeorm/commit/3e4dc9f)) +- unescaped column name in order clause of "migrations" ([#5108](https://github.com/typeorm/typeorm/issues/5108)) ([c0c8566](https://github.com/typeorm/typeorm/commit/c0c8566)) +- upgrade app-root-path ([#5023](https://github.com/typeorm/typeorm/issues/5023)) ([7f87f0c](https://github.com/typeorm/typeorm/commit/7f87f0c)) ### Features -* add distinct on() support for postgres ([#4954](https://github.com/typeorm/typeorm/issues/4954)) ([1293065](https://github.com/typeorm/typeorm/commit/1293065)) -* add migrations transaction option to connection options ([#5147](https://github.com/typeorm/typeorm/issues/5147)) ([fb60688](https://github.com/typeorm/typeorm/commit/fb60688)), closes [#4629](https://github.com/typeorm/typeorm/issues/4629) [#4629](https://github.com/typeorm/typeorm/issues/4629) -* asynchronous ormconfig support ([#5048](https://github.com/typeorm/typeorm/issues/5048)) ([f9fdaee](https://github.com/typeorm/typeorm/commit/f9fdaee)), closes [#4149](https://github.com/typeorm/typeorm/issues/4149) -* export Migration Execution API from main package (fixes [#4880](https://github.com/typeorm/typeorm/issues/4880)) ([#4892](https://github.com/typeorm/typeorm/issues/4892)) ([8f4f908](https://github.com/typeorm/typeorm/commit/8f4f908)) -* support spatial types of MySQL 8+ ([#4794](https://github.com/typeorm/typeorm/issues/4794)) ([231dadf](https://github.com/typeorm/typeorm/commit/231dadf)), closes [#3702](https://github.com/typeorm/typeorm/issues/3702) +- add distinct on() support for postgres ([#4954](https://github.com/typeorm/typeorm/issues/4954)) ([1293065](https://github.com/typeorm/typeorm/commit/1293065)) +- add migrations transaction option to connection options ([#5147](https://github.com/typeorm/typeorm/issues/5147)) ([fb60688](https://github.com/typeorm/typeorm/commit/fb60688)), closes [#4629](https://github.com/typeorm/typeorm/issues/4629) [#4629](https://github.com/typeorm/typeorm/issues/4629) +- asynchronous ormconfig support ([#5048](https://github.com/typeorm/typeorm/issues/5048)) ([f9fdaee](https://github.com/typeorm/typeorm/commit/f9fdaee)), closes [#4149](https://github.com/typeorm/typeorm/issues/4149) +- export Migration Execution API from main package (fixes [#4880](https://github.com/typeorm/typeorm/issues/4880)) ([#4892](https://github.com/typeorm/typeorm/issues/4892)) ([8f4f908](https://github.com/typeorm/typeorm/commit/8f4f908)) +- support spatial types of MySQL 8+ ([#4794](https://github.com/typeorm/typeorm/issues/4794)) ([231dadf](https://github.com/typeorm/typeorm/commit/231dadf)), closes [#3702](https://github.com/typeorm/typeorm/issues/3702) ## [0.2.20](https://github.com/typeorm/typeorm/compare/0.2.19...0.2.20) (2019-10-18) ### Bug Fixes -* ensure distinct property is respected cloning query builder ([#4843](https://github.com/typeorm/typeorm/issues/4843)) ([ea17094](https://github.com/typeorm/typeorm/commit/ea17094)), closes [#4842](https://github.com/typeorm/typeorm/issues/4842) -* **aurora:** apply mysql query fixes to aurora ([#4779](https://github.com/typeorm/typeorm/issues/4779)) ([ee61c51](https://github.com/typeorm/typeorm/commit/ee61c51)) -* allow EntitySchema to be passed to EntityRepository ([#4884](https://github.com/typeorm/typeorm/issues/4884)) ([652a20e](https://github.com/typeorm/typeorm/commit/652a20e)) -* better timestamp comparison ([#4769](https://github.com/typeorm/typeorm/issues/4769)) ([0a13e6a](https://github.com/typeorm/typeorm/commit/0a13e6a)) -* broken database option when using replication, changes introduced by [#4753](https://github.com/typeorm/typeorm/issues/4753) ([#4826](https://github.com/typeorm/typeorm/issues/4826)) ([df5479b](https://github.com/typeorm/typeorm/commit/df5479b)) -* check for version of MariaDB before extracting COLUMN_DEFAULT ([#4783](https://github.com/typeorm/typeorm/issues/4783)) ([c30b485](https://github.com/typeorm/typeorm/commit/c30b485)) -* connection Reuse is broken in a Lambda environment: ([#4804](https://github.com/typeorm/typeorm/issues/4804)) ([7962036](https://github.com/typeorm/typeorm/commit/7962036)) -* FindOptionUtils export ([#4746](https://github.com/typeorm/typeorm/issues/4746)) ([4a62b1c](https://github.com/typeorm/typeorm/commit/4a62b1c)), closes [#4745](https://github.com/typeorm/typeorm/issues/4745) -* loading of aurora-data-api driver ([#4765](https://github.com/typeorm/typeorm/issues/4765)) ([fbb8947](https://github.com/typeorm/typeorm/commit/fbb8947)) -* **postgres:** postgres query runner to create materialized view ([#4877](https://github.com/typeorm/typeorm/issues/4877)) ([d744966](https://github.com/typeorm/typeorm/commit/d744966)) -* migrations run in reverse order for mongodb ([#4702](https://github.com/typeorm/typeorm/issues/4702)) ([2f27581](https://github.com/typeorm/typeorm/commit/2f27581)) -* mongodb Cursor.forEach types ([#4759](https://github.com/typeorm/typeorm/issues/4759)) ([fccbe3e](https://github.com/typeorm/typeorm/commit/fccbe3e)) -* Slack invite URL ([#4836](https://github.com/typeorm/typeorm/issues/4836)) ([149af26](https://github.com/typeorm/typeorm/commit/149af26)) - +- ensure distinct property is respected cloning query builder ([#4843](https://github.com/typeorm/typeorm/issues/4843)) ([ea17094](https://github.com/typeorm/typeorm/commit/ea17094)), closes [#4842](https://github.com/typeorm/typeorm/issues/4842) +- **aurora:** apply mysql query fixes to aurora ([#4779](https://github.com/typeorm/typeorm/issues/4779)) ([ee61c51](https://github.com/typeorm/typeorm/commit/ee61c51)) +- allow EntitySchema to be passed to EntityRepository ([#4884](https://github.com/typeorm/typeorm/issues/4884)) ([652a20e](https://github.com/typeorm/typeorm/commit/652a20e)) +- better timestamp comparison ([#4769](https://github.com/typeorm/typeorm/issues/4769)) ([0a13e6a](https://github.com/typeorm/typeorm/commit/0a13e6a)) +- broken database option when using replication, changes introduced by [#4753](https://github.com/typeorm/typeorm/issues/4753) ([#4826](https://github.com/typeorm/typeorm/issues/4826)) ([df5479b](https://github.com/typeorm/typeorm/commit/df5479b)) +- check for version of MariaDB before extracting COLUMN_DEFAULT ([#4783](https://github.com/typeorm/typeorm/issues/4783)) ([c30b485](https://github.com/typeorm/typeorm/commit/c30b485)) +- connection Reuse is broken in a Lambda environment: ([#4804](https://github.com/typeorm/typeorm/issues/4804)) ([7962036](https://github.com/typeorm/typeorm/commit/7962036)) +- FindOptionUtils export ([#4746](https://github.com/typeorm/typeorm/issues/4746)) ([4a62b1c](https://github.com/typeorm/typeorm/commit/4a62b1c)), closes [#4745](https://github.com/typeorm/typeorm/issues/4745) +- loading of aurora-data-api driver ([#4765](https://github.com/typeorm/typeorm/issues/4765)) ([fbb8947](https://github.com/typeorm/typeorm/commit/fbb8947)) +- **postgres:** postgres query runner to create materialized view ([#4877](https://github.com/typeorm/typeorm/issues/4877)) ([d744966](https://github.com/typeorm/typeorm/commit/d744966)) +- migrations run in reverse order for mongodb ([#4702](https://github.com/typeorm/typeorm/issues/4702)) ([2f27581](https://github.com/typeorm/typeorm/commit/2f27581)) +- mongodb Cursor.forEach types ([#4759](https://github.com/typeorm/typeorm/issues/4759)) ([fccbe3e](https://github.com/typeorm/typeorm/commit/fccbe3e)) +- Slack invite URL ([#4836](https://github.com/typeorm/typeorm/issues/4836)) ([149af26](https://github.com/typeorm/typeorm/commit/149af26)) ### Features -* add name to MigrationInterface (fixes [#3933](https://github.com/typeorm/typeorm/issues/3933) and fixes [#2549](https://github.com/typeorm/typeorm/issues/2549)) ([#4873](https://github.com/typeorm/typeorm/issues/4873)) ([4a73fde](https://github.com/typeorm/typeorm/commit/4a73fde)) -* add new transaction mode to wrap each migration in transaction ([#4629](https://github.com/typeorm/typeorm/issues/4629)) ([848fb1f](https://github.com/typeorm/typeorm/commit/848fb1f)) -* add option to Column to specify the complete enumName ([#4824](https://github.com/typeorm/typeorm/issues/4824)) ([d967180](https://github.com/typeorm/typeorm/commit/d967180)) -* add support for cube array for PostgreSQL ([#4848](https://github.com/typeorm/typeorm/issues/4848)) ([154a441](https://github.com/typeorm/typeorm/commit/154a441)) -* implements Sqlite 'WITHOUT ROWID' table modifier ([#4688](https://github.com/typeorm/typeorm/issues/4688)) ([c1342ad](https://github.com/typeorm/typeorm/commit/c1342ad)), closes [#3330](https://github.com/typeorm/typeorm/issues/3330) +- add name to MigrationInterface (fixes [#3933](https://github.com/typeorm/typeorm/issues/3933) and fixes [#2549](https://github.com/typeorm/typeorm/issues/2549)) ([#4873](https://github.com/typeorm/typeorm/issues/4873)) ([4a73fde](https://github.com/typeorm/typeorm/commit/4a73fde)) +- add new transaction mode to wrap each migration in transaction ([#4629](https://github.com/typeorm/typeorm/issues/4629)) ([848fb1f](https://github.com/typeorm/typeorm/commit/848fb1f)) +- add option to Column to specify the complete enumName ([#4824](https://github.com/typeorm/typeorm/issues/4824)) ([d967180](https://github.com/typeorm/typeorm/commit/d967180)) +- add support for cube array for PostgreSQL ([#4848](https://github.com/typeorm/typeorm/issues/4848)) ([154a441](https://github.com/typeorm/typeorm/commit/154a441)) +- implements Sqlite 'WITHOUT ROWID' table modifier ([#4688](https://github.com/typeorm/typeorm/issues/4688)) ([c1342ad](https://github.com/typeorm/typeorm/commit/c1342ad)), closes [#3330](https://github.com/typeorm/typeorm/issues/3330) ## [0.2.19](https://github.com/typeorm/typeorm/compare/0.2.18...0.2.19) (2019-09-13) ### Bug Fixes -* "database" option error in driver when use "url" option for connection ([690e6f5](https://github.com/typeorm/typeorm/commit/690e6f5)) -* "hstore injection" & properly handle NULL, empty string, backslashes & quotes in hstore key/value pairs ([#4720](https://github.com/typeorm/typeorm/issues/4720)) ([3abe5b9](https://github.com/typeorm/typeorm/commit/3abe5b9)) -* add SaveOptions and RemoveOptions into ActiveRecord ([#4318](https://github.com/typeorm/typeorm/issues/4318)) ([a6d7ba2](https://github.com/typeorm/typeorm/commit/a6d7ba2)) -* apostrophe in Postgres enum strings breaks query ([#4631](https://github.com/typeorm/typeorm/issues/4631)) ([445c740](https://github.com/typeorm/typeorm/commit/445c740)) -* change PrimaryColumn decorator to clone passed options ([#4571](https://github.com/typeorm/typeorm/issues/4571)) ([3cf470d](https://github.com/typeorm/typeorm/commit/3cf470d)), closes [#4570](https://github.com/typeorm/typeorm/issues/4570) -* createQueryBuilder relation remove works only if using ID ([#2632](https://github.com/typeorm/typeorm/issues/2632)) ([#4734](https://github.com/typeorm/typeorm/issues/4734)) ([1d73a90](https://github.com/typeorm/typeorm/commit/1d73a90)) -* resolve issue with conversion string to simple-json ([#4476](https://github.com/typeorm/typeorm/issues/4476)) ([d1594f5](https://github.com/typeorm/typeorm/commit/d1594f5)), closes [#4440](https://github.com/typeorm/typeorm/issues/4440) -* sqlite connections don't ignore the schema property ([#4599](https://github.com/typeorm/typeorm/issues/4599)) ([d8f1c81](https://github.com/typeorm/typeorm/commit/d8f1c81)) -* the excessive stack depth comparing types `FindConditions` and `FindConditions` problem ([#4470](https://github.com/typeorm/typeorm/issues/4470)) ([7a0beed](https://github.com/typeorm/typeorm/commit/7a0beed)) -* views generating broken Migrations ([#4726](https://github.com/typeorm/typeorm/issues/4726)) ([c52b3d2](https://github.com/typeorm/typeorm/commit/c52b3d2)), closes [#4123](https://github.com/typeorm/typeorm/issues/4123) - +- "database" option error in driver when use "url" option for connection ([690e6f5](https://github.com/typeorm/typeorm/commit/690e6f5)) +- "hstore injection" & properly handle NULL, empty string, backslashes & quotes in hstore key/value pairs ([#4720](https://github.com/typeorm/typeorm/issues/4720)) ([3abe5b9](https://github.com/typeorm/typeorm/commit/3abe5b9)) +- add SaveOptions and RemoveOptions into ActiveRecord ([#4318](https://github.com/typeorm/typeorm/issues/4318)) ([a6d7ba2](https://github.com/typeorm/typeorm/commit/a6d7ba2)) +- apostrophe in Postgres enum strings breaks query ([#4631](https://github.com/typeorm/typeorm/issues/4631)) ([445c740](https://github.com/typeorm/typeorm/commit/445c740)) +- change PrimaryColumn decorator to clone passed options ([#4571](https://github.com/typeorm/typeorm/issues/4571)) ([3cf470d](https://github.com/typeorm/typeorm/commit/3cf470d)), closes [#4570](https://github.com/typeorm/typeorm/issues/4570) +- createQueryBuilder relation remove works only if using ID ([#2632](https://github.com/typeorm/typeorm/issues/2632)) ([#4734](https://github.com/typeorm/typeorm/issues/4734)) ([1d73a90](https://github.com/typeorm/typeorm/commit/1d73a90)) +- resolve issue with conversion string to simple-json ([#4476](https://github.com/typeorm/typeorm/issues/4476)) ([d1594f5](https://github.com/typeorm/typeorm/commit/d1594f5)), closes [#4440](https://github.com/typeorm/typeorm/issues/4440) +- sqlite connections don't ignore the schema property ([#4599](https://github.com/typeorm/typeorm/issues/4599)) ([d8f1c81](https://github.com/typeorm/typeorm/commit/d8f1c81)) +- the excessive stack depth comparing types `FindConditions` and `FindConditions` problem ([#4470](https://github.com/typeorm/typeorm/issues/4470)) ([7a0beed](https://github.com/typeorm/typeorm/commit/7a0beed)) +- views generating broken Migrations ([#4726](https://github.com/typeorm/typeorm/issues/4726)) ([c52b3d2](https://github.com/typeorm/typeorm/commit/c52b3d2)), closes [#4123](https://github.com/typeorm/typeorm/issues/4123) ### Features -* add `set` datatype support for MySQL/MariaDB ([#4538](https://github.com/typeorm/typeorm/issues/4538)) ([19e2179](https://github.com/typeorm/typeorm/commit/19e2179)), closes [#2779](https://github.com/typeorm/typeorm/issues/2779) -* add materialized View support for Postgres ([#4478](https://github.com/typeorm/typeorm/issues/4478)) ([dacac83](https://github.com/typeorm/typeorm/commit/dacac83)), closes [#4317](https://github.com/typeorm/typeorm/issues/4317) [#3996](https://github.com/typeorm/typeorm/issues/3996) -* add mongodb `useUnifiedTopology` config parameter ([#4684](https://github.com/typeorm/typeorm/issues/4684)) ([92e4270](https://github.com/typeorm/typeorm/commit/92e4270)) -* add multi-dimensional cube support for PostgreSQL ([#4378](https://github.com/typeorm/typeorm/issues/4378)) ([b6d6278](https://github.com/typeorm/typeorm/commit/b6d6278)) -* add options to input init config for sql.js ([#4560](https://github.com/typeorm/typeorm/issues/4560)) ([5c311ed](https://github.com/typeorm/typeorm/commit/5c311ed)) -* add postgres pool error handler ([#4474](https://github.com/typeorm/typeorm/issues/4474)) ([a925be9](https://github.com/typeorm/typeorm/commit/a925be9)) -* add referenced table metadata to NamingStrategy to resolve foreign key name ([#4274](https://github.com/typeorm/typeorm/issues/4274)) ([0094f61](https://github.com/typeorm/typeorm/commit/0094f61)), closes [#3847](https://github.com/typeorm/typeorm/issues/3847) [#1355](https://github.com/typeorm/typeorm/issues/1355) -* add support for ON CONFLICT for cockroach ([#4518](https://github.com/typeorm/typeorm/issues/4518)) ([db8074a](https://github.com/typeorm/typeorm/commit/db8074a)), closes [#4513](https://github.com/typeorm/typeorm/issues/4513) -* Added support for DISTINCT queries ([#4109](https://github.com/typeorm/typeorm/issues/4109)) ([39a8e34](https://github.com/typeorm/typeorm/commit/39a8e34)) -* Aurora Data API ([#4375](https://github.com/typeorm/typeorm/issues/4375)) ([c321562](https://github.com/typeorm/typeorm/commit/c321562)) -* export additional schema builder classes ([#4325](https://github.com/typeorm/typeorm/issues/4325)) ([e589fda](https://github.com/typeorm/typeorm/commit/e589fda)) -* log files loaded from glob patterns ([#4346](https://github.com/typeorm/typeorm/issues/4346)) ([e12479e](https://github.com/typeorm/typeorm/commit/e12479e)), closes [#4162](https://github.com/typeorm/typeorm/issues/4162) -* UpdateResult returns affected rows in postgresql ([#4432](https://github.com/typeorm/typeorm/issues/4432)) ([7808bba](https://github.com/typeorm/typeorm/commit/7808bba)), closes [#1308](https://github.com/typeorm/typeorm/issues/1308) +- add `set` datatype support for MySQL/MariaDB ([#4538](https://github.com/typeorm/typeorm/issues/4538)) ([19e2179](https://github.com/typeorm/typeorm/commit/19e2179)), closes [#2779](https://github.com/typeorm/typeorm/issues/2779) +- add materialized View support for Postgres ([#4478](https://github.com/typeorm/typeorm/issues/4478)) ([dacac83](https://github.com/typeorm/typeorm/commit/dacac83)), closes [#4317](https://github.com/typeorm/typeorm/issues/4317) [#3996](https://github.com/typeorm/typeorm/issues/3996) +- add mongodb `useUnifiedTopology` config parameter ([#4684](https://github.com/typeorm/typeorm/issues/4684)) ([92e4270](https://github.com/typeorm/typeorm/commit/92e4270)) +- add multi-dimensional cube support for PostgreSQL ([#4378](https://github.com/typeorm/typeorm/issues/4378)) ([b6d6278](https://github.com/typeorm/typeorm/commit/b6d6278)) +- add options to input init config for sql.js ([#4560](https://github.com/typeorm/typeorm/issues/4560)) ([5c311ed](https://github.com/typeorm/typeorm/commit/5c311ed)) +- add postgres pool error handler ([#4474](https://github.com/typeorm/typeorm/issues/4474)) ([a925be9](https://github.com/typeorm/typeorm/commit/a925be9)) +- add referenced table metadata to NamingStrategy to resolve foreign key name ([#4274](https://github.com/typeorm/typeorm/issues/4274)) ([0094f61](https://github.com/typeorm/typeorm/commit/0094f61)), closes [#3847](https://github.com/typeorm/typeorm/issues/3847) [#1355](https://github.com/typeorm/typeorm/issues/1355) +- add support for ON CONFLICT for cockroach ([#4518](https://github.com/typeorm/typeorm/issues/4518)) ([db8074a](https://github.com/typeorm/typeorm/commit/db8074a)), closes [#4513](https://github.com/typeorm/typeorm/issues/4513) +- Added support for DISTINCT queries ([#4109](https://github.com/typeorm/typeorm/issues/4109)) ([39a8e34](https://github.com/typeorm/typeorm/commit/39a8e34)) +- Aurora Data API ([#4375](https://github.com/typeorm/typeorm/issues/4375)) ([c321562](https://github.com/typeorm/typeorm/commit/c321562)) +- export additional schema builder classes ([#4325](https://github.com/typeorm/typeorm/issues/4325)) ([e589fda](https://github.com/typeorm/typeorm/commit/e589fda)) +- log files loaded from glob patterns ([#4346](https://github.com/typeorm/typeorm/issues/4346)) ([e12479e](https://github.com/typeorm/typeorm/commit/e12479e)), closes [#4162](https://github.com/typeorm/typeorm/issues/4162) +- UpdateResult returns affected rows in postgresql ([#4432](https://github.com/typeorm/typeorm/issues/4432)) ([7808bba](https://github.com/typeorm/typeorm/commit/7808bba)), closes [#1308](https://github.com/typeorm/typeorm/issues/1308) ## 0.2.18 ### Bug fixes -* fixed loadRelationCountAndMap when entities' primary keys are strings ([#3946](https://github.com/typeorm/typeorm/issues/3946)) -* fixed QueryExpressionMap not cloning all values correctly ([#4156](https://github.com/typeorm/typeorm/issues/4156)) -* fixed transform embeddeds with no columns but with nested embeddeds (mongodb) ([#4131](https://github.com/typeorm/typeorm/pull/4131)) -* fixed the getMany() result being droped randomly bug when using the buffer as primary key. ([#4220](https://github.com/typeorm/typeorm/issues/4220)) +- fixed loadRelationCountAndMap when entities' primary keys are strings ([#3946](https://github.com/typeorm/typeorm/issues/3946)) +- fixed QueryExpressionMap not cloning all values correctly ([#4156](https://github.com/typeorm/typeorm/issues/4156)) +- fixed transform embeddeds with no columns but with nested embeddeds (mongodb) ([#4131](https://github.com/typeorm/typeorm/pull/4131)) +- fixed the getMany() result being droped randomly bug when using the buffer as primary key. ([#4220](https://github.com/typeorm/typeorm/issues/4220)) ### Features -* adds `typeorm migration:show` command ([#4173](https://github.com/typeorm/typeorm/pull/4173)) -* deprecate column `readonly` option in favor of `update` and `insert` options ([#4035](https://github.com/typeorm/typeorm/pull/4035)) -* support sql.js v1.0 ([#4104](https://github.com/typeorm/typeorm/issues/4104)) -* added support for `orUpdate` in SQLlite ([#4097](https://github.com/typeorm/typeorm/pull/4097)) -* added support for `dirty_read` (NOLOCK) in SQLServer ([#4133](https://github.com/typeorm/typeorm/pull/4133)) -* extend afterLoad() subscriber interface to take LoadEvent ([issue #4185](https://github.com/typeorm/typeorm/issues/4185)) -* relation decorators (e.g. `@OneToMany`) now also accept `string` instead of `typeFunction`, which prevents circular dependency issues in the frontend/browser ([issue #4190](https://github.com/typeorm/typeorm/issues/4190)) -* added support for metadata reflection in typeorm-class-transformer-shim.js ([issue #4219](https://github.com/typeorm/typeorm/issues/4219)) -* added `sqlJsConfig` to input config when initializing sql.js ([issue #4559](https://github.com/typeorm/typeorm/issues/4559)) +- adds `typeorm migration:show` command ([#4173](https://github.com/typeorm/typeorm/pull/4173)) +- deprecate column `readonly` option in favor of `update` and `insert` options ([#4035](https://github.com/typeorm/typeorm/pull/4035)) +- support sql.js v1.0 ([#4104](https://github.com/typeorm/typeorm/issues/4104)) +- added support for `orUpdate` in SQLlite ([#4097](https://github.com/typeorm/typeorm/pull/4097)) +- added support for `dirty_read` (NOLOCK) in SQLServer ([#4133](https://github.com/typeorm/typeorm/pull/4133)) +- extend afterLoad() subscriber interface to take LoadEvent ([issue #4185](https://github.com/typeorm/typeorm/issues/4185)) +- relation decorators (e.g. `@OneToMany`) now also accept `string` instead of `typeFunction`, which prevents circular dependency issues in the frontend/browser ([issue #4190](https://github.com/typeorm/typeorm/issues/4190)) +- added support for metadata reflection in typeorm-class-transformer-shim.js ([issue #4219](https://github.com/typeorm/typeorm/issues/4219)) +- added `sqlJsConfig` to input config when initializing sql.js ([issue #4559](https://github.com/typeorm/typeorm/issues/4559)) ## 0.2.17 (2019-05-01) ### Bug fixes -* fixed transform embeddeds with boolean values (mongodb) ([#3900](https://github.com/typeorm/typeorm/pull/3900)) -* fixed issue with schema inheritance in STI pattern ([#3957](https://github.com/typeorm/typeorm/issues/3957)) -* revert changes from [#3814](https://github.com/typeorm/typeorm/pull/3814) ([#3828](https://github.com/typeorm/typeorm/pull/3828)) -* fix performance issue when inserting into raw tables with QueryBuilder - ([#3931](https://github.com/typeorm/typeorm/issues/3931)) -* sqlite date hydration is susceptible to corruption ([#3949](https://github.com/typeorm/typeorm/issues/3949)) -* fixed mongodb uniques, support 3 ways to define uniques ([#3986](https://github.com/typeorm/typeorm/pull/3986)) -* fixed mongodb TTL index ([#4044](https://github.com/typeorm/typeorm/pull/4044)) +- fixed transform embeddeds with boolean values (mongodb) ([#3900](https://github.com/typeorm/typeorm/pull/3900)) +- fixed issue with schema inheritance in STI pattern ([#3957](https://github.com/typeorm/typeorm/issues/3957)) +- revert changes from [#3814](https://github.com/typeorm/typeorm/pull/3814) ([#3828](https://github.com/typeorm/typeorm/pull/3828)) +- fix performance issue when inserting into raw tables with QueryBuilder + ([#3931](https://github.com/typeorm/typeorm/issues/3931)) +- sqlite date hydration is susceptible to corruption ([#3949](https://github.com/typeorm/typeorm/issues/3949)) +- fixed mongodb uniques, support 3 ways to define uniques ([#3986](https://github.com/typeorm/typeorm/pull/3986)) +- fixed mongodb TTL index ([#4044](https://github.com/typeorm/typeorm/pull/4044)) ### Features -* added deferrable options for foreign keys (postgres) ([#2191](https://github.com/typeorm/typeorm/issues/2191)) -* added View entity implementation ([#1024](https://github.com/typeorm/typeorm/issues/1024)). Read more at [View entities](https://typeorm.io/#/view-entities) -* added multiple value transformer support ([#4007](https://github.com/typeorm/typeorm/issues/4007)) +- added deferrable options for foreign keys (postgres) ([#2191](https://github.com/typeorm/typeorm/issues/2191)) +- added View entity implementation ([#1024](https://github.com/typeorm/typeorm/issues/1024)). Read more at [View entities](https://typeorm.io/#/view-entities) +- added multiple value transformer support ([#4007](https://github.com/typeorm/typeorm/issues/4007)) ## 0.2.16 (2019-03-26) ### Bug fixes -* removed unused parameters from `insert`, `update`, `delete` methods ([#3888](https://github.com/typeorm/typeorm/pull/3888)) -* fixed: migration generator produces duplicated changes ([#1960](https://github.com/typeorm/typeorm/issues/1960)) -* fixed: unique constraint not created on embedded entity field ([#3142](https://github.com/typeorm/typeorm/issues/3142)) -* fixed: FK columns have wrong length when PrimaryGeneratedColumn('uuid') is used ([#3604](https://github.com/typeorm/typeorm/issues/3604)) -* fixed: column option unique sqlite error ([#3803](https://github.com/typeorm/typeorm/issues/3803)) -* fixed: 'uuid' in PrimaryGeneratedColumn causes Many-to-Many Relationship to Fail ([#3151](https://github.com/typeorm/typeorm/issues/3151)) -* fixed: sync enums on schema sync ([#3694](https://github.com/typeorm/typeorm/issues/3694)) -* fixed: changes in enum type is not reflected when generating migration (in definition file) ([#3244](https://github.com/typeorm/typeorm/issues/3244)) -* fixed: migration will keep create and drop indexes if index name is the same across tables ([#3379](https://github.com/typeorm/typeorm/issues/3379)) +- removed unused parameters from `insert`, `update`, `delete` methods ([#3888](https://github.com/typeorm/typeorm/pull/3888)) +- fixed: migration generator produces duplicated changes ([#1960](https://github.com/typeorm/typeorm/issues/1960)) +- fixed: unique constraint not created on embedded entity field ([#3142](https://github.com/typeorm/typeorm/issues/3142)) +- fixed: FK columns have wrong length when PrimaryGeneratedColumn('uuid') is used ([#3604](https://github.com/typeorm/typeorm/issues/3604)) +- fixed: column option unique sqlite error ([#3803](https://github.com/typeorm/typeorm/issues/3803)) +- fixed: 'uuid' in PrimaryGeneratedColumn causes Many-to-Many Relationship to Fail ([#3151](https://github.com/typeorm/typeorm/issues/3151)) +- fixed: sync enums on schema sync ([#3694](https://github.com/typeorm/typeorm/issues/3694)) +- fixed: changes in enum type is not reflected when generating migration (in definition file) ([#3244](https://github.com/typeorm/typeorm/issues/3244)) +- fixed: migration will keep create and drop indexes if index name is the same across tables ([#3379](https://github.com/typeorm/typeorm/issues/3379)) ### Features -* added `lock` option in `FindOptions` +- added `lock` option in `FindOptions` ## 0.2.15 (2019-03-14) ### Bug fixes -* fixed bug in `connection.dropDatabase` method ([#1414](https://github.com/typeorm/typeorm/pull/3727)) -* fixed "deep relations" not loaded/mapped due to the built-in max length of Postgres ([#3118](https://github.com/typeorm/typeorm/issues/3118)) -* updated all dependencies -* fixed types issue from [#3725](https://github.com/typeorm/typeorm/issues/3725) -* removed sql-function-support (`() => ` syntax) in parameters to prevent security considerations -* fix sync schema issue with postgres enum in case capital letters in entity name ([#3536](https://github.com/typeorm/typeorm/issues/3536)) +- fixed bug in `connection.dropDatabase` method ([#1414](https://github.com/typeorm/typeorm/pull/3727)) +- fixed "deep relations" not loaded/mapped due to the built-in max length of Postgres ([#3118](https://github.com/typeorm/typeorm/issues/3118)) +- updated all dependencies +- fixed types issue from [#3725](https://github.com/typeorm/typeorm/issues/3725) +- removed sql-function-support (`() => ` syntax) in parameters to prevent security considerations +- fix sync schema issue with postgres enum in case capital letters in entity name ([#3536](https://github.com/typeorm/typeorm/issues/3536)) ### Features -* added `uuidExtension` option to Postgres connection options, which allows TypeORM to use the newer `pgcrypto` extension to generate UUIDs +- added `uuidExtension` option to Postgres connection options, which allows TypeORM to use the newer `pgcrypto` extension to generate UUIDs ## 0.2.14 (2019-02-25) ### Bug fixes -* fixed migration issue with postgres numeric enum type - change queries are not generated if enum is not modified ([#3587](https://github.com/typeorm/typeorm/issues/3587)) -* fixed mongodb entity listeners in optional embeddeds ([#3450](https://github.com/typeorm/typeorm/issues/3450)) -* fixes returning invalid delete result -* reverted lazy loading properties not enumerable feature to fix related bugs +- fixed migration issue with postgres numeric enum type - change queries are not generated if enum is not modified ([#3587](https://github.com/typeorm/typeorm/issues/3587)) +- fixed mongodb entity listeners in optional embeddeds ([#3450](https://github.com/typeorm/typeorm/issues/3450)) +- fixes returning invalid delete result +- reverted lazy loading properties not enumerable feature to fix related bugs ### Features -* added CockroachDB support -* added browser entry point to `package.json` ([3583](https://github.com/typeorm/typeorm/issues/3583)) -* replaced backend-only drivers by dummy driver in browser builds -* added `useLocalForage` option to Sql.js connection options, which enables asynchronous load and save operations of the datatbase from the indexedDB ([#3554](https://github.com/typeorm/typeorm/issues/3554)) -* added simple-enum column type ([#1414](https://github.com/typeorm/typeorm/issues/1414)) +- added CockroachDB support +- added browser entry point to `package.json` ([3583](https://github.com/typeorm/typeorm/issues/3583)) +- replaced backend-only drivers by dummy driver in browser builds +- added `useLocalForage` option to Sql.js connection options, which enables asynchronous load and save operations of the datatbase from the indexedDB ([#3554](https://github.com/typeorm/typeorm/issues/3554)) +- added simple-enum column type ([#1414](https://github.com/typeorm/typeorm/issues/1414)) ## 0.2.13 (2019-02-10) ### Bug Fixes -* fixed undefined object id field in case property name is `_id` ([3517](https://github.com/typeorm/typeorm/issues/3517)) -* allow to use mongodb index options in `Index` decorator ([#3592](https://github.com/typeorm/typeorm/pull/3592)) -* fixed entity embeddeds indices in mongodb ([#3585](https://github.com/typeorm/typeorm/pull/3585)) -* fixed json/jsonb column data types comparison ([#3496](https://github.com/typeorm/typeorm/issues/3496)) -* fixed increment/decrement value of embedded entity ([#3182](https://github.com/typeorm/typeorm/issues/3182)) -* fixed missing call `transformer.from()` in case column is NULL ([#3395](https://github.com/typeorm/typeorm/issues/3395)) -* fixed signatures of `update`/`insert` methods, some `find*` methods in repositories, entity managers, BaseEntity and QueryBuilders -* handle embedded documents through multiple levels in mongodb ([#3551](https://github.com/typeorm/typeorm/issues/3551)) -* fixed hanging connections in `mssql` driver ([#3327](https://github.com/typeorm/typeorm/pull/3327)) +- fixed undefined object id field in case property name is `_id` ([3517](https://github.com/typeorm/typeorm/issues/3517)) +- allow to use mongodb index options in `Index` decorator ([#3592](https://github.com/typeorm/typeorm/pull/3592)) +- fixed entity embeddeds indices in mongodb ([#3585](https://github.com/typeorm/typeorm/pull/3585)) +- fixed json/jsonb column data types comparison ([#3496](https://github.com/typeorm/typeorm/issues/3496)) +- fixed increment/decrement value of embedded entity ([#3182](https://github.com/typeorm/typeorm/issues/3182)) +- fixed missing call `transformer.from()` in case column is NULL ([#3395](https://github.com/typeorm/typeorm/issues/3395)) +- fixed signatures of `update`/`insert` methods, some `find*` methods in repositories, entity managers, BaseEntity and QueryBuilders +- handle embedded documents through multiple levels in mongodb ([#3551](https://github.com/typeorm/typeorm/issues/3551)) +- fixed hanging connections in `mssql` driver ([#3327](https://github.com/typeorm/typeorm/pull/3327)) ### Features -* Injection 2nd parameter(options) of constructor to `ioredis/cluster` is now possible([#3538](https://github.com/typeorm/typeorm/issues/3538)) +- Injection 2nd parameter(options) of constructor to `ioredis/cluster` is now possible([#3538](https://github.com/typeorm/typeorm/issues/3538)) ## 0.2.12 (2019-01-20) ### Bug Fixes -* fixed mongodb entity listeners and subscribers ([#1527](https://github.com/typeorm/typeorm/issues/1527)) -* fixed connection options builder - paramters parsed from url are assigned on top of options ([#3442](https://github.com/typeorm/typeorm/pull/3442)) -* fixed issue with logical operator precedence in `QueryBuilder` `whereInIds` ([#2103](https://github.com/typeorm/typeorm/issues/2103)) -* fixed missing `isolationLevel` in `Connection.transaction()` method ([#3363](https://github.com/typeorm/typeorm/issues/3363)) -* fixed broken findOne method with custom join column name -* fixed issue with uuid in mysql ([#3374](https://github.com/typeorm/typeorm/issues/3374)) -* fixed missing export of `Exclusion` decorator -* fixed ignored extra options in mongodb driver ([#3403](https://github.com/typeorm/typeorm/pull/3403), [#1741](https://github.com/typeorm/typeorm/issues/1741)) -* fixed signature of root `getRepository` function to accept `EntitySchema` ([#3402](https://github.com/typeorm/typeorm/pull/3402)) -* fixed false undefined connection options passed into mongodb client ([#3366](https://github.com/typeorm/typeorm/pull/3366)) -* fixed ER_DUP_FIELDNAME with simple find ([#3350](https://github.com/typeorm/typeorm/issues/3350)) +- fixed mongodb entity listeners and subscribers ([#1527](https://github.com/typeorm/typeorm/issues/1527)) +- fixed connection options builder - paramters parsed from url are assigned on top of options ([#3442](https://github.com/typeorm/typeorm/pull/3442)) +- fixed issue with logical operator precedence in `QueryBuilder` `whereInIds` ([#2103](https://github.com/typeorm/typeorm/issues/2103)) +- fixed missing `isolationLevel` in `Connection.transaction()` method ([#3363](https://github.com/typeorm/typeorm/issues/3363)) +- fixed broken findOne method with custom join column name +- fixed issue with uuid in mysql ([#3374](https://github.com/typeorm/typeorm/issues/3374)) +- fixed missing export of `Exclusion` decorator +- fixed ignored extra options in mongodb driver ([#3403](https://github.com/typeorm/typeorm/pull/3403), [#1741](https://github.com/typeorm/typeorm/issues/1741)) +- fixed signature of root `getRepository` function to accept `EntitySchema` ([#3402](https://github.com/typeorm/typeorm/pull/3402)) +- fixed false undefined connection options passed into mongodb client ([#3366](https://github.com/typeorm/typeorm/pull/3366)) +- fixed ER_DUP_FIELDNAME with simple find ([#3350](https://github.com/typeorm/typeorm/issues/3350)) ### Features -* added `tslib` to reduce package size ([#3457](https://github.com/typeorm/typeorm/issues/3457), [#3458](https://github.com/typeorm/typeorm/pull/3458)) -* queries are simplified in `findByIds` and `whereInIds` for simple entities with single primary key ([#3431](https://github.com/typeorm/typeorm/pull/3431)) -* added `ioredis` and `ioredis-cluster` cache support ([#3289](https://github.com/typeorm/typeorm/pull/3289),[#3364](https://github.com/typeorm/typeorm/pull/3364)) -* added `LessThanOrEqual` and `MoreThanOrEqual` find options ([#3373](https://github.com/typeorm/typeorm/pull/3373)) -* improve support of string, numeric and heterogeneous enums in postgres and mysql ([#3414](https://github.com/typeorm/typeorm/pull/3414)) -* default value of enum array in postgres is now possible define as typescript array ([#3414](https://github.com/typeorm/typeorm/pull/3414)) +- added `tslib` to reduce package size ([#3457](https://github.com/typeorm/typeorm/issues/3457), [#3458](https://github.com/typeorm/typeorm/pull/3458)) +- queries are simplified in `findByIds` and `whereInIds` for simple entities with single primary key ([#3431](https://github.com/typeorm/typeorm/pull/3431)) +- added `ioredis` and `ioredis-cluster` cache support ([#3289](https://github.com/typeorm/typeorm/pull/3289),[#3364](https://github.com/typeorm/typeorm/pull/3364)) +- added `LessThanOrEqual` and `MoreThanOrEqual` find options ([#3373](https://github.com/typeorm/typeorm/pull/3373)) +- improve support of string, numeric and heterogeneous enums in postgres and mysql ([#3414](https://github.com/typeorm/typeorm/pull/3414)) +- default value of enum array in postgres is now possible define as typescript array ([#3414](https://github.com/typeorm/typeorm/pull/3414)) + ```typescript @Column({ type: "enum", @@ -1735,501 +1851,499 @@ stringEnums: StringEnum[]; ### Breaking changes -* `UpdateQueryBuilder` now throw error if update values are not provided or unknown property is passed into `.set()` method ([#2849](https://github.com/typeorm/typeorm/issues/2849),[#3324](https://github.com/typeorm/typeorm/pull/3324)) - +- `UpdateQueryBuilder` now throw error if update values are not provided or unknown property is passed into `.set()` method ([#2849](https://github.com/typeorm/typeorm/issues/2849),[#3324](https://github.com/typeorm/typeorm/pull/3324)) ## 0.2.11 -* hot fix for mysql schema sync bug +- hot fix for mysql schema sync bug ## 0.2.10 -* allowed caching options from environment variable (#3321) -* more accurate type for postgres ssl parameters -* added support for `ON UPDATE CASCADE` relations for mysql -* `repository.save` returns union type -* added reuse of lazy relationships -* added ability to disable prefixes for embedded columns -* migrations can be tested -* migration run returns array of successful migrations -* added debug ENV option -* added support for postgres exclusion constraints -* bug fixes -* documentation updates -* fixed issue with mysql primary generated uuid ER_TOO_LONG_KEY (#1139) +- allowed caching options from environment variable (#3321) +- more accurate type for postgres ssl parameters +- added support for `ON UPDATE CASCADE` relations for mysql +- `repository.save` returns union type +- added reuse of lazy relationships +- added ability to disable prefixes for embedded columns +- migrations can be tested +- migration run returns array of successful migrations +- added debug ENV option +- added support for postgres exclusion constraints +- bug fixes +- documentation updates +- fixed issue with mysql primary generated uuid ER_TOO_LONG_KEY (#1139) ## 0.2.9 -* `UpdateEvent` now returns with contains `updatedColumns` and `updatedRelations` +- `UpdateEvent` now returns with contains `updatedColumns` and `updatedRelations` ## 0.2.8 -* added support for specifying isolation levels in transactions -* added SQLCipher connection option for sqlite -* added driver to support Expo platform for sqlite -* added support for nativescript -* bug fixes -* documentation updates +- added support for specifying isolation levels in transactions +- added SQLCipher connection option for sqlite +- added driver to support Expo platform for sqlite +- added support for nativescript +- bug fixes +- documentation updates ## 0.2.7 -* added support for rowversion type for mssql (#2198) +- added support for rowversion type for mssql (#2198) ## 0.2.6 -* fixed wrong aggregate and count methods signature in mongodb +- fixed wrong aggregate and count methods signature in mongodb ## 0.2.5 -* added support for enum arrays in postgres -* fixed issue with lazy relations (#1953) -* fixed issue with migration file generator using a wrong class name (#2070) -* fixed issue with unhandled promise rejection warning on postgres connection (#2067) +- added support for enum arrays in postgres +- fixed issue with lazy relations (#1953) +- fixed issue with migration file generator using a wrong class name (#2070) +- fixed issue with unhandled promise rejection warning on postgres connection (#2067) ## 0.2.4 -* fixed bug with relation id loader queries not working with self-referencing relations -* fixed issues with zerofill and unsigned options not available in column options (#2049) -* fixed issue with lazy relation loader (#2029) -* fixed issue with closure table not properly escaped when using custom schema (#2043) -* fixed issue #2053 +- fixed bug with relation id loader queries not working with self-referencing relations +- fixed issues with zerofill and unsigned options not available in column options (#2049) +- fixed issue with lazy relation loader (#2029) +- fixed issue with closure table not properly escaped when using custom schema (#2043) +- fixed issue #2053 ## 0.2.3 -* fixed bug with selecting default values after persistence when initialized properties defined -* fixed bug with find operators used on relational columns (#2031) -* fixed bug with DEFAULT as functions in mssql (#1991) +- fixed bug with selecting default values after persistence when initialized properties defined +- fixed bug with find operators used on relational columns (#2031) +- fixed bug with DEFAULT as functions in mssql (#1991) ## 0.2.2 -* fixing bugs with STI -* fixed bug in mysql schema synchronization +- fixing bugs with STI +- fixed bug in mysql schema synchronization ## 0.2.1 -* fixed bug with STI -* fixed bug with lazy relations inside transactions +- fixed bug with STI +- fixed bug with lazy relations inside transactions ## 0.2.0 -* completely refactored, improved and optimized persistence process and performance. -* removed cascade remove functionality, refactored how cascades are working. -* removed `cascadeRemove` option from relation options. -* replaced `cascadeAll` with `cascade: true` syntax from relation options. -* replaced `cascadeInsert` with `cascade: ["insert"]` syntax from relation options. -* replaced `cascadeUpdate` with `cascade: ["update"]` syntax from relation options. -* now when one-to-one or many-to-one relation is loaded and its not set (set to null) ORM returns you entity with relation set to `null` instead of `undefined property` as before. -* now relation id can be set directly to relation, e.g. `Post { @ManyToOne(type => Tag) tag: Tag|number }` with `post.tag = 1` usage. -* now you can disable persistence on any relation by setting `@OneToMany(type => Post, post => tag, { persistence: false })`. This can dramatically improve entity save performance. -* `loadAllRelationIds` method of `QueryBuilder` now accepts list of relation paths that needs to be loaded, also `disableMixedMap` option is now by default set to false, but you can enable it via new method parameter `options` -* now `returning` and `output` statements of `InsertQueryBuilder` support array of columns as argument -* now when many-to-many and one-to-many relation set to `null` all items from that relation are removed, just like it would be set to empty array -* fixed issues with relation update from one-to-one non-owner side -* now version column is updated on the database level, not by ORM anymore -* now created date and update date columns is set on the database level, not by ORM anymore (e.g. using `CURRENT_TIMESTAMP` as a default value) -* now `InsertQueryBuilder`, `UpdateQueryBuilder` and `DeleteQueryBuilder` automatically update entities after execution. -This only happens if real entity objects are passed. -Some databases (like mysql and sqlite) requires a separate query to perform this operation. -If you want to disable this behavior use `queryBuilder.updateEntity(false)` method. -This feature is convenient for users who have uuid, create/update date, version columns or columns with DEFAULT value set. -* now `InsertQueryBuilder`, `UpdateQueryBuilder` and `DeleteQueryBuilder` call subscribers and listeners. -You can disable this behavior by setting `queryBuilder.callListeners(false)` method. -* `Repository` and `EntityManager` method `.findOneById` is deprecated and will be removed in next 0.3.0 version. -Use `findOne(id)` method instead now. -* `InsertQueryBuilder` now returns `InsertResult` which contains extended information and metadata about runned query -* `UpdateQueryBuilder` now returns `UpdateResult` which contains extended information and metadata about runned query -* `DeleteQueryBuilder` now returns `DeleteResult` which contains extended information and metadata about runned query -* now insert / update / delete queries built with QueryBuilder can be wrapped into a transaction using `useTransaction(true)` method of the QueryBuilder. -* `insert`, `update` and `delete` methods of `QueryRunner` now use `InsertQueryRunner`, `UpdateQueryRunner` and `DeleteQueryRunner` inside -* removed deprecated `removeById`, `removeByIds` methods -* removed `deleteById` method - use `delete(id)` method instead now -* removed `updateById` method - use `update(id)` method instead now -* changed `snakeCase` utility - check table names after upgrading -* added ability to disable transaction in `save` and `remove` operations -* added ability to disable listeners and subscribers in `save` and `remove` operations -* added ability to save and remove objects in chunks -* added ability to disable entity reloading after insertion and updation -* class table inheritance functionality has been completely dropped -* single table inheritance functionality has been fixed -* `@SingleEntityChild` has been renamed to `@ChildEntity` -* `@DiscriminatorValue` has been removed, instead parameter in `@ChildEntity` must be used, e.g. `@ChildEntity("value")` -* `@DiscriminatorColumn` decorator has been removed, use `@TableInheritance` options instead now -* `skipSync` in entity options has been renamed to `synchronize`. Now if it set to false schema synchronization for the entity will be disabled. -By default its true. -* now array initializations for relations are forbidden and ORM throws an error if there are entities with initialized relation arrays. -* `@ClosureEntity` decorator has been removed. Instead `@Entity` + `@Tree("closure-table")` must be used -* added support for nested set and materialized path tree hierarchy patterns -* breaking change on how array parameters work in queries - now instead of (:param) new syntax must be used (:...param). -This fixed various issues on how real arrays must work -* changed the way how entity schemas are created (now more type-safe), now interface EntitySchema is a class -* added `@Unique` decorator. Accepts custom unique constraint name and columns to be unique. Used only on as -composite unique constraint, on table level. E.g. `@Unique("uq_id_name", ["id", "name"])` -* added `@Check` decorator. Accepts custom check constraint name and expression. Used only on as -composite check constraint, on table level. E.g. `@Check("chk_name", "name <> 'asd'")` -* fixed `Oracle` issues, now it will be fully maintained as other drivers -* implemented migrations functionality in all drivers -* CLI commands changed from `migrations:create`, `migrations:generate`, `migrations:revert` and `migrations:run` to `migration:create`, `migration:generate`, `migration:revert` and `migration:run` -* changed the way how migrations work (more info in #1315). Now migration table contains `id` column with auto-generated keys, you need to re-create migrations table or add new column manually. -* entity schemas syntax was changed -* dropped support for WebSql and SystemJS -* `@Index` decorator now accepts `synchronize` option. This option need to avoid deleting custom indices which is not created by TypeORM -* new flag in relation options was introduced: `{ persistence: false }`. You can use it to prevent any extra queries for relations checks -* added support for `UNSIGNED` and `ZEROFILL` column attributes in MySQL -* added support for generated columns in MySQL -* added support for `ON UPDATE` column option in MySQL -* added `SPATIAL` and `FULLTEXT` index options in MySQL -* added `hstore` and `enum` column types support in Postgres -* added range types support in Postgres -* TypeORM now uses `{ "supportBigNumbers": true, "bigNumberStrings": true }` options by default for `node-mysql` -* Integer data types in MySQL now accepts `width` option instead of `length` -* junction tables now have `onDelete: "CASCADE"` attribute on their foreign keys -* `ancestor` and `descendant` columns in ClosureTable marked as primary keys -* unique index now will be created for the join columns in `ManyToOne` and `OneToOne` relations +- completely refactored, improved and optimized persistence process and performance. +- removed cascade remove functionality, refactored how cascades are working. +- removed `cascadeRemove` option from relation options. +- replaced `cascadeAll` with `cascade: true` syntax from relation options. +- replaced `cascadeInsert` with `cascade: ["insert"]` syntax from relation options. +- replaced `cascadeUpdate` with `cascade: ["update"]` syntax from relation options. +- now when one-to-one or many-to-one relation is loaded and its not set (set to null) ORM returns you entity with relation set to `null` instead of `undefined property` as before. +- now relation id can be set directly to relation, e.g. `Post { @ManyToOne(type => Tag) tag: Tag|number }` with `post.tag = 1` usage. +- now you can disable persistence on any relation by setting `@OneToMany(type => Post, post => tag, { persistence: false })`. This can dramatically improve entity save performance. +- `loadAllRelationIds` method of `QueryBuilder` now accepts list of relation paths that needs to be loaded, also `disableMixedMap` option is now by default set to false, but you can enable it via new method parameter `options` +- now `returning` and `output` statements of `InsertQueryBuilder` support array of columns as argument +- now when many-to-many and one-to-many relation set to `null` all items from that relation are removed, just like it would be set to empty array +- fixed issues with relation update from one-to-one non-owner side +- now version column is updated on the database level, not by ORM anymore +- now created date and update date columns is set on the database level, not by ORM anymore (e.g. using `CURRENT_TIMESTAMP` as a default value) +- now `InsertQueryBuilder`, `UpdateQueryBuilder` and `DeleteQueryBuilder` automatically update entities after execution. + This only happens if real entity objects are passed. + Some databases (like mysql and sqlite) requires a separate query to perform this operation. + If you want to disable this behavior use `queryBuilder.updateEntity(false)` method. + This feature is convenient for users who have uuid, create/update date, version columns or columns with DEFAULT value set. +- now `InsertQueryBuilder`, `UpdateQueryBuilder` and `DeleteQueryBuilder` call subscribers and listeners. + You can disable this behavior by setting `queryBuilder.callListeners(false)` method. +- `Repository` and `EntityManager` method `.findOneById` is deprecated and will be removed in next 0.3.0 version. + Use `findOne(id)` method instead now. +- `InsertQueryBuilder` now returns `InsertResult` which contains extended information and metadata about runned query +- `UpdateQueryBuilder` now returns `UpdateResult` which contains extended information and metadata about runned query +- `DeleteQueryBuilder` now returns `DeleteResult` which contains extended information and metadata about runned query +- now insert / update / delete queries built with QueryBuilder can be wrapped into a transaction using `useTransaction(true)` method of the QueryBuilder. +- `insert`, `update` and `delete` methods of `QueryRunner` now use `InsertQueryRunner`, `UpdateQueryRunner` and `DeleteQueryRunner` inside +- removed deprecated `removeById`, `removeByIds` methods +- removed `deleteById` method - use `delete(id)` method instead now +- removed `updateById` method - use `update(id)` method instead now +- changed `snakeCase` utility - check table names after upgrading +- added ability to disable transaction in `save` and `remove` operations +- added ability to disable listeners and subscribers in `save` and `remove` operations +- added ability to save and remove objects in chunks +- added ability to disable entity reloading after insertion and updation +- class table inheritance functionality has been completely dropped +- single table inheritance functionality has been fixed +- `@SingleEntityChild` has been renamed to `@ChildEntity` +- `@DiscriminatorValue` has been removed, instead parameter in `@ChildEntity` must be used, e.g. `@ChildEntity("value")` +- `@DiscriminatorColumn` decorator has been removed, use `@TableInheritance` options instead now +- `skipSync` in entity options has been renamed to `synchronize`. Now if it set to false schema synchronization for the entity will be disabled. + By default its true. +- now array initializations for relations are forbidden and ORM throws an error if there are entities with initialized relation arrays. +- `@ClosureEntity` decorator has been removed. Instead `@Entity` + `@Tree("closure-table")` must be used +- added support for nested set and materialized path tree hierarchy patterns +- breaking change on how array parameters work in queries - now instead of (:param) new syntax must be used (:...param). + This fixed various issues on how real arrays must work +- changed the way how entity schemas are created (now more type-safe), now interface EntitySchema is a class +- added `@Unique` decorator. Accepts custom unique constraint name and columns to be unique. Used only on as + composite unique constraint, on table level. E.g. `@Unique("uq_id_name", ["id", "name"])` +- added `@Check` decorator. Accepts custom check constraint name and expression. Used only on as + composite check constraint, on table level. E.g. `@Check("chk_name", "name <> 'asd'")` +- fixed `Oracle` issues, now it will be fully maintained as other drivers +- implemented migrations functionality in all drivers +- CLI commands changed from `migrations:create`, `migrations:generate`, `migrations:revert` and `migrations:run` to `migration:create`, `migration:generate`, `migration:revert` and `migration:run` +- changed the way how migrations work (more info in #1315). Now migration table contains `id` column with auto-generated keys, you need to re-create migrations table or add new column manually. +- entity schemas syntax was changed +- dropped support for WebSql and SystemJS +- `@Index` decorator now accepts `synchronize` option. This option need to avoid deleting custom indices which is not created by TypeORM +- new flag in relation options was introduced: `{ persistence: false }`. You can use it to prevent any extra queries for relations checks +- added support for `UNSIGNED` and `ZEROFILL` column attributes in MySQL +- added support for generated columns in MySQL +- added support for `ON UPDATE` column option in MySQL +- added `SPATIAL` and `FULLTEXT` index options in MySQL +- added `hstore` and `enum` column types support in Postgres +- added range types support in Postgres +- TypeORM now uses `{ "supportBigNumbers": true, "bigNumberStrings": true }` options by default for `node-mysql` +- Integer data types in MySQL now accepts `width` option instead of `length` +- junction tables now have `onDelete: "CASCADE"` attribute on their foreign keys +- `ancestor` and `descendant` columns in ClosureTable marked as primary keys +- unique index now will be created for the join columns in `ManyToOne` and `OneToOne` relations ## 0.1.19 -* fixed bug in InsertQueryBuilder +- fixed bug in InsertQueryBuilder ## 0.1.18 -* fixed timestamp issues +- fixed timestamp issues ## 0.1.17 -* fixed issue with entity order by applied to update query builder +- fixed issue with entity order by applied to update query builder ## 0.1.16 -* security and bug fixes +- security and bug fixes ## 0.1.15 -* security and bug fixes +- security and bug fixes ## 0.1.14 -* optimized hydration performance ([#1672](https://github.com/typeorm/typeorm/pull/1672)) +- optimized hydration performance ([#1672](https://github.com/typeorm/typeorm/pull/1672)) ## 0.1.13 -* added simple-json column type ([#1448](https://github.com/typeorm/typeorm/pull/1488)) -* fixed transform behaviour for timestamp columns ([#1140](https://github.com/typeorm/typeorm/issues/1140)) -* fixed issue with multi-level relations loading ([#1504](https://github.com/typeorm/typeorm/issues/1504)) +- added simple-json column type ([#1448](https://github.com/typeorm/typeorm/pull/1488)) +- fixed transform behaviour for timestamp columns ([#1140](https://github.com/typeorm/typeorm/issues/1140)) +- fixed issue with multi-level relations loading ([#1504](https://github.com/typeorm/typeorm/issues/1504)) ## 0.1.12 -* EntitySubscriber now fires events on subclass entity ([#1369](https://github.com/typeorm/typeorm/issues/1369)) -* fixed error with entity schema validator being async ([#1448](https://github.com/typeorm/typeorm/issues/1448)) +- EntitySubscriber now fires events on subclass entity ([#1369](https://github.com/typeorm/typeorm/issues/1369)) +- fixed error with entity schema validator being async ([#1448](https://github.com/typeorm/typeorm/issues/1448)) ## 0.1.11 -* postgres extensions now gracefully handled when user does not have rights to use them ([#1407](https://github.com/typeorm/typeorm/issues/1407)) +- postgres extensions now gracefully handled when user does not have rights to use them ([#1407](https://github.com/typeorm/typeorm/issues/1407)) ## 0.1.10 -* `sqljs` driver now enforces FK integrity by default (same behavior as `sqlite`) -* fixed issue that broke browser support in 0.1.8 because of the debug package ([#1344](https://github.com/typeorm/typeorm/pull/1344)) +- `sqljs` driver now enforces FK integrity by default (same behavior as `sqlite`) +- fixed issue that broke browser support in 0.1.8 because of the debug package ([#1344](https://github.com/typeorm/typeorm/pull/1344)) ## 0.1.9 -* fixed bug with sqlite and mysql schema synchronization when uuid column is used ([#1332](https://github.com/typeorm/typeorm/issues/1332)) +- fixed bug with sqlite and mysql schema synchronization when uuid column is used ([#1332](https://github.com/typeorm/typeorm/issues/1332)) ## 0.1.8 -* New DebugLogger ([#1302](https://github.com/typeorm/typeorm/pull/1302)) -* fixed issue with primary relations being nullable by default - now they are not nullable always -* fixed issue with multiple databases support when tables with same name are used across multiple databases +- New DebugLogger ([#1302](https://github.com/typeorm/typeorm/pull/1302)) +- fixed issue with primary relations being nullable by default - now they are not nullable always +- fixed issue with multiple databases support when tables with same name are used across multiple databases ## 0.1.7 -* fixed bug with migrations execution in mssql ([#1254](https://github.com/typeorm/typeorm/issues/1254)) -* added support for more complex ordering in paginated results ([#1259](https://github.com/typeorm/typeorm/issues/1259)) -* MSSQL users are required to add "order by" for skip/offset operations since mssql does not support OFFSET/LIMIT statement without order by applied -* fixed issue when relation query builder methods execute operations with empty arrays ([#1241](https://github.com/typeorm/typeorm/issues/1241)) -* Webpack can now be used for node projects and not only for browser projects. To use TypeORM in Ionic with minimal changes checkout the [ionic-example](https://github.com/typeorm/ionic-example#typeorm--017) for the needed changes. To use webpack for non-Ionic browser webpack projects, the needed configuration can be found in the [docs]( http://typeorm.io/#/supported-platforms) ([#1280](https://github.com/typeorm/typeorm/pulls/1280)) -* added support for loading sub-relations in via find options ([#1270](https://github.com/typeorm/typeorm/issues/1270)) +- fixed bug with migrations execution in mssql ([#1254](https://github.com/typeorm/typeorm/issues/1254)) +- added support for more complex ordering in paginated results ([#1259](https://github.com/typeorm/typeorm/issues/1259)) +- MSSQL users are required to add "order by" for skip/offset operations since mssql does not support OFFSET/LIMIT statement without order by applied +- fixed issue when relation query builder methods execute operations with empty arrays ([#1241](https://github.com/typeorm/typeorm/issues/1241)) +- Webpack can now be used for node projects and not only for browser projects. To use TypeORM in Ionic with minimal changes checkout the [ionic-example](https://github.com/typeorm/ionic-example#typeorm--017) for the needed changes. To use webpack for non-Ionic browser webpack projects, the needed configuration can be found in the [docs](http://typeorm.io/#/supported-platforms) ([#1280](https://github.com/typeorm/typeorm/pulls/1280)) +- added support for loading sub-relations in via find options ([#1270](https://github.com/typeorm/typeorm/issues/1270)) ## 0.1.6 -* added support for indices and listeners in embeddeds -* added support for `ON CONFLICT` keyword -* fixed bug with query builder where lazy relations are loaded multiple times when using `leftJoinAndSelect` ([#996](https://github.com/typeorm/typeorm/issues/996)) -* fixed bug in all sqlite based drivers that generated wrong uuid columns ([#1128](https://github.com/typeorm/typeorm/issues/1128) and [#1161](https://github.com/typeorm/typeorm/issues/1161)) +- added support for indices and listeners in embeddeds +- added support for `ON CONFLICT` keyword +- fixed bug with query builder where lazy relations are loaded multiple times when using `leftJoinAndSelect` ([#996](https://github.com/typeorm/typeorm/issues/996)) +- fixed bug in all sqlite based drivers that generated wrong uuid columns ([#1128](https://github.com/typeorm/typeorm/issues/1128) and [#1161](https://github.com/typeorm/typeorm/issues/1161)) ## 0.1.5 -* fixed bug where `findByIds` would return values with an empty array ([#1118](https://github.com/typeorm/typeorm/issues/1118)) -* fixed bug in MigrationExecutor that didn't release created query builder ([#1201](https://github.com/typeorm/typeorm/issues/1201)) +- fixed bug where `findByIds` would return values with an empty array ([#1118](https://github.com/typeorm/typeorm/issues/1118)) +- fixed bug in MigrationExecutor that didn't release created query builder ([#1201](https://github.com/typeorm/typeorm/issues/1201)) ## 0.1.4 -* fixed bug in mysql driver that generated wrong query when using skip ([#1099](https://github.com/typeorm/typeorm/issues/1099)) -* added option to create query builder from repository without alias([#1084](https://github.com/typeorm/typeorm/issues/1084)) -* fixed bug that made column option "select" unusable ([#1110](https://github.com/typeorm/typeorm/issues/1110)) -* fixed bug that generated mongodb projects what don't work ([#1119](https://github.com/typeorm/typeorm/issues/1119)) +- fixed bug in mysql driver that generated wrong query when using skip ([#1099](https://github.com/typeorm/typeorm/issues/1099)) +- added option to create query builder from repository without alias([#1084](https://github.com/typeorm/typeorm/issues/1084)) +- fixed bug that made column option "select" unusable ([#1110](https://github.com/typeorm/typeorm/issues/1110)) +- fixed bug that generated mongodb projects what don't work ([#1119](https://github.com/typeorm/typeorm/issues/1119)) ## 0.1.3 -* added support for `sql.js`. To use it you just need to install `npm i sql.js` and use `sqljs` as driver type ([#894](https://github.com/typeorm/typeorm/pull/894)). -* added explicit require() statements for drivers ([#1143](https://github.com/typeorm/typeorm/pull/1143)) -* fixed bug where wrong query is generated with multiple primary keys ([#1146](https://github.com/typeorm/typeorm/pull/1146)) -* fixed bug for oracle driver where connect method was wrong ([#1177](https://github.com/typeorm/typeorm/pull/1177)) +- added support for `sql.js`. To use it you just need to install `npm i sql.js` and use `sqljs` as driver type ([#894](https://github.com/typeorm/typeorm/pull/894)). +- added explicit require() statements for drivers ([#1143](https://github.com/typeorm/typeorm/pull/1143)) +- fixed bug where wrong query is generated with multiple primary keys ([#1146](https://github.com/typeorm/typeorm/pull/1146)) +- fixed bug for oracle driver where connect method was wrong ([#1177](https://github.com/typeorm/typeorm/pull/1177)) ## 0.1.2 -* sqlite now supports relative database file paths ([#798](https://github.com/typeorm/typeorm/issues/798) and [#799](https://github.com/typeorm/typeorm/issues/799)) -* fixed bug with not properly working `update` method ([#1037](https://github.com/typeorm/typeorm/issues/1037), [#1042](https://github.com/typeorm/typeorm/issues/1042)) -* fixed bug with replication support ([#1035](https://github.com/typeorm/typeorm/pull/1035)) -* fixed bug with wrong embedded column names being generated ([#969](https://github.com/typeorm/typeorm/pull/969)) -* added support for caching in respositories ([#1057](https://github.com/typeorm/typeorm/issues/1057)) -* added support for the `citext` column type for postgres ([#1075](https://github.com/typeorm/typeorm/pull/1075)) +- sqlite now supports relative database file paths ([#798](https://github.com/typeorm/typeorm/issues/798) and [#799](https://github.com/typeorm/typeorm/issues/799)) +- fixed bug with not properly working `update` method ([#1037](https://github.com/typeorm/typeorm/issues/1037), [#1042](https://github.com/typeorm/typeorm/issues/1042)) +- fixed bug with replication support ([#1035](https://github.com/typeorm/typeorm/pull/1035)) +- fixed bug with wrong embedded column names being generated ([#969](https://github.com/typeorm/typeorm/pull/969)) +- added support for caching in respositories ([#1057](https://github.com/typeorm/typeorm/issues/1057)) +- added support for the `citext` column type for postgres ([#1075](https://github.com/typeorm/typeorm/pull/1075)) ## 0.1.1 -* added support for `pg-native` for postgres (#975). To use it you just need to install `npm i pg-native` and it will be picked up automatically. -* now Find Options support `-1` and `1` for `DESC` and `ASC` values. This is better user experience for MongoDB users. -* now inheritances in embeddeds are supported (#966). -* `isArray: boolean` in `ColumnOptions` is deprecated. Use `array: boolean` instead. -* deprecated `removeById` method, now use `deleteById` method instead. -* added `insert` and `delete` methods into repository and entity manager. -* fixed multiple issues with `update`, `updateById` and `removeById` methods in repository and entity manager. Now they do not use `save` and `remove` methods anymore - instead they are using QueryBuilder to build and execute their queries. -* now `save` method can accept partial entities. -* removed opencollective dependency. -* fixed issues with bulk entity insertions. -* find* methods now can find by embed conditions. -* fixed issues with multiple schema support, added option to `@JoinTable` to support schema and database. -* multiple small bugfixes. +- added support for `pg-native` for postgres (#975). To use it you just need to install `npm i pg-native` and it will be picked up automatically. +- now Find Options support `-1` and `1` for `DESC` and `ASC` values. This is better user experience for MongoDB users. +- now inheritances in embeddeds are supported (#966). +- `isArray: boolean` in `ColumnOptions` is deprecated. Use `array: boolean` instead. +- deprecated `removeById` method, now use `deleteById` method instead. +- added `insert` and `delete` methods into repository and entity manager. +- fixed multiple issues with `update`, `updateById` and `removeById` methods in repository and entity manager. Now they do not use `save` and `remove` methods anymore - instead they are using QueryBuilder to build and execute their queries. +- now `save` method can accept partial entities. +- removed opencollective dependency. +- fixed issues with bulk entity insertions. +- find\* methods now can find by embed conditions. +- fixed issues with multiple schema support, added option to `@JoinTable` to support schema and database. +- multiple small bugfixes. ## 0.1.0 #### BREAKING CHANGES -* `Table`, `AbstractTable`, `ClassTableChild`, `ClosureTable`, `EmbeddableTable`, `SingleTableChild` deprecated decorators were removed. Use `Entity`, `ClassEntityChild`, `ClosureEntity`, `SingleEntityChild` decorators instead. -* `EntityManager#create`, `Repository#create`, `EntityManager#preload`, `Repository#preload`, `EntityManager#merge`, `Repository#merge` methods now accept `DeepPartial` instead of `Object`. -* `EntityManager#merge`, `Repository#merge` methods first argument is now an entity where to need to merge all given entity-like objects. -* changed `find*` repository methods. Now conditions are `Partial` type. -* removed `FindOptions` interface and introduced two new interfaces: `FindOneOptions` and `FindManyOptions` - each for its own `findOne*` or `find*` methods. -* dropped out some of options of `FindOptions`. Use `QueryBuilder` instead. However, added few new options as well. -* deprecated method `addParameters` has been removed from `QueryBuilder`. Use `setParameters` instead. -* removed `setMaxResults`, `setFirstResult` methods in `QueryBuilder`. Use `take` and `skip` methods instead. -* renamed `entityManager` to `manager` in `Connection`, `AbstractRepository` and event objects. `entityManager` property was removed. -* renamed `persist` to `save` in `EntityManager` and `Repository` objects. `persist` method was removed. -* `SpecificRepository` is removed. Use relational query builder functionality instead. -* `transaction` method has been removed from `Repository`. Use `EntityManager#transaction` method instead. -* custom repositories do not support container anymore. -* controller / subscriber / migrations from options tsconfig now appended with a project root directory -* removed naming strategy decorator, naming strategy by name functionality. Now naming strategy should be registered by passing naming strategy instance directly. -* `driver` section in connection options now deprecated. All settings should go directly to connection options root. -* removed `fromTable` from the `QueryBuilder`. Now use regular `from` to select from tables. -* removed `usePool` option from the connection options. Pooling now is always enabled. -* connection options interface has changed and now each platform has its own set of connection options. -* `storage` in sqlite options has been renamed to `database`. -* env variable names for connection were changed (`TYPEORM_DRIVER_TYPE` has been renamed to `TYPEORM_CONNECTION`, some other renaming). More env variable names you can find in `ConnectionOptionsEnvReader` class. -* some api changes in `ConnectionManager` and `createConnection` / `createConnections` methods of typeorm main entrypoint. -* `simple_array` column type now is called `simple-array` -* some column types were removed. Now orm uses column types of underlying database. -* now `number` type in column definitions (like `@Column() likes: number`) maps to `integer` instead of `double`. This is more programmatic design. If you need to store float-pointing values - define a type explicitly. -* `fixedLength` in column options has been removed. Now actual column types can be used, e.g. `@Column("char")` or `@Column("varchar")`. -* `timezone` option has been removed from column options. Now corresponding database types can be used instead. -* `localTimezone` has been removed from the column options. -* `skipSchemaSync` in entity options has been renamed to `skipSync`. -* `setLimit` and `setOffset` in `QueryBuilder` were renamed into `limit` and `offset`. -* `nativeInterface` has been removed from a driver interface and implementations. -* now typeorm works with the latest version of mssql (version 4). -* fixed how orm creates default values for SqlServer - now it creates constraints for it as well. -* migrations interface has changed - now `up` and `down` accept only `QueryRunner`. To use `Connection` and `EntityManager` use properties of `QueryRunner`, e.g. `queryRunner.connection` and `queryRunner.manager`. -* now `update` method in `QueryBuilder` accepts `Partial` and property names used in update map are column property names and they are automatically mapped to column names. -* `SpecificRepository` has been removed. Instead new `RelationQueryBuilder` was introduced. -* `getEntitiesAndRawResults` of `QueryBuilder` has been renamed to `getRawAndEntities`. -* in mssql all constraints are now generated using table name in their names - this is fixes issues with duplicate constraint names. -* now when object is loaded from the database all its columns with null values will be set into entity properties as null. Also after saving entity with unset properties that will be stored as nulls - their (properties) values will be set to null. -* create and update dates in entities now use date with fractional seconds. -* `@PrimaryGeneratedColumn` decorator now accept generation strategy as first argument (default is `increment`), instead of column type. Column type must be passed in options object, e.g. `@PrimaryGeneratedColumn({ type: "bigint"})`. -* `@PrimaryColumn` now does not accept `generated` parameter in options. Use `@Generated` or `@PrimaryGeneratedColumn` decorators instead. -* Logger interface has changed. Custom logger supply mechanism has changed. -* Now `logging` options in connection options is simple "true", or "all", or list of logging modes can be supplied. -* removed `driver` section in connection options. Define options right in the connection options section. -* `Embedded` decorator is deprecated now. use `@Column(type => SomeEmbedded)` instead. -* `schemaName` in connection options is removed. Use `schema` instead. -* `TYPEORM_AUTO_SCHEMA_SYNC` env variable is now called `TYPEORM_SYNCHRONIZE`. -* `schemaSync` method in `Connection` has been renamed to `synchronize`. -* `getEntityManager` has been deprecated. Use `getManager` instead. -* `@TransactionEntityManager` is now called `@TransactionManager` now. -* `EmbeddableEntity`, `Embedded`, `AbstractEntity` decorators has been removed. There is no need to use `EmbeddableEntity` and `AbstractEntity` decorators at all - entity will work as expected without them. Instead of `@Embedded(type => X)` decorator now `@Column(type => X)` must be used instead. -* `tablesPrefix`, `autoSchemaSync`, `autoMigrationsRun`, `dropSchemaOnConnection` options were removed. Use `entityPrefix`, `synchronize`, `migrationsRun`, `dropSchema` options instead. -* removed `persist` method from the `Repository` and `EntityManager`. Use `save` method instead. -* removed `getEntityManager` from `typeorm` namespace. Use `getManager` method instead. -* refactored how query runner works, removed query runner provider -* renamed `TableSchema` into `Table` -* renamed `ColumnSchema` into `TableColumn` -* renamed `ForeignKeySchema` into `TableForeignKey` -* renamed `IndexSchema` into `TableIndex` -* renamed `PrimaryKeySchema` into `TablePrimaryKey` +- `Table`, `AbstractTable`, `ClassTableChild`, `ClosureTable`, `EmbeddableTable`, `SingleTableChild` deprecated decorators were removed. Use `Entity`, `ClassEntityChild`, `ClosureEntity`, `SingleEntityChild` decorators instead. +- `EntityManager#create`, `Repository#create`, `EntityManager#preload`, `Repository#preload`, `EntityManager#merge`, `Repository#merge` methods now accept `DeepPartial` instead of `Object`. +- `EntityManager#merge`, `Repository#merge` methods first argument is now an entity where to need to merge all given entity-like objects. +- changed `find*` repository methods. Now conditions are `Partial` type. +- removed `FindOptions` interface and introduced two new interfaces: `FindOneOptions` and `FindManyOptions` - each for its own `findOne*` or `find*` methods. +- dropped out some of options of `FindOptions`. Use `QueryBuilder` instead. However, added few new options as well. +- deprecated method `addParameters` has been removed from `QueryBuilder`. Use `setParameters` instead. +- removed `setMaxResults`, `setFirstResult` methods in `QueryBuilder`. Use `take` and `skip` methods instead. +- renamed `entityManager` to `manager` in `Connection`, `AbstractRepository` and event objects. `entityManager` property was removed. +- renamed `persist` to `save` in `EntityManager` and `Repository` objects. `persist` method was removed. +- `SpecificRepository` is removed. Use relational query builder functionality instead. +- `transaction` method has been removed from `Repository`. Use `EntityManager#transaction` method instead. +- custom repositories do not support container anymore. +- controller / subscriber / migrations from options tsconfig now appended with a project root directory +- removed naming strategy decorator, naming strategy by name functionality. Now naming strategy should be registered by passing naming strategy instance directly. +- `driver` section in connection options now deprecated. All settings should go directly to connection options root. +- removed `fromTable` from the `QueryBuilder`. Now use regular `from` to select from tables. +- removed `usePool` option from the connection options. Pooling now is always enabled. +- connection options interface has changed and now each platform has its own set of connection options. +- `storage` in sqlite options has been renamed to `database`. +- env variable names for connection were changed (`TYPEORM_DRIVER_TYPE` has been renamed to `TYPEORM_CONNECTION`, some other renaming). More env variable names you can find in `ConnectionOptionsEnvReader` class. +- some api changes in `ConnectionManager` and `createConnection` / `createConnections` methods of typeorm main entrypoint. +- `simple_array` column type now is called `simple-array` +- some column types were removed. Now orm uses column types of underlying database. +- now `number` type in column definitions (like `@Column() likes: number`) maps to `integer` instead of `double`. This is more programmatic design. If you need to store float-pointing values - define a type explicitly. +- `fixedLength` in column options has been removed. Now actual column types can be used, e.g. `@Column("char")` or `@Column("varchar")`. +- `timezone` option has been removed from column options. Now corresponding database types can be used instead. +- `localTimezone` has been removed from the column options. +- `skipSchemaSync` in entity options has been renamed to `skipSync`. +- `setLimit` and `setOffset` in `QueryBuilder` were renamed into `limit` and `offset`. +- `nativeInterface` has been removed from a driver interface and implementations. +- now typeorm works with the latest version of mssql (version 4). +- fixed how orm creates default values for SqlServer - now it creates constraints for it as well. +- migrations interface has changed - now `up` and `down` accept only `QueryRunner`. To use `Connection` and `EntityManager` use properties of `QueryRunner`, e.g. `queryRunner.connection` and `queryRunner.manager`. +- now `update` method in `QueryBuilder` accepts `Partial` and property names used in update map are column property names and they are automatically mapped to column names. +- `SpecificRepository` has been removed. Instead new `RelationQueryBuilder` was introduced. +- `getEntitiesAndRawResults` of `QueryBuilder` has been renamed to `getRawAndEntities`. +- in mssql all constraints are now generated using table name in their names - this is fixes issues with duplicate constraint names. +- now when object is loaded from the database all its columns with null values will be set into entity properties as null. Also after saving entity with unset properties that will be stored as nulls - their (properties) values will be set to null. +- create and update dates in entities now use date with fractional seconds. +- `@PrimaryGeneratedColumn` decorator now accept generation strategy as first argument (default is `increment`), instead of column type. Column type must be passed in options object, e.g. `@PrimaryGeneratedColumn({ type: "bigint"})`. +- `@PrimaryColumn` now does not accept `generated` parameter in options. Use `@Generated` or `@PrimaryGeneratedColumn` decorators instead. +- Logger interface has changed. Custom logger supply mechanism has changed. +- Now `logging` options in connection options is simple "true", or "all", or list of logging modes can be supplied. +- removed `driver` section in connection options. Define options right in the connection options section. +- `Embedded` decorator is deprecated now. use `@Column(type => SomeEmbedded)` instead. +- `schemaName` in connection options is removed. Use `schema` instead. +- `TYPEORM_AUTO_SCHEMA_SYNC` env variable is now called `TYPEORM_SYNCHRONIZE`. +- `schemaSync` method in `Connection` has been renamed to `synchronize`. +- `getEntityManager` has been deprecated. Use `getManager` instead. +- `@TransactionEntityManager` is now called `@TransactionManager` now. +- `EmbeddableEntity`, `Embedded`, `AbstractEntity` decorators has been removed. There is no need to use `EmbeddableEntity` and `AbstractEntity` decorators at all - entity will work as expected without them. Instead of `@Embedded(type => X)` decorator now `@Column(type => X)` must be used instead. +- `tablesPrefix`, `autoSchemaSync`, `autoMigrationsRun`, `dropSchemaOnConnection` options were removed. Use `entityPrefix`, `synchronize`, `migrationsRun`, `dropSchema` options instead. +- removed `persist` method from the `Repository` and `EntityManager`. Use `save` method instead. +- removed `getEntityManager` from `typeorm` namespace. Use `getManager` method instead. +- refactored how query runner works, removed query runner provider +- renamed `TableSchema` into `Table` +- renamed `ColumnSchema` into `TableColumn` +- renamed `ForeignKeySchema` into `TableForeignKey` +- renamed `IndexSchema` into `TableIndex` +- renamed `PrimaryKeySchema` into `TablePrimaryKey` #### NEW FEATURES -* added `mongodb` support. -* entity now can be saved partially within `update` method. -* added prefix support to embeddeds. -* now embeddeds inside other embeddeds are supported. -* now relations are supported inside embeds. -* now relations for multiple primary keys are generated properly. -* now ormconfig is read from `.env`, `.js`, `.json`, `.yml`, `.xml` formats. -* all database-specific types are supported now. -* now migrations generation in mysql is supported. Use `typeorm migrations:generate` command. -* `getGeneratedQuery` was renamed to `getQuery` in `QueryBuilder`. -* `getSqlWithParameters` was renamed to `getSqlAndParameters` in `QueryBuilder`. -* sql queries are highlighted in console. -* added `@Generated` decorator. It can accept `strategy` option with values `increment` and `uuid`. Default is `increment`. It always generates value for column, except when column defined as `nullable` and user sets `null` value in to column. -* added logging of log-running requests. -* added replication support. -* added custom table schema and database support in `Postgres`, `Mysql` and `Sql Server` drivers. -* multiple bug fixes. -* added ActiveRecord support (by extending BaseEntity) class -* `Connection` how has `createQueryRunner` that can be used to control database connection and its transaction state -* `QueryBuilder` is abstract now and all different kinds of query builders were created for different query types - `SelectQueryBuilder`, `UpdateQueryBuilder`, `InsertQueryBuilder` and `DeleteQueryBuilder` with individual method available. +- added `mongodb` support. +- entity now can be saved partially within `update` method. +- added prefix support to embeddeds. +- now embeddeds inside other embeddeds are supported. +- now relations are supported inside embeds. +- now relations for multiple primary keys are generated properly. +- now ormconfig is read from `.env`, `.js`, `.json`, `.yml`, `.xml` formats. +- all database-specific types are supported now. +- now migrations generation in mysql is supported. Use `typeorm migrations:generate` command. +- `getGeneratedQuery` was renamed to `getQuery` in `QueryBuilder`. +- `getSqlWithParameters` was renamed to `getSqlAndParameters` in `QueryBuilder`. +- sql queries are highlighted in console. +- added `@Generated` decorator. It can accept `strategy` option with values `increment` and `uuid`. Default is `increment`. It always generates value for column, except when column defined as `nullable` and user sets `null` value in to column. +- added logging of log-running requests. +- added replication support. +- added custom table schema and database support in `Postgres`, `Mysql` and `Sql Server` drivers. +- multiple bug fixes. +- added ActiveRecord support (by extending BaseEntity) class +- `Connection` how has `createQueryRunner` that can be used to control database connection and its transaction state +- `QueryBuilder` is abstract now and all different kinds of query builders were created for different query types - `SelectQueryBuilder`, `UpdateQueryBuilder`, `InsertQueryBuilder` and `DeleteQueryBuilder` with individual method available. ## 0.0.11 -* fixes [#341](https://github.com/typeorm/typeorm/issues/341) - issue when trying to create a `OneToOne` relation with -`referencedColumnName` where the relation is not between primary keys - +- fixes [#341](https://github.com/typeorm/typeorm/issues/341) - issue when trying to create a `OneToOne` relation with + `referencedColumnName` where the relation is not between primary keys ## 0.0.10 -* added `ObjectLiteral` and `ObjectType` into main exports -* fixed issue fixes [#345](https://github.com/typeorm/typeorm/issues/345). -* fixed issue with migration not saving into the database correctly. +- added `ObjectLiteral` and `ObjectType` into main exports +- fixed issue fixes [#345](https://github.com/typeorm/typeorm/issues/345). +- fixed issue with migration not saving into the database correctly. Note its a breaking change if you have run migrations before and have records in the database table, make sure to apply corresponding changes. More info in [#360](https://github.com/typeorm/typeorm/issues/360) issue. ## 0.0.9 -* fixed bug with indices from columns are not being inherited from parent entity [#242](https://github.com/typeorm/typeorm/issues/242) -* added support of UUID primary columns (thanks [@seanski](https://github.com/seanski)) -* added `count` method to repository and entity manager (thanks [@aequasi](https://github.com/aequasi)) +- fixed bug with indices from columns are not being inherited from parent entity [#242](https://github.com/typeorm/typeorm/issues/242) +- added support of UUID primary columns (thanks [@seanski](https://github.com/seanski)) +- added `count` method to repository and entity manager (thanks [@aequasi](https://github.com/aequasi)) ## 0.0.8 -* added complete babel support -* added `clear` method to `Repository` and `EntityManager` which allows to truncate entity table -* exported `EntityRepository` in `typeorm/index` -* fixed issue with migration generation in [#239](https://github.com/typeorm/typeorm/pull/239) (thanks to [@Tobias4872](https://github.com/Tobias4872)) -* fixed issue with using extra options with SqlServer [#236](https://github.com/typeorm/typeorm/pull/236) (thanks to [@jmai00](https://github.com/jmai00)) -* fixed issue with non-pooled connections [#234](https://github.com/typeorm/typeorm/pull/234) (thanks to [@benny-medflyt](https://github.com/benny-medflyt)) -* fixed issues: -[#242](https://github.com/typeorm/typeorm/issues/242), -[#240](https://github.com/typeorm/typeorm/issues/240), -[#204](https://github.com/typeorm/typeorm/issues/204), -[#219](https://github.com/typeorm/typeorm/issues/219), -[#233](https://github.com/typeorm/typeorm/issues/233), -[#234](https://github.com/typeorm/typeorm/issues/234) +- added complete babel support +- added `clear` method to `Repository` and `EntityManager` which allows to truncate entity table +- exported `EntityRepository` in `typeorm/index` +- fixed issue with migration generation in [#239](https://github.com/typeorm/typeorm/pull/239) (thanks to [@Tobias4872](https://github.com/Tobias4872)) +- fixed issue with using extra options with SqlServer [#236](https://github.com/typeorm/typeorm/pull/236) (thanks to [@jmai00](https://github.com/jmai00)) +- fixed issue with non-pooled connections [#234](https://github.com/typeorm/typeorm/pull/234) (thanks to [@benny-medflyt](https://github.com/benny-medflyt)) +- fixed issues: + [#242](https://github.com/typeorm/typeorm/issues/242), + [#240](https://github.com/typeorm/typeorm/issues/240), + [#204](https://github.com/typeorm/typeorm/issues/204), + [#219](https://github.com/typeorm/typeorm/issues/219), + [#233](https://github.com/typeorm/typeorm/issues/233), + [#234](https://github.com/typeorm/typeorm/issues/234) ## 0.0.7 -* added custom entity repositories support -* merged typeorm-browser and typeorm libraries into single package -* added `@Transaction` decorator -* added exports to `typeorm/index` for naming strategies -* added shims for browsers using typeorm in frontend models, also added shim to use typeorm -with class-transformer library on the frontend -* fixed issue when socketPath could not be used with mysql driver (thanks @johncoffee) -* all table decorators are renamed to `Entity` (`Table` => `Entity`, `AbstractTable` => `AbstractEntity`, -`ClassTableChild` => `ClassEntityChild`, `ClosureTable` => `ClosureEntity`, `EmbeddableTable` => `EmbeddableEntity`, -`SingleTableChild` => `SingleEntityChild`). This change is required because upcoming versions of orm will work -not only with tables, but also with documents and other database-specific "tables". -Previous decorator names are deprecated and will be removed in the future. -* added custom repositories support. Example in samples directory. -* cascade remove options has been removed from `@ManyToMany`, `@OneToMany` decorators. Also cascade remove is not possible -from two sides of `@OneToOne` relationship now. -* fixed issues with subscribers and transactions -* typeorm now has translation in chinese (thanks [@brookshi](https://github.com/brookshi)) -* added `schemaName` support for postgres database [#152](https://github.com/typeorm/typeorm/issues/152) (thanks [@mingyang91](https://github.com/mingyang91)) -* fixed bug when new column was'nt added properly in sqlite [#157](https://github.com/typeorm/typeorm/issues/157) -* added ability to set different types of values for DEFAULT value of the column [#150](https://github.com/typeorm/typeorm/issues/150) -* added ability to use zero, false and empty string values as DEFAULT values in [#189](https://github.com/typeorm/typeorm/pull/189) (thanks to [@Luke265](https://github.com/Luke265)) -* fixed bug with junction tables persistence (thanks [@Luke265](https://github.com/Luke265)) -* fixed bug regexp in `QueryBuilder` (thanks [@netnexus](https://github.com/netnexus)) -* fixed issues [#202](https://github.com/typeorm/typeorm/issues/202), [#203](https://github.com/typeorm/typeorm/issues/203) (thanks to [@mingyang91](https://github.com/mingyang91)) -* fixed issues -[#159](https://github.com/typeorm/typeorm/issues/159), -[#181](https://github.com/typeorm/typeorm/issues/181), -[#176](https://github.com/typeorm/typeorm/issues/176), -[#192](https://github.com/typeorm/typeorm/issues/192), -[#191](https://github.com/typeorm/typeorm/issues/191), -[#190](https://github.com/typeorm/typeorm/issues/190), -[#179](https://github.com/typeorm/typeorm/issues/179), -[#177](https://github.com/typeorm/typeorm/issues/177), -[#175](https://github.com/typeorm/typeorm/issues/175), -[#174](https://github.com/typeorm/typeorm/issues/174), -[#150](https://github.com/typeorm/typeorm/issues/150), -[#159](https://github.com/typeorm/typeorm/issues/159), -[#173](https://github.com/typeorm/typeorm/issues/173), -[#195](https://github.com/typeorm/typeorm/issues/195), -[#151](https://github.com/typeorm/typeorm/issues/151) +- added custom entity repositories support +- merged typeorm-browser and typeorm libraries into single package +- added `@Transaction` decorator +- added exports to `typeorm/index` for naming strategies +- added shims for browsers using typeorm in frontend models, also added shim to use typeorm + with class-transformer library on the frontend +- fixed issue when socketPath could not be used with mysql driver (thanks @johncoffee) +- all table decorators are renamed to `Entity` (`Table` => `Entity`, `AbstractTable` => `AbstractEntity`, + `ClassTableChild` => `ClassEntityChild`, `ClosureTable` => `ClosureEntity`, `EmbeddableTable` => `EmbeddableEntity`, + `SingleTableChild` => `SingleEntityChild`). This change is required because upcoming versions of orm will work + not only with tables, but also with documents and other database-specific "tables". + Previous decorator names are deprecated and will be removed in the future. +- added custom repositories support. Example in samples directory. +- cascade remove options has been removed from `@ManyToMany`, `@OneToMany` decorators. Also cascade remove is not possible + from two sides of `@OneToOne` relationship now. +- fixed issues with subscribers and transactions +- typeorm now has translation in chinese (thanks [@brookshi](https://github.com/brookshi)) +- added `schemaName` support for postgres database [#152](https://github.com/typeorm/typeorm/issues/152) (thanks [@mingyang91](https://github.com/mingyang91)) +- fixed bug when new column was'nt added properly in sqlite [#157](https://github.com/typeorm/typeorm/issues/157) +- added ability to set different types of values for DEFAULT value of the column [#150](https://github.com/typeorm/typeorm/issues/150) +- added ability to use zero, false and empty string values as DEFAULT values in [#189](https://github.com/typeorm/typeorm/pull/189) (thanks to [@Luke265](https://github.com/Luke265)) +- fixed bug with junction tables persistence (thanks [@Luke265](https://github.com/Luke265)) +- fixed bug regexp in `QueryBuilder` (thanks [@netnexus](https://github.com/netnexus)) +- fixed issues [#202](https://github.com/typeorm/typeorm/issues/202), [#203](https://github.com/typeorm/typeorm/issues/203) (thanks to [@mingyang91](https://github.com/mingyang91)) +- fixed issues + [#159](https://github.com/typeorm/typeorm/issues/159), + [#181](https://github.com/typeorm/typeorm/issues/181), + [#176](https://github.com/typeorm/typeorm/issues/176), + [#192](https://github.com/typeorm/typeorm/issues/192), + [#191](https://github.com/typeorm/typeorm/issues/191), + [#190](https://github.com/typeorm/typeorm/issues/190), + [#179](https://github.com/typeorm/typeorm/issues/179), + [#177](https://github.com/typeorm/typeorm/issues/177), + [#175](https://github.com/typeorm/typeorm/issues/175), + [#174](https://github.com/typeorm/typeorm/issues/174), + [#150](https://github.com/typeorm/typeorm/issues/150), + [#159](https://github.com/typeorm/typeorm/issues/159), + [#173](https://github.com/typeorm/typeorm/issues/173), + [#195](https://github.com/typeorm/typeorm/issues/195), + [#151](https://github.com/typeorm/typeorm/issues/151) ## 0.0.6 -* added `JSONB` support for Postgres in #126 (thanks [@CreepGin](https://github.com/CreepGin)@CreepGin) -* fixed in in sqlite query runner in #141 (thanks [@marcinwadon](https://github.com/marcinwadon)) -* added shortcut exports for table schema classes in #135 (thanks [@eduardoweiland](https://github.com/eduardoweiland)) -* fixed bugs with single table inheritance in #132 (thanks [@eduardoweiland](https://github.com/eduardoweiland)) -* fixed issue with `TIME` column in #134 (thanks [@cserron](https://github.com/cserron)) -* fixed issue with relation id in #138 (thanks [@mingyang91](https://github.com/mingyang91)) -* fixed bug when URL for pg was parsed incorrectly #114 (thanks [@mingyang91](https://github.com/mingyang91)) -* fixed bug when embedded is not being updated -* metadata storage now in global variable -* entities are being loaded in migrations and can be used throw the entity manager or their repositories -* migrations now accept `EntityMetadata` which can be used within one transaction -* fixed issue with migration running on windows #140 -* fixed bug with with Class Table Inheritance #144 +- added `JSONB` support for Postgres in #126 (thanks [@CreepGin](https://github.com/CreepGin)@CreepGin) +- fixed in in sqlite query runner in #141 (thanks [@marcinwadon](https://github.com/marcinwadon)) +- added shortcut exports for table schema classes in #135 (thanks [@eduardoweiland](https://github.com/eduardoweiland)) +- fixed bugs with single table inheritance in #132 (thanks [@eduardoweiland](https://github.com/eduardoweiland)) +- fixed issue with `TIME` column in #134 (thanks [@cserron](https://github.com/cserron)) +- fixed issue with relation id in #138 (thanks [@mingyang91](https://github.com/mingyang91)) +- fixed bug when URL for pg was parsed incorrectly #114 (thanks [@mingyang91](https://github.com/mingyang91)) +- fixed bug when embedded is not being updated +- metadata storage now in global variable +- entities are being loaded in migrations and can be used throw the entity manager or their repositories +- migrations now accept `EntityMetadata` which can be used within one transaction +- fixed issue with migration running on windows #140 +- fixed bug with with Class Table Inheritance #144 ## 0.0.5 -* changed `getScalarMany` to `getRawMany` in `QueryBuilder` -* changed `getScalarOne` to `getRawOne` in `QueryBuilder` -* added migrations support +- changed `getScalarMany` to `getRawMany` in `QueryBuilder` +- changed `getScalarOne` to `getRawOne` in `QueryBuilder` +- added migrations support ## 0.0.4 -* fixed problem when `order by` is used with `limit` -* fixed problem when `decorators-shim.d.ts` exist and does not allow to import decorators (treats like they exist in global) -* fixed Sql Server driver bugs +- fixed problem when `order by` is used with `limit` +- fixed problem when `decorators-shim.d.ts` exist and does not allow to import decorators (treats like they exist in global) +- fixed Sql Server driver bugs ## 0.0.3 -* completely refactored persistence mechanism: - * added experimental support of `{ nullable: true }` in relations - * cascade operations should work better now - * optimized all queries - * entities with recursive entities should be persisted correctly now -* now `undefined` properties are skipped in the persistence operation, as well as `undefined` relations. -* added platforms abstractions to allow typeorm to work on multiple platforms -* added experimental support of typeorm in the browser -* breaking changes in `QueryBuilder`: - * `getSingleResult()` renamed to `getOne()` - * `getResults()` renamed to `getMany()` - * `getResultsAndCount()` renamed to `getManyAndCount()` - * in the innerJoin*/leftJoin* methods now no need to specify `ON` - * in the innerJoin*/leftJoin* methods no longer supports parameters, use `addParameters` or `setParameter` instead. - * `setParameters` is now works just like `addParameters` (because previous behaviour confused users), - `addParameters` now is deprecated - * `getOne` returns `Promise` -* breaking changes in `Repository` and `EntityManager`: - * `findOne` and .findOneById` now return `Promise` instead of `Promise` -* now typeorm is compiled into `ES5` instead of `ES6` - this allows to run it on older versions of node.js -* fixed multiple issues with dates and utc-related stuff -* multiple bugfixes +- completely refactored persistence mechanism: + - added experimental support of `{ nullable: true }` in relations + - cascade operations should work better now + - optimized all queries + - entities with recursive entities should be persisted correctly now +- now `undefined` properties are skipped in the persistence operation, as well as `undefined` relations. +- added platforms abstractions to allow typeorm to work on multiple platforms +- added experimental support of typeorm in the browser +- breaking changes in `QueryBuilder`: + - `getSingleResult()` renamed to `getOne()` + - `getResults()` renamed to `getMany()` + - `getResultsAndCount()` renamed to `getManyAndCount()` + - in the innerJoin*/leftJoin* methods now no need to specify `ON` + - in the innerJoin*/leftJoin* methods no longer supports parameters, use `addParameters` or `setParameter` instead. + - `setParameters` is now works just like `addParameters` (because previous behaviour confused users), + `addParameters` now is deprecated + - `getOne` returns `Promise` +- breaking changes in `Repository` and `EntityManager`: + - `findOne` and .findOneById`now return`Promise`instead of`Promise` +- now typeorm is compiled into `ES5` instead of `ES6` - this allows to run it on older versions of node.js +- fixed multiple issues with dates and utc-related stuff +- multiple bugfixes ## 0.0.2 -* lot of API refactorings -* complete support TypeScript 2 -* optimized schema creation -* command line tools -* multiple drivers support -* multiple bugfixes +- lot of API refactorings +- complete support TypeScript 2 +- optimized schema creation +- command line tools +- multiple drivers support +- multiple bugfixes ## 0.0.1 -* first stable version, works with TypeScript 1.x +- first stable version, works with TypeScript 1.x diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9361edd724..6d2cc3c1f3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,14 +11,10 @@ As a contributor, here are the guidelines we would like you to follow: ## Got a Question or Problem? -There are several ways how you can ask your question: +If you have a question or want community support: * You can create a question on [StackOverflow](https://stackoverflow.com/questions/tagged/typeorm) where the questions should be tagged with tag `typeorm`. -* You can ask on [Slack](https://join.slack.com/t/typeorm/shared_invite/zt-uu12ljeb-OH_0086I379fUDApYJHNuw) -* You can create issue on [github](https://github.com/typeorm/typeorm/issues) -* If you have a Skype then try to find me there (`Umed Khudoiberdiev`) - -Preferred way if you create your question on StackOverflow, or create a github issue. +* You can ask on [Discord](https://discord.gg/cC9hkmUgNa) ## Found a security vulnerability? diff --git a/DEVELOPER.md b/DEVELOPER.md index d79cf04e34..da83248ce9 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -57,10 +57,6 @@ Install all TypeORM dependencies by running this command: npm install ``` -During installation, you may have some problems with some dependencies. -For example to properly install oracle driver you need to follow all instructions from - [node-oracle documentation](https://github.com/oracle/node-oracledb). - ## ORM config To create an initial `ormconfig.json` file, run the following command: @@ -174,41 +170,3 @@ in the root of the project. Once all images are fetched and run you can run test - The docker image of mssql-server needs at least 3.25GB of RAM. - Make sure to assign enough memory to the Docker VM if you're running on Docker for Mac or Windows - -### Oracle XE - -In order to run tests on Oracle XE locally, we need to start 2 docker containers: - -- a container with Oracle XE database -- a container with typeorm and its tests - -#### 1. Booting Oracle XE database - -Execute in shell the next command: - -```shell -docker-compose up -d oracle -``` - -It will start an oracle instance only. -The instance will be run in background, -therefore, we need to stop it later on. - -#### 2. Booting typeorm for Oracle - -Execute in shell the next command: - -```shell -docker-compose -f docker-compose.oracle.yml up -``` - -it will start a nodejs instance which builds typeorm and executes unit tests. -The instance exits after the run. - -#### 3. Shutting down Oracle XE database - -Execute in shell the next command: - -```shell -docker-compose down -``` diff --git a/LICENSE b/LICENSE index 658f056da0..e6d5739a62 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License -Copyright (c) 2015-2022 TypeORM. http://typeorm.github.io +Copyright (c) 2015-2024 TypeORM. http://typeorm.github.io Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README-zh_CN.md b/README-zh_CN.md index ab0ff83564..c7729bd779 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -20,7 +20,7 @@
-TypeORM 是一个 [ORM](https://en.wikipedia.org/wiki/Object-relational_mapping) 框架,它可以运行在 NodeJS、Browser、Cordova、PhoneGap、Ionic、React Native、Expo 和 Electron 平台上,可以与 TypeScript 和 JavaScript (ES5,ES6,ES7,ES8)一起使用。 它的目标是始终支持最新的 JavaScript 特性并提供额外的特性以帮助你开发任何使用数据库的(不管是只有几张表的小型应用还是拥有多数据库的大型企业应用)应用程序。 +TypeORM 是一个 [ORM](https://en.wikipedia.org/wiki/Object-relational_mapping) 框架,它可以运行在 NodeJS、Browser、Cordova、PhoneGap、Ionic、React Native、Expo 和 Electron 平台上,可以与 TypeScript 和 JavaScript (ES2021)一起使用。 它的目标是始终支持最新的 JavaScript 特性并提供额外的特性以帮助你开发任何使用数据库的(不管是只有几张表的小型应用还是拥有多数据库的大型企业应用)应用程序。 不同于现有的所有其他 JavaScript ORM 框架,TypeORM 支持 [Data Mapper](./docs/zh_CN/active-record-data-mapper.md#什么是data-mapper模式) 和 [Active Record](./docs/zh_CN/active-record-data-mapper.md#什么是active-record模式) 模式,这意味着你可以以最高效的方式编写高质量的、松耦合的、可扩展的、可维护的应用程序。 @@ -1153,7 +1153,6 @@ let photos = await connection 这几个扩展可以简化 TypeORM 的使用,并将其与其他模块集成: -- [TypeORM + GraphQL framework](http://vesper-framework.com) - [TypeORM integration](https://github.com/typeorm/typeorm-typedi-extensions) with [TypeDI](https://github.com/pleerock/typedi) - [TypeORM integration](https://github.com/typeorm/typeorm-routing-controllers-extensions) with [routing-controllers](https://github.com/pleerock/routing-controllers) - 从现有数据库生成模型 - [typeorm-model-generator](https://github.com/Kononnable/typeorm-model-generator) diff --git a/README.md b/README.md index 7ef29dc6d1..a7d3186240 100644 --- a/README.md +++ b/README.md @@ -13,29 +13,33 @@ Codecov - - -

TypeORM is an [ORM](https://en.wikipedia.org/wiki/Object-relational_mapping) that can run in NodeJS, Browser, Cordova, PhoneGap, Ionic, React Native, NativeScript, Expo, and Electron platforms -and can be used with TypeScript and JavaScript (ES5, ES6, ES7, ES8). +and can be used with TypeScript and JavaScript (ES2021). Its goal is to always support the latest JavaScript features and provide additional features that help you to develop any kind of application that uses databases - from -small applications with a few tables to large scale enterprise applications +small applications with a few tables to large-scale enterprise applications with multiple databases. TypeORM supports both [Active Record](./docs/active-record-data-mapper.md#what-is-the-active-record-pattern) and [Data Mapper](./docs/active-record-data-mapper.md#what-is-the-data-mapper-pattern) patterns, unlike all other JavaScript ORMs currently in existence, -which means you can write high quality, loosely coupled, scalable, -maintainable applications the most productive way. +which means you can write high-quality, loosely coupled, scalable, +maintainable applications in the most productive way. TypeORM is highly influenced by other ORMs, such as [Hibernate](http://hibernate.org/orm/), [Doctrine](http://www.doctrine-project.org/) and [Entity Framework](https://www.asp.net/entity-framework). +> **📣 Announcement: The Future of TypeORM** +> +> We’re excited to share our vision for a revitalized TypeORM—a strategy focused on building a stable, robust, and sustainable foundation for the long term. Learn how we’re structuring maintenance +> and bringing together dedicated resources to ensure TypeORM thrives for years to come. +> +> [Read the full announcement](./docs/future-of-typeorm.md) + ## Features - Supports both [DataMapper](./docs/active-record-data-mapper.md#what-is-the-data-mapper-pattern) and [ActiveRecord](./docs/active-record-data-mapper.md#what-is-the-active-record-pattern) (your choice). @@ -43,10 +47,10 @@ TypeORM is highly influenced by other ORMs, such as [Hibernate](http://hibernate - Database-specific column types. - Entity manager. - Repositories and custom repositories. -- Clean object relational model. +- Clean object-relational model. - Associations (relations). - Eager and lazy relations. -- Uni-directional, bi-directional and self-referenced relations. +- Uni-directional, bi-directional, and self-referenced relations. - Supports multiple inheritance patterns. - Cascades. - Indices. @@ -55,7 +59,7 @@ TypeORM is highly influenced by other ORMs, such as [Hibernate](http://hibernate - Connection pooling. - Replication. - Using multiple database instances. -- Working with multiple databases types. +- Working with multiple database types. - Cross-database and cross-schema queries. - Elegant-syntax, flexible and powerful QueryBuilder. - Left and inner joins. @@ -71,7 +75,7 @@ TypeORM is highly influenced by other ORMs, such as [Hibernate](http://hibernate - Works in NodeJS / Browser / Ionic / Cordova / React Native / NativeScript / Expo / Electron platforms. - TypeScript and JavaScript support. - ESM and CommonJS support. -- Produced code is performant, flexible, clean and maintainable. +- Produced code is performant, flexible, clean, and maintainable. - Follows all possible best practices. - CLI. @@ -361,7 +365,7 @@ This guide will show you how to set up TypeORM from scratch and make it do what ### Create a model -Working with a database starts from creating tables. +Working with a database starts with creating tables. How do you tell TypeORM to create a database table? The answer is - through the models. Your models in your app are your database tables. @@ -409,7 +413,7 @@ export class Photo { Now, a database table will be created for the `Photo` entity and we'll be able to work with it anywhere in our app. We have created a database table, however, what table can exist without columns? -Let's create few columns in our database table. +Let's create a few columns in our database table. ### Adding table columns @@ -441,7 +445,7 @@ export class Photo { } ``` -Now `id`, `name`, `description`, `filename`, `views` and `isPublished` columns will be added to the `photo` table. +Now `id`, `name`, `description`, `filename`, `views`, and `isPublished` columns will be added to the `photo` table. Column types in the database are inferred from the property types you used, e.g. `number` will be converted into `integer`, `string` into `varchar`, `boolean` into `bool`, etc. But you can use any column type your database supports by explicitly specifying a column type into the `@Column` decorator. @@ -515,7 +519,7 @@ export class Photo { Next, let's fix our data types. By default, the string is mapped to a varchar(255)-like type (depending on the database type). The number is mapped to an integer-like type (depending on the database type). We don't want all our columns to be limited varchars or integers. -Let's setup correct data types: +Let's setup the correct data types: ```typescript import { Entity, Column, PrimaryGeneratedColumn } from "typeorm" @@ -569,7 +573,7 @@ const AppDataSource = new DataSource({ logging: false, }) -// to initialize initial connection with the database, register all entities +// to initialize the initial connection with the database, register all entities // and "synchronize" database schema, call "initialize()" method of a newly created database // once in your application bootstrap AppDataSource.initialize() @@ -583,7 +587,7 @@ We are using Postgres in this example, but you can use any other supported datab To use another database, simply change the `type` in the options to the database type you are using: `mysql`, `mariadb`, `postgres`, `cockroachdb`, `sqlite`, `mssql`, `oracle`, `sap`, `spanner`, `cordova`, `nativescript`, `react-native`, `expo`, or `mongodb`. -Also make sure to use your own host, port, username, password and database settings. +Also make sure to use your own host, port, username, password, and database settings. We added our Photo entity to the list of entities for this data source. Each entity you are using in your connection must be listed there. @@ -815,7 +819,7 @@ If you run the app, you'll see a newly generated table, and it will contain a co ### Save a one-to-one relation -Now let's save a photo, its metadata and attach them to each other. +Now let's save a photo, and its metadata and attach them to each other. ```typescript import { Photo } from "./entity/Photo" @@ -954,7 +958,7 @@ export class Photo { Now let's load our photo and its photo metadata in a single query. There are two ways to do it - using `find*` methods or using `QueryBuilder` functionality. -Let's use `find*` methods first. +Let's use `find*` method first. `find*` methods allow you to specify an object with the `FindOneOptions` / `FindManyOptions` interface. ```typescript @@ -1008,7 +1012,7 @@ export class Photo { } ``` -Using `cascade` allows us not to separately save photo and separately save metadata objects now. +Using `cascade` allows us not to separately save photos and separately save metadata objects now. Now we can simply save a photo object, and the metadata object will be saved automatically because of cascade options. ```typescript @@ -1040,7 +1044,7 @@ await photoRepository.save(photo) console.log("Photo is saved, photo metadata is saved too.") ``` -Notice that we now set the photo's `metadata` property, instead of the metadata's `photo` property as before. The `cascade` feature only works if you connect the photo to its metadata from the photo's side. If you set the metadata's side, the metadata would not be saved automatically. +Notice that we now set the photo's `metadata` property, instead of the metadata's `photo` property as before. The `cascade` feature only works if you connect the photo to its metadata from the photo's side. If you set the metadata side, the metadata would not be saved automatically. ### Creating a many-to-one / one-to-many relation @@ -1090,7 +1094,7 @@ export class Photo { } ``` -In many-to-one / one-to-many relation, the owner side is always many-to-one. +In many-to-one / one-to-many relations, the owner side is always many-to-one. It means that the class that uses `@ManyToOne` will store the id of the related object. After you run the application, the ORM will create the `author` table: @@ -1181,7 +1185,7 @@ const options: DataSourceOptions = { } ``` -Now let's insert albums and photos to our database: +Now let's insert albums and photos into our database: ```typescript import { AppDataSource } from "./index" @@ -1257,7 +1261,7 @@ This query selects all published photos with "My" or "Mishka" names. It will select results from position 5 (pagination offset) and will select only 10 results (pagination limit). The selection result will be ordered by id in descending order. -The photo's albums will be left joined and their metadata will be inner joined. +The photo albums will be left joined and their metadata will be inner joined. You'll use the query builder in your application a lot. Learn more about QueryBuilder [here](./docs/select-query-builder.md). @@ -1266,7 +1270,7 @@ Learn more about QueryBuilder [here](./docs/select-query-builder.md). Take a look at the samples in [sample](https://github.com/typeorm/typeorm/tree/master/sample) for examples of usage. -There are a few repositories which you can clone and start with: +There are a few repositories that you can clone and start with: - [Example how to use TypeORM with TypeScript](https://github.com/typeorm/typescript-example) - [Example how to use TypeORM with JavaScript](https://github.com/typeorm/javascript-example) @@ -1288,10 +1292,9 @@ There are a few repositories which you can clone and start with: There are several extensions that simplify working with TypeORM and integrating it with other modules: -- [TypeORM + GraphQL framework](https://github.com/vesper-framework/vesper) - [TypeORM integration](https://github.com/typeorm/typeorm-typedi-extensions) with [TypeDI](https://github.com/pleerock/typedi) - [TypeORM integration](https://github.com/typeorm/typeorm-routing-controllers-extensions) with [routing-controllers](https://github.com/pleerock/routing-controllers) -- Models generation from existing database - [typeorm-model-generator](https://github.com/Kononnable/typeorm-model-generator) +- Models generation from the existing database - [typeorm-model-generator](https://github.com/Kononnable/typeorm-model-generator) - Fixtures loader - [typeorm-fixtures-cli](https://github.com/RobinCK/typeorm-fixtures) - ER Diagram generator - [typeorm-uml](https://github.com/eugene-manuilov/typeorm-uml/) - another ER Diagram generator - [erdia](https://www.npmjs.com/package/erdia/) @@ -1302,7 +1305,7 @@ There are several extensions that simplify working with TypeORM and integrating ## Contributing -Learn about contribution [here](https://github.com/typeorm/typeorm/blob/master/CONTRIBUTING.md) and how to setup your development environment [here](https://github.com/typeorm/typeorm/blob/master/DEVELOPER.md). +Learn about contribution [here](https://github.com/typeorm/typeorm/blob/master/CONTRIBUTING.md) and how to set up your development environment [here](https://github.com/typeorm/typeorm/blob/master/DEVELOPER.md). This project exists thanks to all the people who contribute: diff --git a/README_ko.md b/README_ko.md index 85fe008d00..82fcda1118 100644 --- a/README_ko.md +++ b/README_ko.md @@ -1,7 +1,7 @@ -


Codecov

+ -TypeORM은 NodeJS, Browser, Cordova, PhoneGap, Ionic, React Native, NativeScript, Expo 및 Electron 플랫폼에서 실행할 수 있는 [ORM](https://en.wikipedia.org/wiki/Object-relational_mapping)이며 TypeScript 및 JavaScript(ES5, ES6, ES7, ES8)와 함께 사용할 수 있다. TypeORM의 목표는 항상 최신 JavaScript 기능을 지원하고 몇 개의 테이블이 있는 작은 응용 프로그램에서 여러 데이터베이스가 있는 대규모 엔터프라이즈 응용 프로그램에 이르기까지 데이터베이스를 사용하는 모든 종류의 응용 프로그램을 개발하는 데 도움이 되는 추가 기능을 제공하는 것이다. +TypeORM은 NodeJS, Browser, Cordova, PhoneGap, Ionic, React Native, NativeScript, Expo 및 Electron 플랫폼에서 실행할 수 있는 [ORM](https://en.wikipedia.org/wiki/Object-relational_mapping)이며 TypeScript 및 JavaScript(ES2021)와 함께 사용할 수 있다. TypeORM의 목표는 항상 최신 JavaScript 기능을 지원하고 몇 개의 테이블이 있는 작은 응용 프로그램에서 여러 데이터베이스가 있는 대규모 엔터프라이즈 응용 프로그램에 이르기까지 데이터베이스를 사용하는 모든 종류의 응용 프로그램을 개발하는 데 도움이 되는 추가 기능을 제공하는 것이다. TypeORM은 현재 존재하는 다른 모든 JavaScript ORM과 달리 [Active Record](./docs/active-record-data-mapper.md#what-is-the-active-record-pattern) 및 [Data Mapper](./docs/active-record-data-mapper.md#what-is-the-data-mapper-pattern) 패턴을 모두 지원한다. 즉, 고품질의 느슨하게 결합된 확장 가능하고 유지 관리 가능한 애플리케이션을 가장 생산적인 방식으로 작성할 수 있다. @@ -1155,7 +1155,6 @@ clone하여 시작할 수 있는 몇 가지 리포지토리가 있다: TypeORM 작업을 단순화하고 다른 모듈과 통합하는 몇 가지 확장 방법이 있다: -- [TypeORM + GraphQL 프레임워크](http://vesper-framework.com) - [TypeORM](https://github.com/typeorm/typeorm-typedi-extensions)과 [TypeDI](https://github.com/pleerock/typedi) 통합 - [라우팅 컨트롤러](https://github.com/typeorm/typeorm-routing-controllers-extensions)와 [TypeORM 통합](https://github.com/pleerock/routing-controllers) - 기존 데이터베이스에서 모델 생성 - [typeorm-model-generator](https://github.com/Kononnable/typeorm-model-generator) diff --git a/docker-compose.oracle.yml b/docker-compose.oracle.yml deleted file mode 100644 index f538d08cd8..0000000000 --- a/docker-compose.oracle.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: "3" - -services: - oracle-test: - build: - context: docker/oracle - volumes: - - .:/typeorm - - /typeorm/build - - /typeorm/node_modules - networks: - - typeorm - -networks: - typeorm: diff --git a/docker-compose.yml b/docker-compose.yml index 5ffbc1b584..bbd2fa9aac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,7 @@ version: "3" services: # mysql mysql: + platform: linux/amd64 image: "mysql:5.7.37" container_name: "typeorm-mysql" ports: @@ -38,19 +39,6 @@ services: POSTGRES_PASSWORD: "test" POSTGRES_DB: "test" - postgres-12: - # mdillon/postgis is postgres + PostGIS (only). if you need additional - # extensions, it's probably time to create a purpose-built image with all - # necessary extensions. sorry, and thanks for adding support for them! - image: "postgis/postgis:12-2.5" - container_name: "typeorm-postgres-12" - ports: - - "5532:5432" - environment: - POSTGRES_USER: "test" - POSTGRES_PASSWORD: "test" - POSTGRES_DB: "test" - # mssql mssql: image: "mcr.microsoft.com/mssql/server:2022-latest" @@ -63,20 +51,24 @@ services: # cockroachdb cockroachdb: - image: "cockroachdb/cockroach:v22.1.6" + image: "cockroachdb/cockroach:v23.1.9" container_name: "typeorm-cockroachdb" command: start-single-node --insecure --cache=.25 --store=type=mem,size=.25 ports: - "26257:26257" + # oracle oracle: - image: imnotjames/oracle-xe:18 + build: + context: docker/oracle container_name: "typeorm-oracle" ports: - "1521:1521" - networks: - - default - - typeorm + #volumes: + # - oracle-data:/opt/oracle/oradata + healthcheck: + test: [ "CMD", "/opt/oracle/checkDBStatus.sh" ] + interval: 2s # google cloud spanner spanner: @@ -130,6 +122,3 @@ services: #volumes: # volume-hana-xe: # mysql8_volume: - -networks: - typeorm: diff --git a/docker/oracle/01_init.sql b/docker/oracle/01_init.sql new file mode 100644 index 0000000000..06c4357b17 --- /dev/null +++ b/docker/oracle/01_init.sql @@ -0,0 +1,22 @@ +ALTER SESSION SET CONTAINER = XEPDB1; + +CREATE TABLESPACE typeormspace32 + DATAFILE 'typeormspace32.dbf' + SIZE 100M + AUTOEXTEND ON; + +-- create users: +CREATE USER typeorm IDENTIFIED BY "oracle" DEFAULT TABLESPACE typeormspace32; + +GRANT CREATE SESSION TO typeorm; +GRANT CREATE TABLE TO typeorm; +GRANT CREATE VIEW TO typeorm; +GRANT CREATE MATERIALIZED VIEW TO typeorm; +GRANT CREATE PROCEDURE TO typeorm; +GRANT CREATE SEQUENCE TO typeorm; + +ALTER USER typeorm QUOTA UNLIMITED ON typeormspace32; + +-- set password expiry to unlimited +ALTER PROFILE DEFAULT LIMIT PASSWORD_REUSE_TIME UNLIMITED; +ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED; diff --git a/docker/oracle/Dockerfile b/docker/oracle/Dockerfile index 104a739fdb..7b85195ff2 100644 --- a/docker/oracle/Dockerfile +++ b/docker/oracle/Dockerfile @@ -1,18 +1,8 @@ -FROM node:12 +FROM container-registry.oracle.com/database/express:21.3.0-xe -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get -qq -y install libaio1 && \ - apt-get -q -y autoremove && \ - rm -Rf /var/lib/apt/lists/* +ENV ORACLE_PWD=oracle +ENV ORACLE_SID=XE +COPY 01_init.sql /docker-entrypoint-initdb.d/startup/ +ENV PORT=1521 -WORKDIR /typeorm -ENTRYPOINT ["/docker-entrypoint.sh"] - -COPY . / -RUN chmod 0755 /docker-entrypoint.sh - -ENV PATH="$PATH:/typeorm/node_modules/.bin" -ENV LD_LIBRARY_PATH="/typeorm/node_modules/oracledb/instantclient_19_8/:$LD_LIBRARY_PATH" -ENV BLOB_URL="https://download.oracle.com/otn_software/linux/instantclient/19800/instantclient-basiclite-linux.x64-19.8.0.0.0dbru.zip" - -CMD ["npm", "run", "test-fast"] +EXPOSE ${PORT} diff --git a/docker/oracle/config/ormconfig.json b/docker/oracle/config/ormconfig.json deleted file mode 100644 index 95752587bc..0000000000 --- a/docker/oracle/config/ormconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "skip": false, - "name": "oracle", - "type": "oracle", - "host": "typeorm-oracle", - "username": "system", - "password": "oracle", - "port": 1521, - "sid": "XE", - "logging": false, - "extra": { - "connectString": "typeorm-oracle:1521/XE" - } - } -] diff --git a/docker/oracle/docker-entrypoint.d/030-npm-install.sh b/docker/oracle/docker-entrypoint.d/030-npm-install.sh deleted file mode 100755 index d067948857..0000000000 --- a/docker/oracle/docker-entrypoint.d/030-npm-install.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -# exit when any command fails -set -e - -if [[ $INSTALL == 0 ]] && [[ ! -f ./package.json ]]; then - exit 0 -fi - -INSTALL=0 -if [[ $INSTALL == 0 ]] && [[ "$(ls ./node_modules/ | wc -l | tr -d '\n')" == '0' ]]; then - INSTALL=1 -fi -if [[ $INSTALL == 0 ]] && [[ ! -f ./node_modules/.md5 ]]; then - INSTALL=1 -fi -if [[ $INSTALL == 0 ]] && ! md5sum --check ./node_modules/.md5; then - INSTALL=1 -fi - -if [[ $INSTALL == 1 ]]; then - npm ci --no-optional --ignore-scripts - md5sum ./package-lock.json > ./node_modules/.md5 -fi diff --git a/docker/oracle/docker-entrypoint.d/040-instantclient.sh b/docker/oracle/docker-entrypoint.d/040-instantclient.sh deleted file mode 100755 index b1cdf10073..0000000000 --- a/docker/oracle/docker-entrypoint.d/040-instantclient.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -# exit when any command fails -set -e - -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 - cp /lib/*/libaio.so.* node_modules/oracledb/instantclient_19_8/ -fi - diff --git a/docker/oracle/docker-entrypoint.d/050-npm-compile.sh b/docker/oracle/docker-entrypoint.d/050-npm-compile.sh deleted file mode 100755 index f9b541cf00..0000000000 --- a/docker/oracle/docker-entrypoint.d/050-npm-compile.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -# exit when any command fails -set -e - -npx rimraf build/compiled -npx tsc -cp /config/ormconfig.json build/compiled/ormconfig.json - -if [ ! -f ormconfig.json ]; then - cp ormconfig.json.dist ormconfig.json -fi diff --git a/docker/oracle/docker-entrypoint.sh b/docker/oracle/docker-entrypoint.sh deleted file mode 100755 index 942a12fa92..0000000000 --- a/docker/oracle/docker-entrypoint.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env bash - -set -e - -child_pid=0 -parent_pid=$$ - -catch_exits() { - echo "${0}:stopping ${child_pid}" - kill ${child_pid} & - wait - echo "${0}:stopped ${child_pid}" - - echo "${0}:exit" - exit 0 -} -trap catch_exits TERM KILL INT SIGTERM SIGINT SIGKILL - -fork() { - printf "'%s' " "${@}" | xargs -d "\n" -t sh -c -} - -if [[ ! "${ENTRYPOINT_SKIP}" ]]; then -for file in `ls -v /docker-entrypoint.d/*.sh` - do - echo "${file}:starting" - fork ${file} & - child_pid=$! - echo "${file}:pid ${child_pid}" - wait ${child_pid} - echo "${file}:stopped ${child_pid}" - if [[ "${?}" != "0" ]]; then - exit 1; - fi - done -fi - -echo "${0}:starting" -fork "${@}" & -child_pid=$! -echo "${0}:pid ${child_pid}" -wait ${child_pid} -echo "${0}:stopped ${child_pid}" diff --git a/docs/caching.md b/docs/caching.md index d1000eadad..6bf4f3be1d 100644 --- a/docs/caching.md +++ b/docs/caching.md @@ -137,8 +137,10 @@ Example: cache: { type: "redis", options: { - host: "localhost", - port: 6379 + socket: { + host: "localhost", + port: 6379 + } } } } @@ -240,8 +242,10 @@ Example: cache: { type: "redis", options: { - host: "localhost", - port: 6379 + socket: { + host: "localhost", + port: 6379 + } }, ignoreErrors: true } diff --git a/docs/data-source-options.md b/docs/data-source-options.md index 47d948b0a6..7f77a9f70c 100644 --- a/docs/data-source-options.md +++ b/docs/data-source-options.md @@ -14,6 +14,7 @@ - [`mongodb` data source options](#mongodb-data-source-options) - [`sql.js` data source options](#sqljs-data-source-options) - [`expo` data source options](#expo-data-source-options) +- [`oracle` data source options](#oracle-data-source-options) - [DataSource options example](#data-source-options-example) ## What is `DataSourceOptions` @@ -97,6 +98,9 @@ Different RDBMS-es have their own specific options. - `cache` - Enables entity result caching. You can also configure cache type and other cache options here. Read more about caching [here](caching.md). +- `isolateWhereStatements` - Enables where statement isolation, wrapping each where clause in brackets automatically. + eg. `.where("user.firstName = :search OR user.lastName = :search")` becomes `WHERE (user.firstName = ? OR user.lastName = ?)` instead of `WHERE user.firstName = ? OR user.lastName = ?` + ## `mysql` / `mariadb` data source options - `url` - Connection url where perform connection to. Please note that other data source options will override parameters set from url. @@ -238,6 +242,7 @@ Different RDBMS-es have their own specific options. - `database` - Database name ## `mssql` data source options +Based on [tedious](https://tediousjs.github.io/node-mssql/) MSSQL implementation. See [SqlServerConnectionOptions.ts](..\src\driver\sqlserver\SqlServerConnectionOptions.ts) for details on exposed attributes. - `url` - Connection url where perform connection to. Please note that other data source options will override parameters set from url. @@ -271,9 +276,6 @@ Different RDBMS-es have their own specific options. - `pool.maxWaitingClients` - maximum number of queued requests allowed, additional acquire calls will be callback with an err in a future cycle of the event loop. -- `pool.testOnBorrow` - should the pool validate resources before giving them to clients. Requires that either - `factory.validate` or `factory.validateAsync` to be specified. - - `pool.acquireTimeoutMillis` - max milliseconds an `acquire` call will wait for a resource before timing out. (default no limit), if supplied should non-zero positive integer. @@ -531,6 +533,24 @@ Different RDBMS-es have their own specific options. - `database` - Name of the database. For example, "mydb". - `driver` - The Expo SQLite module. For example, `require('expo-sqlite')`. +## `oracle` data source options + +The following TNS connection string will be used in the next explanations: + +```bash +(DESCRIPTION= + (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521)) + (CONNECT_DATA= + (SID=sales) + (SERVICE_NAME=sales.us.example.com) + (INSTANCE_NAME=sales)) + (SERVER=shared))) +) +``` +- `sid` - The System Identifier (SID) identifies a specific database instance. For example, "sales". +- `serviceName` - The Service Name is an identifier of a database service. For example, `sales.us.example.com`. + + ## Data Source Options example Here is a small example of data source options for mysql: diff --git a/docs/data-source.md b/docs/data-source.md index dc6af1e93a..bede5aac2d 100644 --- a/docs/data-source.md +++ b/docs/data-source.md @@ -8,14 +8,14 @@ Your interaction with the database is only possible once you setup a `DataSource`. TypeORM's `DataSource` holds your database connection settings and -establishes initial database connection or connection pool depending on the RDBMS you use. +establishes the initial database connection or connection pool depending on the RDBMS you use. -In order to establish initial connection / connection pool you must call `initialize` method of your `DataSource` instance. +To establish the initial connection/connection pool, you must call the `initialize` method of your `DataSource` instance. -Disconnection (closing all connections in the pool) is made when `destroy` method is called. +Disconnection (closing all connections in the pool) occurs when the `destroy` method is called. -Generally, you call `initialize` method of the `DataSource` instance on application bootstrap, -and `destroy` it after you completely finished working with the database. +Generally, you call the `initialize` method of the `DataSource` instance on the application bootstrap, +and `destroy` it after you finished working with the database. In practice, if you are building a backend for your site and your backend server always stays running - you never `destroy` a DataSource. @@ -45,11 +45,10 @@ AppDataSource.initialize() }) ``` -It's a good idea to make `AppDataSource` globally available by `export`-ing it, since you'll -use this instance across your application. +It's a good idea to make `AppDataSource` globally available by `export`-ing it since you'll use this instance across your application. -`DataSource` accepts `DataSourceOptions` and those options vary depend on database `type` you use. -For different database types there are different options you can specify. +`DataSource` accepts `DataSourceOptions` and those options vary depending on the database `type` you use. +For different database types, there are different options you can specify. You can define as many data sources as you need in your application, for example: @@ -97,6 +96,6 @@ export class UserController { } ``` -Using `DataSource` instance you can execute database operations with your entities, +Using the `DataSource` instance you can execute database operations with your entities, particularly using `.manager` and `.getRepository()` properties. For more information about them see [Entity Manager and Repository](working-with-entity-manager.md) documentation. diff --git a/docs/delete-query-builder.md b/docs/delete-query-builder.md index 2d77643606..a501d3cc67 100644 --- a/docs/delete-query-builder.md +++ b/docs/delete-query-builder.md @@ -12,7 +12,7 @@ Examples: ```typescript await myDataSource - .createQueryBuilder('users') + .createQueryBuilder() .delete() .from(User) .where("id = :id", { id: 1 }) @@ -33,7 +33,8 @@ Examples: ```typescript await myDataSource - .createQueryBuilder('users') + .getRepository(User) + .createQueryBuilder() .softDelete() .where("id = :id", { id: 1 }) .execute(); @@ -51,7 +52,8 @@ Examples: ```typescript await myDataSource - .createQueryBuilder('users') + .getRepository(User) + .createQueryBuilder() .restore() .where("id = :id", { id: 1 }) .execute(); diff --git a/docs/entities.md b/docs/entities.md index c061f74ef2..81d802508d 100644 --- a/docs/entities.md +++ b/docs/entities.md @@ -1,20 +1,29 @@ # Entities -- [What is Entity?](#what-is-entity) -- [Entity columns](#entity-columns) - - [Primary columns](#primary-columns) - - [Special columns](#special-columns) - - [Spatial columns](#spatial-columns) -- [Column types](#column-types) - - [Column types for `mysql` / `mariadb`](#column-types-for-mysql--mariadb) - - [Column types for `postgres` / `cockroachdb`](#column-types-for-postgres) - - [Column types for `sqlite` / `cordova` / `react-native` / `expo`](#column-types-for-sqlite--cordova--react-native--expo) - - [Column types for `mssql`](#column-types-for-mssql) - - [`enum` column type](#enum-column-type) - - [`simple-array` column type](#simple-array-column-type) - - [`simple-json` column type](#simple-json-column-type) - - [Columns with generated values](#columns-with-generated-values) -- [Column options](#column-options) +- [Entities](#entities) + - [What is Entity?](#what-is-entity) + - [Entity columns](#entity-columns) + - [Primary columns](#primary-columns) + - [Special columns](#special-columns) + - [Spatial columns](#spatial-columns) + - [Column types](#column-types) + - [Column types for `mysql` / `mariadb`](#column-types-for-mysql--mariadb) + - [Column types for `postgres`](#column-types-for-postgres) + - [Column types for `cockroachdb`](#column-types-for-cockroachdb) + - [Column types for `sqlite` / `cordova` / `react-native` / `expo`](#column-types-for-sqlite--cordova--react-native--expo) + - [Column types for `mssql`](#column-types-for-mssql) + - [Column types for `oracle`](#column-types-for-oracle) + - [Column types for `spanner`](#column-types-for-spanner) + - [`enum` column type](#enum-column-type) + - [`set` column type](#set-column-type) + - [`simple-array` column type](#simple-array-column-type) + - [`simple-json` column type](#simple-json-column-type) + - [Columns with generated values](#columns-with-generated-values) + - [Column options](#column-options) + - [Entity inheritance](#entity-inheritance) + - [Tree entities](#tree-entities) + - [Adjacency list](#adjacency-list) + - [Closure table](#closure-table) ## What is Entity? @@ -308,12 +317,10 @@ await dataSource.manager .where( "ST_Distance(geom, ST_SetSRID(ST_GeomFromGeoJSON(:origin), ST_SRID(geom))) > 0", ) - .orderBy({ - "ST_Distance(geom, ST_SetSRID(ST_GeomFromGeoJSON(:origin), ST_SRID(geom)))": - { - order: "ASC", - }, - }) + .orderBy( + "ST_Distance(geom, ST_SetSRID(ST_GeomFromGeoJSON(:origin), ST_SRID(geom)))", + "ASC", + ) .setParameters({ // stringify GeoJSON origin: JSON.stringify(origin), @@ -383,7 +390,8 @@ or `date`, `time`, `time without time zone`, `time with time zone`, `interval`, `bool`, `boolean`, `enum`, `point`, `line`, `lseg`, `box`, `path`, `polygon`, `circle`, `cidr`, `inet`, `macaddr`, `tsvector`, `tsquery`, `uuid`, `xml`, `json`, `jsonb`, `int4range`, `int8range`, `numrange`, -`tsrange`, `tstzrange`, `daterange`, `geometry`, `geography`, `cube`, `ltree` +`tsrange`, `tstzrange`, `daterange`, `int4multirange`, `int8multirange`, `nummultirange`, +`tsmultirange`, `tstzmultirange`, `multidaterange`, `geometry`, `geography`, `cube`, `ltree` ### Column types for `cockroachdb` diff --git a/docs/entity-manager-api.md b/docs/entity-manager-api.md index 3c339c9d86..e0fc0069c5 100644 --- a/docs/entity-manager-api.md +++ b/docs/entity-manager-api.md @@ -183,6 +183,22 @@ await manager.increment(User, { firstName: "Timber" }, "age", 3) await manager.decrement(User, { firstName: "Timber" }, "age", 3) ``` +- `exists` - Check whether any entity exists that matches `FindOptions`. + +```typescript +const exists = await manager.exists(User, { + where: { + firstName: "Timber", + }, +}) +``` + +- `existsBy` - Checks whether any entity exists that matches `FindOptionsWhere`. + +```typescript +const exists = await manager.existsBy(User, { firstName: "Timber" }) +``` + - `count` - Counts entities that match `FindOptions`. Useful for pagination. ```typescript @@ -234,7 +250,7 @@ const [timbers, timbersCount] = await manager.findAndCount(User, { but ignores pagination settings (from and take options). ```typescript -const [timbers, timbersCount] = await manager.findAndCount(User, { +const [timbers, timbersCount] = await manager.findAndCountBy(User, { firstName: "Timber", }) ``` diff --git a/docs/example-with-express.md b/docs/example-with-express.md index 3e41e3b786..ff9e55ff32 100644 --- a/docs/example-with-express.md +++ b/docs/example-with-express.md @@ -153,7 +153,7 @@ Let's create `app-data-source.ts` where we set up initial database connection op ```ts import { DataSource } from "typeorm" -const myDataSource = new DataSource({ +export const myDataSource = new DataSource({ type: "mysql", host: "localhost", port: 3306, diff --git a/docs/find-options.md b/docs/find-options.md index 0c47e88c32..3b93272154 100644 --- a/docs/find-options.md +++ b/docs/find-options.md @@ -606,7 +606,9 @@ SELECT * FROM "post" WHERE "titles" IN ('Go To Statement Considered Harmful', 'S ## Combining Advanced Options -Also you can combine these operators with `Not` operator: +Also you can combine these operators with below: + +- `Not` ```ts import { Not, MoreThan, Equal } from "typeorm" @@ -622,3 +624,35 @@ will execute following query: ```sql SELECT * FROM "post" WHERE NOT("likes" > 10) AND NOT("title" = 'About #2') ``` + +- `Or` + +```ts +import { Not, MoreThan, ILike } from "typeorm" + +const loadedPosts = await dataSource.getRepository(Post).findBy({ + title: Or(Equal("About #2"), ILike("About%")), +}) +``` + +will execute following query: + +```sql +SELECT * FROM "post" WHERE "title" = 'About #2' OR "title" ILIKE 'About%' +``` + +- `And` + +```ts +import { And, Not, Equal, ILike } from "typeorm" + +const loadedPosts = await dataSource.getRepository(Post).findBy({ + title: And(Not(Equal("About #2")), ILike("%About%")), +}) +``` + +will execute following query: + +```sql +SELECT * FROM "post" WHERE NOT("title" = 'About #2') AND "title" ILIKE '%About%' +``` \ No newline at end of file diff --git a/docs/future-of-typeorm.md b/docs/future-of-typeorm.md new file mode 100644 index 0000000000..ca0986f680 --- /dev/null +++ b/docs/future-of-typeorm.md @@ -0,0 +1,50 @@ +# The Future of TypeORM + +> By [David Hoeck (@dlhck)](https://github.com/dlhck) and [Michael Bromley (@michaelbromley)](https://github.com/michaelbromley) + + +TypeORM is one of the most high-performance, feature-rich, and battle-tested ORMs in the Node.js ecosystem, relied upon by hundreds of thousands of projects and companies worldwide. With nearly 2 million downloads each week, it powers countless applications as a critical dependency. However, over the past few years, maintenance has slowed significantly, leading to growing uncertainty about the project’s future among its dedicated community. + +We’re thrilled to announce that Michael Bromley and David Hoeck, under the umbrella of our parent company [Elevantiq](https://elevantiq.com/), are +stepping up to lead TypeORM into its next chapter. At Elevantiq, where we +specialize in enterprise digital commerce solutions, TypeORM is a critical dependency—not +only for [Vendure](https://vendure.io/), our flagship open-source project, but also for many of our other solutions. +With our reliance on TypeORM and the growing needs of its vibrant community, we saw an +opportunity to contribute back and ensure the project remains active, maintained, and secure. + +After discussions with TypeORM’s original maintainers, Umed and Dmitry, we’ve reached an agreement to take on the project’s maintenance, inspired by successful, community-centric open-source projects. One standout model is [the Tauri project](https://github.com/tauri-apps/tauri), a self-governing open-source initiative co-founded by [Daniel](https://github.com/denjell-crabnebula), who we already collaborate with through Michael and Vendure. Our discussions with Tauri have set the foundation for the organizational structure we envision. + +## Our Vision for TypeORM’s Future + +To ensure long-term stability and governance, we plan to establish a non-profit +foundation for TypeORM, likely under the [Commons Conservancy](https://commonsconservancy.org/) in the Netherlands. +This foundation will be led by a board of seven members: Michael and David, +along with five additional board members dedicated to the project’s success. +The board will work closely with a **Working Group** comprising companies, contributors, +and other community members who heavily rely on TypeORM. This collaborative setup will help guide +strategic decisions that align with the needs and goals of TypeORM’s ecosystem. + +## Organizational Structure + +To drive TypeORM forward, we’ll introduce three core domains: + +- **Development**: Led by core developers with expertise across various database engines and adapters, this team will focus on TypeORM’s architecture and ongoing technical maintenance and advancements. +- **Operations**: Handling day-to-day needs, from documentation to sponsorship accounting, this team will keep the project running smoothly. +- **Community**: Dedicated to engaging, moderating, and supporting our growing community, this team will foster collaboration through platforms like Discord. + +## Scaling Sponsorships and Full-Time Development + +A significant part of our strategy is to increase sponsorships, reaching out to +companies and collaborating with organizations like [OSS Pledge](https://opensourcepledge.com/). Our goal is to fund and +employ two full-time developers who will lead the Development team, ensuring ongoing progress +and project maintenance. + +We’re confident that, with this structure, we can build a sustainable future for TypeORM. But the +_success of this vision depends on the support of the community_. +We’ll also remain in close contact with [Umed](https://github.com/pleerock) to keep his insights and vision connected to the project’s evolution. + +## Join Us in Supporting TypeORM + +If your company is interested in starting or expanding its sponsorship with TypeORM, we encourage you to reach out to us directly [via e-mail](mailto:typeorm@elevantiq.com). + +Thank you for your support, and we’re excited to embark on this journey with the TypeORM community! diff --git a/docs/indices.md b/docs/indices.md index b4d8183235..e943245c4c 100644 --- a/docs/indices.md +++ b/docs/indices.md @@ -137,6 +137,19 @@ export class Thing { } ``` +## Concurrent creation + +In order to avoid having to obtain an access exclusive lock when creating and dropping indexes in postgres, you may create them using the CONCURRENTLY modifier. +If you want use the concurrent option, you need set `migrationsTransactionMode: none` between data source options. + +Typeorm supports generating SQL with this option if when the concurrent option is specified on the index. + +```typescript +@Index(["firstName", "middleName", "lastName"], { concurrent: true }) +``` + +For more information see the [postgres documentation](https://www.postgresql.org/docs/current/sql-createindex.html). + ## Disabling synchronization TypeORM does not support some index options and definitions (e.g. `lower`, `pg_trgm`) because of lot of different database specifics and multiple diff --git a/docs/insert-query-builder.md b/docs/insert-query-builder.md index 541711b64c..d01dc4e9f1 100644 --- a/docs/insert-query-builder.md +++ b/docs/insert-query-builder.md @@ -41,7 +41,7 @@ This syntax doesn't escape your values, you need to handle escape on your own. If the values you are trying to insert conflict due to existing data the `orUpdate` function can be used to update specific values on the conflicted target. ```typescript -await datasource +await dataSource .createQueryBuilder() .insert() .into(User) @@ -57,10 +57,28 @@ await datasource .execute() ``` +### IGNORE error (MySQL) or DO NOTHING (Postgres) during insert + +If the values you are trying to insert conflict due to existing data or containing invalid data, the `orIgnore` function can be used to suppress errors and insert only rows that contain valid data. + +```typescript +await dataSource + .createQueryBuilder() + .insert() + .into(User) + .values({ + firstName: "Timber", + lastName: "Saw", + externalId: "abc123", + }) + .orIgnore() + .execute() +``` + ### Skip data update if values have not changed (Postgres) ```typescript -await datasource +await dataSource .createQueryBuilder() .insert() .into(User) @@ -82,7 +100,7 @@ await datasource ### Use partial index (Postgres) ```typescript -await datasource +await dataSource .createQueryBuilder() .insert() .into(User) @@ -100,4 +118,4 @@ await datasource } ) .execute() -``` \ No newline at end of file +``` diff --git a/docs/listeners-and-subscribers.md b/docs/listeners-and-subscribers.md index 37719d48b7..0b7d8a81e2 100644 --- a/docs/listeners-and-subscribers.md +++ b/docs/listeners-and-subscribers.md @@ -239,10 +239,24 @@ export class PostSubscriber implements EntitySubscriberInterface { } /** - * Called before post insertion. + * Called before query execution. + */ + beforeQuery(event: BeforeQueryEvent) { + console.log(`BEFORE QUERY: `, event.query) + } + + /** + * Called after query execution. + */ + afterQuery(event: AfterQueryEvent) { + console.log(`AFTER QUERY: `, event.query) + } + + /** + * Called before entity insertion. */ beforeInsert(event: InsertEvent) { - console.log(`BEFORE POST INSERTED: `, event.entity) + console.log(`BEFORE ENTITY INSERTED: `, event.entity) } /** diff --git a/docs/logging.md b/docs/logging.md index eb088e2b4d..1e8608733c 100644 --- a/docs/logging.md +++ b/docs/logging.md @@ -120,7 +120,7 @@ Or you can extend the `AbstractLogger` class: ```typescript import { AbstractLogger } from "typeorm" -export class MyCustomLogger implements AbstractLogger { +export class MyCustomLogger extends AbstractLogger { /** * Write log to specific output. */ diff --git a/docs/many-to-many-relations.md b/docs/many-to-many-relations.md index e44c368393..6865183247 100644 --- a/docs/many-to-many-relations.md +++ b/docs/many-to-many-relations.md @@ -259,20 +259,20 @@ const categoriesWithQuestions = await dataSource ## Many-to-many relations with custom properties In case you need to have additional properties in your many-to-many relationship, you have to create a new entity yourself. -For example, if you would like entities `Post` and `Category` to have a many-to-many relationship with an additional `order` column, then you need to create an entity `PostToCategory` with two `ManyToOne` relations pointing in both directions and with custom columns in it: +For example, if you would like entities `Question` and `Category` to have a many-to-many relationship with an additional `order` column, then you need to create an entity `QuestionToCategory` with two `ManyToOne` relations pointing in both directions and with custom columns in it: ```typescript import { Entity, Column, ManyToOne, PrimaryGeneratedColumn } from "typeorm" -import { Post } from "./post" +import { Question } from "./question" import { Category } from "./category" @Entity() -export class PostToCategory { +export class QuestionToCategory { @PrimaryGeneratedColumn() - public postToCategoryId: number + public questionToCategoryId: number @Column() - public postId: number + public questionId: number @Column() public categoryId: number @@ -280,24 +280,24 @@ export class PostToCategory { @Column() public order: number - @ManyToOne(() => Post, (post) => post.postToCategories) - public post: Post + @ManyToOne(() => Question, (question) => question.questionToCategories) + public question: Question - @ManyToOne(() => Category, (category) => category.postToCategories) + @ManyToOne(() => Category, (category) => category.questionToCategories) public category: Category } ``` -Additionally you will have to add a relationship like the following to `Post` and `Category`: +Additionally you will have to add a relationship like the following to `Question` and `Category`: ```typescript // category.ts ... -@OneToMany(() => PostToCategory, postToCategory => postToCategory.category) -public postToCategories: PostToCategory[]; +@OneToMany(() => questionToCategory, questionToCategory => questionToCategory.category) +public questionToCategories: QuestionToCategory[]; -// post.ts +// question.ts ... -@OneToMany(() => PostToCategory, postToCategory => postToCategory.post) -public postToCategories: PostToCategory[]; +@OneToMany(() => QuestionToCategory, questionToCategory => questionToCategory.question) +public questionToCategories: QuestionToCategory[]; ``` diff --git a/docs/migrations.md b/docs/migrations.md index 9c0ffadd26..088b759127 100644 --- a/docs/migrations.md +++ b/docs/migrations.md @@ -76,10 +76,10 @@ Before creating a new migration you need to setup your data source options prope Here we setup two options: -- `"migrationsTableName": "migrations"` - Specify this option only if you need migration table name to be different from `"migrations"`. -- `"migrations": [/*...*/]` - list of migrations need to be loaded by TypeORM +- `"migrationsTableName": "migrations"` - Specify this option only if you need the migration table name to be different from `"migrations"`. +- `"migrations": [/*...*/]` - list of migrations that need to be loaded by TypeORM -Once you setup connection options you can create a new migration using CLI: +Once you setup the connection options you can create a new migration using CLI: ``` typeorm migration:create ./path-to-migrations-dir/PostRefactoring diff --git a/docs/mongodb.md b/docs/mongodb.md index 289777af89..d0498c8cd9 100644 --- a/docs/mongodb.md +++ b/docs/mongodb.md @@ -25,7 +25,7 @@ import { Entity, ObjectId, ObjectIdColumn, Column } from "typeorm" @Entity() export class User { @ObjectIdColumn() - id: ObjectId + _id: ObjectId @Column() firstName: string @@ -284,6 +284,10 @@ Perform a bulkWrite operation without a fluent API. Count number of matching documents in the db to a query. +### `countDocuments` + +Count number of matching documents in the db to a query. + #### `createCollectionIndex` Creates an index on the db and collection. diff --git a/docs/multiple-data-sources.md b/docs/multiple-data-sources.md index b0a4cac32d..2b5ec527fa 100644 --- a/docs/multiple-data-sources.md +++ b/docs/multiple-data-sources.md @@ -1,9 +1,9 @@ # Multiple data sources, databases, schemas and replication setup -- [Using multiple data sources](#using-multiple-data-sources) -- [Using multiple databases in a single data source](#using-multiple-databases-within-a-single-data-source) -- [Using multiple schemas in a single data source](#using-multiple-schemas-within-a-single-data-source) -- [Replication](#replication) +- [Using multiple data sources](#using-multiple-data-sources) +- [Using multiple databases in a single data source](#using-multiple-databases-within-a-single-data-source) +- [Using multiple schemas in a single data source](#using-multiple-schemas-within-a-single-data-source) +- [Replication](#replication) ## Using multiple data sources @@ -197,7 +197,7 @@ You can set up read/write replication using TypeORM. Example of replication options: ```typescript -{ +const datasource = new DataSource({ type: "mysql", logging: true, replication: { @@ -208,42 +208,51 @@ Example of replication options: password: "test", database: "test" }, - slaves: [{ - host: "server2", - port: 3306, - username: "test", - password: "test", - database: "test" - }, { - host: "server3", - port: 3306, - username: "test", - password: "test", - database: "test" - }] + slaves: [ + { + host: "server2", + port: 3306, + username: "test", + password: "test", + database: "test" + }, { + host: "server3", + port: 3306, + username: "test", + password: "test", + database: "test" + } + ] } -} +}); ``` -All schema update and write operations are performed using `master` server. -All simple queries performed by find methods or select query builder are using a random `slave` instance. -All queries performed by query method are performed using the `master` instance. +With replication slaves defined, TypeORM will start sending all possible queries to slaves by default. -If you want to explicitly use master in SELECT created by query builder, you can use the following code: +- all queries performed by the `find` methods or `SelectQueryBuilder` will use a random `slave` instance +- all write queries performed by `update`, `create`, `InsertQueryBuilder`, `UpdateQueryBuilder`, etc will use the `master` instance +- all raw queries performed by calling `.query()` will use the `master` instance +- all schema update operations are performed using the `master` instance + +### Explicitly selecting query destinations + +By default, TypeORM will send all read queries to a random read slave, and all writes to the master. This means when you first add the `replication` settings to your configuration, any existing read query runners that don't explicitly specify a replication mode will start going to a slave. This is good for scalability, but if some of those queries *must* return up to date data, then you need to explicitly pass a replication mode when you create a query runner. + +If you want to explicitly use the `master` for read queries, pass an explicit `ReplicationMode` when creating your `QueryRunner`; ```typescript const masterQueryRunner = dataSource.createQueryRunner("master") try { const postsFromMaster = await dataSource - .createQueryBuilder(Post, "post") - .setQueryRunner(masterQueryRunner) + .createQueryBuilder(Post, "post", masterQueryRunner) // you can either pass QueryRunner as an optional argument with query builder + .setQueryRunner(masterQueryRunner) // or use setQueryRunner which sets or overrides query builder's QueryRunner .getMany() } finally { await masterQueryRunner.release() } ``` -If you want to use `slave` in raw queries, you also need to explicitly specify the query runner. +If you want to use a slave in raw queries, pass `slave` as the replication mode when creating a query runner: ```typescript const slaveQueryRunner = dataSource.createQueryRunner("slave") @@ -258,11 +267,48 @@ try { } ``` -Note that connection created by a `QueryRunner` need to be explicitly released. +**Note**: Manually created`QueryRunner` instances must be explicitly released on their own. If you don't release your query runners, they will keep a connection checked out of the pool, and prevent other queries from using it. + +### Adjusting the default destination for reads + +If you don't want all reads to go to a `slave` instance by default, you can change the default read query destination by passing `defaultMode: "master"` in your replication options: + +```typescript +const datasource = new DataSource({ + type: "mysql", + logging: true, + replication: { + // set the default destination for read queries as the master instance + defaultMode: "master", + master: { + host: "server1", + port: 3306, + username: "test", + password: "test", + database: "test" + }, + slaves: [ + { + host: "server2", + port: 3306, + username: "test", + password: "test", + database: "test" + } + ] + } +}); +``` + +With this mode, no queries will go to the read slaves by default, and you'll have to opt-in to sending queries to read slaves with explicit `.createQueryRunner("slave")` calls. + +If you're adding replication options to an existing app for the first time, this is a good option for ensuring no behavior changes right away, and instead you can slowly adopt read replicas on a query runner by query runner basis. + +### Supported drivers -Replication is supported by mysql, postgres and sql server databases. +Replication is supported by the MySQL, PostgreSQL, SQL Server, Cockroach, Oracle, and Spanner connection drivers. -Mysql supports deep configuration: +MySQL replication supports extra configuration options: ```typescript { diff --git a/docs/one-to-one-relations.md b/docs/one-to-one-relations.md index d344e84155..b2d35ef456 100644 --- a/docs/one-to-one-relations.md +++ b/docs/one-to-one-relations.md @@ -44,11 +44,11 @@ export class User { } ``` -Here we added `@OneToOne` to the `user` and specify the target relation type to be `Profile`. +Here we added `@OneToOne` to the `user` and specified the target relation type to be `Profile`. We also added `@JoinColumn` which is required and must be set only on one side of the relation. -The side you set `@JoinColumn` on, that side's table will contain a "relation id" and foreign keys to target entity table. +The side you set `@JoinColumn` on, that side's table will contain a "relation id" and foreign keys to the target entity table. -This example will produce following tables: +This example will produce the following tables: ```shell +-------------+--------------+----------------------------+ @@ -68,7 +68,7 @@ This example will produce following tables: +-------------+--------------+----------------------------+ ``` -Again, `@JoinColumn` must be set only on one side of relation - the side that must have the foreign key in the database table. +Again, `@JoinColumn` must be set only on one side of the relation - the side that must have the foreign key in the database table. Example how to save such a relation: diff --git a/docs/repository-api.md b/docs/repository-api.md index c9d2ca899e..66a5910158 100644 --- a/docs/repository-api.md +++ b/docs/repository-api.md @@ -257,6 +257,22 @@ await repository.increment({ firstName: "Timber" }, "age", 3) await repository.decrement({ firstName: "Timber" }, "age", 3) ``` +- `exists` - Check whether any entity exists that matches `FindOptions`. + +```typescript +const exists = await repository.exists({ + where: { + firstName: "Timber", + }, +}) +``` + +- `existsBy` - Checks whether any entity exists that matches `FindOptionsWhere`. + +```typescript +const exists = await repository.existsBy({ firstName: "Timber" }) +``` + - `count` - Counts entities that match `FindOptions`. Useful for pagination. ```typescript diff --git a/docs/select-query-builder.md b/docs/select-query-builder.md index cc23e86239..eb320576c3 100644 --- a/docs/select-query-builder.md +++ b/docs/select-query-builder.md @@ -29,6 +29,8 @@ - [Using subqueries](#using-subqueries) - [Hidden Columns](#hidden-columns) - [Querying Deleted rows](#querying-deleted-rows) +- [Common table expressions](#common-table-expressions) +- [Time Travel Queries](#time-travel-queries) - [Debugging](#debugging) ## What is `QueryBuilder` @@ -74,6 +76,7 @@ When using the `QueryBuilder`, you need to provide unique parameters in your `WH ```TypeScript const result = await dataSource + .getRepository(User) .createQueryBuilder('user') .leftJoinAndSelect('user.linkedSheep', 'linkedSheep') .leftJoinAndSelect('user.linkedCow', 'linkedCow') @@ -85,6 +88,7 @@ const result = await dataSource ```TypeScript const result = await dataSource + .getRepository(User) .createQueryBuilder('user') .leftJoinAndSelect('user.linkedSheep', 'linkedSheep') .leftJoinAndSelect('user.linkedCow', 'linkedCow') @@ -312,7 +316,7 @@ One query builder is not limited to one alias, they can have multiple aliases. Each select can have its own alias, you can select from multiple tables each with its own alias, you can join multiple tables each with its own alias. -You can use those aliases to access tables are you selecting (or data you are selecting). +You can use those aliases to access tables you are selecting (or data you are selecting). ## Using parameters to escape data @@ -1197,7 +1201,7 @@ If the model you are querying has a column with the attribute `@DeleteDateColumn Let's say you have the following entity: ```typescript -import { Entity, PrimaryGeneratedColumn, Column } from "typeorm" +import { Entity, PrimaryGeneratedColumn, Column, DeleteDateColumn } from "typeorm" @Entity() export class User { diff --git a/docs/separating-entity-definition.md b/docs/separating-entity-definition.md index fc5860ae71..c8a40e9173 100644 --- a/docs/separating-entity-definition.md +++ b/docs/separating-entity-definition.md @@ -303,6 +303,9 @@ const ASchema = new EntitySchema({ target: A, name: "A", type: "entity-child", + // When saving instances of 'A', the "type" column will have the value + // specified on the 'discriminatorValue' property + discriminatorValue: "my-custom-discriminator-value-for-A", columns: { ...BaseSchema.options.columns, a: { @@ -315,6 +318,7 @@ const BSchema = new EntitySchema({ target: B, name: "B", type: "entity-child", + discriminatorValue: undefined, // Defaults to the class name (e.g. "B") columns: { ...BaseSchema.options.columns, b: { @@ -327,6 +331,7 @@ const CSchema = new EntitySchema({ target: C, name: "C", type: "entity-child", + discriminatorValue: "my-custom-discriminator-value-for-C", columns: { ...BaseSchema.options.columns, c: { diff --git a/docs/support.md b/docs/support.md index 9e3ff5dce8..b27e88721e 100644 --- a/docs/support.md +++ b/docs/support.md @@ -10,7 +10,7 @@ If you have a question, you can ask it on [StackOverflow](https://stackoverflow. ### Want community support? -If you want community support, or simply want to chat with friendly TypeORM enthusiasts and users, you can do it on [Slack](https://join.slack.com/t/typeorm/shared_invite/zt-uu12ljeb-OH_0086I379fUDApYJHNuw). +If you want community support, or simply want to chat with friendly TypeORM enthusiasts and users, you can do it on [Discord](https://discord.gg/cC9hkmUgNa). ### Want professional commercial support? diff --git a/docs/view-entities.md b/docs/view-entities.md index e8888ca66c..8aba47bf65 100644 --- a/docs/view-entities.md +++ b/docs/view-entities.md @@ -191,7 +191,7 @@ name: string ## Complete example -Let create two entities and a view containing aggregated data from these entities: +Lets create two entities and a view containing aggregated data from these entities: ```typescript import { Entity, PrimaryGeneratedColumn, Column } from "typeorm" diff --git a/docs/zh_CN/README.md b/docs/zh_CN/README.md index 2917001032..a049c625cb 100644 --- a/docs/zh_CN/README.md +++ b/docs/zh_CN/README.md @@ -1180,7 +1180,6 @@ let photos = await connection 这几个扩展可以简化 TypeORM 的使用,并将其与其他模块集成: -- [TypeORM + GraphQL framework](http://vesper-framework.com) - [TypeORM integration](https://github.com/typeorm/typeorm-typedi-extensions) with [TypeDI](https://github.com/pleerock/typedi) - [TypeORM integration](https://github.com/typeorm/typeorm-routing-controllers-extensions) with [routing-controllers](https://github.com/pleerock/routing-controllers) - 从现有数据库生成模型 - [typeorm-model-generator](https://github.com/Kononnable/typeorm-model-generator) diff --git a/docs/zh_CN/custom-repository.md b/docs/zh_CN/custom-repository.md index f585f2fa1d..ee7abfb6e7 100644 --- a/docs/zh_CN/custom-repository.md +++ b/docs/zh_CN/custom-repository.md @@ -8,140 +8,61 @@ 有几种方法可以创建自定义存储库。 - - [扩展了标准存储库的定制存储库](#扩展了标准存储库的定制存储库) - - [扩展了标准AbstractRepository的自定义存储库](#扩展了标准AbstractRepository的自定义存储库) - - [没有扩展的自定义存储库](#没有扩展的自定义存储库) - - [在事务中使用自定义存储库或为什么自定义存储库不能是服务](#在事务中使用自定义存储库或为什么自定义存储库不能是服务) +- [自定义存储库](#自定义存储库) + - [如何自定义存储库](#如何自定义存储库) + - [在事务中使用自定义存储库](#在事务中使用自定义存储库) -## 扩展了标准存储库的定制存储库 +## 如何自定义存储库 -创建自定义 repository 的第一种方法是扩展`Repository`。 -例如: +常见的做法是将一个实体的存储库实例赋值给一个变量导出,然后在你的应用中使用它,例如: -```typescript -import { EntityRepository, Repository } from "typeorm"; -import { User } from "../entity/User"; +```ts +// user.repository.ts +export const UserRepository = dataSource.getRepository(User) -@EntityRepository(User) -export class UserRepository extends Repository { - findByName(firstName: string, lastName: string) { - return this.findOne({ firstName, lastName }); - } +// user.controller.ts +export class UserController { + users() { + return UserRepository.find() + } } ``` -然后你可以这样使用它: - -```typescript -import { getCustomRepository } from "typeorm"; -import { UserRepository } from "./repository/UserRepository"; - -const userRepository = getCustomRepository(UserRepository); // 或connection.getCustomRepository或manager.getCustomRepository() -const user = userRepository.create(); // 和 const user = new User();一样 -user.firstName = "Timber"; -user.lastName = "Saw"; -await userRepository.save(user); - -const timber = await userRepository.findByName("Timber", "Saw"); -``` - -如你所见,你也可以使用`getCustomRepository` 获取 repository, -并且可以访问在其中创建的任何方法以及标准实体 repository 中的任何方法。 - -## 扩展了标准AbstractRepository的自定义存储库 - -创建自定义 repository 的第二种方法是扩展`AbstractRepository`: +你可以使用 `Repository` 类中的 `.extend` 方法来扩展 `UserRepository` 的功能: ```typescript -import { EntityRepository, AbstractRepository } from "typeorm"; -import { User } from "../entity/User"; - -@EntityRepository(User) -export class UserRepository extends AbstractRepository { - createAndSave(firstName: string, lastName: string) { - const user = new User(); - user.firstName = firstName; - user.lastName = lastName; - return this.manager.save(user); - } - - findByName(firstName: string, lastName: string) { - return this.repository.findOne({ firstName, lastName }); - } +// user.repository.ts +export const UserRepository = dataSource.getRepository(User).extend({ + findByName(firstName: string, lastName: string) { + return this.createQueryBuilder("user") + .where("user.firstName = :firstName", { firstName }) + .andWhere("user.lastName = :lastName", { lastName }) + .getMany() + }, +}) + +// user.controller.ts +export class UserController { + users() { + return UserRepository.findByName("Timber", "Saw") + } } ``` -然后你可以这样使用它: - -```typescript -import { getCustomRepository } from "typeorm"; -import { UserRepository } from "./repository/UserRepository"; - -const userRepository = getCustomRepository(UserRepository); // or connection.getCustomRepository or manager.getCustomRepository() -await userRepository.createAndSave("Timber", "Saw"); -const timber = await userRepository.findByName("Timber", "Saw"); -``` - -这种类型的存储库与前一个存储库之间的区别在于它没有公开`Repository`所具有的所有方法。 -`AbstractRepository`没有任何公共方法,它只有受保护的方法,比如`manager`和`repository`,你可以在自己的公共方法中使用它们。 -如果你不希望将标准`Repository`所有方法公开给 public,那么扩展`AbstractRepository`将非常有用。 - -## 没有扩展的自定义存储库 - -创建存储库的第三种方法是不扩展任何东西, -但是需要定义一个总是接受实体管理器(entity manager)实例的构造函数: - -```typescript -import { EntityRepository, Repository, EntityManager } from "typeorm"; -import { User } from "../entity/User"; - -@EntityRepository() -export class UserRepository { - constructor(private manager: EntityManager) {} - - createAndSave(firstName: string, lastName: string) { - const user = new User(); - user.firstName = firstName; - user.lastName = lastName; - return this.manager.save(user); - } - - findByName(firstName: string, lastName: string) { - return this.manager.findOne(User, { firstName, lastName }); - } -} -``` - -然后你可以这样使用它: - -```typescript -import { getCustomRepository } from "typeorm"; -import { UserRepository } from "./repository/UserRepository"; - -const userRepository = getCustomRepository(UserRepository); // 或者 connection.getCustomRepository 或者 manager.getCustomRepository() -await userRepository.createAndSave("Timber", "Saw"); -const timber = await userRepository.findByName("Timber", "Saw"); -``` - -这种类型的存储库不会扩展任何东西,你只需要定义一个必须接受`EntityManager`的构造函数。 然后在存储库方法中的任何位置使用它。 -此外,这种类型的存储库不绑定到特定实体,因此你可以使用其中的多个实体进行操作。 - -## 在事务中使用自定义存储库或为什么自定义存储库不能是服务 - -自定义存储库不能是服务,因为应用程序中没有自定义存储库的单个实例(就像常规存储库或实体管理器一样)。 -除了您的应用程序中可能存在多个连接(实体管理器和存储库不同)之外,存储库和管理器在事务中也是不同的。 +## 在事务中使用自定义存储库 -例如: +每个事务有自己的执行作用域:它们有自己的执行器、实体管理器和储存库。 +这就是使用全局的(数据源的)实体管理器和存储库在事务中并不会生效的原因。 +为了确保事务中的操作能够正确地被执行你**必须**使用提供的实体管理器实例及其 `getRepository` 方法。如果需要在事务中使用自定义存储库,你必须使用其提供的实体管理器实例上的 `withRepository` 方法: ```typescript -await connection.transaction(async manager => { - // 在事务中你必须使用事务提供的管理器实例而不能使用全局管理器、存储库或自定义存储库, - // 因为这个管理器是独占的和事务性的, - // 如果让我们自定义存储库作为服务,它的一个"manager"属性应该 是EntityManager的唯一实例,但没有全局的EntityManager实例,并且也不可能有。 - // 这就是为什么自定义管理器特定于每个EntityManager而不能是服务。 - // 这也提供了在事务中使用自定义存储库而不会出现什么问题: - const userRepository = manager.getCustomRepository(UserRepository); // 不要在这里使用全局的getCustomRepository! - await userRepository.createAndSave("Timber", "Saw"); - const timber = await userRepository.findByName("Timber", "Saw"); -}); +await connection.transaction(async (manager) => { + // 在事务中你必须使用其提供的实体管理器实例, + // 不能使用全局的实体管理器或者存储库, + // 因为这个实体管理器具有排他性和事务性 + + const userRepository = manager.withRepository(UserRepository) + await userRepository.createAndSave("Timber", "Saw") + const timber = await userRepository.findByName("Timber", "Saw") +}) ``` diff --git a/docs/zh_CN/entities.md b/docs/zh_CN/entities.md index 95f47560b4..138ad8be4a 100644 --- a/docs/zh_CN/entities.md +++ b/docs/zh_CN/entities.md @@ -1,21 +1,26 @@ # 实体 -* [实体是什么?](#实体是什么) -* [实体列](#实体列) - * [主列](#主列) - * [特殊列](#特殊列) - * [空间列](#空间列) -* [列类型](#列类型) - * [`mysql`/`mariadb`的列类型](#`mysql`/`mariadb`的列类型) - * [`postgres`的列类型](#`postgres`的列类型) - * [`sqlite`/`cordova`/`react-native`/`expo`的列类型](#sqlite`/`cordova`/`react-native`/`expo`的列类型) - * [`mssql`的列类型](#`mssql`的列类型) - * [`oracle`的列类型](#`oracle`的列类型) - * [`enum`列类型](#`enum`列类型) - * [`simple-array`的列类型](#`simple-array`的列类型) - * [`simple-json`列类型](#`simple-json`列类型) - * [具有生成值的列](#具有生成值的列) -* [列选项](#列选项) +- [实体](#实体) + - [实体是什么?](#实体是什么) + - [实体列](#实体列) + - [主列](#主列) + - [特殊列](#特殊列) + - [空间列](#空间列) + - [列类型](#列类型) + - [`mysql`/`mariadb`的列类型](#mysqlmariadb的列类型) + - [`postgres`的列类型](#postgres的列类型) + - [`sqlite`/`cordova`/`react-native`/`expo`的列类型](#sqlitecordovareact-nativeexpo的列类型) + - [`mssql`的列类型](#mssql的列类型) + - [`oracle`的列类型](#oracle的列类型) + - [`enum` 列类型](#enum-列类型) + - [`simple-array`的列类型](#simple-array的列类型) + - [`simple-json` 列类型](#simple-json-列类型) + - [具有生成值的列](#具有生成值的列) + - [列选项](#列选项) + - [实体继承](#实体继承) + - [树实体](#树实体) + - [邻接列表](#邻接列表) + - [Closure 表](#closure-表) ## 实体是什么? @@ -206,11 +211,10 @@ await getManager() .createQueryBuilder(Thing, "thing") // 将字符串化的GeoJSON转换为具有与表规范匹配的SRID的geometry .where("ST_Distance(geom, ST_SetSRID(ST_GeomFromGeoJSON(:origin), ST_SRID(geom))) > 0") - .orderBy({ - "ST_Distance(geom, ST_SetSRID(ST_GeomFromGeoJSON(:origin), ST_SRID(geom)))": { - order: "ASC" - } - }) + .orderBy( + "ST_Distance(geom, ST_SetSRID(ST_GeomFromGeoJSON(:origin), ST_SRID(geom)))", + "ASC" + ) .setParameters({ // 字符串化 GeoJSON origin: JSON.stringify(origin) @@ -272,7 +276,8 @@ TypeORM 支持所有最常用的数据库支持的列类型。 `date`, `time`, `time without time zone`, `time with time zone`, `interval`, `bool`, `boolean`, `enum`, `point`, `line`, `lseg`, `box`, `path`, `polygon`, `circle`, `cidr`, `inet`, `macaddr`, `tsvector`, `tsquery`, `uuid`, `xml`, `json`, `jsonb`, `int4range`, `int8range`, `numrange`, -`tsrange`, `tstzrange`, `daterange`, `geometry`, `geography` +`tsrange`, `tstzrange`, `daterange`, `int4multirange`, `int8multirange`, `nummultirange`, +`tsmultirange`, `tstzmultirange`, `multidaterange`, `geometry`, `geography` ### `sqlite`/`cordova`/`react-native`/`expo`的列类型 diff --git a/docs/zh_CN/faq.md b/docs/zh_CN/faq.md index 1bc09d0f0d..c231c252be 100644 --- a/docs/zh_CN/faq.md +++ b/docs/zh_CN/faq.md @@ -149,7 +149,7 @@ createConnection({ 此时你的项目中不再有`Post.ts`。 但是,`Post.js`保留在输出目录中。 现在,当 TypeORM 从输出目录中读取实体时,它会看到两个实体 - `Post`和`Blog`。 这可能是错误的根源。 -这就是为什么当你删除并移动启用了`utDir`的实体时,强烈建议删除输出目录并重新编译项目。 +这就是为什么当你删除并移动启用了`outDir`的实体时,强烈建议删除输出目录并重新编译项目。 ## 如何将TypeORM和ts-node一起使用? diff --git a/docs/zh_CN/index.md b/docs/zh_CN/index.md index 2917001032..a049c625cb 100644 --- a/docs/zh_CN/index.md +++ b/docs/zh_CN/index.md @@ -1180,7 +1180,6 @@ let photos = await connection 这几个扩展可以简化 TypeORM 的使用,并将其与其他模块集成: -- [TypeORM + GraphQL framework](http://vesper-framework.com) - [TypeORM integration](https://github.com/typeorm/typeorm-typedi-extensions) with [TypeDI](https://github.com/pleerock/typedi) - [TypeORM integration](https://github.com/typeorm/typeorm-routing-controllers-extensions) with [routing-controllers](https://github.com/pleerock/routing-controllers) - 从现有数据库生成模型 - [typeorm-model-generator](https://github.com/Kononnable/typeorm-model-generator) diff --git a/extra/typeorm-model-shim.js b/extra/typeorm-model-shim.js index 9dbe87c733..5344d212de 100644 --- a/extra/typeorm-model-shim.js +++ b/extra/typeorm-model-shim.js @@ -20,268 +20,276 @@ // } // } +function noop() {} + +/* export */ +class BaseEntity {} + +exports.BaseEntity = BaseEntity /* export */ function Column() { - return function () {}; + return noop } exports.Column = Column; /* export */ function CreateDateColumn() { - return function () {}; + return noop } exports.CreateDateColumn = CreateDateColumn; /* export */ function DeleteDateColumn() { - return function () {}; + return noop } exports.DeleteDateColumn = DeleteDateColumn; /* export */ function PrimaryGeneratedColumn() { - return function () {}; + return noop } exports.PrimaryGeneratedColumn = PrimaryGeneratedColumn; /* export */ function PrimaryColumn() { - return function () {}; + return noop } exports.PrimaryColumn = PrimaryColumn; /* export */ function UpdateDateColumn() { - return function () {}; + return noop } exports.UpdateDateColumn = UpdateDateColumn; /* export */ function VersionColumn() { - return function () {}; + return noop } exports.VersionColumn = VersionColumn; /* export */ function ViewColumn() { - return function () {}; + return noop } exports.ViewColumn = ViewColumn; /* export */ function ObjectIdColumn() { - return function () {}; + return noop } exports.ObjectIdColumn = ObjectIdColumn; /* export */ function AfterInsert() { - return function () {}; + return noop } exports.AfterInsert = AfterInsert; /* export */ function AfterLoad() { - return function () {}; + return noop } exports.AfterLoad = AfterLoad; /* export */ function AfterSoftRemove() { - return function () {}; + return noop } exports.AfterSoftRemove = AfterSoftRemove; /* export */ function AfterRecover() { - return function () {}; + return noop } exports.AfterRecover = AfterRecover; /* export */ function AfterRemove() { - return function () {}; + return noop } exports.AfterRemove = AfterRemove; /* export */ function AfterUpdate() { - return function () {}; + return noop } exports.AfterUpdate = AfterUpdate; /* export */ function BeforeInsert() { - return function () {}; + return noop } exports.BeforeInsert = BeforeInsert; /* export */ function BeforeSoftRemove() { - return function () {}; + return noop } exports.BeforeSoftRemove = BeforeSoftRemove; /* export */ function BeforeRecover() { - return function () {}; + return noop } exports.BeforeRecover = BeforeRecover; /* export */ function BeforeRemove() { - return function () {}; + return noop } exports.BeforeRemove = BeforeRemove; /* export */ function BeforeUpdate() { - return function () {}; + return noop } exports.BeforeUpdate = BeforeUpdate; /* export */ function EventSubscriber() { - return function () {}; + return noop } exports.EventSubscriber = EventSubscriber; /* export */ function ColumnOptions() { - return function () {}; + return noop } exports.ColumnOptions = ColumnOptions; /* export */ function IndexOptions() { - return function () {}; + return noop } exports.IndexOptions = IndexOptions; /* export */ function JoinColumnOptions() { - return function () {}; + return noop } exports.JoinColumnOptions = JoinColumnOptions; /* export */ function JoinTableOptions() { - return function () {}; + return noop } exports.JoinTableOptions = JoinTableOptions; /* export */ function RelationOptions() { - return function () {}; + return noop } exports.RelationOptions = RelationOptions; /* export */ function EntityOptions() { - return function () {}; + return noop } exports.EntityOptions = EntityOptions; /* export */ function ValueTransformer() { - return function () {}; + return noop } exports.ValueTransformer = ValueTransformer; /* export */ function JoinColumn() { - return function () {}; + return noop } exports.JoinColumn = JoinColumn; /* export */ function JoinTable() { - return function () {}; + return noop } exports.JoinTable = JoinTable; /* export */ function ManyToMany() { - return function () {}; + return noop } exports.ManyToMany = ManyToMany; /* export */ function ManyToOne() { - return function () {}; + return noop } exports.ManyToOne = ManyToOne; /* export */ function OneToMany() { - return function () {}; + return noop } exports.OneToMany = OneToMany; /* export */ function OneToOne() { - return function () {}; + return noop } exports.OneToOne = OneToOne; /* export */ function RelationCount() { - return function () {}; + return noop } exports.RelationCount = RelationCount; /* export */ function RelationId() { - return function () {}; + return noop } exports.RelationId = RelationId; /* export */ function Entity() { - return function () {}; + return noop } exports.Entity = Entity; /* export */ function ChildEntity() { - return function () {}; + return noop } exports.ChildEntity = ChildEntity; /* export */ function TableInheritance() { - return function () {}; + return noop } exports.TableInheritance = TableInheritance; /* export */ function ViewEntity() { - return function () {}; + return noop } exports.ViewEntity = ViewEntity; /* export */ function Transaction() { - return function () {}; + return noop } exports.Transaction = Transaction; /* export */ function TransactionManager() { - return function () {}; + return noop } exports.TransactionManager = TransactionManager; /* export */ function TransactionRepository() { - return function () {}; + return noop } exports.TransactionRepository = TransactionRepository; /* export */ function TreeLevelColumn() { - return function () {}; + return noop } exports.TreeLevelColumn = TreeLevelColumn; /* export */ function TreeParent() { - return function () {}; + return noop } exports.TreeParent = TreeParent; /* export */ function TreeChildren() { - return function () {}; + return noop } exports.TreeChildren = TreeChildren; /* export */ function Tree() { - return function () {}; + return noop } exports.Tree = Tree; /* export */ function Index() { - return function () {}; + return noop } exports.Index = Index; /* export */ function Unique() { - return function () {}; + return noop } exports.Unique = Unique; /* export */ function Check() { - return function () {}; + return noop } exports.Check = Check; /* export */ function Exclusion() { - return function () {}; + return noop } exports.Exclusion = Exclusion; /* export */ function Generated() { - return function () {}; + return noop } exports.Generated = Generated; /* export */ function EntityRepository() { - return function () {}; + return noop } exports.EntityRepository = EntityRepository; + + diff --git a/gulpfile.ts b/gulpfile.ts index 113ac1a0c8..a7b57e0ba8 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -1,17 +1,13 @@ -/// -/// -/// +import { Gulpclass, Task, SequenceTask, MergedTask } from "gulpclass"; -import {Gulpclass, Task, SequenceTask, MergedTask} from "gulpclass"; - -const fs = require("fs"); -const gulp = require("gulp"); -const del = require("del"); -const shell = require("gulp-shell"); -const replace = require("gulp-replace"); -const rename = require("gulp-rename"); -const sourcemaps = require("gulp-sourcemaps"); -const ts = require("gulp-typescript"); +import fs from "fs"; +import gulp from "gulp"; +import del from "del"; +import shell from "gulp-shell"; +import replace from "gulp-replace"; +import rename from "gulp-rename"; +import sourcemaps from "gulp-sourcemaps"; +import ts from "gulp-typescript"; @Gulpclass() export class Gulpfile { @@ -20,20 +16,12 @@ export class Gulpfile { // General tasks // ------------------------------------------------------------------------- - /** - * Creates a delay and resolves after 15 seconds. - */ - @Task() - wait(cb: Function) { - setTimeout(() => cb(), 15000); - } - /** * Cleans build folder. */ @Task() - clean(cb: Function) { - return del(["./build/**"], cb); + async clean() { + return del(["./build/**"]); } /** @@ -70,15 +58,15 @@ export class Gulpfile { @Task() browserCopyTemplates() { return gulp.src("./src/platform/*.template") - .pipe(rename((p: any) => { p.extname = '.ts'; })) + .pipe(rename((p) => { p.extname = '.ts'; })) .pipe(gulp.dest("./build/browser/src/platform")); } @MergedTask() browserCompile() { const tsProject = ts.createProject("tsconfig.json", { - module: "es2015", - "lib": ["es5", "es6", "dom"], + module: "es2020", + lib: ["es2021", "dom"], typescript: require("typescript") }); const tsResult = gulp.src([ @@ -97,7 +85,7 @@ export class Gulpfile { } @Task() - browserClearPackageDirectory(cb: Function) { + async browserClearPackageDirectory() { return del([ "./build/browser/**" ]); @@ -117,7 +105,7 @@ export class Gulpfile { "cd ./build/package && npm publish" ])); } - + /** * Packs a .tgz from ./build/package directory. */ @@ -204,10 +192,10 @@ export class Gulpfile { * Moves all compiled files to the final package directory. */ @Task() - packageClearPackageDirectory(cb: Function) { + async packageClearPackageDirectory() { return del([ "build/package/src/**" - ], cb); + ]); } /** diff --git a/ormconfig.circleci-common.json b/ormconfig.circleci-common.json index 27b8d61132..89f6b7645c 100644 --- a/ormconfig.circleci-common.json +++ b/ormconfig.circleci-common.json @@ -22,7 +22,7 @@ "logging": false }, { - "skip": false, + "skip": true, "name": "sqlite", "type": "sqlite", "database": "./temp/sqlitedb-1.db", @@ -30,7 +30,7 @@ "relationLoadStrategy": "join" }, { - "skip": false, + "skip": true, "name": "sqlite-2", "type": "sqlite", "database": "./temp/sqlitedb-2.db", @@ -57,17 +57,6 @@ }, { "skip": true, - "name": "postgres-12", - "type": "postgres", - "host": "typeorm-postgres-12", - "port": 5432, - "username": "test", - "password": "test", - "database": "test", - "logging": false - }, - { - "skip": false, "name": "sqljs", "type": "sqljs", "logging": false @@ -126,12 +115,12 @@ "type": "oracle", "host": "typeorm-oracle", "port": 1521, - "sid": "XE", - "username": "system", + "serviceName": "XEPDB1", + "username": "typeorm", "password": "oracle", "logging": false, "extra": { - "connectString": "typeorm-oracle:1521/XE" + "connectString": "typeorm-oracle:1521/XEPDB1" } } ] diff --git a/ormconfig.json.dist b/ormconfig.json.dist index 9f752dfa0f..41a97c6a9b 100644 --- a/ormconfig.json.dist +++ b/ormconfig.json.dist @@ -69,14 +69,14 @@ } }, { - "skip": true, + "skip": false, "name": "oracle", "type": "oracle", "host": "localhost", - "username": "system", + "username": "typeorm", "password": "oracle", "port": 1521, - "sid": "xe.oracle.docker", + "serviceName": "XEPDB1", "logging": false }, { diff --git a/package-lock.json b/package-lock.json index 50cdc76b85..fb2ec3fd20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@streamyard/typeorm", - "version": "0.3.16-6", + "version": "0.3.20-1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@streamyard/typeorm", - "version": "0.3.16-6", + "version": "0.3.20-1", "license": "MIT", "dependencies": { "@sqltools/formatter": "^1.2.5", @@ -14,12 +14,11 @@ "buffer": "^6.0.3", "chalk": "^4.1.2", "cli-highlight": "^2.1.11", - "date-fns": "^2.29.3", + "dayjs": "^1.11.9", "debug": "^4.3.4", "dotenv": "^16.0.3", - "glob": "^8.1.0", + "glob": "^10.4.5", "mkdirp": "^2.1.3", - "reflect-metadata": "^0.1.13", "sha.js": "^2.4.11", "tslib": "^2.5.0", "uuid": "^9.0.0", @@ -31,10 +30,13 @@ "typeorm-ts-node-esm": "cli-ts-node-esm.js" }, "devDependencies": { + "@tsconfig/node16": "^16.1.1", "@types/app-root-path": "^1.2.4", "@types/chai": "^4.3.4", "@types/chai-as-promised": "^7.1.5", "@types/debug": "^4.1.7", + "@types/gulp-rename": "^2.0.6", + "@types/gulp-sourcemaps": "^0.0.38", "@types/mkdirp": "^1.0.2", "@types/mocha": "^10.0.1", "@types/node": "^18.13.0", @@ -43,6 +45,7 @@ "@types/source-map-support": "^0.5.6", "@types/uuid": "^9.0.0", "@types/yargs": "^17.0.22", + "@typescript-eslint/eslint-plugin": "^6.17.0", "better-sqlite3": "^8.1.0", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", @@ -50,9 +53,10 @@ "conventional-changelog-angular": "^5.0.13", "conventional-changelog-cli": "^2.2.2", "del": "6.1.1", + "eslint": "^8.44.0", "gulp": "^4.0.2", "gulp-istanbul": "^1.1.3", - "gulp-mocha": "^8.0.0", + "gulp-mocha": "^10.0.0", "gulp-rename": "^2.0.0", "gulp-replace": "^1.1.4", "gulp-shell": "^0.8.0", @@ -60,11 +64,11 @@ "gulp-typescript": "^6.0.0-alpha.1", "gulpclass": "^0.2.0", "husky": "^8.0.3", - "mocha": "^10.2.0", - "mongodb": "^5.2.0", - "mssql": "^9.1.1", + "mocha": "^10.8.2", + "mongodb": "^6.3.0", + "mssql": "^10.0.1", "mysql": "^2.18.1", - "mysql2": "^3.1.1", + "mysql2": "^3.9.7", "pg": "^8.9.0", "pg-query-stream": "^4.3.0", "prettier": "^2.8.3", @@ -76,12 +80,12 @@ "source-map-support": "^0.5.21", "sql.js": "^1.8.0", "sqlite3": "^5.1.4", - "ts-node": "^10.9.1", + "ts-node": "^10.9.2", "typeorm-aurora-data-api-driver": "^2.4.4", - "typescript": "^4.9.5" + "typescript": "^5.3.3" }, "engines": { - "node": ">= 12.9.0" + "node": ">=16.13.0" }, "funding": { "url": "https://opencollective.com/typeorm" @@ -89,17 +93,18 @@ "peerDependencies": { "@google-cloud/spanner": "^5.18.0", "@sap/hana-client": "^2.12.25", - "better-sqlite3": "^7.1.2 || ^8.0.0", + "better-sqlite3": "^8.0.0 || ^9.0.0", "hdb-pool": "^0.1.6", "ioredis": "^5.0.4", - "mongodb": "^5.2.0", - "mssql": "^9.1.1", + "mongodb": "^5.8.0", + "mssql": "^9.1.1 || ^10.0.1", "mysql2": "^2.2.5 || ^3.0.1", - "oracledb": "^5.1.0", + "oracledb": "^6.3.0", "pg": "^8.5.1", "pg-native": "^3.0.0", "pg-query-stream": "^4.0.0", "redis": "^3.1.1 || ^4.0.0", + "reflect-metadata": "^0.1.14 || ^0.2.0", "sql.js": "^1.4.0", "sqlite3": "^5.0.3", "ts-node": "^10.7.0", @@ -159,6 +164,15 @@ } } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@azure/abort-controller": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz", @@ -172,22 +186,23 @@ } }, "node_modules/@azure/core-auth": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.4.0.tgz", - "integrity": "sha512-HFrcTgmuSuukRf/EdPmqBrc5l6Q5Uu+2TbuhaKbgaCpP2TfAeiNaQPAadxO+CYBRHGUzIDteMAjFspFLDLnKVQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.5.0.tgz", + "integrity": "sha512-udzoBuYG1VBoHVohDTrvKjyzel34zt77Bhp7dQntVGGD0ehVq48owENbBG8fIgkHRNUBQH5k1r0hpoMu5L8+kw==", "dev": true, "dependencies": { "@azure/abort-controller": "^1.0.0", + "@azure/core-util": "^1.1.0", "tslib": "^2.2.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" } }, "node_modules/@azure/core-client": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.7.1.tgz", - "integrity": "sha512-85igXpc5V7ns6rvMEpLmIcBDftjUgTWD+0tmYPyQEfPfkAwpPTs1X5rhCDsfqvUZGA8Ksid1hdZGu62r6XXeHg==", + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.7.3.tgz", + "integrity": "sha512-kleJ1iUTxcO32Y06dH9Pfi9K4U+Tlb111WXEnbt7R/ne+NLRwppZiTGJuTD5VVoxTMK5NTbEtm5t2vcdNCFe2g==", "dev": true, "dependencies": { "@azure/abort-controller": "^1.0.0", @@ -217,12 +232,13 @@ } }, "node_modules/@azure/core-lro": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.5.1.tgz", - "integrity": "sha512-JHQy/bA3NOz2WuzOi5zEk6n/TJdAropupxUT521JIJvW7EXV2YN2SFYZrf/2RHeD28QAClGdynYadZsbmP+nyQ==", + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.5.4.tgz", + "integrity": "sha512-3GJiMVH7/10bulzOKGrrLeG/uCBH/9VtxqaMcB9lIqAeamI/xYQSHJL/KcsLDuH+yTjYpro/u6D/MuRe4dN70Q==", "dev": true, "dependencies": { "@azure/abort-controller": "^1.0.0", + "@azure/core-util": "^1.2.0", "@azure/logger": "^1.0.0", "tslib": "^2.2.0" }, @@ -243,24 +259,22 @@ } }, "node_modules/@azure/core-rest-pipeline": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.10.1.tgz", - "integrity": "sha512-Kji9k6TOFRDB5ZMTw8qUf2IJ+CeJtsuMdAHox9eqpTf1cefiNMpzrfnF6sINEBZJsaVaWgQ0o48B6kcUH68niA==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.13.0.tgz", + "integrity": "sha512-a62aP/wppgmnfIkJLfcB4ssPBcH94WzrzPVJ3tlJt050zX4lfmtnvy95D3igDo3f31StO+9BgPrzvkj4aOxnoA==", "dev": true, "dependencies": { - "@azure/abort-controller": "^1.0.0", + "@azure/abort-controller": "^1.1.0", "@azure/core-auth": "^1.4.0", "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.0.0", + "@azure/core-util": "^1.3.0", "@azure/logger": "^1.0.0", - "form-data": "^4.0.0", "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", - "tslib": "^2.2.0", - "uuid": "^8.3.0" + "tslib": "^2.2.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" } }, "node_modules/@azure/core-rest-pipeline/node_modules/@tootallnate/once": { @@ -286,15 +300,6 @@ "node": ">= 6" } }, - "node_modules/@azure/core-rest-pipeline/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/@azure/core-tracing": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.1.tgz", @@ -308,58 +313,47 @@ } }, "node_modules/@azure/core-util": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.1.1.tgz", - "integrity": "sha512-A4TBYVQCtHOigFb2ETiiKFDocBoI1Zk2Ui1KpI42aJSIDexF7DHQFpnjonltXAIU/ceH+1fsZAWWgvX6/AKzog==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.6.1.tgz", + "integrity": "sha512-h5taHeySlsV9qxuK64KZxy4iln1BtMYlNt5jbuEFN3UFSAd1EwKg/Gjl5a6tZ/W8t6li3xPnutOx7zbDyXnPmQ==", "dev": true, "dependencies": { "@azure/abort-controller": "^1.0.0", "tslib": "^2.2.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=16.0.0" } }, "node_modules/@azure/identity": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-2.1.0.tgz", - "integrity": "sha512-BPDz1sK7Ul9t0l9YKLEa8PHqWU4iCfhGJ+ELJl6c8CP3TpJt2urNCbm0ZHsthmxRsYoMPbz2Dvzj30zXZVmAFw==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-3.4.2.tgz", + "integrity": "sha512-0q5DL4uyR0EZ4RXQKD8MadGH6zTIcloUoS/RVbCpNpej4pwte0xpqYxk8K97Py2RiuUvI7F4GXpoT4046VfufA==", "dev": true, "dependencies": { "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", + "@azure/core-auth": "^1.5.0", "@azure/core-client": "^1.4.0", "@azure/core-rest-pipeline": "^1.1.0", "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.0.0", + "@azure/core-util": "^1.6.1", "@azure/logger": "^1.0.0", - "@azure/msal-browser": "^2.26.0", - "@azure/msal-common": "^7.0.0", - "@azure/msal-node": "^1.10.0", + "@azure/msal-browser": "^3.5.0", + "@azure/msal-node": "^2.5.1", "events": "^3.0.0", "jws": "^4.0.0", "open": "^8.0.0", "stoppable": "^1.1.0", - "tslib": "^2.2.0", - "uuid": "^8.3.0" + "tslib": "^2.2.0" }, "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/identity/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "bin": { - "uuid": "dist/bin/uuid" + "node": ">=14.0.0" } }, "node_modules/@azure/keyvault-keys": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@azure/keyvault-keys/-/keyvault-keys-4.6.0.tgz", - "integrity": "sha512-0112LegxeR03L8J4k+q6HwBVvrpd9y+oInG0FG3NaHXN7YUubVBon/eb5jFI6edGrvNigpxSR0XIsprFXdkzCQ==", + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/@azure/keyvault-keys/-/keyvault-keys-4.7.2.tgz", + "integrity": "sha512-VdIH6PjbQ3J5ntK+xeI8eOe1WsDxF9ndXw8BPR/9MZVnIj0vQNtNCS6gpR7EFQeGcs8XjzMfHm0AvKGErobqJQ==", "dev": true, "dependencies": { "@azure/abort-controller": "^1.0.0", @@ -368,79 +362,61 @@ "@azure/core-http-compat": "^1.3.0", "@azure/core-lro": "^2.2.0", "@azure/core-paging": "^1.1.1", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.8.1", "@azure/core-tracing": "^1.0.0", "@azure/core-util": "^1.0.0", "@azure/logger": "^1.0.0", "tslib": "^2.2.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" } }, "node_modules/@azure/logger": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.3.tgz", - "integrity": "sha512-aK4s3Xxjrx3daZr3VylxejK3vG5ExXck5WOHDJ8in/k9AqlfIyFMMT1uG7u8mNjX+QRILTIn0/Xgschfh/dQ9g==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.4.tgz", + "integrity": "sha512-ustrPY8MryhloQj7OWGe+HrYx+aoiOxzbXTtgblbV3xwCqpzUK36phH3XNHQKj3EPonyFUuDTfR3qFhTEAuZEg==", "dev": true, "dependencies": { "tslib": "^2.2.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" } }, "node_modules/@azure/msal-browser": { - "version": "2.33.0", - "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-2.33.0.tgz", - "integrity": "sha512-c7CVh1tfUfxiWkEIhoIb11hL4PGo4hz0M+gMy34ATagAKdLK7qyEu/5AXJWAf5lz5eE+vQhm7+LKiuETrcXXGw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-3.6.0.tgz", + "integrity": "sha512-FrFBJXRJMyWXjAjg4cUNZwEKktzfzD/YD9+S1kj2ors67hKoveam4aL0bZuCZU/jTiHTn0xDQGQh2ksCMXTXtA==", "dev": true, "dependencies": { - "@azure/msal-common": "^10.0.0" + "@azure/msal-common": "14.5.0" }, "engines": { "node": ">=0.8.0" } }, - "node_modules/@azure/msal-browser/node_modules/@azure/msal-common": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-10.0.0.tgz", - "integrity": "sha512-/LghpT93jsZLy55QzTsRZWMx6R1Mjc1Aktwps8sKSGE3WbrGwbSsh2uhDlpl6FMcKChYjJ0ochThWwwOodrQNg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/@azure/msal-common": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-7.6.0.tgz", - "integrity": "sha512-XqfbglUTVLdkHQ8F9UQJtKseRr3sSnr9ysboxtoswvaMVaEfvyLtMoHv9XdKUfOc0qKGzNgRFd9yRjIWVepl6Q==", + "version": "14.5.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.5.0.tgz", + "integrity": "sha512-Gx5rZbiZV/HiZ2nEKfjfAF/qDdZ4/QWxMvMo2jhIFVz528dVKtaZyFAOtsX2Ak8+TQvRsGCaEfuwJFuXB6tu1A==", "dev": true, "engines": { "node": ">=0.8.0" } }, "node_modules/@azure/msal-node": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.15.0.tgz", - "integrity": "sha512-fwC5M0c8pxOAzmScPbpx7j28YVTDebUaizlVF7bR0xvlU0r3VWW5OobCcr9ybqKS6wGyO7u4EhXJS9rjRWAuwA==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.6.0.tgz", + "integrity": "sha512-RWAWCYYrSldIYC47oWtofIun41e6SB9TBYgGYsezq6ednagwo9ZRFyRsvl1NabmdTkdDDXRAABIdveeN2Gtd8w==", "dev": true, "dependencies": { - "@azure/msal-common": "^10.0.0", + "@azure/msal-common": "14.5.0", "jsonwebtoken": "^9.0.0", "uuid": "^8.3.0" }, "engines": { - "node": "10 || 12 || 14 || 16 || 18" - } - }, - "node_modules/@azure/msal-node/node_modules/@azure/msal-common": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-10.0.0.tgz", - "integrity": "sha512-/LghpT93jsZLy55QzTsRZWMx6R1Mjc1Aktwps8sKSGE3WbrGwbSsh2uhDlpl6FMcKChYjJ0ochThWwwOodrQNg==", - "dev": true, - "engines": { - "node": ">=0.8.0" + "node": "16|| 18 || 20" } }, "node_modules/@azure/msal-node/node_modules/uuid": { @@ -453,34 +429,106 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", "dev": true, "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.23.4", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -570,6 +618,84 @@ "node": ">=12" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@gar/promisify": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", @@ -593,6 +719,18 @@ "node": ">= 0.10" } }, + "node_modules/@gulp-sourcemaps/identity-map/node_modules/acorn": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/@gulp-sourcemaps/identity-map/node_modules/through2": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", @@ -638,6 +776,61 @@ "xtend": "~4.0.1" } }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "dev": true + }, "node_modules/@hutson/parse-repository-url": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz", @@ -647,19 +840,60 @@ "node": ">=6.9.0" } }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { @@ -673,15 +907,15 @@ } }, "node_modules/@js-joda/core": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/@js-joda/core/-/core-5.5.2.tgz", - "integrity": "sha512-retLUN4TwCJ0QJDi9OCJwYVaXAz93NeOkEtEQL98M2bykBOxmURlP0YlfsuE46kItOOVZIWRYC3KsSLhQ1R2Qw==", + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/@js-joda/core/-/core-5.6.1.tgz", + "integrity": "sha512-Xla/d7ZMMR6+zRd6lTio0wRZECfcfFJP7GGe9A9L4tDOlD5CX4YcZ4YZle9w58bBYzssojVapI84RraKWDQZRg==", "dev": true }, "node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz", - "integrity": "sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", + "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", "dev": true, "dependencies": { "detect-libc": "^2.0.0", @@ -770,19 +1004,13 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@mapbox/node-pre-gyp/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "node_modules/@mongodb-js/saslprep": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.1.tgz", + "integrity": "sha512-t7c5K033joZZMspnHg/gWPE4kandgc2OxE74aYOtGKfgB9VPuVJPix0H6fhmm2erj5PBJ21mqcx34lpIGtUCsQ==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" + "sparse-bitfield": "^3.0.3" } }, "node_modules/@nodelib/fs.scandir": { @@ -831,22 +1059,6 @@ "semver": "^7.3.5" } }, - "node_modules/@npmcli/fs/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "optional": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@npmcli/move-file": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", @@ -936,6 +1148,15 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@redis/bloom": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@redis/bloom/-/bloom-1.2.0.tgz", @@ -946,9 +1167,9 @@ } }, "node_modules/@redis/client": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@redis/client/-/client-1.5.5.tgz", - "integrity": "sha512-fuMnpDYSjT5JXR9rrCW1YWA4L8N/9/uS4ImT3ZEC/hcaQRI1D/9FvwjriRj1UvepIgzZXthFVKMNRzP/LNL7BQ==", + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@redis/client/-/client-1.5.13.tgz", + "integrity": "sha512-epkUM9D0Sdmt93/8Ozk43PNjLi36RZzG+d/T1Gdu5AI8jvghonTeLYV69WVWdilvFo+PYxbP0TZ0saMvr6nscQ==", "dev": true, "dependencies": { "cluster-key-slot": "1.1.2", @@ -960,63 +1181,63 @@ } }, "node_modules/@redis/graph": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@redis/graph/-/graph-1.1.0.tgz", - "integrity": "sha512-16yZWngxyXPd+MJxeSr0dqh2AIOi8j9yXKcKCwVaKDbH3HTuETpDVPcLujhFYVPtYrngSco31BUcSa9TH31Gqg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@redis/graph/-/graph-1.1.1.tgz", + "integrity": "sha512-FEMTcTHZozZciLRl6GiiIB4zGm5z5F3F6a6FZCyrfxdKOhFlGkiAqlexWMBzCi4DcRoyiOsuLfW+cjlGWyExOw==", "dev": true, "peerDependencies": { "@redis/client": "^1.0.0" } }, "node_modules/@redis/json": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@redis/json/-/json-1.0.4.tgz", - "integrity": "sha512-LUZE2Gdrhg0Rx7AN+cZkb1e6HjoSKaeeW8rYnt89Tly13GBI5eP4CwDVr+MY8BAYfCg4/N15OUrtLoona9uSgw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@redis/json/-/json-1.0.6.tgz", + "integrity": "sha512-rcZO3bfQbm2zPRpqo82XbW8zg4G/w4W3tI7X8Mqleq9goQjAGLL7q/1n1ZX4dXEAmORVZ4s1+uKLaUOg7LrUhw==", "dev": true, "peerDependencies": { "@redis/client": "^1.0.0" } }, "node_modules/@redis/search": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@redis/search/-/search-1.1.1.tgz", - "integrity": "sha512-pqCXTc5e7wJJgUuJiC3hBgfoFRoPxYzwn0BEfKgejTM7M/9zP3IpUcqcjgfp8hF+LoV8rHZzcNTz7V+pEIY7LQ==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@redis/search/-/search-1.1.6.tgz", + "integrity": "sha512-mZXCxbTYKBQ3M2lZnEddwEAks0Kc7nauire8q20oA0oA/LoA+E/b5Y5KZn232ztPb1FkIGqo12vh3Lf+Vw5iTw==", "dev": true, "peerDependencies": { "@redis/client": "^1.0.0" } }, "node_modules/@redis/time-series": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-1.0.4.tgz", - "integrity": "sha512-ThUIgo2U/g7cCuZavucQTQzA9g9JbDDY2f64u3AbAoz/8vE2lt2U37LamDUVChhaDA3IRT9R6VvJwqnUfTJzng==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-1.0.5.tgz", + "integrity": "sha512-IFjIgTusQym2B5IZJG3XKr5llka7ey84fw/NOYqESP5WUfQs9zz1ww/9+qoz4ka/S6KcGBodzlCeZ5UImKbscg==", "dev": true, "peerDependencies": { "@redis/client": "^1.0.0" } }, "node_modules/@sinonjs/commons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", - "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", "dev": true, "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/fake-timers": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.0.2.tgz", - "integrity": "sha512-SwUDyjWnah1AaNl7kxsa7cfLhlTYoiyhDAIgyh+El30YvXs/o7OLXpYH88Zdhyx9JExKrmHDJ+10bwIcY80Jmw==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, "dependencies": { - "@sinonjs/commons": "^2.0.0" + "@sinonjs/commons": "^3.0.0" } }, "node_modules/@sinonjs/samsam": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-7.0.1.tgz", - "integrity": "sha512-zsAk2Jkiq89mhZovB2LLOdTCxJF4hqqTToGP0ASWlhp4I1hqOjcfmZGafXntCN7MDC6yySH0mFHrYtHceOeLmw==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.0.tgz", + "integrity": "sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew==", "dev": true, "dependencies": { "@sinonjs/commons": "^2.0.0", @@ -1024,6 +1245,15 @@ "type-detect": "^4.0.8" } }, + "node_modules/@sinonjs/samsam/node_modules/@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, "node_modules/@sinonjs/text-encoding": { "version": "0.7.2", "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", @@ -1036,9 +1266,9 @@ "integrity": "sha512-Uy0+khmZqUrUGm5dmMqVlnvufZRSK0FbYzVgp0UMstm+F5+W2/jnEEQyc9vo1ZR/E5ZI/B1WjjoTqBqwJL6Krw==" }, "node_modules/@tediousjs/connection-string": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@tediousjs/connection-string/-/connection-string-0.4.2.tgz", - "integrity": "sha512-1R9UC7Qc5wief2oJL+c1+d7v1/oPBayL85u8L/jV2DzIKput1TZ8ZUjj2nxQaSfzu210zp0oFWUrYUiUs8NhBQ==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@tediousjs/connection-string/-/connection-string-0.5.0.tgz", + "integrity": "sha512-7qSgZbincDDDFyRweCIEvZULFAw5iz/DeunhvuxpL31nfntX3P4Yd4HkHBRg9H8CdqY1e5WFN1PZIz/REL9MVQ==", "dev": true }, "node_modules/@tootallnate/once": { @@ -1070,36 +1300,36 @@ "dev": true }, "node_modules/@tsconfig/node16": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", - "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "version": "16.1.1", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-16.1.1.tgz", + "integrity": "sha512-+pio93ejHN4nINX4pXqfnR/fPLRtJBaT4ORaa5RH0Oc1zoYmo2B2koG+M328CQhHKn1Wj6FcOxCDFXAot9NhvA==", "dev": true }, "node_modules/@types/app-root-path": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@types/app-root-path/-/app-root-path-1.2.4.tgz", - "integrity": "sha512-yhURoXmWN/zfw2MXXcOdUTwe5CWhzRWtb4Rs2+JwGpuhm2hxLCzjASi/aIuyVeJB3Iyks1teaHyOEfNNmltdvQ==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@types/app-root-path/-/app-root-path-1.2.8.tgz", + "integrity": "sha512-l12miuN6JXAi3yuADZNhRKbyN7IIyaUP9hFVZ/BbHhWYpBkHLbOaX2WkQoXGJyAgMcP9iZ0S9+tz/FN40VrwWQ==", "dev": true }, "node_modules/@types/chai": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz", - "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==", + "version": "4.3.11", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.11.tgz", + "integrity": "sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==", "dev": true }, "node_modules/@types/chai-as-promised": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz", - "integrity": "sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ==", + "version": "7.1.8", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz", + "integrity": "sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==", "dev": true, "dependencies": { "@types/chai": "*" } }, "node_modules/@types/debug": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", - "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", "dev": true, "dependencies": { "@types/ms": "*" @@ -1111,37 +1341,49 @@ "integrity": "sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==", "dev": true }, - "node_modules/@types/glob": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.0.1.tgz", - "integrity": "sha512-8bVUjXZvJacUFkJXHdyZ9iH1Eaj5V7I8c4NdH5sQJsdXkqT4CA5Dhb4yb4VE/3asyx4L9ayZr1NIhTsWHczmMw==", - "dev": true, - "dependencies": { - "@types/minimatch": "^5.1.2", - "@types/node": "*" - } - }, "node_modules/@types/glob-stream": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@types/glob-stream/-/glob-stream-6.1.1.tgz", - "integrity": "sha512-AGOUTsTdbPkRS0qDeyeS+6KypmfVpbT5j23SN8UPG63qjKXNKjXn6V9wZUr8Fin0m9l8oGYaPK8b2WUMF8xI1A==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@types/glob-stream/-/glob-stream-8.0.2.tgz", + "integrity": "sha512-kyuRfGE+yiSJWzSO3t74rXxdZNdYfLcllO0IUha4eX1fl40pm9L02Q/TEc3mykTLjoWz4STBNwYnUWdFu3I0DA==", "dev": true, "dependencies": { - "@types/glob": "*", - "@types/node": "*" + "@types/node": "*", + "@types/picomatch": "*", + "@types/streamx": "*" } }, "node_modules/@types/gulp": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/@types/gulp/-/gulp-4.0.10.tgz", - "integrity": "sha512-spgZHJFqiEJGwqGlf7T/k4nkBpBcLgP7T0EfN6G2vvnhUfvd4uO1h8RwpXOE8x/54DVYUs1XCAtBHkX/R3axAQ==", + "version": "4.0.17", + "resolved": "https://registry.npmjs.org/@types/gulp/-/gulp-4.0.17.tgz", + "integrity": "sha512-+pKQynu2C/HS16kgmDlAicjtFYP8kaa86eE9P0Ae7GB5W29we/E2TIdbOWtEZD5XkpY+jr8fyqfwO6SWZecLpQ==", "dev": true, "dependencies": { + "@types/node": "*", "@types/undertaker": ">=1.2.6", "@types/vinyl-fs": "*", "chokidar": "^3.3.1" } }, + "node_modules/@types/gulp-rename": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/gulp-rename/-/gulp-rename-2.0.6.tgz", + "integrity": "sha512-pvZdJ004TpC4Ohk9l0CxEXzS9E0L72b5n6lkIEIaWUIy/RlqnkDMHVtEC6InDjd4rt0jZKcvTrDKxeT96WUYnw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/vinyl": "*" + } + }, + "node_modules/@types/gulp-sourcemaps": { + "version": "0.0.38", + "resolved": "https://registry.npmjs.org/@types/gulp-sourcemaps/-/gulp-sourcemaps-0.0.38.tgz", + "integrity": "sha512-9wm+P44eM/VKZSYwGDwalOH6rnvNckwfPgz0gEUlTzjKH1OsSbexdvE8aKBt+8syEkq827Fu+4gV17/EyUtH9w==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/vinyl": "*" + } + }, "node_modules/@types/gulp/node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", @@ -1165,12 +1407,12 @@ } }, "node_modules/@types/gulp/node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -1204,9 +1446,9 @@ } }, "node_modules/@types/gulp/node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -1216,9 +1458,9 @@ } }, "node_modules/@types/gulp/node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, "optional": true, @@ -1229,6 +1471,18 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/@types/gulp/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/@types/gulp/node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -1274,25 +1528,25 @@ "node": ">=8.0" } }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, "node_modules/@types/merge2": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@types/merge2/-/merge2-1.4.0.tgz", - "integrity": "sha512-MRHDvln2ldZELrUC8n1PGaQzZ33aNh8uDcsGehREW0zR1Fr818a4/JTZjO9eloHPPxnpUp8fz/YFTRc5CWm7Xw==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@types/merge2/-/merge2-1.4.4.tgz", + "integrity": "sha512-WZLSif3sHKMlq6vW22R9ub5f+/CEFFlSCY8actv9WBU/8RMJes5zHog9+8oEVLTkaIPaM8fp8XpLaHZggPWN9Q==", "dev": true, "dependencies": { "@types/node": "*" } }, - "node_modules/@types/minimatch": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", - "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", - "dev": true - }, "node_modules/@types/minimist": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", "dev": true }, "node_modules/@types/mkdirp": { @@ -1305,76 +1559,90 @@ } }, "node_modules/@types/mocha": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", - "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", + "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", "dev": true }, "node_modules/@types/ms": { - "version": "0.7.31", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", - "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==", + "version": "0.7.34", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", + "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==", "dev": true }, "node_modules/@types/node": { - "version": "18.13.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.13.0.tgz", - "integrity": "sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==", - "dev": true + "version": "18.19.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.4.tgz", + "integrity": "sha512-xNzlUhzoHotIsnFoXmJB+yWmBvFZgKCI9TtPIEdYIMM1KWfwuY8zh7wvc1u1OAXlC7dlf6mZVx/s+Y5KfFz19A==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/normalize-package-data": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", - "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", "dev": true }, - "node_modules/@types/rimraf": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-2.0.5.tgz", - "integrity": "sha512-YyP+VfeaqAyFmXoTh3HChxOQMyjByRMsHU7kc5KOJkSlXudhMhQIALbYV7rHh/l8d2lX3VUQzprrcAgWdRuU8g==", - "dev": true, - "dependencies": { - "@types/glob": "*", - "@types/node": "*" - } + "node_modules/@types/picomatch": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@types/picomatch/-/picomatch-2.3.3.tgz", + "integrity": "sha512-Yll76ZHikRFCyz/pffKGjrCwe/le2CDwOP5F210KQo27kpRE46U2rDnzikNlVn6/ezH3Mhn46bJMTfeVTtcYMg==", + "dev": true + }, + "node_modules/@types/semver": { + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", + "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", + "dev": true }, "node_modules/@types/sha.js": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/sha.js/-/sha.js-2.4.0.tgz", - "integrity": "sha512-amxKgPy6WJTKuw8mpUwjX2BSxuBtBmZfRwIUDIuPJKNwGN8CWDli8JTg5ONTWOtcTkHIstvT7oAhhYXqEjStHQ==", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/sha.js/-/sha.js-2.4.4.tgz", + "integrity": "sha512-Qukd+D6S2Hm0wLVt2Vh+/eWBIoUt+wF8jWjBsG4F8EFQRwKtYvtXCPcNl2OEUQ1R+eTr3xuSaBYUyM3WD1x/Qw==", "dev": true, "dependencies": { "@types/node": "*" } }, "node_modules/@types/sinon": { - "version": "10.0.13", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.13.tgz", - "integrity": "sha512-UVjDqJblVNQYvVNUsj0PuYYw0ELRmgt1Nt5Vk0pT5f16ROGfcKJY8o1HVuMOJOpD727RrGB9EGvoaTQE5tgxZQ==", + "version": "10.0.20", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.20.tgz", + "integrity": "sha512-2APKKruFNCAZgx3daAyACGzWuJ028VVCUDk6o2rw/Z4PXT0ogwdV4KUegW0MwVs0Zu59auPXbbuBJHF12Sx1Eg==", "dev": true, "dependencies": { "@types/sinonjs__fake-timers": "*" } }, "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz", - "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", + "version": "8.1.5", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.5.tgz", + "integrity": "sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ==", "dev": true }, "node_modules/@types/source-map-support": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/@types/source-map-support/-/source-map-support-0.5.6.tgz", - "integrity": "sha512-b2nJ9YyXmkhGaa2b8VLM0kJ04xxwNyijcq12/kDoomCt43qbHBeK2SLNJ9iJmETaAj+bKUT05PQUu3Q66GvLhQ==", + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/@types/source-map-support/-/source-map-support-0.5.10.tgz", + "integrity": "sha512-tgVP2H469x9zq34Z0m/fgPewGhg/MLClalNOiPIzQlXrSS2YrKu/xCdSCKnEDwkFha51VKEKB6A9wW26/ZNwzA==", "dev": true, "dependencies": { "source-map": "^0.6.0" } }, + "node_modules/@types/streamx": { + "version": "2.9.5", + "resolved": "https://registry.npmjs.org/@types/streamx/-/streamx-2.9.5.tgz", + "integrity": "sha512-IHYsa6jYrck8VEdSwpY141FTTf6D7boPeMq9jy4qazNrFMA4VbRz/sw5LSsfR7jwdDcx0QKWkUexZvsWBC2eIQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/undertaker": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@types/undertaker/-/undertaker-1.2.8.tgz", - "integrity": "sha512-gW3PRqCHYpo45XFQHJBhch7L6hytPsIe0QeLujlnFsjHPnXLhJcPdN6a9368d7aIQgH2I/dUTPFBlGeSNA3qOg==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@types/undertaker/-/undertaker-1.2.11.tgz", + "integrity": "sha512-j1Z0V2ByRHr8ZK7eOeGq0LGkkdthNFW0uAZGY22iRkNQNL9/vAV0yFPr1QN3FM/peY5bxs9P+1f0PYJTQVa5iA==", "dev": true, "dependencies": { "@types/node": "*", @@ -1383,21 +1651,21 @@ } }, "node_modules/@types/undertaker-registry": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/undertaker-registry/-/undertaker-registry-1.0.1.tgz", - "integrity": "sha512-Z4TYuEKn9+RbNVk1Ll2SS4x1JeLHecolIbM/a8gveaHsW0Hr+RQMraZACwTO2VD7JvepgA6UO1A1VrbktQrIbQ==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/undertaker-registry/-/undertaker-registry-1.0.4.tgz", + "integrity": "sha512-tW77pHh2TU4uebWXWeEM5laiw8BuJ7pyJYDh6xenOs75nhny2kVgwYbegJ4BoLMYsIrXaBpKYaPdYO3/udG+hg==", "dev": true }, "node_modules/@types/uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-kr90f+ERiQtKWMz5rP32ltJ/BtULDI5RVO0uavn1HQUOwjx0R1h0rnDYNL0CepF1zL5bSY6FISAfd9tOdDhU5Q==", + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.7.tgz", + "integrity": "sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==", "dev": true }, "node_modules/@types/vinyl": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.7.tgz", - "integrity": "sha512-4UqPv+2567NhMQuMLdKAyK4yzrfCqwaTt6bLhHEs8PFcxbHILsrxaY63n4wgE/BRLDWDQeI+WcTmkXKExh9hQg==", + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.11.tgz", + "integrity": "sha512-vPXzCLmRp74e9LsP8oltnWKTH+jBwt86WgRUb4Pc9Lf3pkMVGyvIo2gm9bODeGfCay2DBB/hAWDuvf07JcK4rw==", "dev": true, "dependencies": { "@types/expect": "^1.20.4", @@ -1405,52 +1673,241 @@ } }, "node_modules/@types/vinyl-fs": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/vinyl-fs/-/vinyl-fs-3.0.1.tgz", - "integrity": "sha512-me2Gcxw23pZp62oqPoiTDDMz/txEmtEZzXM/D/VTr+xUX4LiNA+nQPs38SSPu5KHnsaEER4HEtzWU5qJRXigfA==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/vinyl-fs/-/vinyl-fs-3.0.5.tgz", + "integrity": "sha512-ckYz9giHgV6U10RFuf9WsDQ3X86EFougapxHmmoxLK7e6ICQqO8CE+4V/3lBN148V5N1pb4nQMmMjyScleVsig==", "dev": true, "dependencies": { "@types/glob-stream": "*", "@types/node": "*", - "@types/rimraf": "^2.0.3", "@types/vinyl": "*" } }, "node_modules/@types/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-xTE1E+YF4aWPJJeUzaZI5DRntlkY3+BCVJi0axFptnjGmAoWxkyREIh/XMrfxVLejwQxMCfDXdICo0VLxThrog==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", + "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==", "dev": true }, "node_modules/@types/whatwg-url": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", - "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.3.tgz", + "integrity": "sha512-z1ELvMijRL1QmU7QuzDkeYXSF2+dXI0ITKoQsIoVKcNBOiK5RMmWy+pYYxJTHFt8vkpZe7UsvRErQwcxZkjoUw==", "dev": true, "dependencies": { - "@types/node": "*", "@types/webidl-conversions": "*" } }, "node_modules/@types/yargs": { - "version": "17.0.22", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.22.tgz", - "integrity": "sha512-pet5WJ9U8yPVRhkwuEIp5ktAeAqRZOq4UdAyWLWzxbtpyXnzbtLdKiXAjJzi/KLmPGS9wk86lUFWZFN6sISo4g==", + "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", "dev": true, "dependencies": { "@types/yargs-parser": "*" } }, "node_modules/@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", "dev": true }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.17.0.tgz", + "integrity": "sha512-Vih/4xLXmY7V490dGwBQJTpIZxH4ZFH6eCVmQ4RFkB+wmaCTDAx4dtgoWwMNGKLkqRY1L6rPqzEbjorRnDo4rQ==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.17.0", + "@typescript-eslint/type-utils": "6.17.0", + "@typescript-eslint/utils": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.17.0.tgz", + "integrity": "sha512-C4bBaX2orvhK+LlwrY8oWGmSl4WolCfYm513gEccdWZj0CwGadbIADb0FtVEcI+WzUyjyoBj2JRP8g25E6IB8A==", + "dev": true, + "peer": true, + "dependencies": { + "@typescript-eslint/scope-manager": "6.17.0", + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/typescript-estree": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.17.0.tgz", + "integrity": "sha512-RX7a8lwgOi7am0k17NUO0+ZmMOX4PpjLtLRgLmT1d3lBYdWH4ssBUbwdmc5pdRX8rXon8v9x8vaoOSpkHfcXGA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.17.0.tgz", + "integrity": "sha512-hDXcWmnbtn4P2B37ka3nil3yi3VCQO2QEB9gBiHJmQp5wmyQWqnjA85+ZcE8c4FqnaB6lBwMrPkgd4aBYz3iNg==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "6.17.0", + "@typescript-eslint/utils": "6.17.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.17.0.tgz", + "integrity": "sha512-qRKs9tvc3a4RBcL/9PXtKSehI/q8wuU9xYJxe97WFxnzH8NWWtcW3ffNS+EWg8uPvIerhjsEZ+rHtDqOCiH57A==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.17.0.tgz", + "integrity": "sha512-gVQe+SLdNPfjlJn5VNGhlOhrXz4cajwFd5kAgWtZ9dCZf4XJf8xmgCTLIqec7aha3JwgLI2CK6GY1043FRxZwg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.17.0.tgz", + "integrity": "sha512-LofsSPjN/ITNkzV47hxas2JCsNCEnGhVvocfyOcLzT9c/tSZE7SfhS/iWtzP1lKNOEfLhRTZz6xqI8N2RzweSQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.17.0", + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/typescript-estree": "6.17.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.17.0.tgz", + "integrity": "sha512-H6VwB/k3IuIeQOyYczyyKN8wH6ed8EwliaYHLxOIhyF0dYEIsN8+Bk3GE19qafeMKyZJJHP8+O1HiFhFLUNKSg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.17.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, "node_modules/abbrev": { @@ -1459,10 +1916,22 @@ "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", "dev": true }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dev": true, + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, "node_modules/acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1471,10 +1940,19 @@ "node": ">=0.4.0" } }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz", + "integrity": "sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==", "dev": true, "engines": { "node": ">=0.4.0" @@ -1499,14 +1977,12 @@ } }, "node_modules/agentkeepalive": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", - "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", "dev": true, "optional": true, "dependencies": { - "debug": "^4.1.0", - "depd": "^1.1.2", "humanize-ms": "^1.2.1" }, "engines": { @@ -1526,6 +2002,22 @@ "node": ">=8" } }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/amdefine": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", @@ -1665,51 +2157,26 @@ "node": ">=0.10.0" } }, - "node_modules/anymatch/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "node_modules/anymatch/node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", "dev": true, "dependencies": { - "kind-of": "^6.0.0" + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" } }, - "node_modules/anymatch/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "node_modules/anymatch/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/anymatch/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/anymatch/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4" + "is-plain-object": "^2.0.4" }, "engines": { "node": ">=0.10.0" @@ -1818,9 +2285,9 @@ } }, "node_modules/are-we-there-yet/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "dependencies": { "inherits": "^2.0.3", @@ -1907,6 +2374,19 @@ "node": ">=0.10.0" } }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-each": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", @@ -2006,6 +2486,27 @@ "node": ">=0.10.0" } }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", + "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", @@ -2078,12 +2579,6 @@ "node": ">= 0.10" } }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, "node_modules/atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", @@ -2108,6 +2603,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/aws-ssl-profiles": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz", + "integrity": "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==", + "dev": true, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/bach": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", @@ -2163,51 +2667,17 @@ "node": ">=0.10.0" } }, - "node_modules/base/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/base/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/base/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/base/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" } }, "node_modules/base64-js": { @@ -2230,14 +2700,14 @@ ] }, "node_modules/better-sqlite3": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-8.1.0.tgz", - "integrity": "sha512-p1m09H+Oi8R9TPj810pdNswMFuVgRNgCJEWypp6jlkOgSwMIrNyuj3hW78xEuBRGok5RzeaUW8aBtTWF3l/TQA==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-8.7.0.tgz", + "integrity": "sha512-99jZU4le+f3G6aIl6PmmV0cxUIWqKieHxsiF7G34CVFiE+/UabpYqkU0NJIkY/96mQKikHeBjtR27vFfs5JpEw==", "dev": true, "hasInstallScript": true, "dependencies": { "bindings": "^1.5.0", - "prebuild-install": "^7.1.0" + "prebuild-install": "^7.1.1" } }, "node_modules/bignumber.js": { @@ -2279,6 +2749,55 @@ "file-uri-to-path": "1.0.0" } }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -2315,12 +2834,12 @@ "dev": true }, "node_modules/bson": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bson/-/bson-5.2.0.tgz", - "integrity": "sha512-HevkSpDbpUfsrHWmWiAsNavANKYIErV2ePXllp1bwq5CDreAaFVj6RVlZpJnxK4WWDCJ/5jMUpaY6G526q3Hjg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz", + "integrity": "sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q==", "dev": true, "engines": { - "node": ">=14.20.1" + "node": ">=16.20.1" } }, "node_modules/buffer": { @@ -2454,6 +2973,19 @@ "node": "*" } }, + "node_modules/cacache/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "optional": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/cacache/node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -2504,18 +3036,28 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -2543,18 +3085,18 @@ } }, "node_modules/chai": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", - "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", + "version": "4.3.10", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", + "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", "dev": true, "dependencies": { "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^4.1.2", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.5" + "type-detect": "^4.0.8" }, "engines": { "node": ">=4" @@ -2588,10 +3130,13 @@ } }, "node_modules/check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, + "dependencies": { + "get-func-name": "^2.0.2" + }, "engines": { "node": "*" } @@ -2719,6 +3264,40 @@ "wrap-ansi": "^7.0.0" } }, + "node_modules/cli-highlight/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/cli-highlight/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-highlight/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/cli-highlight/node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -2757,6 +3336,40 @@ "node": ">=12" } }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/clone": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", @@ -2862,25 +3475,13 @@ "color-support": "bin.js" } }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/commander": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", - "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", "dev": true, "engines": { - "node": "^12.20.0 || >=14" + "node": ">=16" } }, "node_modules/compare-func": { @@ -2894,10 +3495,13 @@ } }, "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", + "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/concat-map": { "version": "0.0.1", @@ -3136,6 +3740,15 @@ "node": ">=10" } }, + "node_modules/conventional-changelog-writer/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/conventional-commits-filter": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz", @@ -3207,10 +3820,9 @@ "dev": true }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -3268,18 +3880,6 @@ "node": ">= 0.6" } }, - "node_modules/date-fns": { - "version": "2.29.3", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.3.tgz", - "integrity": "sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==", - "engines": { - "node": ">=0.11" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" - } - }, "node_modules/dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", @@ -3289,12 +3889,17 @@ "node": "*" } }, + "node_modules/dayjs": { + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", + "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" + }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -3431,6 +4036,20 @@ "node": ">= 0.10" } }, + "node_modules/define-data-property": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/define-lazy-prop": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", @@ -3441,11 +4060,12 @@ } }, "node_modules/define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "dependencies": { + "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" }, @@ -3547,29 +4167,19 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/delegates": { + "node_modules/delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", "dev": true }, - "node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", "dev": true, - "optional": true, "engines": { - "node": ">= 0.6" + "node": ">=0.10" } }, "node_modules/detect-file": { @@ -3582,9 +4192,9 @@ } }, "node_modules/detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", "dev": true, "engines": { "node": ">=8" @@ -3600,9 +4210,9 @@ } }, "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, "engines": { "node": ">=0.3.1" @@ -3620,6 +4230,18 @@ "node": ">=8" } }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/dot-prop": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", @@ -3633,11 +4255,14 @@ } }, "node_modules/dotenv": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", - "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", + "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/motdotla/dotenv?sponsor=1" } }, "node_modules/duplexify": { @@ -3674,6 +4299,23 @@ "node": ">=0.10.0" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" + }, + "node_modules/easy-transform-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/easy-transform-stream/-/easy-transform-stream-1.0.1.tgz", + "integrity": "sha512-ktkaa6XR7COAR3oj02CF3IOgz2m1hCaY3SfzvKT4Svt2MhHw9XCt+ncJNWfe2TGz31iqzNGZ8spdKQflj+Rlog==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ecdsa-sig-formatter": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", @@ -3684,9 +4326,9 @@ } }, "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" }, "node_modules/encoding": { "version": "0.1.13", @@ -3734,44 +4376,50 @@ } }, "node_modules/es-abstract": { - "version": "1.21.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.1.tgz", - "integrity": "sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==", + "version": "1.22.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", + "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", "dev": true, "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.2", "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "call-bind": "^1.0.5", "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.3", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.2", "get-symbol-description": "^1.0.0", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has": "^1.0.3", "has-property-descriptors": "^1.0.0", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.4", - "is-array-buffer": "^3.0.1", + "hasown": "^2.0.0", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", "is-callable": "^1.2.7", "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-typed-array": "^1.1.10", + "is-typed-array": "^1.1.12", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.2", + "object-inspect": "^1.13.1", "object-keys": "^1.1.1", "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", "safe-regex-test": "^1.0.0", - "string.prototype.trimend": "^1.0.6", - "string.prototype.trimstart": "^1.0.6", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", "typed-array-length": "^1.0.4", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.9" + "which-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -3781,18 +4429,19 @@ } }, "node_modules/es-aggregate-error": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/es-aggregate-error/-/es-aggregate-error-1.0.9.tgz", - "integrity": "sha512-fvnX40sb538wdU6r4s35cq4EY6Lr09Upj40BEVem4LEsuW8XgQep9yD5Q1U2KftokNp1rWODFJ2qwZSsAjFpbg==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/es-aggregate-error/-/es-aggregate-error-1.0.11.tgz", + "integrity": "sha512-DCiZiNlMlbvofET/cE55My387NiLvuGToBEZDdK9U2G3svDCjL8WOgO5Il6lO83nQ8qmag/R9nArdpaFQ/m3lA==", "dev": true, "dependencies": { - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", + "define-data-property": "^1.1.0", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.1", "function-bind": "^1.1.1", - "functions-have-names": "^1.2.3", - "get-intrinsic": "^1.1.3", + "get-intrinsic": "^1.2.1", "globalthis": "^1.0.3", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.0", + "set-function-name": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -3802,14 +4451,14 @@ } }, "node_modules/es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", + "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" + "get-intrinsic": "^1.2.2", + "has-tostringtag": "^1.0.0", + "hasown": "^2.0.0" }, "engines": { "node": ">= 0.4" @@ -3833,14 +4482,15 @@ } }, "node_modules/es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", "dev": true, "hasInstallScript": true, "dependencies": { "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", "next-tick": "^1.1.0" }, "engines": { @@ -3922,6 +4572,54 @@ "source-map": "~0.2.0" } }, + "node_modules/escodegen/node_modules/estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/escodegen/node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/escodegen/node_modules/source-map": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", @@ -3935,6 +4633,161 @@ "node": ">=0.8.0" } }, + "node_modules/escodegen/node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.56.0", + "@humanwhocodes/config-array": "^0.11.13", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esniff/node_modules/type": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz", + "integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==", + "dev": true + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/esprima": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", @@ -3948,13 +4801,37 @@ "node": ">=0.10.0" } }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, "node_modules/estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=4.0" } }, "node_modules/esutils": { @@ -3976,6 +4853,15 @@ "es5-ext": "~0.10.14" } }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", @@ -3986,23 +4872,23 @@ } }, "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", "dev": true, "dependencies": { "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" }, "engines": { - "node": ">=10" + "node": ">=16.17" }, "funding": { "url": "https://github.com/sindresorhus/execa?sponsor=1" @@ -4126,51 +5012,17 @@ "node": ">=0.10.0" } }, - "node_modules/extglob/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/extglob/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" } }, "node_modules/fancy-log": { @@ -4188,10 +5040,16 @@ "node": ">= 0.10" } }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -4204,6 +5062,24 @@ "node": ">=8.6.0" } }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", @@ -4211,14 +5087,26 @@ "dev": true }, "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz", + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", "dev": true, "dependencies": { "reusify": "^1.0.4" } }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, "node_modules/file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -4306,42 +5194,17 @@ "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/findup-sync/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/findup-sync/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" } }, "node_modules/findup-sync/node_modules/is-extendable": { @@ -4447,6 +5310,83 @@ "flat": "cli.js" } }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flat-cache/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/flat-cache/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/flat-cache/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/flat-cache/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/flatted": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "dev": true + }, "node_modules/flush-write-stream": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", @@ -4487,18 +5427,19 @@ "node": ">=0.10.0" } }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" }, "engines": { - "node": ">= 6" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/fragment-cache": { @@ -4531,6 +5472,18 @@ "node": ">= 8" } }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/fs-mkdirp-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", @@ -4557,13 +5510,14 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true }, "node_modules/fsevents": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", - "deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.", + "deprecated": "The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2", "dev": true, "hasInstallScript": true, "optional": true, @@ -4579,21 +5533,24 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" }, "engines": { "node": ">= 0.4" @@ -4631,6 +5588,32 @@ "node": ">=10" } }, + "node_modules/gauge/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/gauge/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/gauge/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/generate-function": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", @@ -4658,23 +5641,24 @@ } }, "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, "engines": { "node": "*" } }, "node_modules/get-intrinsic": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", - "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4709,6 +5693,26 @@ "wrap-ansi": "^7.0.0" } }, + "node_modules/get-pkg-repo/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/get-pkg-repo/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/get-pkg-repo/node_modules/through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", @@ -4719,6 +5723,23 @@ "xtend": "~4.0.1" } }, + "node_modules/get-pkg-repo/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/get-pkg-repo/node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -4747,12 +5768,12 @@ } }, "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", "dev": true, "engines": { - "node": ">=10" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -4831,6 +5852,15 @@ "node": ">=10" } }, + "node_modules/git-semver-tags/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/gitconfiglocal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", @@ -4847,33 +5877,34 @@ "dev": true }, "node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, - "engines": { - "node": ">=12" + "bin": { + "glob": "dist/esm/bin.mjs" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" } }, "node_modules/glob-stream": { @@ -4979,6 +6010,20 @@ "node": ">= 0.10" } }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/global-modules": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", @@ -5021,6 +6066,21 @@ "which": "bin/which" } }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/globalthis": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", @@ -5081,19 +6141,16 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, - "engines": { - "node": ">=4.x" - } + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true }, "node_modules/gulp": { "version": "4.0.2", @@ -5305,12 +6362,12 @@ } }, "node_modules/gulp-cli/node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -5322,9 +6379,9 @@ } }, "node_modules/gulp-cli/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -5443,20 +6500,19 @@ } }, "node_modules/gulp-mocha": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/gulp-mocha/-/gulp-mocha-8.0.0.tgz", - "integrity": "sha512-FdbBydfzszaES/gXfwD6RFq1yJTj4Z6328R1yqsmhf+t7hW2aj9ZD9Hz8boQShjZ9J8/w6tQBM5mePb8K2pbqA==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/gulp-mocha/-/gulp-mocha-10.0.0.tgz", + "integrity": "sha512-scpNKztpN1EmrqakNuyw8/otee6NvCceiQ0sCf5stiubI/HOconX6KJoFC6/mDcU1pYVJJb7PcxvX9T56jhtnQ==", "dev": true, "dependencies": { - "dargs": "^7.0.0", - "execa": "^5.0.0", - "mocha": "^8.3.0", - "plugin-error": "^1.0.1", - "supports-color": "^8.1.1", - "through2": "^4.0.2" + "dargs": "^8.1.0", + "execa": "^8.0.1", + "gulp-plugin-extras": "^0.3.0", + "mocha": "^10.2.0", + "supports-color": "^9.4.0" }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5470,422 +6526,57 @@ } } }, - "node_modules/gulp-mocha/node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "node_modules/gulp-mocha/node_modules/dargs": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-8.1.0.tgz", + "integrity": "sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==", "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, "engines": { - "node": ">= 8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/gulp-mocha/node_modules/arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-mocha/node_modules/arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-mocha/node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/gulp-mocha/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/gulp-mocha/node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/gulp-mocha/node_modules/chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.1" - } - }, - "node_modules/gulp-mocha/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/gulp-mocha/node_modules/debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/gulp-mocha/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", - "dev": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-mocha/node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/gulp-mocha/node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/gulp-mocha/node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "node_modules/gulp-mocha/node_modules/supports-color": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz", + "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==", "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, "engines": { - "node": "*" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/gulp-mocha/node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/gulp-mocha/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-mocha/node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/gulp-mocha/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-mocha/node_modules/js-yaml": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", - "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/gulp-mocha/node_modules/log-symbols": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0" - }, - "engines": { - "node": ">=10" + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/gulp-mocha/node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "node_modules/gulp-plugin-extras": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/gulp-plugin-extras/-/gulp-plugin-extras-0.3.0.tgz", + "integrity": "sha512-I/kOBSpo61QsGQZcqozZYEnDseKvpudUafVVWDLYgBFAUJ37kW5R8Sjw9cMYzpGyPUfEYOeoY4p+dkfLqgyJUQ==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "@types/vinyl": "^2.0.9", + "chalk": "^5.3.0", + "easy-transform-stream": "^1.0.1" }, "engines": { - "node": "*" - } - }, - "node_modules/gulp-mocha/node_modules/mocha": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", - "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", - "dev": true, - "dependencies": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.1", - "debug": "4.3.1", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.1.6", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "4.0.0", - "log-symbols": "4.0.0", - "minimatch": "3.0.4", - "ms": "2.1.3", - "nanoid": "3.1.20", - "serialize-javascript": "5.0.1", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "which": "2.0.2", - "wide-align": "1.1.3", - "workerpool": "6.1.0", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" - }, - "engines": { - "node": ">= 10.12.0" + "node": ">=18" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "node_modules/gulp-mocha/node_modules/mocha/node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/gulp-mocha/node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/gulp-mocha/node_modules/nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/gulp-mocha/node_modules/plugin-error": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", - "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", - "dev": true, - "dependencies": { - "ansi-colors": "^1.0.1", - "arr-diff": "^4.0.0", - "arr-union": "^3.1.0", - "extend-shallow": "^3.0.2" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/gulp-mocha/node_modules/readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/gulp-mocha/node_modules/serialize-javascript": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", - "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/gulp-mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/gulp-plugin-extras/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, "engines": { - "node": ">=10" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/gulp-mocha/node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/gulp-mocha/node_modules/workerpool": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", - "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==", - "dev": true - }, - "node_modules/gulp-mocha/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/gulp-mocha/node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true, - "engines": { - "node": ">=10" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/gulp-rename": { @@ -6051,6 +6742,18 @@ "node": ">= 6" } }, + "node_modules/gulp-sourcemaps/node_modules/acorn": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/gulp-sourcemaps/node_modules/through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", @@ -6217,13 +6920,13 @@ } }, "node_modules/handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", "dev": true, "dependencies": { "minimist": "^1.2.5", - "neo-async": "^2.6.0", + "neo-async": "^2.6.2", "source-map": "^0.6.1", "wordwrap": "^1.0.0" }, @@ -6246,18 +6949,6 @@ "node": ">=6" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", @@ -6276,12 +6967,12 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.1" + "get-intrinsic": "^1.2.2" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6365,10 +7056,22 @@ "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" } }, "node_modules/he": { @@ -6448,12 +7151,12 @@ } }, "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", "dev": true, "engines": { - "node": ">=10.17.0" + "node": ">=16.17.0" } }, "node_modules/humanize-ms": { @@ -6513,20 +7216,35 @@ ] }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", "dev": true, "engines": { "node": ">= 4" } }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, - "optional": true, "engines": { "node": ">=0.8.19" } @@ -6551,6 +7269,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -6568,13 +7287,13 @@ "dev": true }, "node_modules/internal-slot": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.4.tgz", - "integrity": "sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", + "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", + "get-intrinsic": "^1.2.2", + "hasown": "^2.0.0", "side-channel": "^1.0.4" }, "engines": { @@ -6599,11 +7318,19 @@ "node": ">=0.10.0" } }, - "node_modules/ip": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", - "dev": true + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dev": true, + "optional": true, + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } }, "node_modules/is-absolute": { "version": "1.0.0", @@ -6619,37 +7346,25 @@ } }, "node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz", + "integrity": "sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" + "hasown": "^2.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.10" } }, "node_modules/is-array-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz", - "integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", + "get-intrinsic": "^1.2.0", "is-typed-array": "^1.1.10" }, "funding": { @@ -6721,39 +7436,27 @@ } }, "node_modules/is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dev": true, "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz", + "integrity": "sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" + "hasown": "^2.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" } }, "node_modules/is-date-object": { @@ -6772,17 +7475,16 @@ } }, "node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" } }, "node_modules/is-docker": { @@ -7003,12 +7705,12 @@ } }, "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "dev": true, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7057,16 +7759,12 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", - "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "which-typed-array": "^1.1.11" }, "engines": { "node": ">= 0.4" @@ -7156,8 +7854,7 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "node_modules/isobject": { "version": "3.0.1", @@ -7344,6 +8041,20 @@ "url": "https://bevry.me/fund" } }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/js-md4": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz", @@ -7374,6 +8085,19 @@ "integrity": "sha512-SnZNcinB4RIcnEyZqFPdGPVgrg2AcnykiBy0sHVJQKHYeaLUvi3Exj+iaPpLnFVkDPZIV4U0yvgC9/R4uEAZ9g==", "dev": true }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true, + "optional": true + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "node_modules/json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -7386,6 +8110,12 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -7424,15 +8154,21 @@ } }, "node_modules/jsonwebtoken": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", - "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", "dev": true, "dependencies": { "jws": "^3.2.2", - "lodash": "^4.17.21", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", "ms": "^2.1.1", - "semver": "^7.3.8" + "semver": "^7.5.4" }, "engines": { "node": ">=12", @@ -7460,21 +8196,6 @@ "safe-buffer": "^5.0.1" } }, - "node_modules/jsonwebtoken/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/just-debounce": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.1.0.tgz", @@ -7508,6 +8229,15 @@ "safe-buffer": "^5.0.1" } }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", @@ -7567,13 +8297,13 @@ } }, "node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -7673,12 +8403,60 @@ "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", "dev": true }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", + "dev": true + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", + "dev": true + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", + "dev": true + }, "node_modules/lodash.ismatch": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", "integrity": "sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==", "dev": true }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", + "dev": true + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "dev": true + }, "node_modules/lodash.template": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", @@ -7715,18 +8493,18 @@ } }, "node_modules/long": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.1.tgz", - "integrity": "sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", "dev": true }, "node_modules/loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", "dev": true, "dependencies": { - "get-func-name": "^2.0.0" + "get-func-name": "^2.0.1" } }, "node_modules/lru-cache": { @@ -7750,6 +8528,21 @@ "es5-ext": "~0.10.2" } }, + "node_modules/lru.min": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/lru.min/-/lru.min-1.1.1.tgz", + "integrity": "sha512-FbAj6lXil6t8z4z3j0E5mfRlPzxkySotzUHwRXjlpRh10vc6AI6WN62ehZj82VG7M20rqogJ0GLwar2Xa05a8Q==", + "dev": true, + "engines": { + "bun": ">=1.0.0", + "deno": ">=1.30.0", + "node": ">=8.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wellwelwel" + } + }, "node_modules/make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -7765,6 +8558,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -7799,6 +8601,19 @@ "node": ">= 10" } }, + "node_modules/make-fetch-happen/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "optional": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/make-iterator": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", @@ -7918,42 +8733,17 @@ "node": ">= 0.10" } }, - "node_modules/matchdep/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/matchdep/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" } }, "node_modules/matchdep/node_modules/is-extendable": { @@ -8026,12 +8816,12 @@ } }, "node_modules/matchdep/node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -8062,8 +8852,7 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", - "dev": true, - "optional": true + "dev": true }, "node_modules/meow": { "version": "8.1.2", @@ -8229,12 +9018,12 @@ } }, "node_modules/meow/node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -8246,14 +9035,26 @@ } }, "node_modules/meow/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" } }, + "node_modules/meow/node_modules/type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/meow/node_modules/yargs-parser": { "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", @@ -8279,12 +9080,12 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -8292,21 +9093,21 @@ } }, "node_modules/micromatch/node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, "node_modules/micromatch/node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -8336,34 +9137,16 @@ "node": ">=8.0" } }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "dev": true, "engines": { - "node": ">=6" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/mimic-response": { @@ -8388,20 +9171,24 @@ } }, "node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/minimist": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -8431,15 +9218,11 @@ } }, "node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "engines": { - "node": ">=8" + "node": ">=16 || 14 >=14.17" } }, "node_modules/minipass-collect": { @@ -8449,10 +9232,23 @@ "dev": true, "optional": true, "dependencies": { - "minipass": "^3.0.0" + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-collect/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "optional": true, + "dependencies": { + "yallist": "^4.0.0" }, "engines": { - "node": ">= 8" + "node": ">=8" } }, "node_modules/minipass-fetch": { @@ -8473,6 +9269,19 @@ "encoding": "^0.1.12" } }, + "node_modules/minipass-fetch/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "optional": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minipass-flush": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", @@ -8486,6 +9295,19 @@ "node": ">= 8" } }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "optional": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minipass-pipeline": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", @@ -8499,6 +9321,19 @@ "node": ">=8" } }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "optional": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minipass-sized": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", @@ -8512,6 +9347,19 @@ "node": ">=8" } }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "optional": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minizlib": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", @@ -8525,6 +9373,18 @@ "node": ">= 8" } }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/mixin-deep": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", @@ -8563,9 +9423,9 @@ } }, "node_modules/mkdirp": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.3.tgz", - "integrity": "sha512-sjAkg21peAG9HS+Dkx7hlG9Ztx7HLeKnvB3NQRcu/mltCVmvkF0pisbiTSfDVYTT86XEfZrTUosLdZLStquZUw==", + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.6.tgz", + "integrity": "sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==", "bin": { "mkdirp": "dist/cjs/src/bin.js" }, @@ -8583,32 +9443,31 @@ "dev": true }, "node_modules/mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", - "dev": true, - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", + "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" }, "bin": { "_mocha": "bin/_mocha", @@ -8616,16 +9475,12 @@ }, "engines": { "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" } }, "node_modules/mocha/node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, "engines": { "node": ">=6" @@ -8654,12 +9509,12 @@ } }, "node_modules/mocha/node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -8703,10 +9558,16 @@ "wrap-ansi": "^7.0.0" } }, + "node_modules/mocha/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, "node_modules/mocha/node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -8716,9 +9577,9 @@ } }, "node_modules/mocha/node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, "optional": true, @@ -8730,45 +9591,35 @@ } }, "node_modules/mocha/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": "*" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/mocha/node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/mocha/node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/mocha/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "is-glob": "^4.0.1" }, "engines": { - "node": "*" + "node": ">= 6" } }, "node_modules/mocha/node_modules/is-binary-path": { @@ -8793,9 +9644,9 @@ } }, "node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -8804,12 +9655,6 @@ "node": ">=10" } }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, "node_modules/mocha/node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -8822,6 +9667,20 @@ "node": ">=8.10.0" } }, + "node_modules/mocha/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -8849,6 +9708,23 @@ "node": ">=8.0" } }, + "node_modules/mocha/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/mocha/node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -8868,9 +9744,9 @@ } }, "node_modules/mocha/node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, "engines": { "node": ">=10" @@ -8886,105 +9762,84 @@ } }, "node_modules/mongodb": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.4.0.tgz", - "integrity": "sha512-6GDKgO7WiYUw+ILap143VXfAou06hjxDGgYUZWGnI4hgoZfP3el0G3l69JqJF8SEQbZmC+SN/2a0aWI/aWJoxA==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.3.0.tgz", + "integrity": "sha512-tt0KuGjGtLUhLoU263+xvQmPHEGTw5LbcNC73EoFRYgSHwZt5tsoJC110hDyO1kjQzpgNrpdcSza9PknWN4LrA==", "dev": true, "dependencies": { - "bson": "^5.2.0", - "mongodb-connection-string-url": "^2.6.0", - "socks": "^2.7.1" + "@mongodb-js/saslprep": "^1.1.0", + "bson": "^6.2.0", + "mongodb-connection-string-url": "^3.0.0" }, "engines": { - "node": ">=14.20.1" - }, - "optionalDependencies": { - "saslprep": "^1.0.3" + "node": ">=16.20.1" }, "peerDependencies": { - "@aws-sdk/credential-providers": "^3.201.0", - "mongodb-client-encryption": ">=2.3.0 <3", - "snappy": "^7.2.2" + "@aws-sdk/credential-providers": "^3.188.0", + "@mongodb-js/zstd": "^1.1.0", + "gcp-metadata": "^5.2.0", + "kerberos": "^2.0.1", + "mongodb-client-encryption": ">=6.0.0 <7", + "snappy": "^7.2.2", + "socks": "^2.7.1" }, "peerDependenciesMeta": { "@aws-sdk/credential-providers": { "optional": true }, + "@mongodb-js/zstd": { + "optional": true + }, + "gcp-metadata": { + "optional": true + }, + "kerberos": { + "optional": true + }, "mongodb-client-encryption": { "optional": true }, "snappy": { "optional": true + }, + "socks": { + "optional": true } } }, "node_modules/mongodb-connection-string-url": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz", - "integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==", - "dev": true, - "dependencies": { - "@types/whatwg-url": "^8.2.1", - "whatwg-url": "^11.0.0" - } - }, - "node_modules/mongodb-connection-string-url/node_modules/tr46": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", - "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", - "dev": true, - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/mongodb-connection-string-url/node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/mongodb-connection-string-url/node_modules/whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.0.tgz", + "integrity": "sha512-t1Vf+m1I5hC2M5RJx/7AtxgABy1cZmIPQRMXw+gEIPn/cZNF3Oiy+l0UIypUwVB5trcWHq3crg2g3uAR9aAwsQ==", "dev": true, "dependencies": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" + "@types/whatwg-url": "^11.0.2", + "whatwg-url": "^13.0.0" } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/mssql": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/mssql/-/mssql-9.1.1.tgz", - "integrity": "sha512-m0yTx9xzUtTvJpWJHqknUXUDPRnJXZYOOFNygnNIXn1PBkLsC/rkXQdquObd+M0ZPlBhGC00Jg28zG0wCl7VWg==", + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/mssql/-/mssql-10.0.4.tgz", + "integrity": "sha512-MhX5IcJ75/q+dUiOe+1ajpqjEe96ZKqMchYYPUIDU+Btqhwt4gbFeZhcGUZaRCEMV9uF+G8kLvaNSFaEzL9OXQ==", "dev": true, "dependencies": { - "@tediousjs/connection-string": "^0.4.1", - "commander": "^9.4.0", + "@tediousjs/connection-string": "^0.5.0", + "commander": "^11.0.0", "debug": "^4.3.3", "rfdc": "^1.3.0", "tarn": "^3.0.2", - "tedious": "^15.0.1" + "tedious": "^16.4.0" }, "bin": { "mssql": "bin/mssql" }, "engines": { - "node": ">=10" + "node": ">=14" } }, "node_modules/mute-stdout": { @@ -9011,23 +9866,33 @@ "node": ">= 0.6" } }, - "node_modules/mysql/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "node_modules/mysql/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } }, "node_modules/mysql2": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.1.1.tgz", - "integrity": "sha512-mXz4wEj7AIKPdHQJLJcvq8GJ75BDMH9K4V8Lthra8WH7o/xjV6TXp+dXAXDaMFkLa8YhdZr5X6rxIGQSHPPfhg==", + "version": "3.11.5", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.11.5.tgz", + "integrity": "sha512-0XFu8rUmFN9vC0ME36iBvCUObftiMHItrYFhlCRvFWbLgpNqtC4Br/NmZX1HNCszxT0GGy5QtP+k3Q3eCJPaYA==", "dev": true, "dependencies": { + "aws-ssl-profiles": "^1.1.1", "denque": "^2.1.0", "generate-function": "^2.3.1", "iconv-lite": "^0.6.3", "long": "^5.2.1", - "lru-cache": "^7.14.1", + "lru.min": "^1.0.0", "named-placeholders": "^1.1.3", "seq-queue": "^0.0.5", "sqlstring": "^2.3.2" @@ -9036,24 +9901,6 @@ "node": ">= 8.0" } }, - "node_modules/mysql2/node_modules/denque": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", - "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/mysql2/node_modules/lru-cache": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", - "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/mysql2/node_modules/sqlstring": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", @@ -9086,33 +9933,21 @@ } }, "node_modules/named-placeholders/node_modules/lru-cache": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", - "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, "engines": { "node": ">=12" } }, "node_modules/nan": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", "dev": true, "optional": true }, - "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -9151,61 +9986,36 @@ "dev": true, "dependencies": { "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", - "dev": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" + "isobject": "^3.0.1" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/nanomatch/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "node_modules/nanomatch/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", "dev": true, "dependencies": { - "kind-of": "^6.0.0" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "engines": { "node": ">=0.10.0" } }, "node_modules/nanomatch/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" } }, "node_modules/nanomatch/node_modules/is-extendable": { @@ -9253,6 +10063,12 @@ "integrity": "sha512-E7QQoM+3jvNtlmyfqRZ0/U75VFgCls+fSkbml2MpgWkWyz3ox8Y58gNhfuziuQYGNNQAbFZJQck55LHCnCK6CA==", "dev": true }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -9276,9 +10092,9 @@ "dev": true }, "node_modules/nise": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.4.tgz", - "integrity": "sha512-8+Ib8rRJ4L0o3kfmyVCL7gzrohyDe0cMFTBa2d364yIrEGMEoetznKJx899YxjybU6bL9SQkYPSBBs1gyYs8Xg==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.5.tgz", + "integrity": "sha512-VJuPIfUFaXNRzETTQEEItTOP8Y171ijr+JLq42wHes3DiryR8vT+1TXQW/Rx8JNUhyYYWyIvjXTU6dOhJcs9Nw==", "dev": true, "dependencies": { "@sinonjs/commons": "^2.0.0", @@ -9288,28 +10104,22 @@ "path-to-regexp": "^1.7.0" } }, - "node_modules/node-abi": { - "version": "3.32.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.32.0.tgz", - "integrity": "sha512-HkwdiLzE/LeuOMIQq/dJq70oNyRc88+wt5CH/RXYseE00LkA/c4PkS6Ti1vE4OHYUiKjkwuxjWq9pItgrz8UJw==", + "node_modules/nise/node_modules/@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", "dev": true, "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": ">=10" + "type-detect": "4.0.8" } }, - "node_modules/node-abi/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "node_modules/node-abi": { + "version": "3.52.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.52.0.tgz", + "integrity": "sha512-JJ98b02z16ILv7859irtXn4oUaFWADtvkzy2c0IAatNVX2Mc9Yoh8z6hZInn3QwvMEYhHuQloYi+TTQy67SIdQ==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "semver": "^7.3.5" }, "engines": { "node": ">=10" @@ -9328,9 +10138,9 @@ "dev": true }, "node_modules/node-fetch": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", - "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dev": true, "dependencies": { "whatwg-url": "^5.0.0" @@ -9347,6 +10157,28 @@ } } }, + "node_modules/node-fetch/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "node_modules/node-fetch/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, + "node_modules/node-fetch/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/node-gyp": { "version": "8.4.1", "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz", @@ -9397,6 +10229,13 @@ "concat-map": "0.0.1" } }, + "node_modules/node-gyp/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "optional": true + }, "node_modules/node-gyp/node_modules/gauge": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", @@ -9484,9 +10323,9 @@ } }, "node_modules/node-gyp/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "optional": true, "dependencies": { @@ -9514,30 +10353,26 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/node-gyp/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "node_modules/node-gyp/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true, - "optional": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } + "optional": true }, - "node_modules/node-gyp/node_modules/wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "node_modules/node-gyp/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "optional": true, "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" } }, "node_modules/nopt": { @@ -9567,21 +10402,6 @@ "node": ">=10" } }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -9604,15 +10424,30 @@ } }, "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz", + "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==", "dev": true, "dependencies": { - "path-key": "^3.0.0" + "path-key": "^4.0.0" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/npmlog": { @@ -9671,9 +10506,9 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -9701,13 +10536,13 @@ } }, "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, @@ -9775,29 +10610,30 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, "dependencies": { "wrappy": "1" } }, "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dev": true, "dependencies": { - "mimic-fn": "^2.1.0" + "mimic-fn": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/open": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", - "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", "dev": true, "dependencies": { "define-lazy-prop": "^2.0.0", @@ -9812,22 +10648,33 @@ } }, "node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" }, "engines": { "node": ">= 0.8.0" } }, + "node_modules/oracledb": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/oracledb/-/oracledb-6.3.0.tgz", + "integrity": "sha512-fr3U66QxgGXb5cs/ozLBQU50TMbZcBQEWvSaj2rJAXG8KRrsZcGOK8JTlZL1yJHeW8cSjOm6n/wTw3SJksGjDg==", + "hasInstallScript": true, + "optional": true, + "peer": true, + "engines": { + "node": ">=14.6" + } + }, "node_modules/ordered-read-streams": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", @@ -9903,12 +10750,29 @@ "node": ">=6" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==" + }, "node_modules/packet-reader": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==", "dev": true }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/parse-filepath": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", @@ -10009,7 +10873,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, "engines": { "node": ">=8" } @@ -10041,10 +10904,30 @@ "node": ">=0.10.0" } }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, "node_modules/path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.9.0.tgz", + "integrity": "sha512-xIp7/apCFJuUHdDLWe8O1HIkb0kQrOMb/0u6FXQjemHn/ii5LrIzU6bdECnsiTF/GjZkMEKg1xdiZwNqDYlZ6g==", "dev": true, "dependencies": { "isarray": "0.0.1" @@ -10075,15 +10958,15 @@ } }, "node_modules/pg": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/pg/-/pg-8.9.0.tgz", - "integrity": "sha512-ZJM+qkEbtOHRuXjmvBtOgNOXOtLSbxiMiUVMgE4rV6Zwocy03RicCVvDXgx8l4Biwo8/qORUnEqn2fdQzV7KCg==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.11.3.tgz", + "integrity": "sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g==", "dev": true, "dependencies": { "buffer-writer": "2.0.0", "packet-reader": "1.0.0", - "pg-connection-string": "^2.5.0", - "pg-pool": "^3.5.2", + "pg-connection-string": "^2.6.2", + "pg-pool": "^3.6.1", "pg-protocol": "^1.6.0", "pg-types": "^2.1.0", "pgpass": "1.x" @@ -10091,6 +10974,9 @@ "engines": { "node": ">= 8.0.0" }, + "optionalDependencies": { + "pg-cloudflare": "^1.1.1" + }, "peerDependencies": { "pg-native": ">=3.0.1" }, @@ -10100,16 +10986,23 @@ } } }, + "node_modules/pg-cloudflare": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz", + "integrity": "sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==", + "dev": true, + "optional": true + }, "node_modules/pg-connection-string": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.5.0.tgz", - "integrity": "sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.2.tgz", + "integrity": "sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA==", "dev": true }, "node_modules/pg-cursor": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/pg-cursor/-/pg-cursor-2.8.0.tgz", - "integrity": "sha512-LrOaEHK+R1C40e+xeri3FTRY/VKp9uTOCVsKtGB7LJ57qbeaphYvWjbVly8AesdT1GfHXYcAnVdExKhW7DKOvA==", + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/pg-cursor/-/pg-cursor-2.10.3.tgz", + "integrity": "sha512-rDyBVoqPVnx/PTmnwQAYgusSeAKlTL++gmpf5klVK+mYMFEqsOc6VHHZnPKc/4lOvr4r6fiMuoxSFuBF1dx4FQ==", "dev": true, "peerDependencies": { "pg": "^8" @@ -10125,9 +11018,9 @@ } }, "node_modules/pg-pool": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.5.2.tgz", - "integrity": "sha512-His3Fh17Z4eg7oANLob6ZvH8xIVen3phEZh2QuyrIl4dQSDVEabNducv6ysROKpDNPSD+12tONZVWfSgMvDD9w==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.1.tgz", + "integrity": "sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og==", "dev": true, "peerDependencies": { "pg": ">=8.0" @@ -10140,12 +11033,12 @@ "dev": true }, "node_modules/pg-query-stream": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/pg-query-stream/-/pg-query-stream-4.3.0.tgz", - "integrity": "sha512-+Eer4Y1e43rAaphFNu9/VJKn9nKTApFKCSwVtDjXYnuO4QYqWHOEkApmGJv8gvaU5T6fcuEtjsN24gk+Rx7X9A==", + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/pg-query-stream/-/pg-query-stream-4.5.3.tgz", + "integrity": "sha512-ufa94r/lHJdjAm3+zPZEO0gXAmCb4tZPaOt7O76mjcxdL/HxwTuryy76km+u0odBBgtfdKFYq/9XGfiYeQF0yA==", "dev": true, "dependencies": { - "pg-cursor": "^2.8.0" + "pg-cursor": "^2.10.3" }, "peerDependencies": { "pg": "^8" @@ -10177,9 +11070,9 @@ } }, "node_modules/pgpass/node_modules/split2": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-4.1.0.tgz", - "integrity": "sha512-VBiJxFkxiXRlUIeyMQi8s4hgvKCSjtknJv/LVYbrgALPwf5zSKmEwV9Lst25AkvMDnvxODugjdl6KZgwKM1WYQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", "dev": true, "engines": { "node": ">= 10.x" @@ -10362,18 +11255,18 @@ } }, "node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, "engines": { "node": ">= 0.8.0" } }, "node_modules/prettier": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.3.tgz", - "integrity": "sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -10394,6 +11287,15 @@ "node": ">= 0.8" } }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -10453,9 +11355,9 @@ } }, "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "engines": { "node": ">=6" @@ -10667,12 +11569,12 @@ } }, "node_modules/read-pkg/node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -10684,18 +11586,18 @@ } }, "node_modules/read-pkg/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" } }, "node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "dependencies": { "core-util-is": "~1.0.0", @@ -10707,12 +11609,6 @@ "util-deprecate": "~1.0.1" } }, - "node_modules/readable-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, "node_modules/readdirp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", @@ -10762,42 +11658,17 @@ "node": ">=0.10.0" } }, - "node_modules/readdirp/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readdirp/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/readdirp/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" } }, "node_modules/readdirp/node_modules/is-extendable": { @@ -10883,23 +11754,24 @@ } }, "node_modules/redis": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/redis/-/redis-4.6.4.tgz", - "integrity": "sha512-wi2tgDdQ+Q8q+PR5FLRx4QvDiWaA+PoJbrzsyFqlClN5R4LplHqN3scs/aGjE//mbz++W19SgxiEnQ27jnCRaA==", + "version": "4.6.12", + "resolved": "https://registry.npmjs.org/redis/-/redis-4.6.12.tgz", + "integrity": "sha512-41Xuuko6P4uH4VPe5nE3BqXHB7a9lkFL0J29AlxKaIfD6eWO8VO/5PDF9ad2oS+mswMsfFxaM5DlE3tnXT+P8Q==", "dev": true, "dependencies": { "@redis/bloom": "1.2.0", - "@redis/client": "1.5.5", - "@redis/graph": "1.1.0", - "@redis/json": "1.0.4", - "@redis/search": "1.1.1", - "@redis/time-series": "1.0.4" + "@redis/client": "1.5.13", + "@redis/graph": "1.1.1", + "@redis/json": "1.0.6", + "@redis/search": "1.1.6", + "@redis/time-series": "1.0.5" } }, "node_modules/reflect-metadata": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", - "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.1.tgz", + "integrity": "sha512-i5lLI6iw9AU3Uu4szRNPPEkomnkjRTaVt9hy/bn5g/oSzekBSMeLZblcjP74AW0vBabqERLLIrz+gR8QYR54Tw==", + "peer": true }, "node_modules/regex-not": { "version": "1.0.2", @@ -10952,14 +11824,14 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" }, "engines": { "node": ">= 0.4" @@ -11223,6 +12095,15 @@ "node": ">=0.10.0" } }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/resolve-options": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", @@ -11278,10 +12159,13 @@ "dev": true }, "node_modules/rimraf": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.1.2.tgz", - "integrity": "sha512-BlIbgFryTbw3Dz6hyoWFhKk+unCcHMSkZGrTFVAx2WmttdBSonsdtRlwiuTbDqTKr+UlXIUqJVS4QT5tUzGENQ==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz", + "integrity": "sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==", "dev": true, + "dependencies": { + "glob": "^9.2.0" + }, "bin": { "rimraf": "dist/cjs/src/bin.js" }, @@ -11292,6 +12176,48 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rimraf/node_modules/glob": { + "version": "9.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", + "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "minimatch": "^8.0.2", + "minipass": "^4.2.4", + "path-scurry": "^1.6.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", + "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minipass": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", + "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -11315,24 +12241,34 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-array-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", + "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/safe-regex": { "version": "1.1.0", @@ -11363,26 +12299,19 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "node_modules/saslprep": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", - "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", + "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, - "optional": true, "dependencies": { - "sparse-bitfield": "^3.0.3" + "lru-cache": "^6.0.0" }, - "engines": { - "node": ">=6" - } - }, - "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, "bin": { "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/semver-greatest-satisfied-range": { @@ -11404,9 +12333,9 @@ "dev": true }, "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "dependencies": { "randombytes": "^2.1.0" @@ -11418,6 +12347,35 @@ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "dev": true }, + "node_modules/set-function-length": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", + "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.1", + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", @@ -11461,7 +12419,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -11473,7 +12430,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, "engines": { "node": ">=8" } @@ -11493,10 +12449,15 @@ } }, "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/simple-concat": { "version": "1.0.1", @@ -11544,16 +12505,17 @@ } }, "node_modules/sinon": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.0.1.tgz", - "integrity": "sha512-PZXKc08f/wcA/BMRGBze2Wmw50CWPiAH3E21EOi4B49vJ616vW4DQh4fQrqsYox2aNR/N3kCqLuB0PwwOucQrg==", + "version": "15.2.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.2.0.tgz", + "integrity": "sha512-nPS85arNqwBXaIsFCkolHjGIkFo+Oxu9vbgmBJizLAhqe6P2o3Qmj3KCUoRkfhHtvgDhZdWD3risLHAUJ8npjw==", + "deprecated": "16.1.1", "dev": true, "dependencies": { - "@sinonjs/commons": "^2.0.0", - "@sinonjs/fake-timers": "10.0.2", - "@sinonjs/samsam": "^7.0.1", - "diff": "^5.0.0", - "nise": "^5.1.2", + "@sinonjs/commons": "^3.0.0", + "@sinonjs/fake-timers": "^10.3.0", + "@sinonjs/samsam": "^8.0.0", + "diff": "^5.1.0", + "nise": "^5.1.4", "supports-color": "^7.2.0" }, "funding": { @@ -11585,6 +12547,7 @@ "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "dev": true, + "optional": true, "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" @@ -11635,51 +12598,17 @@ "node": ">=0.10.0" } }, - "node_modules/snapdragon-node/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/snapdragon-node/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" } }, "node_modules/snapdragon-util": { @@ -11745,16 +12674,17 @@ } }, "node_modules/socks": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", - "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", "dev": true, + "optional": true, "dependencies": { - "ip": "^2.0.0", + "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" }, "engines": { - "node": ">= 10.13.0", + "node": ">= 10.0.0", "npm": ">= 3.0.0" } }, @@ -11824,15 +12754,14 @@ "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", "dev": true, - "optional": true, "dependencies": { "memory-pager": "^1.0.2" } }, "node_modules/spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", "dev": true, "dependencies": { "spdx-expression-parse": "^3.0.0", @@ -11856,9 +12785,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", - "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", + "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", "dev": true }, "node_modules/split": { @@ -11932,9 +12861,9 @@ } }, "node_modules/split2/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "dependencies": { "inherits": "^2.0.3", @@ -11946,21 +12875,21 @@ } }, "node_modules/sprintf-js": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", "dev": true }, "node_modules/sql.js": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/sql.js/-/sql.js-1.8.0.tgz", - "integrity": "sha512-3HD8pSkZL+5YvYUI8nlvNILs61ALqq34xgmF+BHpqxe68yZIJ1H+sIVIODvni25+CcxHUxDyrTJUL0lE/m7afw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/sql.js/-/sql.js-1.9.0.tgz", + "integrity": "sha512-+QMN8NU5KJxofT+lEaSLYdhh+Pdq7ZYS6X5bSbpmD+4SKFf+qBmr+coKT07LZ+keUNh1sf3Nz9dQwD8WNI2i/Q==", "dev": true }, "node_modules/sqlite3": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.1.4.tgz", - "integrity": "sha512-i0UlWAzPlzX3B5XP2cYuhWQJsTtlMD6obOa1PgeEQ4DHEXUuyJkgv50I3isqZAP5oFc2T8OFvakmDh2W6I+YpA==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.1.6.tgz", + "integrity": "sha512-olYkWoKFVNSSSQNvxVUfjiVbz3YtBwTJj+mfV5zpHmqW3sELx2Cf4QCdirMelhM5Zh+KDVaKgQHqCxrqiWHybw==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -12002,6 +12931,19 @@ "node": ">= 8" } }, + "node_modules/ssri/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "optional": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/stack-trace": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", @@ -12055,13 +12997,24 @@ "safe-buffer": "~5.1.0" } }, - "node_modules/string_decoder/node_modules/safe-buffer": { + "node_modules/string-width": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/string-width": { + "node_modules/string-width-cjs": { + "name": "string-width", "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", @@ -12074,29 +13027,76 @@ "node": ">=8" } }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/string.prototype.trimend": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", - "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", - "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -12113,6 +13113,18 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -12132,12 +13144,15 @@ } }, "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true, "engines": { - "node": ">=6" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/strip-indent": { @@ -12198,14 +13213,14 @@ } }, "node_modules/tar": { - "version": "6.1.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", - "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", "dev": true, "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", - "minipass": "^4.0.0", + "minipass": "^5.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" @@ -12248,45 +13263,10 @@ "node": ">=6" } }, - "node_modules/tar-stream/node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/tar-stream/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/tar-stream/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "dependencies": { "inherits": "^2.0.3", @@ -12298,9 +13278,9 @@ } }, "node_modules/tar/node_modules/minipass": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.2.tgz", - "integrity": "sha512-4Hbzei7ZyBp+1aw0874YWpKOubZd/jc53/XU+gkYry1QV+VvrbO8icLM5CUtm4F0hyXn85DXYKEMIS26gitD3A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", "dev": true, "engines": { "node": ">=8" @@ -12328,51 +13308,81 @@ } }, "node_modules/tedious": { - "version": "15.1.2", - "resolved": "https://registry.npmjs.org/tedious/-/tedious-15.1.2.tgz", - "integrity": "sha512-94slmnggCX8zG6iLNnM3k6PplTguP0p7R2RWOKTXdPmK1VmTpWk4+e0J4koIMXm1jjG7sGlZ1/JlaGVAdF1OOg==", + "version": "16.7.1", + "resolved": "https://registry.npmjs.org/tedious/-/tedious-16.7.1.tgz", + "integrity": "sha512-NmedZS0NJiTv3CoYnf1FtjxIDUgVYzEmavrc8q2WHRb+lP4deI9BpQfmNnBZZaWusDbP5FVFZCcvzb3xOlNVlQ==", "dev": true, "dependencies": { - "@azure/identity": "^2.0.4", + "@azure/identity": "^3.4.1", "@azure/keyvault-keys": "^4.4.0", - "@js-joda/core": "^5.2.0", - "bl": "^5.0.0", - "es-aggregate-error": "^1.0.8", + "@js-joda/core": "^5.5.3", + "bl": "^6.0.3", + "es-aggregate-error": "^1.0.9", "iconv-lite": "^0.6.3", "js-md4": "^0.3.2", "jsbi": "^4.3.0", "native-duplexpair": "^1.0.0", - "node-abort-controller": "^3.0.1", - "punycode": "^2.1.0", + "node-abort-controller": "^3.1.1", "sprintf-js": "^1.1.2" }, "engines": { - "node": ">=14" + "node": ">=16" } }, "node_modules/tedious/node_modules/bl": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", - "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==", + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/bl/-/bl-6.0.10.tgz", + "integrity": "sha512-F14DFhDZfxtVm2FY0k9kG2lWAwzZkO9+jX3Ytuoy/V0E1/5LBuBzzQHXAjqpxXEDIpmTPZZf5GVIGPQcLxFpaA==", "dev": true, "dependencies": { "buffer": "^6.0.3", "inherits": "^2.0.4", - "readable-stream": "^3.4.0" + "readable-stream": "^4.2.0" } }, "node_modules/tedious/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dev": true, + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/tedious/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/tedious/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" + "safe-buffer": "~5.2.0" } }, "node_modules/temp-dir": { @@ -12416,6 +13426,12 @@ "node": ">=0.10" } }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, "node_modules/textextensions": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-3.3.0.tgz", @@ -12483,9 +13499,9 @@ } }, "node_modules/through2/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "dependencies": { "inherits": "^2.0.3", @@ -12606,42 +13622,17 @@ "node": ">=0.10.0" } }, - "node_modules/to-regex/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/to-regex/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" } }, "node_modules/to-regex/node_modules/is-extendable": { @@ -12668,15 +13659,6 @@ "node": ">=0.10.0" } }, - "node_modules/to-regex/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/to-through": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", @@ -12700,10 +13682,16 @@ } }, "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", + "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", + "dev": true, + "dependencies": { + "punycode": "^2.3.0" + }, + "engines": { + "node": ">=14" + } }, "node_modules/trim-newlines": { "version": "3.0.1", @@ -12714,10 +13702,22 @@ "node": ">=8" } }, + "node_modules/ts-api-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", + "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "dev": true, + "engines": { + "node": ">=16.13.0" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", @@ -12757,17 +13757,11 @@ } } }, - "node_modules/ts-node/node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } + "node_modules/ts-node/node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true }, "node_modules/ts-node/node_modules/diff": { "version": "4.0.2", @@ -12779,9 +13773,9 @@ } }, "node_modules/tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tunnel-agent": { "version": "0.6.0", @@ -12802,12 +13796,12 @@ "dev": true }, "node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "dependencies": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" }, "engines": { "node": ">= 0.8.0" @@ -12823,9 +13817,9 @@ } }, "node_modules/type-fest": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", - "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, "engines": { "node": ">=10" @@ -12834,6 +13828,57 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typed-array-length": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", @@ -12867,16 +13912,16 @@ } }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/uglify-js": { @@ -12952,6 +13997,12 @@ "integrity": "sha512-Ia0sQNrMPXXkqVFt6w6M1n1oKo3NfKs+mvaV811Jwir7vAk9a6PVV9VPYf6X3BU97QiLEmuW3uXH9u87zDFfdw==", "dev": true }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, "node_modules/union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", @@ -13064,6 +14115,15 @@ "yarn": "*" } }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", @@ -13087,9 +14147,13 @@ "dev": true }, "node_modules/uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], "bin": { "uuid": "dist/bin/uuid" } @@ -13235,26 +14299,31 @@ } }, "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "dev": true, + "engines": { + "node": ">=12" + } }, "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-13.0.0.tgz", + "integrity": "sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==", "dev": true, "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "tr46": "^4.1.1", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=16" } }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, "dependencies": { "isexe": "^2.0.0" }, @@ -13288,17 +14357,16 @@ "dev": true }, "node_modules/which-typed-array": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", - "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", + "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", "dev": true, "dependencies": { "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "call-bind": "^1.0.4", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.10" + "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -13308,61 +14376,38 @@ } }, "node_modules/wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", "dev": true, "dependencies": { - "string-width": "^1.0.2 || 2" - } - }, - "node_modules/wide-align/node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, - "engines": { - "node": ">=4" + "string-width": "^1.0.2 || 2 || 3 || 4" } }, - "node_modules/wide-align/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, - "engines": { - "node": ">=4" - } + "node_modules/wide-align/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "node_modules/wide-align/node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { - "ansi-regex": "^3.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -13375,12 +14420,29 @@ "dev": true }, "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", "dev": true }, "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", @@ -13396,10 +14458,65 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true }, "node_modules/xtend": { "version": "4.0.2", @@ -13425,9 +14542,9 @@ "dev": true }, "node_modules/yargs": { - "version": "17.6.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", - "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -13497,6 +14614,24 @@ "node": ">=8" } }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", diff --git a/package.json b/package.json index a5bb9f7f79..6ef808262e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@streamyard/typeorm", "private": true, - "version": "0.3.16-6", + "version": "0.3.20-1", "description": "Data-Mapper ORM for TypeScript, ES7, ES6, ES5. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, MongoDB, Spanner databases.", "license": "MIT", "readmeFilename": "README.md", @@ -10,7 +10,7 @@ "email": "pleerock.me@gmail.com" }, "engines": { - "node": ">= 12.9.0" + "node": ">=16.13.0" }, "exports": { ".": { @@ -48,8 +48,8 @@ "./browser/driver/cockroachdb/CockroachDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/mongodb/MongoDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/mongodb/MongoQueryRunner.js": "./browser/platform/BrowserDisabledDriversDummy.js", - "./browser/driver/mongodb/typings.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/mongodb/bson.typings.js": "./browser/platform/BrowserDisabledDriversDummy.js", + "./browser/driver/mongodb/typings.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/mysql/MysqlDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/oracle/OracleDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/postgres/PostgresDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", @@ -93,10 +93,13 @@ "cloud-spanner-orm" ], "devDependencies": { + "@tsconfig/node16": "^16.1.1", "@types/app-root-path": "^1.2.4", "@types/chai": "^4.3.4", "@types/chai-as-promised": "^7.1.5", "@types/debug": "^4.1.7", + "@types/gulp-rename": "^2.0.6", + "@types/gulp-sourcemaps": "^0.0.38", "@types/mkdirp": "^1.0.2", "@types/mocha": "^10.0.1", "@types/node": "^18.13.0", @@ -105,6 +108,7 @@ "@types/source-map-support": "^0.5.6", "@types/uuid": "^9.0.0", "@types/yargs": "^17.0.22", + "@typescript-eslint/eslint-plugin": "^6.17.0", "better-sqlite3": "^8.1.0", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", @@ -112,9 +116,10 @@ "conventional-changelog-angular": "^5.0.13", "conventional-changelog-cli": "^2.2.2", "del": "6.1.1", + "eslint": "^8.44.0", "gulp": "^4.0.2", "gulp-istanbul": "^1.1.3", - "gulp-mocha": "^8.0.0", + "gulp-mocha": "^10.0.0", "gulp-rename": "^2.0.0", "gulp-replace": "^1.1.4", "gulp-shell": "^0.8.0", @@ -122,11 +127,11 @@ "gulp-typescript": "^6.0.0-alpha.1", "gulpclass": "^0.2.0", "husky": "^8.0.3", - "mocha": "^10.2.0", - "mongodb": "^5.2.0", - "mssql": "^9.1.1", + "mocha": "^10.8.2", + "mongodb": "^6.3.0", + "mssql": "^10.0.1", "mysql": "^2.18.1", - "mysql2": "^3.1.1", + "mysql2": "^3.9.7", "pg": "^8.9.0", "pg-query-stream": "^4.3.0", "prettier": "^2.8.3", @@ -138,24 +143,25 @@ "source-map-support": "^0.5.21", "sql.js": "^1.8.0", "sqlite3": "^5.1.4", - "ts-node": "^10.9.1", + "ts-node": "^10.9.2", "typeorm-aurora-data-api-driver": "^2.4.4", - "typescript": "^4.9.5" + "typescript": "^5.3.3" }, "peerDependencies": { "@google-cloud/spanner": "^5.18.0", "@sap/hana-client": "^2.12.25", - "better-sqlite3": "^7.1.2 || ^8.0.0", + "better-sqlite3": "^8.0.0 || ^9.0.0", "hdb-pool": "^0.1.6", "ioredis": "^5.0.4", - "mongodb": "^5.2.0", - "mssql": "^9.1.1", + "mongodb": "^5.8.0", + "mssql": "^9.1.1 || ^10.0.1", "mysql2": "^2.2.5 || ^3.0.1", - "oracledb": "^5.1.0", + "oracledb": "^6.3.0", "pg": "^8.5.1", "pg-native": "^3.0.0", "pg-query-stream": "^4.0.0", "redis": "^3.1.1 || ^4.0.0", + "reflect-metadata": "^0.1.14 || ^0.2.0", "sql.js": "^1.4.0", "sqlite3": "^5.0.3", "ts-node": "^10.7.0", @@ -220,12 +226,11 @@ "buffer": "^6.0.3", "chalk": "^4.1.2", "cli-highlight": "^2.1.11", - "date-fns": "^2.29.3", + "dayjs": "^1.11.9", "debug": "^4.3.4", "dotenv": "^16.0.3", - "glob": "^8.1.0", + "glob": "^10.4.5", "mkdirp": "^2.1.3", - "reflect-metadata": "^0.1.13", "sha.js": "^2.4.11", "tslib": "^2.5.0", "uuid": "^9.0.0", @@ -238,7 +243,7 @@ "watch": "./node_modules/.bin/tsc -w", "package": "gulp package", "pack": "gulp pack", - "lint": "prettier --check \"./src/**/*.ts\" \"./test/**/*.ts\" \"./sample/**/*.ts\"", + "lint": "eslint . --ext .ts", "format": "prettier --write --end-of-line auto \"./src/**/*.ts\" \"./test/**/*.ts\" \"./sample/**/*.ts\"", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 2" }, diff --git a/sample/sample23-nested-joins/app.ts b/sample/sample23-nested-joins/app.ts index b49ce7dda5..956576cb6a 100644 --- a/sample/sample23-nested-joins/app.ts +++ b/sample/sample23-nested-joins/app.ts @@ -102,9 +102,7 @@ dataSource.initialize().then( .where("post.id=:id", { id: post.id }) .getOne() }) - .then((loadedPost) => { - console.log(loadedPost) - console.log("Finally bakhrom's post:") + .then(() => { post.author = author2 return postRepository.save(post) }) diff --git a/sample/sample33-custom-repository/repository/PostRepository.ts b/sample/sample33-custom-repository/repository/PostRepository.ts index dad6c0dd94..de6e5eeb24 100644 --- a/sample/sample33-custom-repository/repository/PostRepository.ts +++ b/sample/sample33-custom-repository/repository/PostRepository.ts @@ -5,6 +5,6 @@ export const PostRepository = Sample33CustomRepositoryConnection.getRepository( Post, ).extend({ findMyPost() { - return this.findOne() + return this.findOne({}) }, }) diff --git a/src/cache/DbQueryResultCache.ts b/src/cache/DbQueryResultCache.ts index 91dbb00929..6f981ff630 100644 --- a/src/cache/DbQueryResultCache.ts +++ b/src/cache/DbQueryResultCache.ts @@ -158,6 +158,7 @@ export class DbQueryResultCache implements QueryResultCache { ? new MssqlParameter(options.identifier, "nvarchar") : options.identifier, }) + .cache(false) // disable cache to avoid infinite loops when cache is alwaysEnable .getRawOne() } else if (options.query) { if (this.connection.driver.options.type === "oracle") { @@ -168,6 +169,7 @@ export class DbQueryResultCache implements QueryResultCache { )}, :query) = 0`, { query: options.query }, ) + .cache(false) // disable cache to avoid infinite loops when cache is alwaysEnable .getRawOne() } @@ -179,6 +181,7 @@ export class DbQueryResultCache implements QueryResultCache { ? new MssqlParameter(options.query, "nvarchar") : options.query, }) + .cache(false) // disable cache to avoid infinite loops when cache is alwaysEnable .getRawOne() } diff --git a/src/commands/CommandUtils.ts b/src/commands/CommandUtils.ts index fee1ed1588..ff440cfc9b 100644 --- a/src/commands/CommandUtils.ts +++ b/src/commands/CommandUtils.ts @@ -33,13 +33,18 @@ export class CommandUtils { ) } + if (InstanceChecker.isDataSource(dataSourceFileExports)) { + return dataSourceFileExports + } + const dataSourceExports = [] for (const fileExportKey in dataSourceFileExports) { const fileExport = dataSourceFileExports[fileExportKey] // It is necessary to await here in case of the exported async value (Promise). // e.g. the DataSource is instantiated with an async factory in the source file - const awaitedFileExport = - fileExport instanceof Promise ? await fileExport : fileExport + // It is safe to await regardless of the export being async or not due to `awaits` definition: + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await#return_value + const awaitedFileExport = await fileExport if (InstanceChecker.isDataSource(awaitedFileExport)) { dataSourceExports.push(awaitedFileExport) } diff --git a/src/commands/EntityCreateCommand.ts b/src/commands/EntityCreateCommand.ts index d397831808..b78e464b0a 100644 --- a/src/commands/EntityCreateCommand.ts +++ b/src/commands/EntityCreateCommand.ts @@ -11,6 +11,14 @@ export class EntityCreateCommand implements yargs.CommandModule { command = "entity:create " describe = "Generates a new entity." + builder(args: yargs.Argv) { + return args.positional("path", { + type: "string", + describe: "Path of the entity file", + demandOption: true, + }) + } + async handler(args: yargs.Arguments) { try { const fullPath = (args.path as string).startsWith("/") diff --git a/src/commands/InitCommand.ts b/src/commands/InitCommand.ts index 8a14d2738f..0e785aecfc 100644 --- a/src/commands/InitCommand.ts +++ b/src/commands/InitCommand.ts @@ -690,7 +690,7 @@ Steps to run this project: if (!packageJson.devDependencies) packageJson.devDependencies = {} Object.assign(packageJson.devDependencies, { - "ts-node": "10.7.0", + "ts-node": "10.9.1", "@types/node": "^16.11.10", typescript: "4.5.2", }) @@ -717,7 +717,7 @@ Steps to run this project: packageJson.dependencies["sqlite3"] = "^5.0.2" break case "better-sqlite3": - packageJson.dependencies["better-sqlite3"] = "^7.0.0" + packageJson.dependencies["better-sqlite3"] = "^8.0.0" break case "oracle": packageJson.dependencies["oracledb"] = "^5.1.0" diff --git a/src/commands/MigrationCreateCommand.ts b/src/commands/MigrationCreateCommand.ts index b24b42f795..321f8ac58e 100644 --- a/src/commands/MigrationCreateCommand.ts +++ b/src/commands/MigrationCreateCommand.ts @@ -14,6 +14,11 @@ export class MigrationCreateCommand implements yargs.CommandModule { builder(args: yargs.Argv) { return args + .positional("path", { + type: "string", + describe: "Path of the migration file", + demandOption: true, + }) .option("o", { alias: "outputJs", type: "boolean", @@ -29,12 +34,12 @@ export class MigrationCreateCommand implements yargs.CommandModule { }) } - async handler(args: yargs.Arguments) { + async handler(args: yargs.Arguments) { try { const timestamp = CommandUtils.getTimestamp(args.timestamp) - const inputPath = (args.path as string).startsWith("/") - ? (args.path as string) - : path.resolve(process.cwd(), args.path as string) + const inputPath = args.path.startsWith("/") + ? args.path + : path.resolve(process.cwd(), args.path) const filename = path.basename(inputPath) const fullPath = path.dirname(inputPath) + "/" + timestamp + "-" + filename @@ -69,7 +74,7 @@ export class MigrationCreateCommand implements yargs.CommandModule { * Gets contents of the migration file. */ protected static getTemplate(name: string, timestamp: number): string { - return `import { MigrationInterface, QueryRunner } from "typeorm" + return `import { MigrationInterface, QueryRunner } from "typeorm"; export class ${camelCase( name, diff --git a/src/commands/MigrationGenerateCommand.ts b/src/commands/MigrationGenerateCommand.ts index ac6f7b5313..8ccdaae736 100644 --- a/src/commands/MigrationGenerateCommand.ts +++ b/src/commands/MigrationGenerateCommand.ts @@ -18,6 +18,11 @@ export class MigrationGenerateCommand implements yargs.CommandModule { builder(args: yargs.Argv) { return args + .positional("path", { + type: "string", + describe: "Path of the migration file", + demandOption: true, + }) .option("dataSource", { alias: "d", type: "string", @@ -60,12 +65,12 @@ export class MigrationGenerateCommand implements yargs.CommandModule { }) } - async handler(args: yargs.Arguments) { + async handler(args: yargs.Arguments) { const timestamp = CommandUtils.getTimestamp(args.timestamp) const extension = args.outputJs ? ".js" : ".ts" - const fullPath = (args.path as string).startsWith("/") - ? (args.path as string) - : path.resolve(process.cwd(), args.path as string) + const fullPath = args.path.startsWith("/") + ? args.path + : path.resolve(process.cwd(), args.path) const filename = timestamp + "-" + path.basename(fullPath) + extension let dataSource: DataSource | undefined = undefined @@ -196,7 +201,9 @@ export class MigrationGenerateCommand implements yargs.CommandModule { )} has been generated successfully.`, ), ) - process.exit(0) + if (args.exitProcess !== false) { + process.exit(0) + } } } catch (err) { PlatformTools.logCmdErr("Error during migration generation:", err) diff --git a/src/commands/SubscriberCreateCommand.ts b/src/commands/SubscriberCreateCommand.ts index 2afcfb3ba5..a82855275f 100644 --- a/src/commands/SubscriberCreateCommand.ts +++ b/src/commands/SubscriberCreateCommand.ts @@ -11,6 +11,14 @@ export class SubscriberCreateCommand implements yargs.CommandModule { command = "subscriber:create " describe = "Generates a new subscriber." + builder(args: yargs.Argv) { + return args.positional("path", { + type: "string", + describe: "Path of the subscriber file", + demandOption: true, + }) + } + async handler(args: yargs.Arguments) { try { const fullPath = (args.path as string).startsWith("/") diff --git a/src/data-source/BaseDataSourceOptions.ts b/src/data-source/BaseDataSourceOptions.ts index dcd5f2b2f8..03aa17d0b9 100644 --- a/src/data-source/BaseDataSourceOptions.ts +++ b/src/data-source/BaseDataSourceOptions.ts @@ -208,4 +208,9 @@ export interface BaseDataSourceOptions { */ readonly ignoreErrors?: boolean } + + /** + * Allows automatic isolation of where clauses + */ + readonly isolateWhereStatements?: boolean } diff --git a/src/data-source/DataSource.ts b/src/data-source/DataSource.ts index 1a811b8c5a..3c8b0ed118 100644 --- a/src/data-source/DataSource.ts +++ b/src/data-source/DataSource.ts @@ -1,4 +1,5 @@ import { Driver } from "../driver/Driver" +import { registerQueryBuilders } from "../query-builder" import { Repository } from "../repository/Repository" import { EntitySubscriberInterface } from "../subscriber/EntitySubscriberInterface" import { EntityTarget } from "../common/EntityTarget" @@ -41,6 +42,8 @@ import { DriverUtils } from "../driver/DriverUtils" import { InstanceChecker } from "../util/InstanceChecker" import { ObjectLiteral } from "../common/ObjectLiteral" +registerQueryBuilders() + /** * DataSource is a pre-defined connection configuration to a specific database. * You can have multiple data sources connected (with multiple connections in it), @@ -136,6 +139,7 @@ export class DataSource { // ------------------------------------------------------------------------- constructor(options: DataSourceOptions) { + registerQueryBuilders() this.name = options.name || "default" this.options = options this.logger = new LoggerFactory().create( @@ -390,7 +394,9 @@ export class DataSource { const migrationExecutor = new MigrationExecutor(this) migrationExecutor.transaction = - (options && options.transaction) || "all" + options?.transaction || + this.options?.migrationsTransactionMode || + "all" migrationExecutor.fake = (options && options.fake) || false const successMigrations = @@ -737,4 +743,21 @@ export class DataSource { } } } + + /** + * Get the replication mode SELECT queries should use for this datasource by default + */ + defaultReplicationModeForReads(): ReplicationMode { + if ("replication" in this.driver.options) { + const value = ( + this.driver.options.replication as { + defaultMode?: ReplicationMode + } + ).defaultMode + if (value) { + return value + } + } + return "slave" + } } diff --git a/src/decorator/Index.ts b/src/decorator/Index.ts index 9e36cdad5f..2f3d09abae 100644 --- a/src/decorator/Index.ts +++ b/src/decorator/Index.ts @@ -139,6 +139,7 @@ export function Index( parser: options ? options.parser : undefined, sparse: options && options.sparse ? true : false, background: options && options.background ? true : false, + concurrent: options && options.concurrent ? true : false, expireAfterSeconds: options ? options.expireAfterSeconds : undefined, diff --git a/src/decorator/entity/Entity.ts b/src/decorator/entity/Entity.ts index 00d00cef1d..c680e305f8 100644 --- a/src/decorator/entity/Entity.ts +++ b/src/decorator/entity/Entity.ts @@ -41,6 +41,7 @@ export function Entity( schema: options.schema ? options.schema : undefined, synchronize: options.synchronize, withoutRowid: options.withoutRowid, + comment: options.comment ? options.comment : undefined, } as TableMetadataArgs) } } diff --git a/src/decorator/options/EntityOptions.ts b/src/decorator/options/EntityOptions.ts index 2212bac617..f3cc6e7f31 100644 --- a/src/decorator/options/EntityOptions.ts +++ b/src/decorator/options/EntityOptions.ts @@ -46,4 +46,9 @@ export interface EntityOptions { * @see https://www.sqlite.org/withoutrowid.html. */ withoutRowid?: boolean + + /** + * Table comment. Not supported by all database types. + */ + comment?: string } diff --git a/src/decorator/options/IndexOptions.ts b/src/decorator/options/IndexOptions.ts index 6f319ef586..b5ca566711 100644 --- a/src/decorator/options/IndexOptions.ts +++ b/src/decorator/options/IndexOptions.ts @@ -52,6 +52,12 @@ export interface IndexOptions { */ background?: boolean + /** + * Create the index using the CONCURRENTLY modifier + * Works only in postgres. + */ + concurrent?: boolean + /** * Specifies a time to live, in seconds. * This option is only supported for mongodb database. diff --git a/src/driver/Driver.ts b/src/driver/Driver.ts index 90a6fec010..acdaf72361 100644 --- a/src/driver/Driver.ts +++ b/src/driver/Driver.ts @@ -112,6 +112,11 @@ export interface Driver { */ mappedDataTypes: MappedColumnTypes + /** + * The prefix used for the parameters + */ + parametersPrefix?: string + /** * Max length allowed by the DBMS for aliases (execution of queries). */ diff --git a/src/driver/DriverUtils.ts b/src/driver/DriverUtils.ts index 4600aeec73..f8b84fd287 100644 --- a/src/driver/DriverUtils.ts +++ b/src/driver/DriverUtils.ts @@ -127,14 +127,11 @@ export class DriverUtils { buildOptions: { shorten?: boolean; joiner?: string } | undefined, ...alias: string[] ): string { - const newAlias = - alias.length === 1 - ? alias[0] - : alias.join( - buildOptions && buildOptions.joiner - ? buildOptions.joiner - : "_", - ) + const joiner = + buildOptions && buildOptions.joiner ? buildOptions.joiner : "_" + + let newAlias = alias.length === 1 ? alias[0] : alias.join(joiner) + if ( maxAliasLength && maxAliasLength > 0 && diff --git a/src/driver/aurora-mysql/AuroraMysqlQueryRunner.ts b/src/driver/aurora-mysql/AuroraMysqlQueryRunner.ts index 7dc7174e00..0d9ef69084 100644 --- a/src/driver/aurora-mysql/AuroraMysqlQueryRunner.ts +++ b/src/driver/aurora-mysql/AuroraMysqlQueryRunner.ts @@ -99,11 +99,12 @@ export class AuroraMysqlQueryRunner } if (this.transactionDepth === 0) { + this.transactionDepth += 1 await this.client.startTransaction() } else { - await this.query(`SAVEPOINT typeorm_${this.transactionDepth}`) + this.transactionDepth += 1 + await this.query(`SAVEPOINT typeorm_${this.transactionDepth - 1}`) } - this.transactionDepth += 1 await this.broadcaster.broadcast("AfterTransactionStart") } @@ -118,14 +119,15 @@ export class AuroraMysqlQueryRunner await this.broadcaster.broadcast("BeforeTransactionCommit") if (this.transactionDepth > 1) { + this.transactionDepth -= 1 await this.query( - `RELEASE SAVEPOINT typeorm_${this.transactionDepth - 1}`, + `RELEASE SAVEPOINT typeorm_${this.transactionDepth}`, ) } else { + this.transactionDepth -= 1 await this.client.commitTransaction() this.isTransactionActive = false } - this.transactionDepth -= 1 await this.broadcaster.broadcast("AfterTransactionCommit") } @@ -140,14 +142,15 @@ export class AuroraMysqlQueryRunner await this.broadcaster.broadcast("BeforeTransactionRollback") if (this.transactionDepth > 1) { + this.transactionDepth -= 1 await this.query( - `ROLLBACK TO SAVEPOINT typeorm_${this.transactionDepth - 1}`, + `ROLLBACK TO SAVEPOINT typeorm_${this.transactionDepth}`, ) } else { + this.transactionDepth -= 1 await this.client.rollbackTransaction() this.isTransactionActive = false } - this.transactionDepth -= 1 await this.broadcaster.broadcast("AfterTransactionRollback") } @@ -2819,4 +2822,16 @@ export class AuroraMysqlQueryRunner return false } + + /** + * Change table comment. + */ + changeTableComment( + tableOrName: Table | string, + comment?: string, + ): Promise { + throw new TypeORMError( + `aurora-mysql driver does not support change table comment.`, + ) + } } diff --git a/src/driver/aurora-postgres/AuroraPostgresQueryRunner.ts b/src/driver/aurora-postgres/AuroraPostgresQueryRunner.ts index 9e02d4818a..8269738939 100644 --- a/src/driver/aurora-postgres/AuroraPostgresQueryRunner.ts +++ b/src/driver/aurora-postgres/AuroraPostgresQueryRunner.ts @@ -6,6 +6,8 @@ import { AuroraPostgresDriver } from "./AuroraPostgresDriver" import { PostgresQueryRunner } from "../postgres/PostgresQueryRunner" import { ReplicationMode } from "../types/ReplicationMode" import { QueryResult } from "../../query-runner/QueryResult" +import { Table } from "../../schema-builder/table/Table" +import { TypeORMError } from "../../error" class PostgresQueryRunnerWrapper extends PostgresQueryRunner { driver: any @@ -108,11 +110,12 @@ export class AuroraPostgresQueryRunner } if (this.transactionDepth === 0) { + this.transactionDepth += 1 await this.client.startTransaction() } else { - await this.query(`SAVEPOINT typeorm_${this.transactionDepth}`) + this.transactionDepth += 1 + await this.query(`SAVEPOINT typeorm_${this.transactionDepth} - 1`) } - this.transactionDepth += 1 await this.broadcaster.broadcast("AfterTransactionStart") } @@ -127,14 +130,15 @@ export class AuroraPostgresQueryRunner await this.broadcaster.broadcast("BeforeTransactionCommit") if (this.transactionDepth > 1) { + this.transactionDepth -= 1 await this.query( - `RELEASE SAVEPOINT typeorm_${this.transactionDepth - 1}`, + `RELEASE SAVEPOINT typeorm_${this.transactionDepth}`, ) } else { + this.transactionDepth -= 1 await this.client.commitTransaction() this.isTransactionActive = false } - this.transactionDepth -= 1 await this.broadcaster.broadcast("AfterTransactionCommit") } @@ -149,14 +153,15 @@ export class AuroraPostgresQueryRunner await this.broadcaster.broadcast("BeforeTransactionRollback") if (this.transactionDepth > 1) { + this.transactionDepth -= 1 await this.query( - `ROLLBACK TO SAVEPOINT typeorm_${this.transactionDepth - 1}`, + `ROLLBACK TO SAVEPOINT typeorm_${this.transactionDepth}`, ) } else { + this.transactionDepth -= 1 await this.client.rollbackTransaction() this.isTransactionActive = false } - this.transactionDepth -= 1 await this.broadcaster.broadcast("AfterTransactionRollback") } @@ -191,4 +196,16 @@ export class AuroraPostgresQueryRunner return result } + + /** + * Change table comment. + */ + changeTableComment( + tableOrName: Table | string, + comment?: string, + ): Promise { + throw new TypeORMError( + `aurora-postgres driver does not support change comment.`, + ) + } } diff --git a/src/driver/better-sqlite3/BetterSqlite3QueryRunner.ts b/src/driver/better-sqlite3/BetterSqlite3QueryRunner.ts index d7fcc8adaa..5375fa5ecd 100644 --- a/src/driver/better-sqlite3/BetterSqlite3QueryRunner.ts +++ b/src/driver/better-sqlite3/BetterSqlite3QueryRunner.ts @@ -4,6 +4,7 @@ import { AbstractSqliteQueryRunner } from "../sqlite-abstract/AbstractSqliteQuer import { Broadcaster } from "../../subscriber/Broadcaster" import { BetterSqlite3Driver } from "./BetterSqlite3Driver" import { QueryResult } from "../../query-runner/QueryResult" +import { BroadcasterResult } from "../../subscriber/BroadcasterResult" /** * Runs queries on a single sqlite database connection. @@ -83,7 +84,14 @@ export class BetterSqlite3QueryRunner extends AbstractSqliteQueryRunner { const connection = this.driver.connection + const broadcasterResult = new BroadcasterResult() + this.driver.connection.logger.logQuery(query, parameters, this) + this.broadcaster.broadcastBeforeQueryEvent( + broadcasterResult, + query, + parameters, + ) const queryStartTime = +new Date() const stmt = await this.getStmt(query) @@ -121,6 +129,16 @@ export class BetterSqlite3QueryRunner extends AbstractSqliteQueryRunner { this, ) + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + true, + queryExecutionTime, + result.raw, + undefined, + ) + if (!useStructuredResult) { return result.raw } diff --git a/src/driver/capacitor/CapacitorDriver.ts b/src/driver/capacitor/CapacitorDriver.ts index 0a08012f3c..59b33fe760 100644 --- a/src/driver/capacitor/CapacitorDriver.ts +++ b/src/driver/capacitor/CapacitorDriver.ts @@ -80,7 +80,7 @@ export class CapacitorDriver extends AbstractSqliteDriver { // we need to enable foreign keys in sqlite to make sure all foreign key related features // working properly. this also makes onDelete to work with sqlite. - await connection.query(`PRAGMA foreign_keys = ON`) + await connection.run(`PRAGMA foreign_keys = ON`) if ( this.options.journalMode && @@ -88,7 +88,7 @@ export class CapacitorDriver extends AbstractSqliteDriver { this.options.journalMode, ) !== -1 ) { - await connection.query( + await connection.run( `PRAGMA journal_mode = ${this.options.journalMode}`, ) } diff --git a/src/driver/capacitor/CapacitorQueryRunner.ts b/src/driver/capacitor/CapacitorQueryRunner.ts index 00732714ce..24babaee1f 100644 --- a/src/driver/capacitor/CapacitorQueryRunner.ts +++ b/src/driver/capacitor/CapacitorQueryRunner.ts @@ -62,7 +62,10 @@ export class CapacitorQueryRunner extends AbstractSqliteQueryRunner { this.driver.connection.logger.logQuery(query, parameters, this) - const command = query.substr(0, query.indexOf(" ")) + const command = query.substring( + 0, + query.indexOf(" ") !== -1 ? query.indexOf(" ") : undefined, + ) try { let raw: any @@ -78,7 +81,9 @@ export class CapacitorQueryRunner extends AbstractSqliteQueryRunner { ].indexOf(command) !== -1 ) { raw = await databaseConnection.execute(query, false) - } else if (["INSERT", "UPDATE", "DELETE"].indexOf(command) !== -1) { + } else if ( + ["INSERT", "UPDATE", "DELETE", "PRAGMA"].indexOf(command) !== -1 + ) { raw = await databaseConnection.run(query, parameters, false) } else { raw = await databaseConnection.query(query, parameters || []) diff --git a/src/driver/cockroachdb/CockroachConnectionOptions.ts b/src/driver/cockroachdb/CockroachConnectionOptions.ts index 4ec17d369f..3eb405a856 100644 --- a/src/driver/cockroachdb/CockroachConnectionOptions.ts +++ b/src/driver/cockroachdb/CockroachConnectionOptions.ts @@ -1,4 +1,5 @@ import { BaseDataSourceOptions } from "../../data-source/BaseDataSourceOptions" +import { ReplicationMode } from "../types/ReplicationMode" import { CockroachConnectionCredentialsOptions } from "./CockroachConnectionCredentialsOptions" /** @@ -48,6 +49,12 @@ export interface CockroachConnectionOptions * List of read-from severs (slaves). */ readonly slaves: CockroachConnectionCredentialsOptions[] + + /** + * Default connection pool to use for SELECT queries + * @default "slave" + */ + readonly defaultMode?: ReplicationMode } /** diff --git a/src/driver/cockroachdb/CockroachDriver.ts b/src/driver/cockroachdb/CockroachDriver.ts index e7312bff5c..e78f7c294c 100644 --- a/src/driver/cockroachdb/CockroachDriver.ts +++ b/src/driver/cockroachdb/CockroachDriver.ts @@ -224,6 +224,11 @@ export class CockroachDriver implements Driver { metadataValue: "string", } + /** + * The prefix used for the parameters + */ + parametersPrefix: string = "$" + /** * Default values of length, precision and scale depends on column data type. * Used in the cases when length/precision/scale is not specified by user. @@ -509,6 +514,7 @@ export class CockroachDriver implements Driver { if (!parameters || !Object.keys(parameters).length) return [sql, escapedParameters] + const parameterIndexMap = new Map() sql = sql.replace( /:(\.\.\.)?([A-Za-z0-9_.]+)/g, (full, isArray: string, key: string): string => { @@ -516,6 +522,10 @@ export class CockroachDriver implements Driver { return full } + if (parameterIndexMap.has(key)) { + return this.parametersPrefix + parameterIndexMap.get(key) + } + let value: any = parameters[key] if (isArray) { @@ -535,6 +545,7 @@ export class CockroachDriver implements Driver { } escapedParameters.push(value) + parameterIndexMap.set(key, escapedParameters.length) return this.createParameter(key, escapedParameters.length - 1) }, ) // todo: make replace only in value statements, otherwise problems @@ -689,12 +700,15 @@ export class CockroachDriver implements Driver { normalizeDefault(columnMetadata: ColumnMetadata): string | undefined { const defaultValue = columnMetadata.default + if (defaultValue === undefined || defaultValue === null) { + return undefined + } + if ( (columnMetadata.type === "enum" || columnMetadata.type === "simple-enum") && defaultValue !== undefined ) { - if (defaultValue === null) return "NULL" if (columnMetadata.isArray) { const enumName = this.buildEnumName(columnMetadata) let arrayValue = defaultValue @@ -743,10 +757,6 @@ export class CockroachDriver implements Driver { return `'${JSON.stringify(defaultValue)}'` } - if (defaultValue === undefined || defaultValue === null) { - return undefined - } - return `${defaultValue}` } @@ -873,10 +883,19 @@ export class CockroachDriver implements Driver { ) if (!tableColumn) return false // we don't need new columns, we only need exist and changed - // console.log("table:", columnMetadata.entityMetadata.tableName); - // console.log("name:", tableColumn.name, columnMetadata.databaseName); - // console.log("type:", tableColumn.type, this.normalizeType(columnMetadata)); - // console.log("length:", tableColumn.length, columnMetadata.length); + // console.log("table:", columnMetadata.entityMetadata.tableName) + // console.log("name:", { + // tableColumn: tableColumn.name, + // columnMetadata: columnMetadata.databaseName, + // }) + // console.log("type:", { + // tableColumn: tableColumn.type, + // columnMetadata: this.normalizeType(columnMetadata), + // }) + // console.log("length:", { + // tableColumn: tableColumn.length, + // columnMetadata: columnMetadata.length, + // }) // console.log("width:", tableColumn.width, columnMetadata.width); // console.log("precision:", tableColumn.precision, columnMetadata.precision); // console.log("scale:", tableColumn.scale, columnMetadata.scale); @@ -886,7 +905,10 @@ export class CockroachDriver implements Driver { // console.log("isPrimary:", tableColumn.isPrimary, columnMetadata.isPrimary); // console.log("isNullable:", tableColumn.isNullable, columnMetadata.isNullable); // console.log("isUnique:", tableColumn.isUnique, this.normalizeIsUnique(columnMetadata)); - // console.log("isGenerated:", tableColumn.isGenerated, columnMetadata.isGenerated); + // console.log("asExpression:", { + // tableColumn: (tableColumn.asExpression || "").trim(), + // columnMetadata: (columnMetadata.asExpression || "").trim(), + // }) // console.log("=========================================="); return ( @@ -961,7 +983,7 @@ export class CockroachDriver implements Driver { * Creates an escaped parameter. */ createParameter(parameterName: string, index: number): string { - return "$" + (index + 1) + return this.parametersPrefix + (index + 1) } // ------------------------------------------------------------------------- diff --git a/src/driver/cockroachdb/CockroachQueryRunner.ts b/src/driver/cockroachdb/CockroachQueryRunner.ts index 28ad89f176..45e3b250a9 100644 --- a/src/driver/cockroachdb/CockroachQueryRunner.ts +++ b/src/driver/cockroachdb/CockroachQueryRunner.ts @@ -25,6 +25,7 @@ import { ReplicationMode } from "../types/ReplicationMode" import { TypeORMError } from "../../error" import { MetadataTableType } from "../types/MetadataTableType" import { InstanceChecker } from "../../util/InstanceChecker" +import { BroadcasterResult } from "../../subscriber/BroadcasterResult" import { VersionUtils } from "../../util/VersionUtils" /** @@ -55,7 +56,7 @@ export class CockroachQueryRunner /** * Special callback provided by a driver used to release a created connection. */ - protected releaseCallback: Function + protected releaseCallback?: (err: any) => void /** * Stores all executed queries to be able to run them again if transaction fails. @@ -105,7 +106,18 @@ export class CockroachQueryRunner .then(([connection, release]: any[]) => { this.driver.connectedQueryRunners.push(this) this.databaseConnection = connection - this.releaseCallback = release + + const onErrorCallback = (err: Error) => + this.releaseConnection(err) + this.releaseCallback = (err?: Error) => { + this.databaseConnection.removeListener( + "error", + onErrorCallback, + ) + release(err) + } + this.databaseConnection.on("error", onErrorCallback) + return this.databaseConnection }) } else { @@ -115,7 +127,18 @@ export class CockroachQueryRunner .then(([connection, release]: any[]) => { this.driver.connectedQueryRunners.push(this) this.databaseConnection = connection - this.releaseCallback = release + + const onErrorCallback = (err: Error) => + this.releaseConnection(err) + this.releaseCallback = (err?: Error) => { + this.databaseConnection.removeListener( + "error", + onErrorCallback, + ) + release(err) + } + this.databaseConnection.on("error", onErrorCallback) + return this.databaseConnection }) } @@ -124,21 +147,33 @@ export class CockroachQueryRunner } /** - * Releases used database connection. - * You cannot use query runner methods once its released. + * Release a connection back to the pool, optionally specifying an Error to release with. + * Per pg-pool documentation this will prevent the pool from re-using the broken connection. */ - release(): Promise { + private async releaseConnection(err?: Error) { if (this.isReleased) { - return Promise.resolve() + return } this.isReleased = true - if (this.releaseCallback) this.releaseCallback() + if (this.releaseCallback) { + this.releaseCallback(err) + this.releaseCallback = undefined + } const index = this.driver.connectedQueryRunners.indexOf(this) - if (index !== -1) this.driver.connectedQueryRunners.splice(index) - return Promise.resolve() + if (index !== -1) { + this.driver.connectedQueryRunners.splice(index, 1) + } + } + + /** + * Releases used database connection. + * You cannot use query runner methods once its released. + */ + release(): Promise { + return this.releaseConnection() } /** @@ -155,6 +190,7 @@ export class CockroachQueryRunner } if (this.transactionDepth === 0) { + this.transactionDepth += 1 await this.query("START TRANSACTION") await this.query("SAVEPOINT cockroach_restart") if (isolationLevel) { @@ -163,10 +199,10 @@ export class CockroachQueryRunner ) } } else { - await this.query(`SAVEPOINT typeorm_${this.transactionDepth}`) + this.transactionDepth += 1 + await this.query(`SAVEPOINT typeorm_${this.transactionDepth - 1}`) } - this.transactionDepth += 1 this.storeQueries = true await this.broadcaster.broadcast("AfterTransactionStart") @@ -182,18 +218,20 @@ export class CockroachQueryRunner await this.broadcaster.broadcast("BeforeTransactionCommit") if (this.transactionDepth > 1) { + this.transactionDepth -= 1 await this.query( - `RELEASE SAVEPOINT typeorm_${this.transactionDepth - 1}`, + `RELEASE SAVEPOINT typeorm_${this.transactionDepth}`, ) - this.transactionDepth -= 1 } else { this.storeQueries = false - await this.query("RELEASE SAVEPOINT cockroach_restart") + this.transactionDepth -= 1 + // This was disabled because it failed tests after update to CRDB 24.2 + // https://github.com/typeorm/typeorm/pull/11190 + // await this.query("RELEASE SAVEPOINT cockroach_restart") await this.query("COMMIT") this.queries = [] this.isTransactionActive = false this.transactionRetries = 0 - this.transactionDepth -= 1 } await this.broadcaster.broadcast("AfterTransactionCommit") @@ -209,17 +247,18 @@ export class CockroachQueryRunner await this.broadcaster.broadcast("BeforeTransactionRollback") if (this.transactionDepth > 1) { + this.transactionDepth -= 1 await this.query( - `ROLLBACK TO SAVEPOINT typeorm_${this.transactionDepth - 1}`, + `ROLLBACK TO SAVEPOINT typeorm_${this.transactionDepth}`, ) } else { this.storeQueries = false + this.transactionDepth -= 1 await this.query("ROLLBACK") this.queries = [] this.isTransactionActive = false this.transactionRetries = 0 } - this.transactionDepth -= 1 await this.broadcaster.broadcast("AfterTransactionRollback") } @@ -235,7 +274,15 @@ export class CockroachQueryRunner if (this.isReleased) throw new QueryRunnerAlreadyReleasedError() const databaseConnection = await this.connect() + const broadcasterResult = new BroadcasterResult() + this.driver.connection.logger.logQuery(query, parameters, this) + this.broadcaster.broadcastBeforeQueryEvent( + broadcasterResult, + query, + parameters, + ) + const queryStartTime = +new Date() if (this.isTransactionActive && this.storeQueries) { @@ -287,6 +334,16 @@ export class CockroachQueryRunner result.raw = raw.rows } + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + true, + queryExecutionTime, + raw, + undefined, + ) + if (useStructuredResult) { return result } else { @@ -329,9 +386,19 @@ export class CockroachQueryRunner parameters, this, ) - + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + false, + undefined, + undefined, + err, + ) throw new QueryFailedError(query, parameters, err) } + } finally { + await broadcasterResult.wait() } } @@ -954,7 +1021,7 @@ export class CockroachQueryRunner const enumColumns = newTable.columns.filter( (column) => column.type === "enum" || column.type === "simple-enum", ) - for (let column of enumColumns) { + for (const column of enumColumns) { // skip renaming for user-defined enum name if (column.enumName) continue @@ -3283,10 +3350,10 @@ export class CockroachQueryRunner } else { tableColumn.default = dbColumn[ "column_default" - ].replace(/:::[\w\s\[\]\"]+/g, "") + ].replace(/:::[\w\s[\]"]+/g, "") tableColumn.default = tableColumn.default.replace( - /^(-?[\d\.]+)$/, + /^(-?[\d.]+)$/, "($1)", ) @@ -3301,7 +3368,8 @@ export class CockroachQueryRunner } if ( - dbColumn["is_generated"] === "YES" && + (dbColumn["is_generated"] === "YES" || + dbColumn["is_generated"] === "ALWAYS") && dbColumn["generation_expression"] ) { tableColumn.generatedType = @@ -3310,7 +3378,7 @@ export class CockroachQueryRunner : "VIRTUAL" // We cannot relay on information_schema.columns.generation_expression, because it is formatted different. const asExpressionQuery = - await this.selectTypeormMetadataSql({ + this.selectTypeormMetadataSql({ schema: dbTable["table_schema"], table: dbTable["table_name"], type: MetadataTableType.GENERATED_COLUMN, @@ -3678,7 +3746,7 @@ export class CockroachQueryRunner protected async getVersion(): Promise { const result = await this.query(`SELECT version()`) return result[0]["version"].replace( - /^CockroachDB CCL v([\d\.]+) .*$/, + /^CockroachDB CCL v([\d.]+) .*$/, "$1", ) } @@ -3837,7 +3905,7 @@ export class CockroachQueryRunner table: Table, indexOrName: TableIndex | TableUnique | string, ): Query { - let indexName = + const indexName = InstanceChecker.isTableIndex(indexOrName) || InstanceChecker.isTableUnique(indexOrName) ? indexOrName.name @@ -4145,4 +4213,15 @@ export class CockroachQueryRunner return c } + /** + * Change table comment. + */ + changeTableComment( + tableOrName: Table | string, + comment?: string, + ): Promise { + throw new TypeORMError( + `cockroachdb driver does not support change table comment.`, + ) + } } diff --git a/src/driver/cordova/CordovaDriver.ts b/src/driver/cordova/CordovaDriver.ts index 50eee92f6b..158d407108 100644 --- a/src/driver/cordova/CordovaDriver.ts +++ b/src/driver/cordova/CordovaDriver.ts @@ -74,8 +74,12 @@ export class CordovaDriver extends AbstractSqliteDriver { this.options.extra || {}, ) - const connection = await new Promise((resolve) => { - this.sqlite.openDatabase(options, (db: any) => resolve(db)) + const connection = await new Promise((resolve, fail) => { + this.sqlite.openDatabase( + options, + (db: any) => resolve(db), + (err: any) => fail(err), + ) }) await new Promise((ok, fail) => { diff --git a/src/driver/cordova/CordovaQueryRunner.ts b/src/driver/cordova/CordovaQueryRunner.ts index 0c9abb979b..bf2ebe1ec0 100644 --- a/src/driver/cordova/CordovaQueryRunner.ts +++ b/src/driver/cordova/CordovaQueryRunner.ts @@ -6,6 +6,7 @@ import { CordovaDriver } from "./CordovaDriver" import { Broadcaster } from "../../subscriber/Broadcaster" import { TypeORMError } from "../../error" import { QueryResult } from "../../query-runner/QueryResult" +import { BroadcasterResult } from "../../subscriber/BroadcasterResult" /** * Runs queries on a single sqlite database connection. @@ -52,7 +53,15 @@ export class CordovaQueryRunner extends AbstractSqliteQueryRunner { if (this.isReleased) throw new QueryRunnerAlreadyReleasedError() const databaseConnection = await this.connect() + const broadcasterResult = new BroadcasterResult() + this.driver.connection.logger.logQuery(query, parameters, this) + this.broadcaster.broadcastBeforeQueryEvent( + broadcasterResult, + query, + parameters, + ) + const queryStartTime = +new Date() try { @@ -70,6 +79,17 @@ export class CordovaQueryRunner extends AbstractSqliteQueryRunner { this.driver.options.maxQueryExecutionTime const queryEndTime = +new Date() const queryExecutionTime = queryEndTime - queryStartTime + + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + true, + queryExecutionTime, + raw, + undefined, + ) + if ( maxQueryExecutionTime && queryExecutionTime > maxQueryExecutionTime @@ -108,7 +128,19 @@ export class CordovaQueryRunner extends AbstractSqliteQueryRunner { parameters, this, ) + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + false, + undefined, + undefined, + err, + ) + throw new QueryFailedError(query, parameters, err) + } finally { + await broadcasterResult.wait() } } diff --git a/src/driver/expo/ExpoQueryRunner.ts b/src/driver/expo/ExpoQueryRunner.ts index 41d7a63d09..f0c25f929d 100644 --- a/src/driver/expo/ExpoQueryRunner.ts +++ b/src/driver/expo/ExpoQueryRunner.ts @@ -5,6 +5,7 @@ import { TransactionNotStartedError } from "../../error/TransactionNotStartedErr import { ExpoDriver } from "./ExpoDriver" import { Broadcaster } from "../../subscriber/Broadcaster" import { QueryResult } from "../../query-runner/QueryResult" +import { BroadcasterResult } from "../../subscriber/BroadcasterResult" // Needed to satisfy the Typescript compiler interface IResultSet { @@ -164,7 +165,15 @@ export class ExpoQueryRunner extends AbstractSqliteQueryRunner { return new Promise(async (ok, fail) => { const databaseConnection = await this.connect() + const broadcasterResult = new BroadcasterResult() + this.driver.connection.logger.logQuery(query, parameters, this) + this.broadcaster.broadcastBeforeQueryEvent( + broadcasterResult, + query, + parameters, + ) + const queryStartTime = +new Date() // All Expo SQL queries are executed in a transaction context databaseConnection.transaction( @@ -176,13 +185,25 @@ export class ExpoQueryRunner extends AbstractSqliteQueryRunner { this.transaction.executeSql( query, parameters, - (t: ITransaction, raw: IResultSet) => { + async (t: ITransaction, raw: IResultSet) => { // log slow queries if maxQueryExecution time is set const maxQueryExecutionTime = this.driver.options.maxQueryExecutionTime const queryEndTime = +new Date() const queryExecutionTime = queryEndTime - queryStartTime + + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + true, + queryExecutionTime, + raw, + undefined, + ) + await broadcasterResult.wait() + if ( maxQueryExecutionTime && queryExecutionTime > maxQueryExecutionTime @@ -222,13 +243,24 @@ export class ExpoQueryRunner extends AbstractSqliteQueryRunner { ok(result.raw) } }, - (t: ITransaction, err: any) => { + async (t: ITransaction, err: any) => { this.driver.connection.logger.logQueryError( err, query, parameters, this, ) + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + false, + undefined, + undefined, + err, + ) + await broadcasterResult.wait() + fail(new QueryFailedError(query, parameters, err)) }, ) diff --git a/src/driver/mongodb/MongoQueryRunner.ts b/src/driver/mongodb/MongoQueryRunner.ts index 3839cdcc60..779cb53ad0 100644 --- a/src/driver/mongodb/MongoQueryRunner.ts +++ b/src/driver/mongodb/MongoQueryRunner.ts @@ -303,7 +303,7 @@ export class MongoQueryRunner implements QueryRunner { collectionName: string, filter: Filter, options?: FindOneAndDeleteOptions, - ): Promise { + ): Promise { return this.getCollection(collectionName).findOneAndDelete( filter, options || {}, @@ -318,7 +318,7 @@ export class MongoQueryRunner implements QueryRunner { filter: Filter, replacement: Document, options?: FindOneAndReplaceOptions, - ): Promise { + ): Promise { return this.getCollection(collectionName).findOneAndReplace( filter, replacement, @@ -334,7 +334,7 @@ export class MongoQueryRunner implements QueryRunner { filter: Filter, update: UpdateFilter, options?: FindOneAndUpdateOptions, - ): Promise { + ): Promise { return this.getCollection(collectionName).findOneAndUpdate( filter, update, @@ -1263,4 +1263,16 @@ export class MongoQueryRunner implements QueryRunner { .db(this.connection.driver.database!) .collection(collectionName) } + + /** + * Change table comment. + */ + changeTableComment( + tableOrName: Table | string, + comment?: string, + ): Promise { + throw new TypeORMError( + `mongodb driver does not support change table comment.`, + ) + } } diff --git a/src/driver/mongodb/typings.ts b/src/driver/mongodb/typings.ts index d988b5e7e9..a31fb255ad 100644 --- a/src/driver/mongodb/typings.ts +++ b/src/driver/mongodb/typings.ts @@ -2165,7 +2165,7 @@ export declare class Collection { findOneAndDelete( filter: Filter, options?: FindOneAndDeleteOptions, - ): Promise> + ): Promise | null> /** * Find a document and replace it in one atomic operation. Requires a write lock for the duration of the operation. * @@ -2177,7 +2177,7 @@ export declare class Collection { filter: Filter, replacement: WithoutId, options?: FindOneAndReplaceOptions, - ): Promise> + ): Promise | null> /** * Find a document and update it in one atomic operation. Requires a write lock for the duration of the operation. * @@ -2189,7 +2189,7 @@ export declare class Collection { filter: Filter, update: UpdateFilter, options?: FindOneAndUpdateOptions, - ): Promise> + ): Promise | null> /** * Execute an aggregation framework pipeline against the collection, needs MongoDB \>= 2.2 * @@ -3787,7 +3787,7 @@ export declare interface GridFSBucketReadStreamOptionsWithRevision * @public */ export declare class GridFSBucketWriteStream { - /* + /* `implements NodeJS.WritableStream` Has to be removed, otherwise tsc places a `/// ` in the output file, because vinyl-fs messed with NodeJS.WritableStream in the global scope: diff --git a/src/driver/mysql/MysqlConnectionOptions.ts b/src/driver/mysql/MysqlConnectionOptions.ts index 47da7138ca..b1f8d39820 100644 --- a/src/driver/mysql/MysqlConnectionOptions.ts +++ b/src/driver/mysql/MysqlConnectionOptions.ts @@ -1,4 +1,5 @@ import { BaseDataSourceOptions } from "../../data-source/BaseDataSourceOptions" +import { ReplicationMode } from "../types/ReplicationMode" import { MysqlConnectionCredentialsOptions } from "./MysqlConnectionCredentialsOptions" /** @@ -146,5 +147,11 @@ export interface MysqlConnectionOptions * ORDER: Select the first node available unconditionally. */ readonly selector?: "RR" | "RANDOM" | "ORDER" + + /** + * Default connection pool to use for SELECT queries + * @default "slave" + */ + readonly defaultMode?: ReplicationMode } } diff --git a/src/driver/mysql/MysqlQueryRunner.ts b/src/driver/mysql/MysqlQueryRunner.ts index 8e6a7a5a0f..cd70ec9b33 100644 --- a/src/driver/mysql/MysqlQueryRunner.ts +++ b/src/driver/mysql/MysqlQueryRunner.ts @@ -26,6 +26,7 @@ import { ReplicationMode } from "../types/ReplicationMode" import { TypeORMError } from "../../error" import { MetadataTableType } from "../types/MetadataTableType" import { InstanceChecker } from "../../util/InstanceChecker" +import { BroadcasterResult } from "../../subscriber/BroadcasterResult" /** * Runs queries on a single mysql database connection. @@ -118,6 +119,7 @@ export class MysqlQueryRunner extends BaseQueryRunner implements QueryRunner { throw err } if (this.transactionDepth === 0) { + this.transactionDepth += 1 if (isolationLevel) { await this.query( "SET TRANSACTION ISOLATION LEVEL " + isolationLevel, @@ -125,9 +127,9 @@ export class MysqlQueryRunner extends BaseQueryRunner implements QueryRunner { } await this.query("START TRANSACTION") } else { - await this.query(`SAVEPOINT typeorm_${this.transactionDepth}`) + this.transactionDepth += 1 + await this.query(`SAVEPOINT typeorm_${this.transactionDepth - 1}`) } - this.transactionDepth += 1 await this.broadcaster.broadcast("AfterTransactionStart") } @@ -142,14 +144,15 @@ export class MysqlQueryRunner extends BaseQueryRunner implements QueryRunner { await this.broadcaster.broadcast("BeforeTransactionCommit") if (this.transactionDepth > 1) { + this.transactionDepth -= 1 await this.query( - `RELEASE SAVEPOINT typeorm_${this.transactionDepth - 1}`, + `RELEASE SAVEPOINT typeorm_${this.transactionDepth}`, ) } else { + this.transactionDepth -= 1 await this.query("COMMIT") this.isTransactionActive = false } - this.transactionDepth -= 1 await this.broadcaster.broadcast("AfterTransactionCommit") } @@ -164,14 +167,15 @@ export class MysqlQueryRunner extends BaseQueryRunner implements QueryRunner { await this.broadcaster.broadcast("BeforeTransactionRollback") if (this.transactionDepth > 1) { + this.transactionDepth -= 1 await this.query( - `ROLLBACK TO SAVEPOINT typeorm_${this.transactionDepth - 1}`, + `ROLLBACK TO SAVEPOINT typeorm_${this.transactionDepth}`, ) } else { + this.transactionDepth -= 1 await this.query("ROLLBACK") this.isTransactionActive = false } - this.transactionDepth -= 1 await this.broadcaster.broadcast("AfterTransactionRollback") } @@ -187,19 +191,29 @@ export class MysqlQueryRunner extends BaseQueryRunner implements QueryRunner { if (this.isReleased) throw new QueryRunnerAlreadyReleasedError() return new Promise(async (ok, fail) => { + const broadcasterResult = new BroadcasterResult() + try { const databaseConnection = await this.connect() + this.driver.connection.logger.logQuery(query, parameters, this) + this.broadcaster.broadcastBeforeQueryEvent( + broadcasterResult, + query, + parameters, + ) + const queryStartTime = +new Date() databaseConnection.query( query, parameters, - (err: any, raw: any) => { + async (err: any, raw: any) => { // log slow queries if maxQueryExecution time is set const maxQueryExecutionTime = this.driver.options.maxQueryExecutionTime const queryEndTime = +new Date() const queryExecutionTime = queryEndTime - queryStartTime + if ( maxQueryExecutionTime && queryExecutionTime > maxQueryExecutionTime @@ -218,11 +232,31 @@ export class MysqlQueryRunner extends BaseQueryRunner implements QueryRunner { parameters, this, ) + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + false, + undefined, + undefined, + err, + ) + return fail( new QueryFailedError(query, parameters, err), ) } + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + true, + queryExecutionTime, + raw, + undefined, + ) + const result = new QueryResult() result.raw = raw @@ -246,6 +280,8 @@ export class MysqlQueryRunner extends BaseQueryRunner implements QueryRunner { ) } catch (err) { fail(err) + } finally { + await broadcasterResult.wait() } }) } @@ -710,6 +746,49 @@ export class MysqlQueryRunner extends BaseQueryRunner implements QueryRunner { this.replaceCachedTable(oldTable, newTable) } + /** + * Change table comment. + */ + async changeTableComment( + tableOrName: Table | string, + newComment?: string, + ): Promise { + const upQueries: Query[] = [] + const downQueries: Query[] = [] + + const table = InstanceChecker.isTable(tableOrName) + ? tableOrName + : await this.getCachedTable(tableOrName) + + newComment = this.escapeComment(newComment) + const comment = this.escapeComment(table.comment) + + if (newComment === comment) { + return + } + + const newTable = table.clone() + + upQueries.push( + new Query( + `ALTER TABLE ${this.escapePath( + newTable, + )} COMMENT ${newComment}`, + ), + ) + downQueries.push( + new Query( + `ALTER TABLE ${this.escapePath(table)} COMMENT ${comment}`, + ), + ) + + await this.executeQueries(upQueries, downQueries) + + // change table comment and replace it in cached tabled; + table.comment = newTable.comment + this.replaceCachedTable(table, newTable) + } + /** * Creates a new column from the column in the table. */ @@ -2310,11 +2389,15 @@ export class MysqlQueryRunner extends BaseQueryRunner implements QueryRunner { // will cause the query to not hit the optimizations & do full scans. This is why // a number of queries below do `UNION`s of single `WHERE` clauses. - const dbTables: { TABLE_SCHEMA: string; TABLE_NAME: string }[] = [] + const dbTables: { + TABLE_SCHEMA: string + TABLE_NAME: string + TABLE_COMMENT: string + }[] = [] if (!tableNames) { // Since we don't have any of this data we have to do a scan - const tablesSql = `SELECT \`TABLE_SCHEMA\`, \`TABLE_NAME\` FROM \`INFORMATION_SCHEMA\`.\`TABLES\`` + const tablesSql = `SELECT \`TABLE_SCHEMA\`, \`TABLE_NAME\`, \`TABLE_COMMENT\` FROM \`INFORMATION_SCHEMA\`.\`TABLES\`` dbTables.push(...(await this.query(tablesSql))) } else { @@ -2331,7 +2414,7 @@ export class MysqlQueryRunner extends BaseQueryRunner implements QueryRunner { database = currentDatabase } - return `SELECT \`TABLE_SCHEMA\`, \`TABLE_NAME\` FROM \`INFORMATION_SCHEMA\`.\`TABLES\` WHERE \`TABLE_SCHEMA\` = '${database}' AND \`TABLE_NAME\` = '${name}'` + return `SELECT \`TABLE_SCHEMA\`, \`TABLE_NAME\`, \`TABLE_COMMENT\` FROM \`INFORMATION_SCHEMA\`.\`TABLES\` WHERE \`TABLE_SCHEMA\` = '${database}' AND \`TABLE_NAME\` = '${name}'` }) .join(" UNION ") @@ -2646,7 +2729,7 @@ export class MysqlQueryRunner extends BaseQueryRunner implements QueryRunner { // We cannot relay on information_schema.columns.generation_expression, because it is formatted different. const asExpressionQuery = - await this.selectTypeormMetadataSql({ + this.selectTypeormMetadataSql({ schema: dbTable["TABLE_SCHEMA"], table: dbTable["TABLE_NAME"], type: MetadataTableType.GENERATED_COLUMN, @@ -2889,6 +2972,8 @@ export class MysqlQueryRunner extends BaseQueryRunner implements QueryRunner { }) }) + table.comment = dbTable["TABLE_COMMENT"] + return table }), ) @@ -3022,6 +3107,10 @@ export class MysqlQueryRunner extends BaseQueryRunner implements QueryRunner { sql += `) ENGINE=${table.engine || "InnoDB"}` + if (table.comment) { + sql += ` COMMENT="${table.comment}"` + } + return new Query(sql) } diff --git a/src/driver/oracle/OracleConnectionOptions.ts b/src/driver/oracle/OracleConnectionOptions.ts index 486e12dc68..e1299bbd51 100644 --- a/src/driver/oracle/OracleConnectionOptions.ts +++ b/src/driver/oracle/OracleConnectionOptions.ts @@ -1,6 +1,14 @@ import { BaseDataSourceOptions } from "../../data-source/BaseDataSourceOptions" import { OracleConnectionCredentialsOptions } from "./OracleConnectionCredentialsOptions" +export interface OracleThickModeOptions { + binaryDir?: string + configDir?: string + driverName?: string + errorUrl?: string + libDir?: string +} + /** * Oracle-specific connection options. */ @@ -23,6 +31,14 @@ export interface OracleConnectionOptions */ readonly driver?: any + /** + * Utilize the thick driver. Starting from oracledb version 6, it's necessary to set this to true when opting for the thick client usage. + * Alternatively, an 'OracleThickModeOptions' object can be configured, which is used for the thick mode configuration by passing it to the 'node-oracledb' driver. + * For additional information, refer to the details provided in the following link: + * (https://node-oracledb.readthedocs.io/en/latest/api_manual/oracledb.html#oracledb.initOracleClient) + */ + readonly thickMode?: boolean | OracleThickModeOptions + /** * A boolean determining whether to pass time values in UTC or local time. (default: false). */ diff --git a/src/driver/oracle/OracleDriver.ts b/src/driver/oracle/OracleDriver.ts index 2eafc1e47c..0d24e68112 100644 --- a/src/driver/oracle/OracleDriver.ts +++ b/src/driver/oracle/OracleDriver.ts @@ -128,6 +128,8 @@ export class OracleDriver implements Driver { "nclob", "rowid", "urowid", + "simple-json", + "json", ] /** @@ -215,6 +217,11 @@ export class OracleDriver implements Driver { metadataValue: "clob", } + /** + * The prefix used for the parameters + */ + parametersPrefix: string = ":" + /** * Default values of length, precision and scale depends on column data type. * Used in the cases when length/precision/scale is not specified by user. @@ -247,7 +254,7 @@ export class OracleDriver implements Driver { maxAliasLength = 29 cteCapabilities: CteCapabilities = { - enabled: false, // TODO: enable + enabled: true, } dummyTableName = "DUAL" @@ -294,8 +301,8 @@ export class OracleDriver implements Driver { * either create a pool and create connection when needed. */ async connect(): Promise { - this.oracle.fetchAsString = [this.oracle.CLOB] - this.oracle.fetchAsBuffer = [this.oracle.BLOB] + this.oracle.fetchAsString = [this.oracle.DB_TYPE_CLOB] + this.oracle.fetchAsBuffer = [this.oracle.DB_TYPE_BLOB] if (this.options.replication) { this.slaves = await Promise.all( this.options.replication.slaves.map((slave) => { @@ -378,6 +385,7 @@ export class OracleDriver implements Driver { if (!parameters || !Object.keys(parameters).length) return [sql, escapedParameters] + const parameterIndexMap = new Map() sql = sql.replace( /:(\.\.\.)?([A-Za-z0-9_.]+)/g, (full, isArray: string, key: string): string => { @@ -385,6 +393,10 @@ export class OracleDriver implements Driver { return full } + if (parameterIndexMap.has(key)) { + return this.parametersPrefix + parameterIndexMap.get(key) + } + let value: any = parameters[key] if (isArray) { @@ -408,6 +420,7 @@ export class OracleDriver implements Driver { } escapedParameters.push(value) + parameterIndexMap.set(key, escapedParameters.length) return this.createParameter(key, escapedParameters.length - 1) }, ) // todo: make replace only in value statements, otherwise problems @@ -536,6 +549,8 @@ export class OracleDriver implements Driver { return DateUtils.simpleArrayToString(value) } else if (columnMetadata.type === "simple-json") { return DateUtils.simpleJsonToString(value) + } else if (columnMetadata.type === "json") { + return DateUtils.simpleJsonToString(value) } return value @@ -566,8 +581,6 @@ export class OracleDriver implements Driver { columnMetadata.type === "timestamp with local time zone" ) { value = DateUtils.normalizeHydratedDate(value) - } else if (columnMetadata.type === "json") { - value = JSON.parse(value) } else if (columnMetadata.type === "simple-array") { value = DateUtils.stringToSimpleArray(value) } else if (columnMetadata.type === "simple-json") { @@ -624,6 +637,8 @@ export class OracleDriver implements Driver { return "clob" } else if (column.type === "simple-json") { return "clob" + } else if (column.type === "json") { + return "json" } else { return (column.type as string) || "" } @@ -928,7 +943,7 @@ export class OracleDriver implements Driver { * Creates an escaped parameter. */ createParameter(parameterName: string, index: number): string { - return ":" + (index + 1) + return this.parametersPrefix + (index + 1) } /** @@ -943,21 +958,24 @@ export class OracleDriver implements Driver { case "smallint": case "dec": case "decimal": - return this.oracle.NUMBER + return this.oracle.DB_TYPE_NUMBER case "char": case "nchar": case "nvarchar2": case "varchar2": - return this.oracle.STRING + return this.oracle.DB_TYPE_VARCHAR case "blob": - return this.oracle.BLOB + return this.oracle.DB_TYPE_BLOB + case "simple-json": case "clob": - return this.oracle.CLOB + return this.oracle.DB_TYPE_CLOB case "date": case "timestamp": case "timestamp with time zone": case "timestamp with local time zone": - return this.oracle.DATE + return this.oracle.DB_TYPE_TIMESTAMP + case "json": + return this.oracle.DB_TYPE_JSON } } @@ -975,6 +993,12 @@ export class OracleDriver implements Driver { } catch (e) { throw new DriverPackageNotInstalledError("Oracle", "oracledb") } + const thickMode = this.options.thickMode + if (thickMode) { + typeof thickMode === "object" + ? this.oracle.initOracleClient(thickMode) + : this.oracle.initOracleClient() + } } /** diff --git a/src/driver/oracle/OracleQueryRunner.ts b/src/driver/oracle/OracleQueryRunner.ts index 8cb4d3dd23..6693a9c443 100644 --- a/src/driver/oracle/OracleQueryRunner.ts +++ b/src/driver/oracle/OracleQueryRunner.ts @@ -24,6 +24,7 @@ import { TypeORMError } from "../../error" import { QueryResult } from "../../query-runner/QueryResult" import { MetadataTableType } from "../types/MetadataTableType" import { InstanceChecker } from "../../util/InstanceChecker" +import { BroadcasterResult } from "../../subscriber/BroadcasterResult" /** * Runs queries on a single oracle database connection. @@ -135,13 +136,14 @@ export class OracleQueryRunner extends BaseQueryRunner implements QueryRunner { } if (this.transactionDepth === 0) { + this.transactionDepth += 1 await this.query( "SET TRANSACTION ISOLATION LEVEL " + isolationLevel, ) } else { - await this.query(`SAVEPOINT typeorm_${this.transactionDepth}`) + this.transactionDepth += 1 + await this.query(`SAVEPOINT typeorm_${this.transactionDepth - 1}`) } - this.transactionDepth += 1 await this.broadcaster.broadcast("AfterTransactionStart") } @@ -174,14 +176,15 @@ export class OracleQueryRunner extends BaseQueryRunner implements QueryRunner { await this.broadcaster.broadcast("BeforeTransactionRollback") if (this.transactionDepth > 1) { + this.transactionDepth -= 1 await this.query( - `ROLLBACK TO SAVEPOINT typeorm_${this.transactionDepth - 1}`, + `ROLLBACK TO SAVEPOINT typeorm_${this.transactionDepth}`, ) } else { + this.transactionDepth -= 1 await this.query("ROLLBACK") this.isTransactionActive = false } - this.transactionDepth -= 1 await this.broadcaster.broadcast("AfterTransactionRollback") } @@ -197,14 +200,21 @@ export class OracleQueryRunner extends BaseQueryRunner implements QueryRunner { if (this.isReleased) throw new QueryRunnerAlreadyReleasedError() const databaseConnection = await this.connect() + const broadcasterResult = new BroadcasterResult() this.driver.connection.logger.logQuery(query, parameters, this) + this.broadcaster.broadcastBeforeQueryEvent( + broadcasterResult, + query, + parameters, + ) + const queryStartTime = +new Date() try { const executionOptions = { autoCommit: !this.isTransactionActive, - outFormat: this.driver.oracle.OBJECT, + outFormat: this.driver.oracle.OUT_FORMAT_OBJECT, } const raw = await databaseConnection.execute( @@ -218,6 +228,17 @@ export class OracleQueryRunner extends BaseQueryRunner implements QueryRunner { this.driver.options.maxQueryExecutionTime const queryEndTime = +new Date() const queryExecutionTime = queryEndTime - queryStartTime + + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + true, + queryExecutionTime, + raw, + undefined, + ) + if ( maxQueryExecutionTime && queryExecutionTime > maxQueryExecutionTime @@ -271,7 +292,19 @@ export class OracleQueryRunner extends BaseQueryRunner implements QueryRunner { parameters, this, ) + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + false, + undefined, + undefined, + err, + ) + throw new QueryFailedError(query, parameters, err) + } finally { + await broadcasterResult.wait() } } @@ -290,7 +323,7 @@ export class OracleQueryRunner extends BaseQueryRunner implements QueryRunner { const executionOptions = { autoCommit: !this.isTransactionActive, - outFormat: this.driver.oracle.OBJECT, + outFormat: this.driver.oracle.OUT_FORMAT_OBJECT, } const databaseConnection = await this.connect() @@ -2388,7 +2421,13 @@ export class OracleQueryRunner extends BaseQueryRunner implements QueryRunner { (dbColumn) => dbColumn["OWNER"] === dbTable["OWNER"] && dbColumn["TABLE_NAME"] === - dbTable["TABLE_NAME"], + dbTable["TABLE_NAME"] && + // Filter out auto-generated virtual columns, + // since TypeORM will have no info about them. + !( + dbColumn["VIRTUAL_COLUMN"] === "YES" && + dbColumn["USER_GENERATED"] === "NO" + ), ) .map(async (dbColumn) => { const columnConstraints = dbConstraints.filter( @@ -2567,7 +2606,7 @@ export class OracleQueryRunner extends BaseQueryRunner implements QueryRunner { tableColumn.generatedType = "VIRTUAL" const asExpressionQuery = - await this.selectTypeormMetadataSql({ + this.selectTypeormMetadataSql({ table: dbTable["TABLE_NAME"], type: MetadataTableType.GENERATED_COLUMN, name: tableColumn.name, @@ -2680,6 +2719,35 @@ export class OracleQueryRunner extends BaseQueryRunner implements QueryRunner { }, ) + // Attempt to map auto-generated virtual columns to their + // referenced columns, through its 'DATA_DEFAULT' property. + // + // An example of this happening is when a column of type + // TIMESTAMP WITH TIME ZONE is indexed. Oracle will create a + // virtual column of type TIMESTAMP with a default value of + // SYS_EXTRACT_UTC(). + const autoGenVirtualDbColumns = dbColumns + .filter( + (dbColumn) => + dbColumn["OWNER"] === dbTable["OWNER"] && + dbColumn["TABLE_NAME"] === dbTable["TABLE_NAME"] && + dbColumn["VIRTUAL_COLUMN"] === "YES" && + dbColumn["USER_GENERATED"] === "NO", + ) + .reduce((acc, x) => { + const referencedDbColumn = dbColumns.find((dbColumn) => + x["DATA_DEFAULT"].includes(dbColumn["COLUMN_NAME"]), + ) + + if (!referencedDbColumn) return acc + + return { + ...acc, + [x["COLUMN_NAME"]]: + referencedDbColumn["COLUMN_NAME"], + } + }, {}) + // create TableIndex objects from the loaded indices table.indices = dbIndices .filter( @@ -2688,9 +2756,20 @@ export class OracleQueryRunner extends BaseQueryRunner implements QueryRunner { dbIndex["OWNER"] === dbTable["OWNER"], ) .map((dbIndex) => { + // + const columnNames = dbIndex["COLUMN_NAMES"] + .split(",") + .map( + ( + columnName: keyof typeof autoGenVirtualDbColumns, + ) => + autoGenVirtualDbColumns[columnName] ?? + columnName, + ) + return new TableIndex({ name: dbIndex["INDEX_NAME"], - columnNames: dbIndex["COLUMN_NAMES"].split(","), + columnNames, isUnique: dbIndex["UNIQUENESS"] === "UNIQUE", }) }) @@ -3102,4 +3181,16 @@ export class OracleQueryRunner extends BaseQueryRunner implements QueryRunner { return `"${tableName}"` } + + /** + * Change table comment. + */ + changeTableComment( + tableOrName: Table | string, + comment?: string, + ): Promise { + throw new TypeORMError( + `oracle driver does not support change table comment.`, + ) + } } diff --git a/src/driver/postgres/PostgresConnectionCredentialsOptions.ts b/src/driver/postgres/PostgresConnectionCredentialsOptions.ts index bcb6e5372a..4345198900 100644 --- a/src/driver/postgres/PostgresConnectionCredentialsOptions.ts +++ b/src/driver/postgres/PostgresConnectionCredentialsOptions.ts @@ -38,4 +38,10 @@ export interface PostgresConnectionCredentialsOptions { * Object with ssl parameters */ readonly ssl?: boolean | TlsOptions + + /** + * sets the application_name var to help db administrators identify + * the service using this connection. Defaults to 'undefined' + */ + readonly applicationName?: string } diff --git a/src/driver/postgres/PostgresConnectionOptions.ts b/src/driver/postgres/PostgresConnectionOptions.ts index 231fadfd25..17b3a41620 100644 --- a/src/driver/postgres/PostgresConnectionOptions.ts +++ b/src/driver/postgres/PostgresConnectionOptions.ts @@ -1,4 +1,5 @@ import { BaseDataSourceOptions } from "../../data-source/BaseDataSourceOptions" +import { ReplicationMode } from "../types/ReplicationMode" import { PostgresConnectionCredentialsOptions } from "./PostgresConnectionCredentialsOptions" /** @@ -47,6 +48,12 @@ export interface PostgresConnectionOptions * List of read-from severs (slaves). */ readonly slaves: PostgresConnectionCredentialsOptions[] + + /** + * Default connection pool to use for SELECT queries + * @default "slave" + */ + readonly defaultMode?: ReplicationMode } /** @@ -78,12 +85,6 @@ export interface PostgresConnectionOptions */ readonly installExtensions?: boolean - /** - * sets the application_name var to help db administrators identify - * the service using this connection. Defaults to 'undefined' - */ - readonly applicationName?: string - /** * Return 64-bit integers (int8) as JavaScript integers. * diff --git a/src/driver/postgres/PostgresDriver.ts b/src/driver/postgres/PostgresDriver.ts index a66911e3bb..837618f940 100644 --- a/src/driver/postgres/PostgresDriver.ts +++ b/src/driver/postgres/PostgresDriver.ts @@ -180,6 +180,12 @@ export class PostgresDriver implements Driver { "tsrange", "tstzrange", "daterange", + "int4multirange", + "int8multirange", + "nummultirange", + "tsmultirange", + "tstzmultirange", + "datemultirange", "geometry", "geography", "cube", @@ -257,6 +263,11 @@ export class PostgresDriver implements Driver { metadataValue: "text", } + /** + * The prefix used for the parameters + */ + parametersPrefix: string = "$" + /** * Default values of length, precision and scale depends on column data type. * Used in the cases when length/precision/scale is not specified by user. @@ -388,7 +399,7 @@ export class PostgresDriver implements Driver { }[] } const versionString = results.rows[0].version.replace( - /^PostgreSQL ([\d\.]+) .*$/, + /^PostgreSQL ([\d.]+) .*$/, "$1", ) this.version = versionString @@ -740,7 +751,7 @@ export class PostgresDriver implements Driver { } else if (columnMetadata.type === "simple-json") { value = DateUtils.stringToSimpleJson(value) } else if (columnMetadata.type === "cube") { - value = value.replace(/[\(\)\s]+/g, "") // remove whitespace + value = value.replace(/[()\s]+/g, "") // remove whitespace if (columnMetadata.isArray) { /** * Strips these groups from `{"1,2,3","",NULL}`: @@ -748,7 +759,7 @@ export class PostgresDriver implements Driver { * 2. ["", undefined] <- cube of arity 0 * 3. [undefined, "NULL"] <- NULL */ - const regexp = /(?:\"((?:[\d\s\.,])*)\")|(?:(NULL))/g + const regexp = /(?:"((?:[\d\s.,])*)")|(?:(NULL))/g const unparsedArrayString = value value = [] @@ -830,6 +841,7 @@ export class PostgresDriver implements Driver { if (!parameters || !Object.keys(parameters).length) return [sql, escapedParameters] + const parameterIndexMap = new Map() sql = sql.replace( /:(\.\.\.)?([A-Za-z0-9_.]+)/g, (full, isArray: string, key: string): string => { @@ -837,6 +849,10 @@ export class PostgresDriver implements Driver { return full } + if (parameterIndexMap.has(key)) { + return this.parametersPrefix + parameterIndexMap.get(key) + } + let value: any = parameters[key] if (isArray) { @@ -856,6 +872,7 @@ export class PostgresDriver implements Driver { } escapedParameters.push(value) + parameterIndexMap.set(key, escapedParameters.length) return this.createParameter(key, escapedParameters.length - 1) }, ) // todo: make replace only in value statements, otherwise problems @@ -994,7 +1011,7 @@ export class PostgresDriver implements Driver { normalizeDefault(columnMetadata: ColumnMetadata): string | undefined { const defaultValue = columnMetadata.default - if (defaultValue === null) { + if (defaultValue === null || defaultValue === undefined) { return undefined } @@ -1028,10 +1045,6 @@ export class PostgresDriver implements Driver { return `'${JSON.stringify(defaultValue)}'` } - if (defaultValue === undefined) { - return undefined - } - return `${defaultValue}` } @@ -1399,7 +1412,7 @@ export class PostgresDriver implements Driver { * Creates an escaped parameter. */ createParameter(parameterName: string, index: number): string { - return "$" + (index + 1) + return this.parametersPrefix + (index + 1) } // ------------------------------------------------------------------------- @@ -1466,7 +1479,8 @@ export class PostgresDriver implements Driver { port: credentials.port, ssl: credentials.ssl, connectionTimeoutMillis: options.connectTimeoutMS, - application_name: options.applicationName, + application_name: + options.applicationName ?? credentials.applicationName, max: options.poolSize, }, options.extra || {}, diff --git a/src/driver/postgres/PostgresQueryRunner.ts b/src/driver/postgres/PostgresQueryRunner.ts index 3fa2d3ddb9..481cf4943c 100644 --- a/src/driver/postgres/PostgresQueryRunner.ts +++ b/src/driver/postgres/PostgresQueryRunner.ts @@ -26,6 +26,7 @@ import { IsolationLevel } from "../types/IsolationLevel" import { MetadataTableType } from "../types/MetadataTableType" import { ReplicationMode } from "../types/ReplicationMode" import { PostgresDriver } from "./PostgresDriver" +import { BroadcasterResult } from "../../subscriber/BroadcasterResult" /** * Runs queries on a single postgres database connection. @@ -173,6 +174,7 @@ export class PostgresQueryRunner } if (this.transactionDepth === 0) { + this.transactionDepth += 1 await this.query("START TRANSACTION") if (isolationLevel) { await this.query( @@ -180,9 +182,9 @@ export class PostgresQueryRunner ) } } else { - await this.query(`SAVEPOINT typeorm_${this.transactionDepth}`) + this.transactionDepth += 1 + await this.query(`SAVEPOINT typeorm_${this.transactionDepth - 1}`) } - this.transactionDepth += 1 await this.broadcaster.broadcast("AfterTransactionStart") } @@ -197,14 +199,15 @@ export class PostgresQueryRunner await this.broadcaster.broadcast("BeforeTransactionCommit") if (this.transactionDepth > 1) { + this.transactionDepth -= 1 await this.query( - `RELEASE SAVEPOINT typeorm_${this.transactionDepth - 1}`, + `RELEASE SAVEPOINT typeorm_${this.transactionDepth}`, ) } else { + this.transactionDepth -= 1 await this.query("COMMIT") this.isTransactionActive = false } - this.transactionDepth -= 1 await this.broadcaster.broadcast("AfterTransactionCommit") } @@ -219,14 +222,15 @@ export class PostgresQueryRunner await this.broadcaster.broadcast("BeforeTransactionRollback") if (this.transactionDepth > 1) { + this.transactionDepth -= 1 await this.query( - `ROLLBACK TO SAVEPOINT typeorm_${this.transactionDepth - 1}`, + `ROLLBACK TO SAVEPOINT typeorm_${this.transactionDepth}`, ) } else { + this.transactionDepth -= 1 await this.query("ROLLBACK") this.isTransactionActive = false } - this.transactionDepth -= 1 await this.broadcaster.broadcast("AfterTransactionRollback") } @@ -242,8 +246,15 @@ export class PostgresQueryRunner if (this.isReleased) throw new QueryRunnerAlreadyReleasedError() const databaseConnection = await this.connect() + const broadcasterResult = new BroadcasterResult() this.driver.connection.logger.logQuery(query, parameters, this) + this.broadcaster.broadcastBeforeQueryEvent( + broadcasterResult, + query, + parameters, + ) + try { const queryStartTime = +new Date() const raw = await databaseConnection.query(query, parameters) @@ -252,6 +263,17 @@ export class PostgresQueryRunner this.driver.options.maxQueryExecutionTime const queryEndTime = +new Date() const queryExecutionTime = queryEndTime - queryStartTime + + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + true, + queryExecutionTime, + raw, + undefined, + ) + if ( maxQueryExecutionTime && queryExecutionTime > maxQueryExecutionTime @@ -296,7 +318,19 @@ export class PostgresQueryRunner parameters, this, ) + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + false, + undefined, + undefined, + err, + ) + throw new QueryFailedError(query, parameters, err) + } finally { + await broadcasterResult.wait() } } @@ -568,6 +602,23 @@ export class PostgresQueryRunner }) } + if (table.comment) { + upQueries.push( + new Query( + "COMMENT ON TABLE " + + this.escapePath(table) + + " IS '" + + table.comment + + "'", + ), + ) + downQueries.push( + new Query( + "COMMENT ON TABLE " + this.escapePath(table) + " IS NULL", + ), + ) + } + await this.executeQueries(upQueries, downQueries) } @@ -3242,10 +3293,14 @@ export class PostgresQueryRunner const currentSchema = await this.getCurrentSchema() const currentDatabase = await this.getCurrentDatabase() - const dbTables: { table_schema: string; table_name: string }[] = [] + const dbTables: { + table_schema: string + table_name: string + table_comment: string + }[] = [] if (!tableNames) { - const tablesSql = `SELECT "table_schema", "table_name" FROM "information_schema"."tables"` + const tablesSql = `SELECT "table_schema", "table_name", obj_description(('"' || "table_schema" || '"."' || "table_name" || '"')::regclass, 'pg_class') AS table_comment FROM "information_schema"."tables"` dbTables.push(...(await this.query(tablesSql))) } else { const tablesCondition = tableNames @@ -3258,7 +3313,7 @@ export class PostgresQueryRunner .join(" OR ") const tablesSql = - `SELECT "table_schema", "table_name" FROM "information_schema"."tables" WHERE ` + + `SELECT "table_schema", "table_name", obj_description(('"' || "table_schema" || '"."' || "table_name" || '"')::regclass, 'pg_class') AS table_comment FROM "information_schema"."tables" WHERE ` + tablesCondition dbTables.push(...(await this.query(tablesSql))) } @@ -3311,13 +3366,14 @@ export class PostgresQueryRunner const indicesSql = `SELECT "ns"."nspname" AS "table_schema", "t"."relname" AS "table_name", "i"."relname" AS "constraint_name", "a"."attname" AS "column_name", ` + `CASE "ix"."indisunique" WHEN 't' THEN 'TRUE' ELSE'FALSE' END AS "is_unique", pg_get_expr("ix"."indpred", "ix"."indrelid") AS "condition", ` + - `"types"."typname" AS "type_name" ` + + `"types"."typname" AS "type_name", "am"."amname" AS "index_type" ` + `FROM "pg_class" "t" ` + `INNER JOIN "pg_index" "ix" ON "ix"."indrelid" = "t"."oid" ` + `INNER JOIN "pg_attribute" "a" ON "a"."attrelid" = "t"."oid" AND "a"."attnum" = ANY ("ix"."indkey") ` + `INNER JOIN "pg_namespace" "ns" ON "ns"."oid" = "t"."relnamespace" ` + `INNER JOIN "pg_class" "i" ON "i"."oid" = "ix"."indexrelid" ` + `INNER JOIN "pg_type" "types" ON "types"."oid" = "a"."atttypid" ` + + `INNER JOIN "pg_am" "am" ON "i"."relam" = "am"."oid" ` + `LEFT JOIN "pg_constraint" "cnst" ON "cnst"."conname" = "i"."relname" ` + `WHERE "t"."relkind" IN ('r', 'p') AND "cnst"."contype" IS NULL AND (${constraintsCondition})` @@ -3381,6 +3437,7 @@ export class PostgresQueryRunner const schema = getSchemaFromKey(dbTable, "table_schema") table.database = currentDatabase table.schema = dbTable["table_schema"] + table.comment = dbTable["table_comment"] table.name = this.driver.buildTableName( dbTable["table_name"], schema, @@ -3416,47 +3473,60 @@ export class PostgresQueryRunner if ( tableColumn.type === "numeric" || + tableColumn.type === "numeric[]" || tableColumn.type === "decimal" || tableColumn.type === "float" ) { + let numericPrecision = + dbColumn["numeric_precision"] + let numericScale = dbColumn["numeric_scale"] + if (dbColumn["data_type"] === "ARRAY") { + const numericSize = dbColumn[ + "format_type" + ].match( + /^numeric\(([0-9]+),([0-9]+)\)\[\]$/, + ) + if (numericSize) { + numericPrecision = +numericSize[1] + numericScale = +numericSize[2] + } + } // If one of these properties was set, and another was not, Postgres sets '0' in to unspecified property // we set 'undefined' in to unspecified property to avoid changing column on sync if ( - dbColumn["numeric_precision"] !== null && + numericPrecision !== null && !this.isDefaultColumnPrecision( table, tableColumn, - dbColumn["numeric_precision"], + numericPrecision, ) ) { - tableColumn.precision = - dbColumn["numeric_precision"] + tableColumn.precision = numericPrecision } else if ( - dbColumn["numeric_scale"] !== null && + numericScale !== null && !this.isDefaultColumnScale( table, tableColumn, - dbColumn["numeric_scale"], + numericScale, ) ) { tableColumn.precision = undefined } if ( - dbColumn["numeric_scale"] !== null && + numericScale !== null && !this.isDefaultColumnScale( table, tableColumn, - dbColumn["numeric_scale"], + numericScale, ) ) { - tableColumn.scale = - dbColumn["numeric_scale"] + tableColumn.scale = numericScale } else if ( - dbColumn["numeric_precision"] !== null && + numericPrecision !== null && !this.isDefaultColumnPrecision( table, tableColumn, - dbColumn["numeric_precision"], + numericPrecision, ) ) { tableColumn.scale = undefined @@ -3717,7 +3787,7 @@ export class PostgresQueryRunner } else { tableColumn.default = dbColumn[ "column_default" - ].replace(/::[\w\s.\[\]\-"]+/g, "") + ].replace(/::[\w\s.[\]\-"]+/g, "") tableColumn.default = tableColumn.default.replace( /^(-?\d+)$/, @@ -3734,7 +3804,7 @@ export class PostgresQueryRunner tableColumn.generatedType = "STORED" // We cannot relay on information_schema.columns.generation_expression, because it is formatted different. const asExpressionQuery = - await this.selectTypeormMetadataSql({ + this.selectTypeormMetadataSql({ database: currentDatabase, schema: dbTable["table_schema"], table: dbTable["table_name"], @@ -3926,12 +3996,7 @@ export class PostgresQueryRunner columnNames: indices.map((i) => i["column_name"]), isUnique: constraint["is_unique"] === "TRUE", where: constraint["condition"], - isSpatial: indices.every( - (i) => - this.driver.spatialTypes.indexOf( - i["type_name"], - ) >= 0, - ), + isSpatial: constraint["index_type"] === "gist", isFulltext: false, }) }) @@ -4095,7 +4160,7 @@ export class PostgresQueryRunner */ protected async getVersion(): Promise { const result = await this.query(`SELECT version()`) - return result[0]["version"].replace(/^PostgreSQL ([\d\.]+) .*$/, "$1") + return result[0]["version"].replace(/^PostgreSQL ([\d.]+) .*$/, "$1") } /** @@ -4244,9 +4309,9 @@ export class PostgresQueryRunner .map((columnName) => `"${columnName}"`) .join(", ") return new Query( - `CREATE ${index.isUnique ? "UNIQUE " : ""}INDEX "${ - index.name - }" ON ${this.escapePath(table)} ${ + `CREATE ${index.isUnique ? "UNIQUE " : ""}INDEX${ + index.isConcurrent ? " CONCURRENTLY" : "" + } "${index.name}" ON ${this.escapePath(table)} ${ index.isSpatial ? "USING GiST " : "" }(${columns}) ${index.where ? "WHERE " + index.where : ""}`, ) @@ -4275,13 +4340,24 @@ export class PostgresQueryRunner table: Table | View, indexOrName: TableIndex | string, ): Query { - let indexName = InstanceChecker.isTableIndex(indexOrName) + const indexName = InstanceChecker.isTableIndex(indexOrName) ? indexOrName.name : indexOrName + const concurrent = InstanceChecker.isTableIndex(indexOrName) + ? indexOrName.isConcurrent + : false const { schema } = this.driver.parseTableName(table) return schema - ? new Query(`DROP INDEX "${schema}"."${indexName}"`) - : new Query(`DROP INDEX "${indexName}"`) + ? new Query( + `DROP INDEX ${ + concurrent ? "CONCURRENTLY " : "" + }"${schema}"."${indexName}"`, + ) + : new Query( + `DROP INDEX ${ + concurrent ? "CONCURRENTLY " : "" + }"${indexName}"`, + ) } /** @@ -4663,4 +4739,47 @@ export class PostgresQueryRunner ) return result.length ? true : false } + + /** + * Change table comment. + */ + async changeTableComment( + tableOrName: Table | string, + newComment?: string, + ): Promise { + const upQueries: Query[] = [] + const downQueries: Query[] = [] + + const table = InstanceChecker.isTable(tableOrName) + ? tableOrName + : await this.getCachedTable(tableOrName) + + newComment = this.escapeComment(newComment) + const comment = this.escapeComment(table.comment) + + if (newComment === comment) { + return + } + + const newTable = table.clone() + + upQueries.push( + new Query( + `COMMENT ON TABLE ${this.escapePath( + newTable, + )} IS ${newComment}`, + ), + ) + + downQueries.push( + new Query( + `COMMENT ON TABLE ${this.escapePath(table)} IS ${comment}`, + ), + ) + + await this.executeQueries(upQueries, downQueries) + + table.comment = newTable.comment + this.replaceCachedTable(table, newTable) + } } diff --git a/src/driver/react-native/ReactNativeQueryRunner.ts b/src/driver/react-native/ReactNativeQueryRunner.ts index 75defeadfe..4242322799 100644 --- a/src/driver/react-native/ReactNativeQueryRunner.ts +++ b/src/driver/react-native/ReactNativeQueryRunner.ts @@ -5,6 +5,7 @@ import { AbstractSqliteQueryRunner } from "../sqlite-abstract/AbstractSqliteQuer import { ReactNativeDriver } from "./ReactNativeDriver" import { Broadcaster } from "../../subscriber/Broadcaster" import { QueryResult } from "../../query-runner/QueryResult" +import { BroadcasterResult } from "../../subscriber/BroadcasterResult" /** * Runs queries on a single sqlite database connection. @@ -53,17 +54,36 @@ export class ReactNativeQueryRunner extends AbstractSqliteQueryRunner { return new Promise(async (ok, fail) => { const databaseConnection = await this.connect() + const broadcasterResult = new BroadcasterResult() + this.driver.connection.logger.logQuery(query, parameters, this) + this.broadcaster.broadcastBeforeQueryEvent( + broadcasterResult, + query, + parameters, + ) + const queryStartTime = +new Date() databaseConnection.executeSql( query, parameters, - (raw: any) => { + async (raw: any) => { // log slow queries if maxQueryExecution time is set const maxQueryExecutionTime = this.driver.options.maxQueryExecutionTime const queryEndTime = +new Date() const queryExecutionTime = queryEndTime - queryStartTime + + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + true, + queryExecutionTime, + raw, + undefined, + ) + if ( maxQueryExecutionTime && queryExecutionTime > maxQueryExecutionTime @@ -75,6 +95,9 @@ export class ReactNativeQueryRunner extends AbstractSqliteQueryRunner { this, ) + if (broadcasterResult.promises.length > 0) + await Promise.all(broadcasterResult.promises) + const result = new QueryResult() if (raw?.hasOwnProperty("rowsAffected")) { @@ -102,13 +125,24 @@ export class ReactNativeQueryRunner extends AbstractSqliteQueryRunner { ok(result.raw) } }, - (err: any) => { + async (err: any) => { this.driver.connection.logger.logQueryError( err, query, parameters, this, ) + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + false, + undefined, + undefined, + err, + ) + await broadcasterResult.wait() + fail(new QueryFailedError(query, parameters, err)) }, ) diff --git a/src/driver/sap/SapDriver.ts b/src/driver/sap/SapDriver.ts index 365ec471bf..fd3ab14133 100644 --- a/src/driver/sap/SapDriver.ts +++ b/src/driver/sap/SapDriver.ts @@ -6,9 +6,9 @@ import { Table, TableColumn, TableForeignKey, - TypeORMError, } from "../.." import { DriverPackageNotInstalledError } from "../../error/DriverPackageNotInstalledError" +import { TypeORMError } from "../../error/TypeORMError" import { ColumnMetadata } from "../../metadata/ColumnMetadata" import { PlatformTools } from "../../platform/PlatformTools" import { RdbmsSchemaBuilder } from "../../schema-builder/RdbmsSchemaBuilder" @@ -47,6 +47,10 @@ export class SapDriver implements Driver { */ client: any + /** + * Hana Client streaming extension. + */ + streamClient: any /** * Pool for master database. */ @@ -182,7 +186,7 @@ export class SapDriver implements Driver { cacheTime: "bigint", cacheDuration: "integer", cacheQuery: "nvarchar(5000)" as any, - cacheResult: "text", + cacheResult: "nclob", metadataType: "nvarchar", metadataDatabase: "nvarchar", metadataSchema: "nvarchar", @@ -765,7 +769,8 @@ export class SapDriver implements Driver { this.getColumnLength(columnMetadata)) || tableColumn.precision !== columnMetadata.precision || tableColumn.scale !== columnMetadata.scale || - // || tableColumn.comment !== columnMetadata.comment || // todo + tableColumn.comment !== + this.escapeComment(columnMetadata.comment) || (!tableColumn.isGenerated && hanaNullComapatibleDefault !== tableColumn.default) || // we included check for generated here, because generated columns already can have default values tableColumn.isPrimary !== columnMetadata.isPrimary || @@ -825,6 +830,9 @@ export class SapDriver implements Driver { try { if (!this.options.hanaClientDriver) { PlatformTools.load("@sap/hana-client") + this.streamClient = PlatformTools.load( + "@sap/hana-client/extension/Stream", + ) } } catch (e) { // todo: better error for browser env @@ -834,4 +842,15 @@ export class SapDriver implements Driver { ) } } + + /** + * Escapes a given comment. + */ + protected escapeComment(comment?: string) { + if (!comment) return comment + + comment = comment.replace(/\u0000/g, "") // Null bytes aren't allowed in comments + + return comment + } } diff --git a/src/driver/sap/SapQueryRunner.ts b/src/driver/sap/SapQueryRunner.ts index 50afd07586..5050cab47c 100644 --- a/src/driver/sap/SapQueryRunner.ts +++ b/src/driver/sap/SapQueryRunner.ts @@ -27,6 +27,7 @@ import { QueryLock } from "../../query-runner/QueryLock" import { MetadataTableType } from "../types/MetadataTableType" import { InstanceChecker } from "../../util/InstanceChecker" import { promisify } from "util" +import { BroadcasterResult } from "../../subscriber/BroadcasterResult" /** * Runs queries on a single SQL Server database connection. @@ -194,29 +195,56 @@ export class SapQueryRunner extends BaseQueryRunner implements QueryRunner { let statement: any const result = new QueryResult() + const broadcasterResult = new BroadcasterResult() try { const databaseConnection = await this.connect() this.driver.connection.logger.logQuery(query, parameters, this) + this.broadcaster.broadcastBeforeQueryEvent( + broadcasterResult, + query, + parameters, + ) + const queryStartTime = +new Date() const isInsertQuery = query.substr(0, 11) === "INSERT INTO" - statement = databaseConnection.prepare(query) + if (parameters?.some(Array.isArray)) { + statement = await promisify( + databaseConnection.prepare.bind(databaseConnection), + )(query) + } - const raw = await new Promise((ok, fail) => { - statement.exec(parameters, (err: any, raw: any) => - err - ? fail(new QueryFailedError(query, parameters, err)) - : ok(raw), - ) - }) + let raw: any + try { + raw = statement + ? await promisify(statement.exec.bind(statement))( + parameters, + ) + : await promisify( + databaseConnection.exec.bind(databaseConnection), + )(query, parameters, {}) + } catch (err) { + throw new QueryFailedError(query, parameters, err) + } // log slow queries if maxQueryExecution time is set const maxQueryExecutionTime = this.driver.connection.options.maxQueryExecutionTime const queryEndTime = +new Date() const queryExecutionTime = queryEndTime - queryStartTime + + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + true, + queryExecutionTime, + raw, + undefined, + ) + if ( maxQueryExecutionTime && queryExecutionTime > maxQueryExecutionTime @@ -261,20 +289,31 @@ export class SapQueryRunner extends BaseQueryRunner implements QueryRunner { result.raw = identityValueResult[0]["CURRENT_IDENTITY_VALUE()"] result.records = identityValueResult } - } catch (e) { + } catch (err) { this.driver.connection.logger.logQueryError( - e, + err, query, parameters, this, ) - throw e + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + false, + undefined, + undefined, + err, + ) + throw err } finally { // Never forget to drop the statement we reserved if (statement?.drop) { await new Promise((ok) => statement.drop(() => ok())) } + await broadcasterResult.wait() + // Always release the lock. release() } @@ -295,7 +334,22 @@ export class SapQueryRunner extends BaseQueryRunner implements QueryRunner { onEnd?: Function, onError?: Function, ): Promise { - throw new TypeORMError(`Stream is not supported by SAP driver.`) + if (this.isReleased) throw new QueryRunnerAlreadyReleasedError() + + const databaseConnection = await this.connect() + this.driver.connection.logger.logQuery(query, parameters, this) + + const prepareAsync = promisify(databaseConnection.prepare).bind( + databaseConnection, + ) + const statement = await prepareAsync(query) + const resultSet = statement.executeQuery(parameters) + const stream = this.driver.streamClient.createObjectStream(resultSet) + + if (onEnd) stream.on("end", onEnd) + if (onError) stream.on("error", onError) + + return stream } /** @@ -384,7 +438,7 @@ export class SapQueryRunner extends BaseQueryRunner implements QueryRunner { parsedTableName.schema = await this.getCurrentSchema() } - const sql = `SELECT * FROM "SYS"."TABLE_COLUMNS" WHERE "SCHEMA_NAME" = ${parsedTableName.schema} AND "TABLE_NAME" = ${parsedTableName.tableName} AND "COLUMN_NAME" = '${columnName}'` + const sql = `SELECT * FROM "SYS"."TABLE_COLUMNS" WHERE "SCHEMA_NAME" = '${parsedTableName.schema}' AND "TABLE_NAME" = '${parsedTableName.tableName}' AND "COLUMN_NAME" = '${columnName}'` const result = await this.query(sql) return result.length ? true : false } @@ -1248,19 +1302,48 @@ export class SapQueryRunner extends BaseQueryRunner implements QueryRunner { oldColumn.name = newColumn.name } - if (this.isColumnChanged(oldColumn, newColumn)) { + if (this.isColumnChanged(oldColumn, newColumn, true)) { upQueries.push( new Query( `ALTER TABLE ${this.escapePath( table, - )} ALTER (${this.buildCreateColumnSql(newColumn)})`, + )} ALTER (${this.buildCreateColumnSql( + newColumn, + !( + oldColumn.default === null || + oldColumn.default === undefined + ), + !oldColumn.isNullable, + )})`, ), ) downQueries.push( new Query( `ALTER TABLE ${this.escapePath( table, - )} ALTER (${this.buildCreateColumnSql(oldColumn)})`, + )} ALTER (${this.buildCreateColumnSql( + oldColumn, + !( + newColumn.default === null || + newColumn.default === undefined + ), + !newColumn.isNullable, + )})`, + ), + ) + } else if (oldColumn.comment !== newColumn.comment) { + upQueries.push( + new Query( + `COMMENT ON COLUMN ${this.escapePath(table)}."${ + oldColumn.name + }" IS ${this.escapeComment(newColumn.comment)}`, + ), + ) + downQueries.push( + new Query( + `COMMENT ON COLUMN ${this.escapePath(table)}."${ + newColumn.name + }" IS ${this.escapeComment(oldColumn.comment)}`, ), ) } @@ -1412,74 +1495,6 @@ export class SapQueryRunner extends BaseQueryRunner implements QueryRunner { } } - if (newColumn.default !== oldColumn.default) { - if ( - newColumn.default !== null && - newColumn.default !== undefined - ) { - upQueries.push( - new Query( - `ALTER TABLE ${this.escapePath(table)} ALTER ("${ - newColumn.name - }" ${this.connection.driver.createFullType( - newColumn, - )} DEFAULT ${newColumn.default})`, - ), - ) - - if ( - oldColumn.default !== null && - oldColumn.default !== undefined - ) { - downQueries.push( - new Query( - `ALTER TABLE ${this.escapePath( - table, - )} ALTER ("${ - oldColumn.name - }" ${this.connection.driver.createFullType( - oldColumn, - )} DEFAULT ${oldColumn.default})`, - ), - ) - } else { - downQueries.push( - new Query( - `ALTER TABLE ${this.escapePath( - table, - )} ALTER ("${ - oldColumn.name - }" ${this.connection.driver.createFullType( - oldColumn, - )} DEFAULT NULL)`, - ), - ) - } - } else if ( - oldColumn.default !== null && - oldColumn.default !== undefined - ) { - upQueries.push( - new Query( - `ALTER TABLE ${this.escapePath(table)} ALTER ("${ - newColumn.name - }" ${this.connection.driver.createFullType( - newColumn, - )} DEFAULT NULL)`, - ), - ) - downQueries.push( - new Query( - `ALTER TABLE ${this.escapePath(table)} ALTER ("${ - oldColumn.name - }" ${this.connection.driver.createFullType( - oldColumn, - )} DEFAULT ${oldColumn.default})`, - ), - ) - } - } - await this.executeQueries(upQueries, downQueries) this.replaceCachedTable(table, clonedTable) } @@ -2751,7 +2766,9 @@ export class SapQueryRunner extends BaseQueryRunner implements QueryRunner { dbColumn["DEFAULT_VALUE"] } } - tableColumn.comment = "" // dbColumn["COLUMN_COMMENT"]; + if (dbColumn["COMMENTS"]) { + tableColumn.comment = dbColumn["COMMENTS"] + } if (dbColumn["character_set_name"]) tableColumn.charset = dbColumn["character_set_name"] @@ -3277,6 +3294,19 @@ export class SapQueryRunner extends BaseQueryRunner implements QueryRunner { ) } + /** + * Escapes a given comment so it's safe to include in a query. + */ + protected escapeComment(comment?: string) { + if (!comment) { + return "NULL" + } + + comment = comment.replace(/'/g, "''").replace(/\u0000/g, "") // Null bytes aren't allowed in comments + + return `'${comment}'` + } + /** * Escapes given table or view path. */ @@ -3290,58 +3320,50 @@ export class SapQueryRunner extends BaseQueryRunner implements QueryRunner { return `"${tableName}"` } - /** - * Concat database name and schema name to the foreign key name. - * Needs because FK name is relevant to the schema and database. - */ - protected buildForeignKeyName( - fkName: string, - schemaName: string | undefined, - dbName: string | undefined, - ): string { - let joinedFkName = fkName - if (schemaName) joinedFkName = schemaName + "." + joinedFkName - if (dbName) joinedFkName = dbName + "." + joinedFkName - - return joinedFkName - } - - /** - * Removes parenthesis around default value. - * Sql server returns default value with parenthesis around, e.g. - * ('My text') - for string - * ((1)) - for number - * (newsequentialId()) - for function - */ - protected removeParenthesisFromDefault(defaultValue: any): any { - if (defaultValue.substr(0, 1) !== "(") return defaultValue - const normalizedDefault = defaultValue.substr( - 1, - defaultValue.lastIndexOf(")") - 1, - ) - return this.removeParenthesisFromDefault(normalizedDefault) - } - /** * Builds a query for create column. */ - protected buildCreateColumnSql(column: TableColumn) { + protected buildCreateColumnSql( + column: TableColumn, + explicitDefault?: boolean, + explicitNullable?: boolean, + ) { let c = `"${column.name}" ` + this.connection.driver.createFullType(column) if (column.charset) c += " CHARACTER SET " + column.charset if (column.collation) c += " COLLATE " + column.collation - if (column.default !== undefined && column.default !== null) - // DEFAULT must be placed before NOT NULL + if (column.default !== undefined && column.default !== null) { c += " DEFAULT " + column.default - if (column.isNullable !== true && !column.isGenerated) + } else if (explicitDefault) { + c += " DEFAULT NULL" + } + if (!column.isGenerated) { // NOT NULL is not supported with GENERATED - c += " NOT NULL" + if (column.isNullable !== true) c += " NOT NULL" + else if (explicitNullable) c += " NULL" + } if ( column.isGenerated === true && column.generationStrategy === "increment" - ) + ) { c += " GENERATED ALWAYS AS IDENTITY" + } + if (column.comment) { + c += ` COMMENT ${this.escapeComment(column.comment)}` + } return c } + + /** + * Change table comment. + */ + changeTableComment( + tableOrName: Table | string, + comment?: string, + ): Promise { + throw new TypeORMError( + `spa driver does not support change table comment.`, + ) + } } diff --git a/src/driver/spanner/SpannerConnectionOptions.ts b/src/driver/spanner/SpannerConnectionOptions.ts index 848228139c..ce12bb0377 100644 --- a/src/driver/spanner/SpannerConnectionOptions.ts +++ b/src/driver/spanner/SpannerConnectionOptions.ts @@ -1,4 +1,5 @@ import { BaseConnectionOptions } from "../../connection/BaseConnectionOptions" +import { ReplicationMode } from "../types/ReplicationMode" import { SpannerConnectionCredentialsOptions } from "./SpannerConnectionCredentialsOptions" import { SpannerSessionPoolOptions } from "./SpannerSessionPoolOptions" @@ -144,6 +145,12 @@ export interface SpannerConnectionOptions * ORDER: Select the first node available unconditionally. */ readonly selector?: "RR" | "RANDOM" | "ORDER" + + /** + * Default connection pool to use for SELECT queries + * @default "slave" + */ + readonly defaultMode?: ReplicationMode } readonly poolSize?: never diff --git a/src/driver/spanner/SpannerDriver.ts b/src/driver/spanner/SpannerDriver.ts index 005ce49bab..e18420c429 100644 --- a/src/driver/spanner/SpannerDriver.ts +++ b/src/driver/spanner/SpannerDriver.ts @@ -157,6 +157,11 @@ export class SpannerDriver implements Driver { metadataValue: "string", } + /** + * The prefix used for the parameters + */ + parametersPrefix: string = "@param" + /** * Default values of length, precision and scale depends on column data type. * Used in the cases when length/precision/scale is not specified by user. @@ -254,6 +259,7 @@ export class SpannerDriver implements Driver { if (!parameters || !Object.keys(parameters).length) return [sql, escapedParameters] + const parameterIndexMap = new Map() sql = sql.replace( /:(\.\.\.)?([A-Za-z0-9_.]+)/g, (full, isArray: string, key: string): string => { @@ -261,6 +267,10 @@ export class SpannerDriver implements Driver { return full } + if (parameterIndexMap.has(key)) { + return this.parametersPrefix + parameterIndexMap.get(key) + } + let value: any = parameters[key] if (value === null) { @@ -282,7 +292,9 @@ export class SpannerDriver implements Driver { if (value instanceof Function) { return value() } + escapedParameters.push(value) + parameterIndexMap.set(key, escapedParameters.length - 1) return this.createParameter(key, escapedParameters.length - 1) }, ) // todo: make replace only in value statements, otherwise problems @@ -720,7 +732,7 @@ export class SpannerDriver implements Driver { * Creates an escaped parameter. */ createParameter(parameterName: string, index: number): string { - return "@param" + index + return this.parametersPrefix + index } // ------------------------------------------------------------------------- diff --git a/src/driver/spanner/SpannerQueryRunner.ts b/src/driver/spanner/SpannerQueryRunner.ts index 921162366f..b54e7c02af 100644 --- a/src/driver/spanner/SpannerQueryRunner.ts +++ b/src/driver/spanner/SpannerQueryRunner.ts @@ -24,6 +24,7 @@ import { TypeORMError } from "../../error" import { QueryResult } from "../../query-runner/QueryResult" import { MetadataTableType } from "../types/MetadataTableType" import { SpannerDriver } from "./SpannerDriver" +import { BroadcasterResult } from "../../subscriber/BroadcasterResult" /** * Runs queries on a single postgres database connection. @@ -43,6 +44,11 @@ export class SpannerQueryRunner extends BaseQueryRunner implements QueryRunner { */ protected currentTransaction?: any + /** + * Transaction currently executed by this session. + */ + protected sessionTransaction?: any + // ------------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------------- @@ -152,6 +158,8 @@ export class SpannerQueryRunner extends BaseQueryRunner implements QueryRunner { ): Promise { if (this.isReleased) throw new QueryRunnerAlreadyReleasedError() + const broadcasterResult = new BroadcasterResult() + try { const queryStartTime = +new Date() let rawResult: @@ -171,7 +179,6 @@ export class SpannerQueryRunner extends BaseQueryRunner implements QueryRunner { await this.initTransaction() await this.currentTransaction.begin() } - const executor = isSelect && !this.isTransactionActive ? this.driver.instanceDatabase @@ -179,6 +186,12 @@ export class SpannerQueryRunner extends BaseQueryRunner implements QueryRunner { try { this.driver.connection.logger.logQuery(query, parameters, this) + this.broadcaster.broadcastBeforeQueryEvent( + broadcasterResult, + query, + parameters, + ) + rawResult = await executor.run({ sql: query, params: parameters @@ -206,6 +219,17 @@ export class SpannerQueryRunner extends BaseQueryRunner implements QueryRunner { this.driver.options.maxQueryExecutionTime const queryEndTime = +new Date() const queryExecutionTime = queryEndTime - queryStartTime + + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + true, + queryExecutionTime, + rawResult, + undefined, + ) + if ( maxQueryExecutionTime && queryExecutionTime > maxQueryExecutionTime @@ -237,8 +261,18 @@ export class SpannerQueryRunner extends BaseQueryRunner implements QueryRunner { parameters, this, ) + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + false, + undefined, + undefined, + err, + ) throw new QueryFailedError(query, parameters, err) } finally { + await broadcasterResult.wait() } } @@ -1733,7 +1767,7 @@ export class SpannerQueryRunner extends BaseQueryRunner implements QueryRunner { // We cannot relay on information_schema.columns.generation_expression, because it is formatted different. const asExpressionQuery = - await this.selectTypeormMetadataSql({ + this.selectTypeormMetadataSql({ table: dbTable["TABLE_NAME"], type: MetadataTableType.GENERATED_COLUMN, name: tableColumn.name, @@ -2194,4 +2228,16 @@ export class SpannerQueryRunner extends BaseQueryRunner implements QueryRunner { query.startsWith("DELETE") ) } + + /** + * Change table comment. + */ + changeTableComment( + tableOrName: Table | string, + comment?: string, + ): Promise { + throw new TypeORMError( + `spanner driver does not support change table comment.`, + ) + } } diff --git a/src/driver/spanner/SpannerSessionPoolOptions.ts b/src/driver/spanner/SpannerSessionPoolOptions.ts index d9291905ab..930545fdef 100644 --- a/src/driver/spanner/SpannerSessionPoolOptions.ts +++ b/src/driver/spanner/SpannerSessionPoolOptions.ts @@ -3,24 +3,23 @@ * more: https://github.com/ko3a4ok/nodejs-spanner/blob/aa8e8becf74d41d0de68253c17ebab188b5c7620/src/session-pool.ts#L149 */ export interface SpannerSessionPoolOptions { - acquireTimeout?: number; - concurrency?: number; - fail?: boolean; - idlesAfter?: number; - keepAlive?: number; - labels?: { [label: string]: string }; - max?: number; - maxIdle?: number; - min?: number; + acquireTimeout?: number + concurrency?: number + fail?: boolean + idlesAfter?: number + keepAlive?: number + labels?: { [label: string]: string } + max?: number + maxIdle?: number + min?: number /** * @deprecated. Starting from v6.5.0 the same session can be reused for * different types of transactions. */ - writes?: number; - incStep?: number; - databaseRole?: string | null; + writes?: number + incStep?: number + databaseRole?: string | null } - /* Defaults: const DEFAULTS: SessionPoolOptions = { acquireTimeout: Infinity, diff --git a/src/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts b/src/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts index 5e155ccbc4..4e3d1f6cc3 100644 --- a/src/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts +++ b/src/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts @@ -101,6 +101,7 @@ export abstract class AbstractSqliteQueryRunner } if (this.transactionDepth === 0) { + this.transactionDepth += 1 if (isolationLevel) { if (isolationLevel === "READ UNCOMMITTED") { await this.query("PRAGMA read_uncommitted = true") @@ -110,9 +111,9 @@ export abstract class AbstractSqliteQueryRunner } await this.query("BEGIN TRANSACTION") } else { - await this.query(`SAVEPOINT typeorm_${this.transactionDepth}`) + this.transactionDepth += 1 + await this.query(`SAVEPOINT typeorm_${this.transactionDepth - 1}`) } - this.transactionDepth += 1 await this.broadcaster.broadcast("AfterTransactionStart") } @@ -127,14 +128,15 @@ export abstract class AbstractSqliteQueryRunner await this.broadcaster.broadcast("BeforeTransactionCommit") if (this.transactionDepth > 1) { + this.transactionDepth -= 1 await this.query( - `RELEASE SAVEPOINT typeorm_${this.transactionDepth - 1}`, + `RELEASE SAVEPOINT typeorm_${this.transactionDepth}`, ) } else { + this.transactionDepth -= 1 await this.query("COMMIT") this.isTransactionActive = false } - this.transactionDepth -= 1 await this.broadcaster.broadcast("AfterTransactionCommit") } @@ -149,14 +151,15 @@ export abstract class AbstractSqliteQueryRunner await this.broadcaster.broadcast("BeforeTransactionRollback") if (this.transactionDepth > 1) { + this.transactionDepth -= 1 await this.query( - `ROLLBACK TO SAVEPOINT typeorm_${this.transactionDepth - 1}`, + `ROLLBACK TO SAVEPOINT typeorm_${this.transactionDepth}`, ) } else { + this.transactionDepth -= 1 await this.query("ROLLBACK") this.isTransactionActive = false } - this.transactionDepth -= 1 await this.broadcaster.broadcast("AfterTransactionRollback") } @@ -1435,7 +1438,7 @@ export abstract class AbstractSqliteQueryRunner dbColumn["hidden"] === 2 ? "VIRTUAL" : "STORED" const asExpressionQuery = - await this.selectTypeormMetadataSql({ + this.selectTypeormMetadataSql({ table: table.name, type: MetadataTableType.GENERATED_COLUMN, name: tableColumn.name, @@ -1453,20 +1456,10 @@ export abstract class AbstractSqliteQueryRunner } if (tableColumn.type === "varchar") { - // Check if this is an enum - const enumMatch = sql.match( - new RegExp( - '"(' + - tableColumn.name + - ")\" varchar CHECK\\s*\\(\\s*\"\\1\"\\s+IN\\s*\\(('[^']+'(?:\\s*,\\s*'[^']+')+)\\s*\\)\\s*\\)", - ), + tableColumn.enum = OrmUtils.parseSqlCheckExpression( + sql, + tableColumn.name, ) - if (enumMatch) { - // This is an enum - tableColumn.enum = enumMatch[2] - .substr(1, enumMatch[2].length - 2) - .split("','") - } } // parse datatype and attempt to retrieve length, precision and scale @@ -1475,7 +1468,7 @@ export abstract class AbstractSqliteQueryRunner const fullType = tableColumn.type let dataType = fullType.substr(0, pos) if ( - !!this.driver.withLengthColumnTypes.find( + this.driver.withLengthColumnTypes.find( (col) => col === dataType, ) ) { @@ -1491,7 +1484,7 @@ export abstract class AbstractSqliteQueryRunner } } if ( - !!this.driver.withPrecisionColumnTypes.find( + this.driver.withPrecisionColumnTypes.find( (col) => col === dataType, ) ) { @@ -1503,7 +1496,7 @@ export abstract class AbstractSqliteQueryRunner tableColumn.precision = +matches[1] } if ( - !!this.driver.withScaleColumnTypes.find( + this.driver.withScaleColumnTypes.find( (col) => col === dataType, ) ) { @@ -2249,4 +2242,14 @@ export abstract class AbstractSqliteQueryRunner .map((i) => (disableEscape ? i : `"${i}"`)) .join(".") } + + /** + * Change table comment. + */ + changeTableComment( + tableOrName: Table | string, + comment?: string, + ): Promise { + throw new TypeORMError(`sqlit driver does not support change comment.`) + } } diff --git a/src/driver/sqlite/SqliteDriver.ts b/src/driver/sqlite/SqliteDriver.ts index 91adfe8444..767ba058e0 100644 --- a/src/driver/sqlite/SqliteDriver.ts +++ b/src/driver/sqlite/SqliteDriver.ts @@ -35,7 +35,6 @@ export class SqliteDriver extends AbstractSqliteDriver { constructor(connection: DataSource) { super(connection) - this.connection = connection this.options = connection.options as SqliteConnectionOptions this.database = this.options.database diff --git a/src/driver/sqlite/SqliteQueryRunner.ts b/src/driver/sqlite/SqliteQueryRunner.ts index e3a142ad25..822c292def 100644 --- a/src/driver/sqlite/SqliteQueryRunner.ts +++ b/src/driver/sqlite/SqliteQueryRunner.ts @@ -6,6 +6,7 @@ import { SqliteDriver } from "./SqliteDriver" import { Broadcaster } from "../../subscriber/Broadcaster" import { ConnectionIsNotSetError } from "../../error/ConnectionIsNotSetError" import { QueryResult } from "../../query-runner/QueryResult" +import { BroadcasterResult } from "../../subscriber/BroadcasterResult" /** * Runs queries on a single sqlite database connection. @@ -57,84 +58,121 @@ export class SqliteQueryRunner extends AbstractSqliteQueryRunner { const connection = this.driver.connection const options = connection.options as SqliteConnectionOptions const maxQueryExecutionTime = this.driver.options.maxQueryExecutionTime + const broadcasterResult = new BroadcasterResult() + const broadcaster = this.broadcaster + + broadcaster.broadcastBeforeQueryEvent( + broadcasterResult, + query, + parameters, + ) if (!connection.isInitialized) { throw new ConnectionIsNotSetError("sqlite") } return new Promise(async (ok, fail) => { - const databaseConnection = await this.connect() - this.driver.connection.logger.logQuery(query, parameters, this) - const queryStartTime = +new Date() - const isInsertQuery = query.startsWith("INSERT ") - const isDeleteQuery = query.startsWith("DELETE ") - const isUpdateQuery = query.startsWith("UPDATE ") - - const execute = async () => { - if (isInsertQuery || isDeleteQuery || isUpdateQuery) { - await databaseConnection.run(query, parameters, handler) - } else { - await databaseConnection.all(query, parameters, handler) - } - } - - const handler = function (err: any, rows: any) { - if (err && err.toString().indexOf("SQLITE_BUSY:") !== -1) { - if ( - typeof options.busyErrorRetry === "number" && - options.busyErrorRetry > 0 - ) { - setTimeout(execute, options.busyErrorRetry) - return - } - } - - // log slow queries if maxQueryExecution time is set - const queryEndTime = +new Date() - const queryExecutionTime = queryEndTime - queryStartTime - if ( - maxQueryExecutionTime && - queryExecutionTime > maxQueryExecutionTime - ) - connection.logger.logQuerySlow( - queryExecutionTime, - query, - parameters, - this, - ) - - if (err) { - connection.logger.logQueryError( - err, - query, - parameters, - this, - ) - fail(new QueryFailedError(query, parameters, err)) - } else { - const result = new QueryResult() - - if (isInsertQuery) { - result.raw = this["lastID"] + try { + const databaseConnection = await this.connect() + this.driver.connection.logger.logQuery(query, parameters, this) + const queryStartTime = +new Date() + const isInsertQuery = query.startsWith("INSERT ") + const isDeleteQuery = query.startsWith("DELETE ") + const isUpdateQuery = query.startsWith("UPDATE ") + + const execute = async () => { + if (isInsertQuery || isDeleteQuery || isUpdateQuery) { + await databaseConnection.run(query, parameters, handler) } else { - result.raw = rows + await databaseConnection.all(query, parameters, handler) } + } - if (Array.isArray(rows)) { - result.records = rows + const self = this + const handler = function (this: any, err: any, rows: any) { + if (err && err.toString().indexOf("SQLITE_BUSY:") !== -1) { + if ( + typeof options.busyErrorRetry === "number" && + options.busyErrorRetry > 0 + ) { + setTimeout(execute, options.busyErrorRetry) + return + } } - result.affected = this["changes"] - - if (useStructuredResult) { - ok(result) + // log slow queries if maxQueryExecution time is set + const queryEndTime = +new Date() + const queryExecutionTime = queryEndTime - queryStartTime + if ( + maxQueryExecutionTime && + queryExecutionTime > maxQueryExecutionTime + ) + connection.logger.logQuerySlow( + queryExecutionTime, + query, + parameters, + self, + ) + + if (err) { + connection.logger.logQueryError( + err, + query, + parameters, + self, + ) + broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + false, + undefined, + undefined, + err, + ) + + return fail( + new QueryFailedError(query, parameters, err), + ) } else { - ok(result.raw) + const result = new QueryResult() + + if (isInsertQuery) { + result.raw = this["lastID"] + } else { + result.raw = rows + } + + broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + true, + queryExecutionTime, + result.raw, + undefined, + ) + + if (Array.isArray(rows)) { + result.records = rows + } + + result.affected = this["changes"] + + if (useStructuredResult) { + ok(result) + } else { + ok(result.raw) + } } } - } - await execute() + await execute() + } catch (err) { + fail(err) + } finally { + await broadcasterResult.wait() + } }) } } diff --git a/src/driver/sqljs/SqljsQueryRunner.ts b/src/driver/sqljs/SqljsQueryRunner.ts index 4207d8eb96..65a56f6364 100644 --- a/src/driver/sqljs/SqljsQueryRunner.ts +++ b/src/driver/sqljs/SqljsQueryRunner.ts @@ -4,6 +4,7 @@ import { SqljsDriver } from "./SqljsDriver" import { Broadcaster } from "../../subscriber/Broadcaster" import { QueryFailedError } from "../../error/QueryFailedError" import { QueryResult } from "../../query-runner/QueryResult" +import { BroadcasterResult } from "../../subscriber/BroadcasterResult" /** * Runs queries on a single sqlite database connection. @@ -84,7 +85,15 @@ export class SqljsQueryRunner extends AbstractSqliteQueryRunner { const command = query.trim().split(" ", 1)[0] const databaseConnection = this.driver.databaseConnection + const broadcasterResult = new BroadcasterResult() + this.driver.connection.logger.logQuery(query, parameters, this) + this.broadcaster.broadcastBeforeQueryEvent( + broadcasterResult, + query, + parameters, + ) + const queryStartTime = +new Date() let statement: any try { @@ -102,6 +111,7 @@ export class SqljsQueryRunner extends AbstractSqliteQueryRunner { this.driver.options.maxQueryExecutionTime const queryEndTime = +new Date() const queryExecutionTime = queryEndTime - queryStartTime + if ( maxQueryExecutionTime && queryExecutionTime > maxQueryExecutionTime @@ -119,6 +129,16 @@ export class SqljsQueryRunner extends AbstractSqliteQueryRunner { records.push(statement.getAsObject()) } + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + true, + queryExecutionTime, + records, + undefined, + ) + const result = new QueryResult() result.affected = databaseConnection.getRowsModified() @@ -136,18 +156,30 @@ export class SqljsQueryRunner extends AbstractSqliteQueryRunner { } else { return result.raw } - } catch (e) { + } catch (err) { if (statement) { statement.free() } this.driver.connection.logger.logQueryError( - e, + err, query, parameters, this, ) - throw new QueryFailedError(query, parameters, e) + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + false, + undefined, + undefined, + err, + ) + + throw new QueryFailedError(query, parameters, err) + } finally { + await broadcasterResult.wait() } } } diff --git a/src/driver/sqlserver/SqlServerConnectionCredentialsOptions.ts b/src/driver/sqlserver/SqlServerConnectionCredentialsOptions.ts index 3707107601..69ae7af051 100644 --- a/src/driver/sqlserver/SqlServerConnectionCredentialsOptions.ts +++ b/src/driver/sqlserver/SqlServerConnectionCredentialsOptions.ts @@ -1,5 +1,6 @@ import { DefaultAuthentication } from "./authentication/DefaultAuthentication" import { AzureActiveDirectoryAccessTokenAuthentication } from "./authentication/AzureActiveDirectoryAccessTokenAuthentication" +import { AzureActiveDirectoryDefaultAuthentication } from "./authentication/AzureActiveDirectoryDefaultAuthentication" import { AzureActiveDirectoryMsiAppServiceAuthentication } from "./authentication/AzureActiveDirectoryMsiAppServiceAuthentication" import { AzureActiveDirectoryMsiVmAuthentication } from "./authentication/AzureActiveDirectoryMsiVmAuthentication" import { AzureActiveDirectoryPasswordAuthentication } from "./authentication/AzureActiveDirectoryPasswordAuthentication" @@ -10,6 +11,7 @@ export type SqlServerConnectionCredentialsAuthenticationOptions = | DefaultAuthentication | NtlmAuthentication | AzureActiveDirectoryAccessTokenAuthentication + | AzureActiveDirectoryDefaultAuthentication | AzureActiveDirectoryMsiAppServiceAuthentication | AzureActiveDirectoryMsiVmAuthentication | AzureActiveDirectoryPasswordAuthentication diff --git a/src/driver/sqlserver/SqlServerConnectionOptions.ts b/src/driver/sqlserver/SqlServerConnectionOptions.ts index 7ae231b639..65dce74118 100644 --- a/src/driver/sqlserver/SqlServerConnectionOptions.ts +++ b/src/driver/sqlserver/SqlServerConnectionOptions.ts @@ -1,4 +1,5 @@ import { BaseDataSourceOptions } from "../../data-source/BaseDataSourceOptions" +import { ReplicationMode } from "../types/ReplicationMode" import { SqlServerConnectionCredentialsOptions } from "./SqlServerConnectionCredentialsOptions" /** @@ -61,12 +62,6 @@ export interface SqlServerConnectionOptions */ readonly maxWaitingClients?: number - /** - * Should the pool validate resources before giving them to clients. Requires that either factory.validate or - * factory.validateAsync to be specified - */ - readonly testOnBorrow?: boolean - /** * Max milliseconds an acquire call will wait for a resource before timing out. (default no limit), if supplied should non-zero positive integer. */ @@ -185,6 +180,12 @@ export interface SqlServerConnectionOptions */ readonly disableOutputReturning?: boolean + /** + * A boolean, controlling whether MssqlParameter types char, varchar, and text are converted to their unicode equivalents, nchar, nvarchar, and ntext. + * (default: false, meaning that char/varchar/text parameters will be converted to nchar/nvarchar/ntext) + */ + readonly disableAsciiToUnicodeParamConversion?: boolean + /** * Debug options */ @@ -304,6 +305,12 @@ export interface SqlServerConnectionOptions * List of read-from severs (slaves). */ readonly slaves: SqlServerConnectionCredentialsOptions[] + + /** + * Default connection pool to use for SELECT queries + * @default "slave" + */ + readonly defaultMode?: ReplicationMode } readonly poolSize?: never diff --git a/src/driver/sqlserver/SqlServerDriver.ts b/src/driver/sqlserver/SqlServerDriver.ts index 9f0fba09d9..60f2643e6b 100644 --- a/src/driver/sqlserver/SqlServerDriver.ts +++ b/src/driver/sqlserver/SqlServerDriver.ts @@ -211,6 +211,11 @@ export class SqlServerDriver implements Driver { metadataValue: "nvarchar(MAX)" as any, } + /** + * The prefix used for the parameters + */ + parametersPrefix: string = "@" + /** * Default values of length, precision and scale depends on column data type. * Used in the cases when length/precision/scale is not specified by user. @@ -371,6 +376,7 @@ export class SqlServerDriver implements Driver { if (!parameters || !Object.keys(parameters).length) return [sql, escapedParameters] + const parameterIndexMap = new Map() sql = sql.replace( /:(\.\.\.)?([A-Za-z0-9_.]+)/g, (full, isArray: string, key: string): string => { @@ -378,6 +384,10 @@ export class SqlServerDriver implements Driver { return full } + if (parameterIndexMap.has(key)) { + return this.parametersPrefix + parameterIndexMap.get(key) + } + let value: any = parameters[key] if (isArray) { @@ -397,6 +407,7 @@ export class SqlServerDriver implements Driver { } escapedParameters.push(value) + parameterIndexMap.set(key, escapedParameters.length - 1) return this.createParameter(key, escapedParameters.length - 1) }, ) // todo: make replace only in value statements, otherwise problems @@ -908,7 +919,7 @@ export class SqlServerDriver implements Driver { * Creates an escaped parameter. */ createParameter(parameterName: string, index: number): string { - return "@" + index + return this.parametersPrefix + index } // ------------------------------------------------------------------------- diff --git a/src/driver/sqlserver/SqlServerQueryRunner.ts b/src/driver/sqlserver/SqlServerQueryRunner.ts index c320b184b4..118a863bb7 100644 --- a/src/driver/sqlserver/SqlServerQueryRunner.ts +++ b/src/driver/sqlserver/SqlServerQueryRunner.ts @@ -27,6 +27,7 @@ import { TypeORMError } from "../../error" import { QueryLock } from "../../query-runner/QueryLock" import { MetadataTableType } from "../types/MetadataTableType" import { InstanceChecker } from "../../util/InstanceChecker" +import { BroadcasterResult } from "../../subscriber/BroadcasterResult" /** * Runs queries on a single SQL Server database connection. @@ -106,6 +107,7 @@ export class SqlServerQueryRunner } if (this.transactionDepth === 0) { + this.transactionDepth += 1 const pool = await (this.mode === "slave" ? this.driver.obtainSlaveConnection() : this.driver.obtainMasterConnection()) @@ -123,12 +125,12 @@ export class SqlServerQueryRunner this.databaseConnection.begin(transactionCallback) } } else { + this.transactionDepth += 1 await this.query( - `SAVE TRANSACTION typeorm_${this.transactionDepth}`, + `SAVE TRANSACTION typeorm_${this.transactionDepth - 1}`, ) ok() } - this.transactionDepth += 1 }) await this.broadcaster.broadcast("AfterTransactionStart") @@ -147,6 +149,7 @@ export class SqlServerQueryRunner if (this.transactionDepth === 1) { return new Promise((ok, fail) => { + this.transactionDepth -= 1 this.databaseConnection.commit(async (err: any) => { if (err) return fail(err) this.isTransactionActive = false @@ -156,7 +159,6 @@ export class SqlServerQueryRunner ok() this.connection.logger.logQuery("COMMIT") - this.transactionDepth -= 1 }) }) } @@ -175,12 +177,13 @@ export class SqlServerQueryRunner await this.broadcaster.broadcast("BeforeTransactionRollback") if (this.transactionDepth > 1) { + this.transactionDepth -= 1 await this.query( - `ROLLBACK TRANSACTION typeorm_${this.transactionDepth - 1}`, + `ROLLBACK TRANSACTION typeorm_${this.transactionDepth}`, ) - this.transactionDepth -= 1 } else { return new Promise((ok, fail) => { + this.transactionDepth -= 1 this.databaseConnection.rollback(async (err: any) => { if (err) return fail(err) this.isTransactionActive = false @@ -190,7 +193,6 @@ export class SqlServerQueryRunner ok() this.connection.logger.logQuery("ROLLBACK") - this.transactionDepth -= 1 }) }) } @@ -208,8 +210,16 @@ export class SqlServerQueryRunner const release = await this.lock.acquire() + const broadcasterResult = new BroadcasterResult() + try { this.driver.connection.logger.logQuery(query, parameters, this) + this.broadcaster.broadcastBeforeQueryEvent( + broadcasterResult, + query, + parameters, + ) + const pool = await (this.mode === "slave" ? this.driver.obtainSlaveConnection() : this.driver.obtainMasterConnection()) @@ -245,6 +255,17 @@ export class SqlServerQueryRunner this.driver.options.maxQueryExecutionTime const queryEndTime = +new Date() const queryExecutionTime = queryEndTime - queryStartTime + + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + true, + queryExecutionTime, + raw, + undefined, + ) + if ( maxQueryExecutionTime && queryExecutionTime > maxQueryExecutionTime @@ -297,8 +318,20 @@ export class SqlServerQueryRunner parameters, this, ) + this.broadcaster.broadcastAfterQueryEvent( + broadcasterResult, + query, + parameters, + false, + undefined, + undefined, + err, + ) + throw err } finally { + await broadcasterResult.wait() + release() } } @@ -3309,7 +3342,7 @@ export class SqlServerQueryRunner : "VIRTUAL" // We cannot relay on information_schema.columns.generation_expression, because it is formatted different. const asExpressionQuery = - await this.selectTypeormMetadataSql({ + this.selectTypeormMetadataSql({ database: dbTable["TABLE_CATALOG"], schema: dbTable["TABLE_SCHEMA"], table: dbTable["TABLE_NAME"], @@ -4049,12 +4082,33 @@ export class SqlServerQueryRunner case "tinyint": return this.driver.mssql.TinyInt case "char": + if ( + this.driver.options.options + ?.disableAsciiToUnicodeParamConversion + ) { + return this.driver.mssql.Char(...parameter.params) + } + return this.driver.mssql.NChar(...parameter.params) case "nchar": return this.driver.mssql.NChar(...parameter.params) case "text": + if ( + this.driver.options.options + ?.disableAsciiToUnicodeParamConversion + ) { + return this.driver.mssql.Text + } + return this.driver.mssql.Ntext case "ntext": return this.driver.mssql.Ntext case "varchar": + if ( + this.driver.options.options + ?.disableAsciiToUnicodeParamConversion + ) { + return this.driver.mssql.VarChar(...parameter.params) + } + return this.driver.mssql.NVarChar(...parameter.params) case "nvarchar": return this.driver.mssql.NVarChar(...parameter.params) case "xml": @@ -4107,4 +4161,16 @@ export class SqlServerQueryRunner return ISOLATION_LEVEL.READ_COMMITTED } } + + /** + * Change table comment. + */ + changeTableComment( + tableOrName: Table | string, + comment?: string, + ): Promise { + throw new TypeORMError( + `sqlserver driver does not support change table comment.`, + ) + } } diff --git a/src/driver/sqlserver/authentication/AzureActiveDirectoryDefaultAuthentication.ts b/src/driver/sqlserver/authentication/AzureActiveDirectoryDefaultAuthentication.ts new file mode 100644 index 0000000000..0af38901da --- /dev/null +++ b/src/driver/sqlserver/authentication/AzureActiveDirectoryDefaultAuthentication.ts @@ -0,0 +1,12 @@ +export interface AzureActiveDirectoryDefaultAuthentication { + /** + * This uses DefaultAzureCredential from @azure/identity to try multiple methods of authentication + */ + type: "azure-active-directory-default" + options: { + /** + * The clientId of the user you want to log in with, mapped to the managedIdentityClientId in tedious + */ + clientId?: string + } +} diff --git a/src/driver/types/ColumnTypes.ts b/src/driver/types/ColumnTypes.ts index f40ec1a4f1..3954766d95 100644 --- a/src/driver/types/ColumnTypes.ts +++ b/src/driver/types/ColumnTypes.ts @@ -172,6 +172,14 @@ export type SimpleColumnType = | "tstzrange" // postgres | "daterange" // postgres + // multirange types + | "int4multirange" // postgres + | "int8multirange" // postgres + | "nummultirange" // postgres + | "tsmultirange" // postgres + | "tstzmultirange" // postgres + | "datemultirange" // postgres + // other types | "enum" // mysql, postgres | "set" // mysql diff --git a/src/entity-manager/EntityManager.ts b/src/entity-manager/EntityManager.ts index 7d12f4bc19..d65d3877d9 100644 --- a/src/entity-manager/EntityManager.ts +++ b/src/entity-manager/EntityManager.ts @@ -257,34 +257,34 @@ export class EntityManager { * Creates a new entity instance and copies all entity properties from this object into a new entity. * Note that it copies only properties that present in entity schema. */ - create( + create>( entityClass: EntityTarget, - plainObject?: DeepPartial, + plainObject?: EntityLike, ): Entity /** * Creates a new entities and copies all entity properties from given objects into their new entities. * Note that it copies only properties that present in entity schema. */ - create( + create>( entityClass: EntityTarget, - plainObjects?: DeepPartial[], + plainObjects?: EntityLike[], ): Entity[] /** * Creates a new entity instance or instances. * Can copy properties from the given object into new entities. */ - create( + create>( entityClass: EntityTarget, - plainObjectOrObjects?: DeepPartial | DeepPartial[], + plainObjectOrObjects?: EntityLike | EntityLike[], ): Entity | Entity[] { const metadata = this.connection.getMetadata(entityClass) if (!plainObjectOrObjects) return metadata.create(this.queryRunner) if (Array.isArray(plainObjectOrObjects)) - return (plainObjectOrObjects as DeepPartial[]).map( + return (plainObjectOrObjects as EntityLike[]).map( (plainEntityLike) => this.create(entityClass, plainEntityLike), ) @@ -955,7 +955,7 @@ export class EntityManager { } /** - * Checks whether any entity exists with the given condition + * Checks whether any entity exists with the given options. */ exists( entityClass: EntityTarget, @@ -971,6 +971,19 @@ export class EntityManager { .getExists() } + /** + * Checks whether any entity exists with the given conditions. + */ + async existsBy( + entityClass: EntityTarget, + where: FindOptionsWhere | FindOptionsWhere[], + ): Promise { + const metadata = this.connection.getMetadata(entityClass) + return this.createQueryBuilder(entityClass, metadata.name) + .setFindOptions({ where }) + .getExists() + } + /** * Counts entities that match given options. * Useful for pagination. @@ -1054,11 +1067,20 @@ export class EntityManager { where: FindOptionsWhere | FindOptionsWhere[] = {}, ): Promise { const metadata = this.connection.getMetadata(entityClass) + const column = metadata.columns.find( + (item) => item.propertyPath === columnName, + ) + if (!column) { + throw new TypeORMError( + `Column "${columnName}" was not found in table "${metadata.name}"`, + ) + } + const result = await this.createQueryBuilder(entityClass, metadata.name) .setFindOptions({ where }) .select( `${fnName}(${this.connection.driver.escape( - String(columnName), + column.databaseName, )})`, fnName, ) diff --git a/src/entity-manager/MongoEntityManager.ts b/src/entity-manager/MongoEntityManager.ts index 1951d26a63..f15c3c07a4 100644 --- a/src/entity-manager/MongoEntityManager.ts +++ b/src/entity-manager/MongoEntityManager.ts @@ -54,6 +54,7 @@ import { IndexInformationOptions, ObjectId, FilterOperators, + CountDocumentsOptions, } from "../driver/mongodb/typings" import { DataSource } from "../data-source/DataSource" import { MongoFindManyOptions } from "../find-options/mongodb/MongoFindManyOptions" @@ -499,6 +500,22 @@ export class MongoEntityManager extends EntityManager { return this.mongoQueryRunner.count(metadata.tableName, query, options) } + /** + * Count number of matching documents in the db to a query. + */ + countDocuments( + entityClassOrName: EntityTarget, + query: Filter = {}, + options: CountDocumentsOptions = {}, + ): Promise { + const metadata = this.connection.getMetadata(entityClassOrName) + return this.mongoQueryRunner.countDocuments( + metadata.tableName, + query, + options, + ) + } + /** * Count number of matching documents in the db to a query. */ @@ -625,7 +642,7 @@ export class MongoEntityManager extends EntityManager { entityClassOrName: EntityTarget, query: ObjectLiteral, options?: FindOneAndDeleteOptions, - ): Promise { + ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.findOneAndDelete( metadata.tableName, @@ -642,7 +659,7 @@ export class MongoEntityManager extends EntityManager { query: Filter, replacement: Document, options?: FindOneAndReplaceOptions, - ): Promise { + ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.findOneAndReplace( metadata.tableName, @@ -660,7 +677,7 @@ export class MongoEntityManager extends EntityManager { query: Filter, update: UpdateFilter, options?: FindOneAndUpdateOptions, - ): Promise { + ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.findOneAndUpdate( metadata.tableName, @@ -1008,11 +1025,11 @@ export class MongoEntityManager extends EntityManager { cursor: FindCursor | AggregationCursor, ) { const queryRunner = this.mongoQueryRunner - cursor.toArray = () => - cursor - .clone() - .toArray() - .then(async (results: Entity[]) => { + + ;(cursor as any)["__to_array_func"] = cursor.toArray + cursor.toArray = async () => + ((cursor as any)["__to_array_func"] as CallableFunction)().then( + async (results: Entity[]) => { const transformer = new DocumentToEntityTransformer() const entities = transformer.transformAll(results, metadata) // broadcast "load" events @@ -1022,13 +1039,12 @@ export class MongoEntityManager extends EntityManager { entities, ) return entities - }) - - cursor.next = () => - cursor - .clone() - .next() - .then(async (result: Entity) => { + }, + ) + ;(cursor as any)["__next_func"] = cursor.next + cursor.next = async () => + ((cursor as any)["__next_func"] as CallableFunction)().then( + async (result: Entity) => { if (!result) { return result } @@ -1039,7 +1055,8 @@ export class MongoEntityManager extends EntityManager { entity, ]) return entity - }) + }, + ) } protected filterSoftDeleted( @@ -1080,7 +1097,7 @@ export class MongoEntityManager extends EntityManager { ) || {} if (id) { query["_id"] = - id instanceof objectIdInstance ? id : new ObjectId(id) + id instanceof objectIdInstance ? id : new objectIdInstance(id) } const cursor = this.createEntityCursor(entityClassOrName, query) const deleteDateColumn = diff --git a/src/entity-schema/EntitySchemaOptions.ts b/src/entity-schema/EntitySchemaOptions.ts index 42e0bd47c6..59617965f9 100644 --- a/src/entity-schema/EntitySchemaOptions.ts +++ b/src/entity-schema/EntitySchemaOptions.ts @@ -124,4 +124,9 @@ export class EntitySchemaOptions { * Inheritance options. */ inheritance?: EntitySchemaInheritanceOptions + + /** + * Custom discriminator value for Single Table Inheritance. + */ + discriminatorValue?: string } diff --git a/src/entity-schema/EntitySchemaTransformer.ts b/src/entity-schema/EntitySchemaTransformer.ts index 1e3d77b312..72ec666bb9 100644 --- a/src/entity-schema/EntitySchemaTransformer.ts +++ b/src/entity-schema/EntitySchemaTransformer.ts @@ -65,6 +65,15 @@ export class EntitySchemaTransformer { } as InheritanceMetadataArgs) } + const { discriminatorValue } = options + + if (discriminatorValue) { + metadataArgsStorage.discriminatorValues.push({ + target: options.target || options.name, + value: discriminatorValue, + }) + } + this.transformColumnsRecursive(options, metadataArgsStorage) }) diff --git a/src/error/EntityNotFoundError.ts b/src/error/EntityNotFoundError.ts index e3ed2551ac..da1954bc5f 100644 --- a/src/error/EntityNotFoundError.ts +++ b/src/error/EntityNotFoundError.ts @@ -7,9 +7,15 @@ import { InstanceChecker } from "../util/InstanceChecker" * Thrown when no result could be found in methods which are not allowed to return undefined or an empty set. */ export class EntityNotFoundError extends TypeORMError { + public readonly entityClass: EntityTarget + public readonly criteria: any + constructor(entityClass: EntityTarget, criteria: any) { super() + this.entityClass = entityClass + this.criteria = criteria + this.message = `Could not find any entity of type "${this.stringifyTarget( entityClass, diff --git a/src/error/QueryFailedError.ts b/src/error/QueryFailedError.ts index 8f224f300b..1dd39c6d1f 100644 --- a/src/error/QueryFailedError.ts +++ b/src/error/QueryFailedError.ts @@ -4,11 +4,11 @@ import { TypeORMError } from "./TypeORMError" /** * Thrown when query execution has failed. */ -export class QueryFailedError extends TypeORMError { +export class QueryFailedError extends TypeORMError { constructor( readonly query: string, readonly parameters: any[] | undefined, - readonly driverError: any, + readonly driverError: T, ) { super( driverError diff --git a/src/find-options/FindOperatorType.ts b/src/find-options/FindOperatorType.ts index dfd03fef10..b51069f8eb 100644 --- a/src/find-options/FindOperatorType.ts +++ b/src/find-options/FindOperatorType.ts @@ -20,3 +20,4 @@ export type FindOperatorType = | "arrayOverlap" | "and" | "jsonContains" + | "or" diff --git a/src/find-options/FindOptionsUtils.ts b/src/find-options/FindOptionsUtils.ts index e6e8900c24..417365c8ea 100644 --- a/src/find-options/FindOptionsUtils.ts +++ b/src/find-options/FindOptionsUtils.ts @@ -391,7 +391,7 @@ export class FindOptionsUtils { qb.connection.driver, { joiner: "__" }, alias, - relation.propertyPath, + relation.propertyName, ) // add a join for the relation diff --git a/src/find-options/FindOptionsWhere.ts b/src/find-options/FindOptionsWhere.ts index 5dec38e30b..3baef35d4d 100644 --- a/src/find-options/FindOptionsWhere.ts +++ b/src/find-options/FindOptionsWhere.ts @@ -37,6 +37,7 @@ export type FindOptionsWhereProperty< | EqualOperator | FindOperator | boolean + | Property : Property | FindOperator /** diff --git a/src/find-options/operator/Or.ts b/src/find-options/operator/Or.ts new file mode 100644 index 0000000000..5105abf361 --- /dev/null +++ b/src/find-options/operator/Or.ts @@ -0,0 +1,5 @@ +import { FindOperator } from "../FindOperator" + +export function Or(...values: FindOperator[]): FindOperator { + return new FindOperator("or", values as any, true, true) +} diff --git a/src/index.ts b/src/index.ts index 97607928be..68a6a6c3b8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -67,6 +67,7 @@ export * from "./decorator/Exclusion" export * from "./decorator/Generated" export * from "./decorator/EntityRepository" export * from "./find-options/operator/And" +export * from "./find-options/operator/Or" export * from "./find-options/operator/Any" export * from "./find-options/operator/ArrayContainedBy" export * from "./find-options/operator/ArrayContains" @@ -119,6 +120,7 @@ export * from "./schema-builder/table/TableForeignKey" export * from "./schema-builder/table/TableIndex" export * from "./schema-builder/table/TableUnique" export * from "./schema-builder/table/Table" +export * from "./schema-builder/view/View" export * from "./schema-builder/options/TableCheckOptions" export * from "./schema-builder/options/TableColumnOptions" export * from "./schema-builder/options/TableExclusionOptions" diff --git a/src/logger/AbstractLogger.ts b/src/logger/AbstractLogger.ts index 217723006e..5c581bc8ea 100644 --- a/src/logger/AbstractLogger.ts +++ b/src/logger/AbstractLogger.ts @@ -132,7 +132,7 @@ export abstract class AbstractLogger implements Logger { * Logs events from the migration run process. */ logMigration(message: string, queryRunner?: QueryRunner) { - if (this.isLogEnabledFor("migration")) { + if (!this.isLogEnabledFor("migration")) { return } diff --git a/src/metadata-args/IndexMetadataArgs.ts b/src/metadata-args/IndexMetadataArgs.ts index 74a877f4dc..7823c700a7 100644 --- a/src/metadata-args/IndexMetadataArgs.ts +++ b/src/metadata-args/IndexMetadataArgs.ts @@ -72,6 +72,12 @@ export interface IndexMetadataArgs { */ background?: boolean + /** + * Builds the index using the concurrently option. + * This option is only supported for postgres database. + */ + concurrent?: boolean + /** * Specifies a time to live, in seconds. * This option is only supported for mongodb database. diff --git a/src/metadata-args/TableMetadataArgs.ts b/src/metadata-args/TableMetadataArgs.ts index 4bbc20b05c..7eb08fc85f 100644 --- a/src/metadata-args/TableMetadataArgs.ts +++ b/src/metadata-args/TableMetadataArgs.ts @@ -70,4 +70,9 @@ export interface TableMetadataArgs { * an integer primary key column named 'rowid' on table creation. */ withoutRowid?: boolean + + /** + * Table comment. Not supported by all database types. + */ + comment?: string } diff --git a/src/metadata-builder/EntityMetadataBuilder.ts b/src/metadata-builder/EntityMetadataBuilder.ts index d67dd20581..4b76e4970c 100644 --- a/src/metadata-builder/EntityMetadataBuilder.ts +++ b/src/metadata-builder/EntityMetadataBuilder.ts @@ -542,6 +542,21 @@ export class EntityMetadataBuilder { (column) => column.propertyName === args.propertyName, )! + // for multiple table inheritance we can override default column values + if ( + entityMetadata.tableType === "regular" && + args.target !== entityMetadata.target + ) { + const childArgs = this.metadataArgsStorage.columns.find( + (c) => + c.propertyName === args.propertyName && + c.target === entityMetadata.target, + ) + if (childArgs && childArgs.options.default) { + args.options.default = childArgs.options.default + } + } + const column = new ColumnMetadata({ connection: this.connection, entityMetadata, @@ -1128,6 +1143,21 @@ export class EntityMetadataBuilder { * Creates indices for the table of single table inheritance. */ protected createKeysForTableInheritance(entityMetadata: EntityMetadata) { + const isDiscriminatorColumnAlreadyIndexed = entityMetadata.indices.some( + ({ givenColumnNames }) => + !!givenColumnNames && + Array.isArray(givenColumnNames) && + givenColumnNames.length === 1 && + givenColumnNames[0] === + entityMetadata.discriminatorColumn?.databaseName, + ) + + // If the discriminator column is already indexed, there is no need to + // add another index on top of it. + if (isDiscriminatorColumnAlreadyIndexed) { + return + } + entityMetadata.indices.push( new IndexMetadata({ entityMetadata: entityMetadata, diff --git a/src/metadata/ColumnMetadata.ts b/src/metadata/ColumnMetadata.ts index 6f7d9541ba..85e3a26a36 100644 --- a/src/metadata/ColumnMetadata.ts +++ b/src/metadata/ColumnMetadata.ts @@ -694,19 +694,29 @@ export class ColumnMetadata { entity[this.relationMetadata.propertyName] && ObjectUtils.isObject(entity[this.relationMetadata.propertyName]) ) { - const map = this.relationMetadata.joinColumns.reduce( - (map, joinColumn) => { - const value = - joinColumn.referencedColumn!.getEntityValueMap( - entity[this.relationMetadata!.propertyName], - ) - if (value === undefined) return map - return OrmUtils.mergeDeep(map, value) - }, - {}, - ) - if (Object.keys(map).length > 0) - return { [this.propertyName]: map } + if (this.relationMetadata.joinColumns.length > 1) { + const map = this.relationMetadata.joinColumns.reduce( + (map, joinColumn) => { + const value = + joinColumn.referencedColumn!.getEntityValueMap( + entity[this.relationMetadata!.propertyName], + ) + if (value === undefined) return map + return OrmUtils.mergeDeep(map, value) + }, + {}, + ) + if (Object.keys(map).length > 0) + return { [this.propertyName]: map } + } else { + const value = + this.relationMetadata.joinColumns[0].referencedColumn!.getEntityValue( + entity[this.relationMetadata!.propertyName], + ) + if (value) { + return { [this.propertyName]: value } + } + } return undefined } else { @@ -714,8 +724,9 @@ export class ColumnMetadata { entity[this.propertyName] !== undefined && (returnNulls === false || entity[this.propertyName] !== null) - ) + ) { return { [this.propertyName]: entity[this.propertyName] } + } return undefined } diff --git a/src/metadata/EntityMetadata.ts b/src/metadata/EntityMetadata.ts index 311d87ac57..b1b70ddec0 100644 --- a/src/metadata/EntityMetadata.ts +++ b/src/metadata/EntityMetadata.ts @@ -458,7 +458,7 @@ export class EntityMetadata { afterLoadListeners: EntityListenerMetadata[] = [] /** - * Listener metadatas with "AFTER INSERT" type. + * Listener metadatas with "BEFORE INSERT" type. */ beforeInsertListeners: EntityListenerMetadata[] = [] @@ -468,7 +468,7 @@ export class EntityMetadata { afterInsertListeners: EntityListenerMetadata[] = [] /** - * Listener metadatas with "AFTER UPDATE" type. + * Listener metadatas with "BEFORE UPDATE" type. */ beforeUpdateListeners: EntityListenerMetadata[] = [] @@ -478,7 +478,7 @@ export class EntityMetadata { afterUpdateListeners: EntityListenerMetadata[] = [] /** - * Listener metadatas with "AFTER REMOVE" type. + * Listener metadatas with "BEFORE REMOVE" type. */ beforeRemoveListeners: EntityListenerMetadata[] = [] @@ -516,6 +516,11 @@ export class EntityMetadata { */ propertiesMap: ObjectLiteral + /** + * Table comment. Not supported by all database types. + */ + comment?: string + // --------------------------------------------------------------------- // Constructor // --------------------------------------------------------------------- @@ -1061,6 +1066,8 @@ export class EntityMetadata { this.tableMetadataArgs.type === "junction" this.isClosureJunction = this.tableMetadataArgs.type === "closure-junction" + + this.comment = this.tableMetadataArgs.comment } /** @@ -1120,6 +1127,7 @@ export class EntityMetadata { return this.columns.filter((column) => { return ( column.default !== undefined || + column.asExpression !== undefined || column.isGenerated || column.isCreateDate || column.isUpdateDate || diff --git a/src/metadata/IndexMetadata.ts b/src/metadata/IndexMetadata.ts index 5db4705bb7..9fe82c5754 100644 --- a/src/metadata/IndexMetadata.ts +++ b/src/metadata/IndexMetadata.ts @@ -73,6 +73,12 @@ export class IndexMetadata { */ isBackground?: boolean + /** + * Builds the index using the concurrently option. + * This options is only supported for postgres database. + */ + isConcurrent?: boolean + /** * Specifies a time to live, in seconds. * This option is only supported for mongodb database. @@ -148,6 +154,7 @@ export class IndexMetadata { this.where = options.args.where this.isSparse = options.args.sparse this.isBackground = options.args.background + this.isConcurrent = options.args.concurrent this.expireAfterSeconds = options.args.expireAfterSeconds this.givenName = options.args.name this.givenColumnNames = options.args.columns diff --git a/src/migration/MigrationExecutor.ts b/src/migration/MigrationExecutor.ts index 1c0eee35c4..135d1e9e45 100644 --- a/src/migration/MigrationExecutor.ts +++ b/src/migration/MigrationExecutor.ts @@ -517,9 +517,11 @@ export class MigrationExecutor { .migrationId, }), isGenerated: true, - generationStrategy: this.connection.driver.options.type === "spanner" - ? "uuid" - : "increment", + generationStrategy: + this.connection.driver.options.type === + "spanner" + ? "uuid" + : "increment", isPrimary: true, isNullable: false, }, @@ -670,11 +672,10 @@ export class MigrationExecutor { values["name"] = migration.name } - if(this.connection.driver.options.type === "spanner"){ - // spanner cannot auto generate id's so need to generate ids when inserting a migration + if (this.connection.driver.options.type === "spanner") { + // Spanner cannot auto-generate the id, so we need to provide it values["id"] = uuidv4() } - if (this.connection.driver.options.type === "mongodb") { const mongoRunner = queryRunner as MongoQueryRunner await mongoRunner.databaseConnection diff --git a/src/naming-strategy/DefaultNamingStrategy.ts b/src/naming-strategy/DefaultNamingStrategy.ts index e5d08b23b4..f22f09baaa 100644 --- a/src/naming-strategy/DefaultNamingStrategy.ts +++ b/src/naming-strategy/DefaultNamingStrategy.ts @@ -209,10 +209,6 @@ export class DefaultNamingStrategy implements NamingStrategyInterface { return prefix + tableName } - eagerJoinRelationAlias(alias: string, propertyPath: string): string { - return alias + "_" + propertyPath.replace(".", "_") - } - nestedSetColumnNames = { left: "nsleft", right: "nsright" } materializedPathColumnName = "mpath" } diff --git a/src/naming-strategy/NamingStrategyInterface.ts b/src/naming-strategy/NamingStrategyInterface.ts index fb4f1e0585..4c2e8989eb 100644 --- a/src/naming-strategy/NamingStrategyInterface.ts +++ b/src/naming-strategy/NamingStrategyInterface.ts @@ -162,11 +162,6 @@ export interface NamingStrategyInterface { */ prefixTableName(prefix: string, tableName: string): string - /** - * Gets the name of the alias used for relation joins. - */ - eagerJoinRelationAlias(alias: string, propertyPath: string): string - /** * Column names for nested sets. */ diff --git a/src/persistence/Subject.ts b/src/persistence/Subject.ts index b81aec76fc..8fb0e7ac68 100644 --- a/src/persistence/Subject.ts +++ b/src/persistence/Subject.ts @@ -195,7 +195,10 @@ export class Subject { (this.databaseEntityLoaded === false || (this.databaseEntityLoaded && this.databaseEntity)) && // ((this.entity && this.databaseEntity) || (!this.entity && !this.databaseEntity)) && - this.changeMaps.length > 0 + // ensure there are one or more changes for updatable columns + this.changeMaps.some( + (change) => !change.column || change.column.isUpdate, + ) ) } diff --git a/src/persistence/SubjectExecutor.ts b/src/persistence/SubjectExecutor.ts index 1b910cd6c1..ac78d13ad5 100644 --- a/src/persistence/SubjectExecutor.ts +++ b/src/persistence/SubjectExecutor.ts @@ -174,7 +174,7 @@ export class SubjectExecutor { // update all special columns in persisted entities, like inserted id or remove ids from the removed entities // console.time(".updateSpecialColumnsInPersistedEntities"); - await this.updateSpecialColumnsInPersistedEntities() + this.updateSpecialColumnsInPersistedEntities() // console.timeEnd(".updateSpecialColumnsInPersistedEntities"); // finally broadcast "after" events after we finish insert / update / remove operations @@ -300,6 +300,7 @@ export class SubjectExecutor { result, subject.metadata, subject.entity!, + subject.identifier, ), ) if (this.updateSubjects.length) @@ -526,7 +527,6 @@ export class SubjectExecutor { protected async executeUpdateOperations(): Promise { const isSpanner = this.queryRunner.connection.driver.options.type === "spanner" - const updateSubject = async (subject: Subject) => { if (!subject.identifier) throw new SubjectWithoutIdentifierError(subject) @@ -1081,6 +1081,9 @@ export class SubjectExecutor { // entities does not have virtual columns if (column.isVirtual) return + // if column is deletedAt + if (column.isDeleteDate) return + // update nullable columns if (column.isNullable) { const columnValue = column.getEntityValue(subject.entity!) diff --git a/src/persistence/subject-builder/ManyToManySubjectBuilder.ts b/src/persistence/subject-builder/ManyToManySubjectBuilder.ts index ef79dcfa98..93ce9b032f 100644 --- a/src/persistence/subject-builder/ManyToManySubjectBuilder.ts +++ b/src/persistence/subject-builder/ManyToManySubjectBuilder.ts @@ -98,10 +98,17 @@ export class ManyToManySubjectBuilder { // if subject don't have database entity it means all related entities in persisted subject are new and must be bind // and we don't need to remove something that is not exist - if (subject.databaseEntity) - databaseRelatedEntityIds = relation.getEntityValue( + if (subject.databaseEntity) { + const databaseRelatedEntityValue = relation.getEntityValue( subject.databaseEntity, ) + if (databaseRelatedEntityValue) { + databaseRelatedEntityIds = databaseRelatedEntityValue.map( + (e: any) => + relation.inverseEntityMetadata.getEntityIdMap(e), + ) + } + } // extract entity's relation value // by example: categories inside our post (subject.entity is post) diff --git a/src/platform/BrowserPlatformTools.template b/src/platform/BrowserPlatformTools.template index 0e424a22f4..f03afe58b3 100644 --- a/src/platform/BrowserPlatformTools.template +++ b/src/platform/BrowserPlatformTools.template @@ -5,6 +5,8 @@ * For node.js environment this class is not getting packaged. * Don't use methods of this class in the code, use PlatformTools methods instead. */ +import { Buffer } from "buffer"; + export class PlatformTools { /** @@ -164,8 +166,8 @@ interface Window { } declare var window: Window; -if (typeof window !== "undefined" && typeof require !== "undefined") { - window.Buffer = require("buffer/").Buffer; +if (typeof window !== "undefined") { + window.Buffer = Buffer; } // NativeScript uses global, not window if (typeof global !== "undefined" && typeof require !== "undefined") { diff --git a/src/platform/PlatformTools.ts b/src/platform/PlatformTools.ts index dc7d5c16c9..72116e3ced 100644 --- a/src/platform/PlatformTools.ts +++ b/src/platform/PlatformTools.ts @@ -54,6 +54,9 @@ export class PlatformTools { case "@sap/hana-client": return require("@sap/hana-client") + case "@sap/hana-client/extension/Stream": + return require("@sap/hana-client/extension/Stream") + case "hdb-pool": return require("hdb-pool") diff --git a/src/query-builder/InsertQueryBuilder.ts b/src/query-builder/InsertQueryBuilder.ts index da25a7b5bb..52a906f789 100644 --- a/src/query-builder/InsertQueryBuilder.ts +++ b/src/query-builder/InsertQueryBuilder.ts @@ -459,7 +459,8 @@ export class InsertQueryBuilder< // add VALUES expression if (valuesExpression) { if ( - this.connection.driver.options.type === "oracle" && + (this.connection.driver.options.type === "oracle" || + this.connection.driver.options.type === "sap") && this.getValueSets().length > 1 ) { query += ` ${valuesExpression}` @@ -516,9 +517,7 @@ export class InsertQueryBuilder< indexPredicate && DriverUtils.isPostgresFamily(this.connection.driver) ) { - conflictTarget += ` WHERE ( ${this.escape( - indexPredicate, - )} )` + conflictTarget += ` WHERE ( ${indexPredicate} )` } } else if (conflict) { conflictTarget += ` ON CONSTRAINT ${this.escape( @@ -526,25 +525,60 @@ export class InsertQueryBuilder< )}` } + const updatePart: string[] = [] + if (Array.isArray(overwrite)) { - query += ` ${conflictTarget} DO UPDATE SET ` - query += overwrite - ?.map( + updatePart.push( + ...overwrite.map( (column) => `${this.escape( column, )} = EXCLUDED.${this.escape(column)}`, - ) - .join(", ") - query += " " + ), + ) } else if (columns) { - query += ` ${conflictTarget} DO UPDATE SET ` - query += columns - .map( + updatePart.push( + ...columns.map( (column) => `${this.escape(column)} = :${column}`, - ) - .join(", ") + ), + ) + } + + if (updatePart.length > 0) { + query += ` ${conflictTarget} DO UPDATE SET ` + + updatePart.push( + ...this.expressionMap + .mainAlias!.metadata.columns.filter( + (column) => + column.isUpdateDate && + !overwrite?.includes( + column.databaseName, + ) && + !( + (this.connection.driver.options + .type === "oracle" && + this.getValueSets().length > + 1) || + DriverUtils.isSQLiteFamily( + this.connection.driver, + ) || + this.connection.driver.options + .type === "sap" || + this.connection.driver.options + .type === "spanner" + ), + ) + .map( + (column) => + `${this.escape( + column.databaseName, + )} = DEFAULT`, + ), + ) + + query += updatePart.join(", ") query += " " } diff --git a/src/query-builder/QueryBuilder.ts b/src/query-builder/QueryBuilder.ts index 786993ea4f..8953cd895f 100644 --- a/src/query-builder/QueryBuilder.ts +++ b/src/query-builder/QueryBuilder.ts @@ -80,6 +80,11 @@ export abstract class QueryBuilder { */ private parameterIndex = 0 + /** + * Contains all registered query builder classes. + */ + private static queryBuilderRegistry: Record = {} + // ------------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------------- @@ -112,6 +117,10 @@ export abstract class QueryBuilder { } } + static registerQueryBuilderClass(name: string, factory: any) { + QueryBuilder.queryBuilderRegistry[name] = factory + } + // ------------------------------------------------------------------------- // Abstract Methods // ------------------------------------------------------------------------- @@ -179,12 +188,9 @@ export abstract class QueryBuilder { ] } - // loading it dynamically because of circular issue - const SelectQueryBuilderCls = - require("./SelectQueryBuilder").SelectQueryBuilder if (InstanceChecker.isSelectQueryBuilder(this)) return this as any - return new SelectQueryBuilderCls(this) + return QueryBuilder.queryBuilderRegistry["SelectQueryBuilder"](this) } /** @@ -193,12 +199,9 @@ export abstract class QueryBuilder { insert(): InsertQueryBuilder { this.expressionMap.queryType = "insert" - // loading it dynamically because of circular issue - const InsertQueryBuilderCls = - require("./InsertQueryBuilder").InsertQueryBuilder if (InstanceChecker.isInsertQueryBuilder(this)) return this as any - return new InsertQueryBuilderCls(this) + return QueryBuilder.queryBuilderRegistry["InsertQueryBuilder"](this) } /** @@ -256,12 +259,9 @@ export abstract class QueryBuilder { this.expressionMap.queryType = "update" this.expressionMap.valuesSet = updateSet - // loading it dynamically because of circular issue - const UpdateQueryBuilderCls = - require("./UpdateQueryBuilder").UpdateQueryBuilder if (InstanceChecker.isUpdateQueryBuilder(this)) return this as any - return new UpdateQueryBuilderCls(this) + return QueryBuilder.queryBuilderRegistry["UpdateQueryBuilder"](this) } /** @@ -270,34 +270,25 @@ export abstract class QueryBuilder { delete(): DeleteQueryBuilder { this.expressionMap.queryType = "delete" - // loading it dynamically because of circular issue - const DeleteQueryBuilderCls = - require("./DeleteQueryBuilder").DeleteQueryBuilder if (InstanceChecker.isDeleteQueryBuilder(this)) return this as any - return new DeleteQueryBuilderCls(this) + return QueryBuilder.queryBuilderRegistry["DeleteQueryBuilder"](this) } softDelete(): SoftDeleteQueryBuilder { this.expressionMap.queryType = "soft-delete" - // loading it dynamically because of circular issue - const SoftDeleteQueryBuilderCls = - require("./SoftDeleteQueryBuilder").SoftDeleteQueryBuilder if (InstanceChecker.isSoftDeleteQueryBuilder(this)) return this as any - return new SoftDeleteQueryBuilderCls(this) + return QueryBuilder.queryBuilderRegistry["SoftDeleteQueryBuilder"](this) } restore(): SoftDeleteQueryBuilder { this.expressionMap.queryType = "restore" - // loading it dynamically because of circular issue - const SoftDeleteQueryBuilderCls = - require("./SoftDeleteQueryBuilder").SoftDeleteQueryBuilder if (InstanceChecker.isSoftDeleteQueryBuilder(this)) return this as any - return new SoftDeleteQueryBuilderCls(this) + return QueryBuilder.queryBuilderRegistry["SoftDeleteQueryBuilder"](this) } /** @@ -335,12 +326,9 @@ export abstract class QueryBuilder { this.expressionMap.setMainAlias(mainAlias) } - // loading it dynamically because of circular issue - const RelationQueryBuilderCls = - require("./RelationQueryBuilder").RelationQueryBuilder if (InstanceChecker.isRelationQueryBuilder(this)) return this as any - return new RelationQueryBuilderCls(this) + return QueryBuilder.queryBuilderRegistry["RelationQueryBuilder"](this) } /** @@ -533,8 +521,11 @@ export abstract class QueryBuilder { * Creates a completely new query builder. * Uses same query runner as current QueryBuilder. */ - createQueryBuilder(): this { - return new (this.constructor as any)(this.connection, this.queryRunner) + createQueryBuilder(queryRunner?: QueryRunner): this { + return new (this.constructor as any)( + this.connection, + queryRunner ?? this.queryRunner, + ) } /** @@ -779,15 +770,15 @@ export abstract class QueryBuilder { statement = statement.replace( new RegExp( // Avoid a lookbehind here since it's not well supported - `([ =\(]|^.{0})` + // any of ' =(' or start of line + `([ =(]|^.{0})` + // any of ' =(' or start of line // followed by our prefix, e.g. 'tablename.' or '' `${ replaceAliasNamePrefixes ? "(" + replaceAliasNamePrefixes + ")" : "" - }([^ =\(\)\,]+)` + // a possible property name: sequence of anything but ' =(),' + }([^ =(),]+)` + // a possible property name: sequence of anything but ' =(),' // terminated by ' =),' or end of line - `(?=[ =\)\,]|.{0}$)`, + `(?=[ =),]|.{0}$)`, "gm", ), (...matches) => { @@ -829,7 +820,7 @@ export abstract class QueryBuilder { // to scrub "ending" characters from the SQL but otherwise we can leave everything else // as-is and it should be valid. - return `/* ${this.expressionMap.comment.replace("*/", "")} */ ` + return `/* ${this.expressionMap.comment.replace(/\*\//g, "")} */ ` } /** @@ -1024,9 +1015,31 @@ export abstract class QueryBuilder { switch (clause.type) { case "and": - return (index > 0 ? "AND " : "") + expression + return ( + (index > 0 ? "AND " : "") + + `${ + this.connection.options.isolateWhereStatements + ? "(" + : "" + }${expression}${ + this.connection.options.isolateWhereStatements + ? ")" + : "" + }` + ) case "or": - return (index > 0 ? "OR " : "") + expression + return ( + (index > 0 ? "OR " : "") + + `${ + this.connection.options.isolateWhereStatements + ? "(" + : "" + }${expression}${ + this.connection.options.isolateWhereStatements + ? ")" + : "" + }` + ) } return expression @@ -1120,7 +1133,9 @@ export abstract class QueryBuilder { true, )}` case "and": - return condition.parameters.join(" AND ") + return "(" + condition.parameters.join(" AND ") + ")" + case "or": + return "(" + condition.parameters.join(" OR ") + ")" } throw new TypeError( @@ -1536,6 +1551,20 @@ export abstract class QueryBuilder { } else if (parameterValue.type === "and") { const values: FindOperator[] = parameterValue.value + return { + operator: parameterValue.type, + parameters: values.map((operator) => + this.createWhereConditionExpression( + this.getWherePredicateCondition( + aliasPath, + operator, + ), + ), + ), + } + } else if (parameterValue.type === "or") { + const values: FindOperator[] = parameterValue.value + return { operator: parameterValue.type, parameters: values.map((operator) => diff --git a/src/query-builder/QueryExpressionMap.ts b/src/query-builder/QueryExpressionMap.ts index c0156e040a..3f1867d7be 100644 --- a/src/query-builder/QueryExpressionMap.ts +++ b/src/query-builder/QueryExpressionMap.ts @@ -261,8 +261,9 @@ export class QueryExpressionMap { /** * Indicates if query result cache is enabled or not. + * It is undefined by default to avoid overriding the `alwaysEnabled` config */ - cache: boolean = false + cache?: boolean /** * Time in milliseconds in which cache will expire. diff --git a/src/query-builder/ReturningResultsEntityUpdator.ts b/src/query-builder/ReturningResultsEntityUpdator.ts index f5e9eb449f..e59c05ab92 100644 --- a/src/query-builder/ReturningResultsEntityUpdator.ts +++ b/src/query-builder/ReturningResultsEntityUpdator.ts @@ -274,7 +274,11 @@ export class ReturningResultsEntityUpdator { getUpdationReturningColumns(): ColumnMetadata[] { return this.expressionMap.mainAlias!.metadata.columns.filter( (column) => { - return column.isUpdateDate || column.isVersion + return ( + column.asExpression !== undefined || + column.isUpdateDate || + column.isVersion + ) }, ) } @@ -286,6 +290,7 @@ export class ReturningResultsEntityUpdator { return this.expressionMap.mainAlias!.metadata.columns.filter( (column) => { return ( + column.asExpression !== undefined || column.isUpdateDate || column.isVersion || column.isDeleteDate diff --git a/src/query-builder/SelectQueryBuilder.ts b/src/query-builder/SelectQueryBuilder.ts index 1866c5f6eb..1bb808addc 100644 --- a/src/query-builder/SelectQueryBuilder.ts +++ b/src/query-builder/SelectQueryBuilder.ts @@ -1445,10 +1445,10 @@ export class SelectQueryBuilder } /** - * Set's LIMIT - maximum number of rows to be selected. + * Sets LIMIT - maximum number of rows to be selected. * NOTE that it may not work as you expect if you are using joins. * If you want to implement pagination, and you are having join in your query, - * then use instead take method instead. + * then use the take method instead. */ limit(limit?: number): this { this.expressionMap.limit = this.normalizeNumber(limit) @@ -1464,10 +1464,10 @@ export class SelectQueryBuilder } /** - * Set's OFFSET - selection offset. + * Sets OFFSET - selection offset. * NOTE that it may not work as you expect if you are using joins. * If you want to implement pagination, and you are having join in your query, - * then use instead skip method instead. + * then use the skip method instead. */ offset(offset?: number): this { this.expressionMap.offset = this.normalizeNumber(offset) @@ -2348,6 +2348,11 @@ export class SelectQueryBuilder }) .join(" AND ") + if (!condition) + throw new TypeORMError( + `Relation ${relation.entityMetadata.name}.${relation.propertyName} does not have join columns.`, + ) + return ( " " + joinAttr.direction + @@ -2877,6 +2882,11 @@ export class SelectQueryBuilder }) }) } else { + if (column.isVirtualProperty) { + // Do not add unselected virtual properties to final select + return + } + finalSelects.push({ selection: selectionPath, aliasName: DriverUtils.buildAlias( @@ -3593,7 +3603,7 @@ export class SelectQueryBuilder ) : this.findOptions.relations - const queryBuilder = this.createQueryBuilder() + const queryBuilder = this.createQueryBuilder(queryRunner) .select(relationAlias) .from(relationTarget, relationAlias) .setFindOptions({ @@ -3743,7 +3753,12 @@ export class SelectQueryBuilder */ protected async loadRawResults(queryRunner: QueryRunner) { const [sql, parameters] = this.getQueryAndParameters() - const queryId = sql + " -- PARAMETERS: " + JSON.stringify(parameters) + const queryId = + sql + + " -- PARAMETERS: " + + JSON.stringify(parameters, (_, value) => + typeof value === "bigint" ? value.toString() : value, + ) const cacheOptions = typeof this.connection.options.cache === "object" ? this.connection.options.cache @@ -3752,9 +3767,10 @@ export class SelectQueryBuilder undefined const isCachingEnabled = // Caching is enabled globally and isn't disabled locally. - (cacheOptions.alwaysEnabled && this.expressionMap.cache) || + (cacheOptions.alwaysEnabled && + this.expressionMap.cache !== false) || // ...or it's enabled locally explicitly. - this.expressionMap.cache + this.expressionMap.cache === true let cacheError = false if (this.connection.queryResultCache && isCachingEnabled) { try { @@ -3842,7 +3858,12 @@ export class SelectQueryBuilder * Creates a query builder used to execute sql queries inside this query builder. */ protected obtainQueryRunner() { - return this.queryRunner || this.connection.createQueryRunner("slave") + return ( + this.queryRunner || + this.connection.createQueryRunner( + this.connection.defaultReplicationModeForReads(), + ) + ) } protected buildSelect( @@ -4203,10 +4224,9 @@ export class SelectQueryBuilder ) { let condition: string = "" // let parameterIndex = Object.keys(this.expressionMap.nativeParameters).length; - if (Array.isArray(where) && where.length) { - condition = - "(" + - where + if (Array.isArray(where)) { + if (where.length) { + condition = where .map((whereItem) => { return this.buildWhere( whereItem, @@ -4217,8 +4237,8 @@ export class SelectQueryBuilder }) .filter((condition) => !!condition) .map((condition) => "(" + condition + ")") - .join(" OR ") + - ")" + .join(" OR ") + } } else { let andConditions: string[] = [] for (let key in where) { @@ -4487,8 +4507,10 @@ export class SelectQueryBuilder } } } - condition = andConditions.join(" AND ") + condition = andConditions.length + ? "(" + andConditions.join(") AND (") + ")" + : andConditions.join(" AND ") } - return condition + return condition.length ? "(" + condition + ")" : condition } } diff --git a/src/query-builder/WhereClause.ts b/src/query-builder/WhereClause.ts index 0ab126e330..299c9a278d 100644 --- a/src/query-builder/WhereClause.ts +++ b/src/query-builder/WhereClause.ts @@ -18,6 +18,7 @@ type PredicateOperator = | "arrayOverlap" | "and" | "jsonContains" + | "or" export interface WherePredicateOperator { operator: PredicateOperator diff --git a/src/query-builder/index.ts b/src/query-builder/index.ts new file mode 100644 index 0000000000..7aad4cd351 --- /dev/null +++ b/src/query-builder/index.ts @@ -0,0 +1,34 @@ +import { DeleteQueryBuilder } from "./DeleteQueryBuilder" +import { InsertQueryBuilder } from "./InsertQueryBuilder" +import { QueryBuilder } from "./QueryBuilder" +import { RelationQueryBuilder } from "./RelationQueryBuilder" +import { SelectQueryBuilder } from "./SelectQueryBuilder" +import { SoftDeleteQueryBuilder } from "./SoftDeleteQueryBuilder" +import { UpdateQueryBuilder } from "./UpdateQueryBuilder" + +export function registerQueryBuilders() { + QueryBuilder.registerQueryBuilderClass( + "DeleteQueryBuilder", + (qb: QueryBuilder) => new DeleteQueryBuilder(qb), + ) + QueryBuilder.registerQueryBuilderClass( + "InsertQueryBuilder", + (qb: QueryBuilder) => new InsertQueryBuilder(qb), + ) + QueryBuilder.registerQueryBuilderClass( + "RelationQueryBuilder", + (qb: QueryBuilder) => new RelationQueryBuilder(qb), + ) + QueryBuilder.registerQueryBuilderClass( + "SelectQueryBuilder", + (qb: QueryBuilder) => new SelectQueryBuilder(qb), + ) + QueryBuilder.registerQueryBuilderClass( + "SoftDeleteQueryBuilder", + (qb: QueryBuilder) => new SoftDeleteQueryBuilder(qb), + ) + QueryBuilder.registerQueryBuilderClass( + "UpdateQueryBuilder", + (qb: QueryBuilder) => new UpdateQueryBuilder(qb), + ) +} diff --git a/src/query-runner/BaseQueryRunner.ts b/src/query-runner/BaseQueryRunner.ts index 466e6160fa..9858888938 100644 --- a/src/query-runner/BaseQueryRunner.ts +++ b/src/query-runner/BaseQueryRunner.ts @@ -320,6 +320,7 @@ export abstract class BaseQueryRunner { foundTable.checks = changedTable.checks foundTable.justCreated = changedTable.justCreated foundTable.engine = changedTable.engine + foundTable.comment = changedTable.comment } } diff --git a/src/query-runner/QueryRunner.ts b/src/query-runner/QueryRunner.ts index 1640399676..692fbb855c 100644 --- a/src/query-runner/QueryRunner.ts +++ b/src/query-runner/QueryRunner.ts @@ -271,6 +271,14 @@ export interface QueryRunner { newTableName: string, ): Promise + /** + * Change table comment. Only supports MySQL and MariaDB + */ + changeTableComment( + tableOrName: Table | string, + comment?: string, + ): Promise + /** * Adds a new column. */ diff --git a/src/repository/BaseEntity.ts b/src/repository/BaseEntity.ts index 77d716b819..c02f3e21ec 100644 --- a/src/repository/BaseEntity.ts +++ b/src/repository/BaseEntity.ts @@ -389,6 +389,26 @@ export class BaseEntity { return this.getRepository().delete(criteria) } + /** + * Checks whether any entity exists that matches the given options. + */ + static exists( + this: { new (): T } & typeof BaseEntity, + options?: FindManyOptions, + ): Promise { + return this.getRepository().exists(options) + } + + /** + * Checks whether any entity exists that matches the given conditions. + */ + static existsBy( + this: { new (): T } & typeof BaseEntity, + where: FindOptionsWhere, + ): Promise { + return this.getRepository().existsBy(where) + } + /** * Counts entities that match given options. */ diff --git a/src/repository/MongoRepository.ts b/src/repository/MongoRepository.ts index 78860e4756..ac9f137f75 100644 --- a/src/repository/MongoRepository.ts +++ b/src/repository/MongoRepository.ts @@ -43,6 +43,7 @@ import { UpdateFilter, UpdateOptions, UpdateResult, + CountDocumentsOptions, } from "../driver/mongodb/typings" import { FindManyOptions } from "../find-options/FindManyOptions" @@ -244,6 +245,20 @@ export class MongoRepository< return this.manager.count(this.metadata.target, query || {}, options) } + /** + * Count number of matching documents in the db to a query. + */ + countDocuments( + query?: ObjectLiteral, + options?: CountDocumentsOptions, + ): Promise { + return this.manager.countDocuments( + this.metadata.target, + query || {}, + options, + ) + } + /** * Count number of matching documents in the db to a query. */ @@ -340,7 +355,7 @@ export class MongoRepository< findOneAndDelete( query: ObjectLiteral, options?: FindOneAndDeleteOptions, - ): Promise { + ): Promise { return this.manager.findOneAndDelete( this.metadata.tableName, query, @@ -355,7 +370,7 @@ export class MongoRepository< query: ObjectLiteral, replacement: Object, options?: FindOneAndReplaceOptions, - ): Promise { + ): Promise { return this.manager.findOneAndReplace( this.metadata.tableName, query, @@ -371,7 +386,7 @@ export class MongoRepository< query: ObjectLiteral, update: Object, options?: FindOneAndUpdateOptions, - ): Promise { + ): Promise { return this.manager.findOneAndUpdate( this.metadata.tableName, query, diff --git a/src/repository/Repository.ts b/src/repository/Repository.ts index 68f269d927..a9b8f87a30 100644 --- a/src/repository/Repository.ts +++ b/src/repository/Repository.ts @@ -126,7 +126,7 @@ export class Repository { | DeepPartial | DeepPartial[], ): Entity | Entity[] { - return this.manager.create( + return this.manager.create( this.metadata.target as any, plainEntityLikeOrPlainEntityLikes as any, ) @@ -453,12 +453,32 @@ export class Repository { } /** - * Checks whether any entity exists that match given options. + * Checks whether any entity exists that matches the given options. + * + * @deprecated use `exists` method instead, for example: + * + * .exists() */ exist(options?: FindManyOptions): Promise { return this.manager.exists(this.metadata.target, options) } + /** + * Checks whether any entity exists that matches the given options. + */ + exists(options?: FindManyOptions): Promise { + return this.manager.exists(this.metadata.target, options) + } + + /** + * Checks whether any entity exists that matches the given conditions. + */ + existsBy( + where: FindOptionsWhere | FindOptionsWhere[], + ): Promise { + return this.manager.existsBy(this.metadata.target, where) + } + /** * Counts entities that match given options. * Useful for pagination. @@ -675,20 +695,25 @@ export class Repository { * Extends repository with provided functions. */ extend( - custom: CustomRepository & ThisType, + customs: CustomRepository & ThisType, ): this & CustomRepository { // return { // ...this, // ...custom // }; - const thisRepo = this.constructor as new (...args: any[]) => typeof this + const thisRepo: any = this.constructor const { target, manager, queryRunner } = this - const cls = new (class extends thisRepo {})( - target, - manager, - queryRunner, - ) - Object.assign(cls, custom) - return cls as any + const ChildClass = class extends thisRepo { + constructor( + target: EntityTarget, + manager: EntityManager, + queryRunner?: QueryRunner, + ) { + super(target, manager, queryRunner) + } + } + for (const custom in customs) + ChildClass.prototype[custom] = customs[custom] + return new ChildClass(target, manager, queryRunner) as any } } diff --git a/src/schema-builder/RdbmsSchemaBuilder.ts b/src/schema-builder/RdbmsSchemaBuilder.ts index 9453ed633a..1f5460e3f5 100644 --- a/src/schema-builder/RdbmsSchemaBuilder.ts +++ b/src/schema-builder/RdbmsSchemaBuilder.ts @@ -221,6 +221,7 @@ export class RdbmsSchemaBuilder implements SchemaBuilder { await this.dropCompositeUniqueConstraints() // await this.renameTables(); await this.renameColumns() + await this.changeTableComment() await this.createNewTables() await this.dropRemovedColumns() await this.addNewColumns() @@ -590,6 +591,27 @@ export class RdbmsSchemaBuilder implements SchemaBuilder { } } + /** + * change table comment + */ + protected async changeTableComment(): Promise { + for (const metadata of this.entityToSyncMetadatas) { + const table = this.queryRunner.loadedTables.find( + (table) => + this.getTablePath(table) === this.getTablePath(metadata), + ) + if (!table) continue + + if ( + DriverUtils.isMySQLFamily(this.connection.driver) || + this.connection.driver.options.type === "postgres" + ) { + const newComment = metadata.comment + await this.queryRunner.changeTableComment(table, newComment) + } + } + } + /** * Creates tables that do not exist in the database yet. * New tables are created without foreign and primary keys. diff --git a/src/schema-builder/options/TableIndexOptions.ts b/src/schema-builder/options/TableIndexOptions.ts index 7999055042..0719a44a6b 100644 --- a/src/schema-builder/options/TableIndexOptions.ts +++ b/src/schema-builder/options/TableIndexOptions.ts @@ -27,6 +27,12 @@ export interface TableIndexOptions { */ isSpatial?: boolean + /** + * Builds the index using the concurrently option. + * This options is only supported for postgres database. + */ + isConcurrent?: boolean + /** * The FULLTEXT modifier indexes the entire column and does not allow prefixing. * Supported only in MySQL & SAP HANA. diff --git a/src/schema-builder/options/TableOptions.ts b/src/schema-builder/options/TableOptions.ts index 7d6409f8a0..416413ad5d 100644 --- a/src/schema-builder/options/TableOptions.ts +++ b/src/schema-builder/options/TableOptions.ts @@ -74,4 +74,9 @@ export interface TableOptions { * Table engine. */ engine?: string + + /** + * Table comment. Not supported by all database types. + */ + comment?: string } diff --git a/src/schema-builder/table/Table.ts b/src/schema-builder/table/Table.ts index 776ddae871..835456b63f 100644 --- a/src/schema-builder/table/Table.ts +++ b/src/schema-builder/table/Table.ts @@ -83,6 +83,11 @@ export class Table { */ engine?: string + /** + * Table comment. Not supported by all database types. + */ + comment?: string + // ------------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------------- @@ -137,6 +142,8 @@ export class Table { if (options.withoutRowid) this.withoutRowid = options.withoutRowid this.engine = options.engine + + this.comment = options.comment } } @@ -171,6 +178,7 @@ export class Table { justCreated: this.justCreated, withoutRowid: this.withoutRowid, engine: this.engine, + comment: this.comment, }) } @@ -411,6 +419,7 @@ export class Table { exclusions: entityMetadata.exclusions.map((exclusion) => TableExclusion.create(exclusion), ), + comment: entityMetadata.comment, } return new Table(options) diff --git a/src/schema-builder/table/TableIndex.ts b/src/schema-builder/table/TableIndex.ts index 7662f427d2..7bb8b18c92 100644 --- a/src/schema-builder/table/TableIndex.ts +++ b/src/schema-builder/table/TableIndex.ts @@ -32,6 +32,12 @@ export class TableIndex { */ isSpatial: boolean + /** + * Create the index using the CONCURRENTLY modifier + * Works only in postgres. + */ + isConcurrent: boolean + /** * The FULLTEXT modifier indexes the entire column and does not allow prefixing. * Works only in MySQL. @@ -67,6 +73,7 @@ export class TableIndex { this.columnNames = options.columnNames this.isUnique = !!options.isUnique this.isSpatial = !!options.isSpatial + this.isConcurrent = !!options.isConcurrent this.isFulltext = !!options.isFulltext this.isNullFiltered = !!options.isNullFiltered this.parser = options.parser @@ -86,6 +93,7 @@ export class TableIndex { columnNames: [...this.columnNames], isUnique: this.isUnique, isSpatial: this.isSpatial, + isConcurrent: this.isConcurrent, isFulltext: this.isFulltext, isNullFiltered: this.isNullFiltered, parser: this.parser, @@ -108,6 +116,7 @@ export class TableIndex { ), isUnique: indexMetadata.isUnique, isSpatial: indexMetadata.isSpatial, + isConcurrent: indexMetadata.isConcurrent, isFulltext: indexMetadata.isFulltext, isNullFiltered: indexMetadata.isNullFiltered, parser: indexMetadata.parser, diff --git a/src/subscriber/Broadcaster.ts b/src/subscriber/Broadcaster.ts index 02a74e3444..7462b67101 100644 --- a/src/subscriber/Broadcaster.ts +++ b/src/subscriber/Broadcaster.ts @@ -8,6 +8,9 @@ import { RelationMetadata } from "../metadata/RelationMetadata" import { ObjectUtils } from "../util/ObjectUtils" interface BroadcasterEvents { + BeforeQuery: () => void + AfterQuery: () => void + BeforeTransactionCommit: () => void AfterTransactionCommit: () => void BeforeTransactionStart: () => void @@ -366,6 +369,7 @@ export class Broadcaster { result: BroadcasterResult, metadata: EntityMetadata, entity?: ObjectLiteral, + identifier?: ObjectLiteral, ): void { if (entity && metadata.afterInsertListeners.length) { metadata.afterInsertListeners.forEach((listener) => { @@ -390,6 +394,67 @@ export class Broadcaster { manager: this.queryRunner.manager, entity: entity, metadata: metadata, + entityId: metadata.getEntityIdMixedMap(identifier), + }) + if (executionResult instanceof Promise) + result.promises.push(executionResult) + result.count++ + } + }) + } + } + + /** + * Broadcasts "BEFORE_QUERY" event. + */ + broadcastBeforeQueryEvent( + result: BroadcasterResult, + query: string, + parameters: undefined | any[], + ): void { + if (this.queryRunner.connection.subscribers.length) { + this.queryRunner.connection.subscribers.forEach((subscriber) => { + if (subscriber.beforeQuery) { + const executionResult = subscriber.beforeQuery({ + connection: this.queryRunner.connection, + queryRunner: this.queryRunner, + manager: this.queryRunner.manager, + query: query, + parameters: parameters, + }) + if (executionResult instanceof Promise) + result.promises.push(executionResult) + result.count++ + } + }) + } + } + + /** + * Broadcasts "AFTER_QUERY" event. + */ + broadcastAfterQueryEvent( + result: BroadcasterResult, + query: string, + parameters: undefined | any[], + success: boolean, + executionTime: undefined | number, + rawResults: undefined | any, + error: undefined | any, + ): void { + if (this.queryRunner.connection.subscribers.length) { + this.queryRunner.connection.subscribers.forEach((subscriber) => { + if (subscriber.afterQuery) { + const executionResult = subscriber.afterQuery({ + connection: this.queryRunner.connection, + queryRunner: this.queryRunner, + manager: this.queryRunner.manager, + query: query, + parameters: parameters, + success: success, + executionTime: executionTime, + rawResults: rawResults, + error: error, }) if (executionResult instanceof Promise) result.promises.push(executionResult) diff --git a/src/subscriber/EntitySubscriberInterface.ts b/src/subscriber/EntitySubscriberInterface.ts index a832197cf2..964a343837 100644 --- a/src/subscriber/EntitySubscriberInterface.ts +++ b/src/subscriber/EntitySubscriberInterface.ts @@ -7,6 +7,7 @@ import { InsertEvent } from "./event/InsertEvent" import { LoadEvent } from "./event/LoadEvent" import { SoftRemoveEvent } from "./event/SoftRemoveEvent" import { RecoverEvent } from "./event/RecoverEvent" +import { AfterQueryEvent, BeforeQueryEvent } from "./event/QueryEvent" /** * Classes that implement this interface are subscribers that subscribe for the specific events in the ORM. @@ -28,6 +29,16 @@ export interface EntitySubscriberInterface { */ afterLoad?(entity: Entity, event?: LoadEvent): Promise | void + /** + * Called before query is executed. + */ + beforeQuery?(event: BeforeQueryEvent): Promise | void + + /** + * Called after query is executed. + */ + afterQuery?(event: AfterQueryEvent): Promise | void + /** * Called before entity is inserted to the database. */ diff --git a/src/subscriber/event/InsertEvent.ts b/src/subscriber/event/InsertEvent.ts index f5aec9aba4..d0bd3a453c 100644 --- a/src/subscriber/event/InsertEvent.ts +++ b/src/subscriber/event/InsertEvent.ts @@ -2,6 +2,7 @@ import { EntityManager } from "../../entity-manager/EntityManager" import { DataSource } from "../../data-source/DataSource" import { QueryRunner } from "../../query-runner/QueryRunner" import { EntityMetadata } from "../../metadata/EntityMetadata" +import { ObjectLiteral } from "../../common/ObjectLiteral" /** * InsertEvent is an object that broadcaster sends to the entity subscriber when entity is inserted to the database. @@ -29,6 +30,11 @@ export interface InsertEvent { */ entity: Entity + /** + * Id or ids of the entity being inserted. + */ + entityId?: ObjectLiteral + /** * Metadata of the entity. */ diff --git a/src/subscriber/event/QueryEvent.ts b/src/subscriber/event/QueryEvent.ts new file mode 100644 index 0000000000..1cfcf25cee --- /dev/null +++ b/src/subscriber/event/QueryEvent.ts @@ -0,0 +1,59 @@ +import { EntityManager } from "../../entity-manager/EntityManager" +import { DataSource } from "../../data-source/DataSource" +import { QueryRunner } from "../../query-runner/QueryRunner" + +/** + * BeforeQueryEvent is an object that broadcaster sends to the entity subscriber before query is ran against the database. + */ +export interface QueryEvent { + /** + * Connection used in the event. + */ + connection: DataSource + + /** + * QueryRunner used in the event transaction. + * All database operations in the subscribed event listener should be performed using this query runner instance. + */ + queryRunner: QueryRunner + + /** + * EntityManager used in the event transaction. + * All database operations in the subscribed event listener should be performed using this entity manager instance. + */ + manager: EntityManager + + /** + * Query that is being executed. + */ + query: string + + /** + * Parameters used in the query. + */ + parameters?: any[] +} + +export interface BeforeQueryEvent extends QueryEvent {} + +export interface AfterQueryEvent extends QueryEvent { + /** + * Whether the query was successful. + */ + success: boolean + + /** + * The duration of the query execution. + */ + executionTime?: number + + /** + * The raw results from the database if the query was successful. + */ + rawResults?: any + + /** + * The error thrown if the query was unsuccessful. + */ + error?: any +} diff --git a/src/util/DateUtils.ts b/src/util/DateUtils.ts index 7339966740..587b238338 100644 --- a/src/util/DateUtils.ts +++ b/src/util/DateUtils.ts @@ -1,5 +1,5 @@ import { ColumnMetadata } from "../metadata/ColumnMetadata" -import { parseISO } from "date-fns" +import dayjs from "dayjs" /** * Provides utilities to transform hydrated and persisted data. @@ -62,7 +62,9 @@ export class DateUtils { * https://stackoverflow.com/a/2587398 */ let date = - typeof mixedDate === "string" ? parseISO(mixedDate) : mixedDate + typeof mixedDate === "string" + ? dayjs(mixedDate).toDate() + : mixedDate if (toUtc) date = new Date( diff --git a/src/util/DepGraph.ts b/src/util/DepGraph.ts index d33d0b4b60..8280354a6e 100644 --- a/src/util/DepGraph.ts +++ b/src/util/DepGraph.ts @@ -79,11 +79,11 @@ export class DepGraph { edgeList, ) { Object.keys(edgeList).forEach(function (key: any) { - let idx = edgeList[key].indexOf(node) + const idx = edgeList[key].indexOf(node) if (idx >= 0) { edgeList[key].splice(idx, 1) } - }, this) + }) }) } } diff --git a/src/util/DirectoryExportedClassesLoader.ts b/src/util/DirectoryExportedClassesLoader.ts index ebb8cfb439..80ead87480 100644 --- a/src/util/DirectoryExportedClassesLoader.ts +++ b/src/util/DirectoryExportedClassesLoader.ts @@ -1,4 +1,4 @@ -import glob from "glob" +import * as glob from "glob" import { PlatformTools } from "../platform/PlatformTools" import { Logger } from "../logger/Logger" import { importOrRequireFile } from "./ImportUtils" diff --git a/src/util/OrmUtils.ts b/src/util/OrmUtils.ts index 4d78bc4ec7..987b9cdf2a 100644 --- a/src/util/OrmUtils.ts +++ b/src/util/OrmUtils.ts @@ -340,6 +340,81 @@ export class OrmUtils { return !haveSharedObjects } + /** + * Parses the CHECK constraint on the specified column and returns + * all values allowed by the constraint or undefined if the constraint + * is not present. + */ + static parseSqlCheckExpression( + sql: string, + columnName: string, + ): string[] | undefined { + const enumMatch = sql.match( + new RegExp( + `"${columnName}" varchar CHECK\\s*\\(\\s*"${columnName}"\\s+IN\\s*`, + ), + ) + + if (enumMatch && enumMatch.index) { + const afterMatch = sql.substring( + enumMatch.index + enumMatch[0].length, + ) + + // This is an enum + // all enum values stored as a comma separated list + const chars = afterMatch + + /** + * * When outside quotes: empty string + * * When inside single quotes: `'` + */ + let currentQuotes = "" + let nextValue = "" + const enumValues: string[] = [] + for (let idx = 0; idx < chars.length; idx++) { + const char = chars[idx] + switch (char) { + case ",": + if (currentQuotes == "") { + enumValues.push(nextValue) + nextValue = "" + } else { + nextValue += char + } + break + case "'": + if (currentQuotes == char) { + const isNextCharQuote = chars[idx + 1] === char + if (isNextCharQuote) { + // double quote in sql should be treated as a + // single quote that's part of the quoted string + nextValue += char + idx += 1 // skip that next quote + } else { + currentQuotes = "" + } + } else { + currentQuotes = char + } + break + case ")": + if (currentQuotes == "") { + enumValues.push(nextValue) + return enumValues + } else { + nextValue += char + } + break + default: + if (currentQuotes != "") { + nextValue += char + } + } + } + } + return undefined + } + // ------------------------------------------------------------------------- // Private methods // ------------------------------------------------------------------------- diff --git a/src/util/PathUtils.ts b/src/util/PathUtils.ts index 714fb285fe..0677761b4a 100644 --- a/src/util/PathUtils.ts +++ b/src/util/PathUtils.ts @@ -30,5 +30,5 @@ export function filepathToName(filepath: string): string { * Cross platform isAbsolute */ export function isAbsolute(filepath: string): boolean { - return !!filepath.match(/^(?:[a-z]:|[\\]|[\/])/i) + return !!filepath.match(/^(?:[a-z]:|[\\]|[/])/i) } diff --git a/test/functional/cache/entity/Address.ts b/test/functional/cache/entity/Address.ts index 1dc1afcb03..b7eb5cf11c 100644 --- a/test/functional/cache/entity/Address.ts +++ b/test/functional/cache/entity/Address.ts @@ -14,6 +14,6 @@ export class Address { @Column() address: string - @ManyToOne(() => User) + @ManyToOne(() => User, (u) => u.addresses) user: User } diff --git a/test/functional/columns/comments/columns-comments.ts b/test/functional/columns/comments/columns-comments.ts index 46359acc0f..d0d1dd73f0 100644 --- a/test/functional/columns/comments/columns-comments.ts +++ b/test/functional/columns/comments/columns-comments.ts @@ -14,8 +14,8 @@ describe("columns > comments", () => { async () => (connections = await createTestingConnections({ entities: [Test], - // Only supported on postgres, cockroachdb, and mysql - enabledDrivers: ["postgres", "cockroachdb", "mysql"], + // Only supported on cockroachdb, mysql, postgres, and sap + enabledDrivers: ["cockroachdb", "mysql", "postgres", "sap"], })), ) beforeEach(() => reloadTestingDatabases(connections)) diff --git a/test/functional/commands/migration-create.ts b/test/functional/commands/migration-create.ts index 7420101b7c..579126180d 100644 --- a/test/functional/commands/migration-create.ts +++ b/test/functional/commands/migration-create.ts @@ -16,8 +16,7 @@ import { MigrationCreateCommand } from "../../../src/commands/MigrationCreateCom import { Post } from "./entity/Post" import { resultsTemplates } from "./templates/result-templates-create" -// TODO: broken after 0.3.0 changes, fix later -describe.skip("commands - migration create", () => { +describe("commands - migration create", () => { let connectionOptions: DataSourceOptions[] let createFileStub: sinon.SinonStub let timerStub: sinon.SinonFakeTimers @@ -26,23 +25,22 @@ describe.skip("commands - migration create", () => { let connectionOptionsReader: ConnectionOptionsReader let baseConnectionOptions: DataSourceOptions - const enabledDrivers = [ - "postgres", + const enabledDrivers: DatabaseType[] = [ + "better-sqlite3", + "cockroachdb", + "mariadb", "mssql", "mysql", - "mariadb", - "sqlite", - "better-sqlite3", "oracle", - "cockroachdb", - ] as DatabaseType[] + "postgres", + "sqlite", + ] // simulate args: `npm run typeorm migration:run -- -n test-migration -d test-directory` const testHandlerArgs = (options: Record) => ({ $0: "test", _: ["test"], - name: "test-migration", - dir: "test-directory", + path: "test-directory/test-migration", ...options, }) @@ -72,7 +70,7 @@ describe.skip("commands - migration create", () => { }) afterEach(async () => { - getConnectionOptionsStub.restore() + getConnectionOptionsStub?.restore() }) it("should write regular empty migration file when no option is passed", async () => { diff --git a/test/functional/commands/migration-generate.ts b/test/functional/commands/migration-generate.ts index fbb45651f3..024ffa5a5c 100644 --- a/test/functional/commands/migration-generate.ts +++ b/test/functional/commands/migration-generate.ts @@ -2,6 +2,7 @@ import sinon from "sinon" import { ConnectionOptionsReader, DatabaseType, + DataSource, DataSourceOptions, } from "../../../src" import { @@ -15,24 +16,31 @@ import { MigrationGenerateCommand } from "../../../src/commands/MigrationGenerat import { Post } from "./entity/Post" import { resultsTemplates } from "./templates/result-templates-generate" -// TODO: broken after 0.3.0 changes, fix later -describe.skip("commands - migration generate", () => { +describe("commands - migration generate", () => { let connectionOptions: DataSourceOptions[] let createFileStub: sinon.SinonStub - let timerStub: sinon.SinonFakeTimers + let loadDataSourceStub: sinon.SinonStub let getConnectionOptionsStub: sinon.SinonStub let migrationGenerateCommand: MigrationGenerateCommand let connectionOptionsReader: ConnectionOptionsReader let baseConnectionOptions: DataSourceOptions - const enabledDrivers = ["mysql"] as DatabaseType[] + const enabledDrivers = [ + "postgres", + "mssql", + "mysql", + "mariadb", + "sqlite", + "better-sqlite3", + "oracle", + "cockroachdb", + ] as DatabaseType[] // simulate args: `npm run typeorm migration:run -- -n test-migration -d test-directory` const testHandlerArgs = (options: Record) => ({ $0: "test", _: ["test"], - name: "test-migration", - dir: "test-directory", + path: "test-directory/test-migration", ...options, }) @@ -52,13 +60,12 @@ describe.skip("commands - migration generate", () => { connectionOptionsReader = new ConnectionOptionsReader() migrationGenerateCommand = new MigrationGenerateCommand() createFileStub = sinon.stub(CommandUtils, "createFile") - - timerStub = sinon.useFakeTimers(1610975184784) + loadDataSourceStub = sinon.stub(CommandUtils, "loadDataSource") }) after(async () => { - timerStub.restore() createFileStub.restore() + loadDataSourceStub.restore() }) it("writes regular migration file when no option is passed", async () => { @@ -75,9 +82,13 @@ describe.skip("commands - migration generate", () => { entities: [Post], }) + loadDataSourceStub.resolves(new DataSource(connectionOption)) + await migrationGenerateCommand.handler( testHandlerArgs({ - connection: connectionOption.name, + dataSource: "dummy-path", + timestamp: "1610975184784", + exitProcess: false, }), ) @@ -85,7 +96,7 @@ describe.skip("commands - migration generate", () => { sinon.assert.calledWith( createFileStub, sinon.match(/test-directory.*test-migration.ts/), - sinon.match(resultsTemplates.control), + sinon.match(resultsTemplates[connectionOption.type]?.control), ) getConnectionOptionsStub.restore() @@ -106,10 +117,14 @@ describe.skip("commands - migration generate", () => { entities: [Post], }) + loadDataSourceStub.resolves(new DataSource(connectionOption)) + await migrationGenerateCommand.handler( testHandlerArgs({ - connection: connectionOption.name, + dataSource: "dummy-path", + timestamp: "1610975184784", outputJs: true, + exitProcess: false, }), ) @@ -117,7 +132,9 @@ describe.skip("commands - migration generate", () => { sinon.assert.calledWith( createFileStub, sinon.match(/test-directory.*test-migration.js/), - sinon.match(resultsTemplates.javascript), + sinon.match( + resultsTemplates[connectionOption.type]?.javascript, + ), ) getConnectionOptionsStub.restore() @@ -138,10 +155,13 @@ describe.skip("commands - migration generate", () => { entities: [Post], }) + loadDataSourceStub.resolves(new DataSource(connectionOption)) + await migrationGenerateCommand.handler( testHandlerArgs({ - connection: connectionOption.name, + dataSource: "dummy-path", timestamp: "1641163894670", + exitProcess: false, }), ) @@ -149,7 +169,7 @@ describe.skip("commands - migration generate", () => { sinon.assert.calledWith( createFileStub, sinon.match("test-directory/1641163894670-test-migration.ts"), - sinon.match(resultsTemplates.timestamp), + sinon.match(resultsTemplates[connectionOption.type]?.timestamp), ) getConnectionOptionsStub.restore() diff --git a/test/functional/commands/templates/generate/cockroachdb.ts b/test/functional/commands/templates/generate/cockroachdb.ts new file mode 100644 index 0000000000..cb9c1eb8fd --- /dev/null +++ b/test/functional/commands/templates/generate/cockroachdb.ts @@ -0,0 +1,49 @@ +export const cockroachdb: Record = { + control: `import { MigrationInterface, QueryRunner } from "typeorm"; + +export class TestMigration1610975184784 implements MigrationInterface { + name = 'TestMigration1610975184784' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`CREATE SEQUENCE "post_id_seq"\`); + await queryRunner.query(\`CREATE TABLE "post" ("id" INT DEFAULT nextval('"post_id_seq"') NOT NULL, "title" varchar NOT NULL, "createdAt" timestamptz NOT NULL DEFAULT now(), CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`DROP TABLE "post"\`); + await queryRunner.query(\`DROP SEQUENCE "post_id_seq"\`); + } + +}`, + javascript: `const { MigrationInterface, QueryRunner } = require("typeorm"); + +module.exports = class TestMigration1610975184784 { + name = 'TestMigration1610975184784' + + async up(queryRunner) { + await queryRunner.query(\`CREATE SEQUENCE "post_id_seq"\`); + await queryRunner.query(\`CREATE TABLE "post" ("id" INT DEFAULT nextval('"post_id_seq"') NOT NULL, "title" varchar NOT NULL, "createdAt" timestamptz NOT NULL DEFAULT now(), CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`); + } + + async down(queryRunner) { + await queryRunner.query(\`DROP TABLE "post"\`); + await queryRunner.query(\`DROP SEQUENCE "post_id_seq"\`); + } +}`, + timestamp: `import { MigrationInterface, QueryRunner } from "typeorm"; + +export class TestMigration1641163894670 implements MigrationInterface { + name = 'TestMigration1641163894670' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`CREATE SEQUENCE "post_id_seq"\`); + await queryRunner.query(\`CREATE TABLE "post" ("id" INT DEFAULT nextval('"post_id_seq"') NOT NULL, "title" varchar NOT NULL, "createdAt" timestamptz NOT NULL DEFAULT now(), CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`DROP TABLE "post"\`); + await queryRunner.query(\`DROP SEQUENCE "post_id_seq"\`); + } + +}`, +} diff --git a/test/functional/commands/templates/generate/mssql.ts b/test/functional/commands/templates/generate/mssql.ts new file mode 100644 index 0000000000..7bde7f2857 --- /dev/null +++ b/test/functional/commands/templates/generate/mssql.ts @@ -0,0 +1,43 @@ +export const mssql: Record = { + control: `import { MigrationInterface, QueryRunner } from "typeorm"; + +export class TestMigration1610975184784 implements MigrationInterface { + name = 'TestMigration1610975184784' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`CREATE TABLE "post" ("id" int NOT NULL IDENTITY(1,1), "title" nvarchar(255) NOT NULL, "createdAt" datetime2 NOT NULL CONSTRAINT "DF_fb91bea2d37140a877b775e6b2a" DEFAULT getdate(), CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`DROP TABLE "post"\`); + } + +}`, + javascript: `const { MigrationInterface, QueryRunner } = require("typeorm"); + +module.exports = class TestMigration1610975184784 { + name = 'TestMigration1610975184784' + + async up(queryRunner) { + await queryRunner.query(\`CREATE TABLE "post" ("id" int NOT NULL IDENTITY(1,1), "title" nvarchar(255) NOT NULL, "createdAt" datetime2 NOT NULL CONSTRAINT "DF_fb91bea2d37140a877b775e6b2a" DEFAULT getdate(), CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`); + } + + async down(queryRunner) { + await queryRunner.query(\`DROP TABLE "post"\`); + } +}`, + timestamp: `import { MigrationInterface, QueryRunner } from "typeorm"; + +export class TestMigration1641163894670 implements MigrationInterface { + name = 'TestMigration1641163894670' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`CREATE TABLE "post" ("id" int NOT NULL IDENTITY(1,1), "title" nvarchar(255) NOT NULL, "createdAt" datetime2 NOT NULL CONSTRAINT "DF_fb91bea2d37140a877b775e6b2a" DEFAULT getdate(), CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`DROP TABLE "post"\`); + } + +}`, +} diff --git a/test/functional/commands/templates/generate/mysql.ts b/test/functional/commands/templates/generate/mysql.ts new file mode 100644 index 0000000000..29e069eeb9 --- /dev/null +++ b/test/functional/commands/templates/generate/mysql.ts @@ -0,0 +1,43 @@ +export const mysql: Record = { + control: `import { MigrationInterface, QueryRunner } from "typeorm"; + +export class TestMigration1610975184784 implements MigrationInterface { + name = 'TestMigration1610975184784' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`CREATE TABLE \\\`post\\\` (\\\`id\\\` int NOT NULL AUTO_INCREMENT, \\\`title\\\` varchar(255) NOT NULL, \\\`createdAt\\\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), PRIMARY KEY (\\\`id\\\`)) ENGINE=InnoDB\`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`DROP TABLE \\\`post\\\`\`); + } + +}`, + javascript: `const { MigrationInterface, QueryRunner } = require("typeorm"); + +module.exports = class TestMigration1610975184784 { + name = 'TestMigration1610975184784' + + async up(queryRunner) { + await queryRunner.query(\`CREATE TABLE \\\`post\\\` (\\\`id\\\` int NOT NULL AUTO_INCREMENT, \\\`title\\\` varchar(255) NOT NULL, \\\`createdAt\\\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), PRIMARY KEY (\\\`id\\\`)) ENGINE=InnoDB\`); + } + + async down(queryRunner) { + await queryRunner.query(\`DROP TABLE \\\`post\\\`\`); + } +}`, + timestamp: `import { MigrationInterface, QueryRunner } from "typeorm"; + +export class TestMigration1641163894670 implements MigrationInterface { + name = 'TestMigration1641163894670' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`CREATE TABLE \\\`post\\\` (\\\`id\\\` int NOT NULL AUTO_INCREMENT, \\\`title\\\` varchar(255) NOT NULL, \\\`createdAt\\\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), PRIMARY KEY (\\\`id\\\`)) ENGINE=InnoDB\`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`DROP TABLE \\\`post\\\`\`); + } + +}`, +} diff --git a/test/functional/commands/templates/generate/oracle.ts b/test/functional/commands/templates/generate/oracle.ts new file mode 100644 index 0000000000..6ab8444ad0 --- /dev/null +++ b/test/functional/commands/templates/generate/oracle.ts @@ -0,0 +1,43 @@ +export const oracle: Record = { + control: `import { MigrationInterface, QueryRunner } from "typeorm"; + +export class TestMigration1610975184784 implements MigrationInterface { + name = 'TestMigration1610975184784' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`CREATE TABLE "post" ("id" number GENERATED BY DEFAULT AS IDENTITY, "title" varchar2(255) NOT NULL, "createdAt" timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`DROP TABLE "post"\`); + } + +}`, + javascript: `const { MigrationInterface, QueryRunner } = require("typeorm"); + +module.exports = class TestMigration1610975184784 { + name = 'TestMigration1610975184784' + + async up(queryRunner) { + await queryRunner.query(\`CREATE TABLE "post" ("id" number GENERATED BY DEFAULT AS IDENTITY, "title" varchar2(255) NOT NULL, "createdAt" timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`); + } + + async down(queryRunner) { + await queryRunner.query(\`DROP TABLE "post"\`); + } +}`, + timestamp: `import { MigrationInterface, QueryRunner } from "typeorm"; + +export class TestMigration1641163894670 implements MigrationInterface { + name = 'TestMigration1641163894670' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`CREATE TABLE "post" ("id" number GENERATED BY DEFAULT AS IDENTITY, "title" varchar2(255) NOT NULL, "createdAt" timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`DROP TABLE "post"\`); + } + +}`, +} diff --git a/test/functional/commands/templates/generate/postgres.ts b/test/functional/commands/templates/generate/postgres.ts new file mode 100644 index 0000000000..a25ead2e20 --- /dev/null +++ b/test/functional/commands/templates/generate/postgres.ts @@ -0,0 +1,43 @@ +export const postgres: Record = { + control: `import { MigrationInterface, QueryRunner } from "typeorm"; + +export class TestMigration1610975184784 implements MigrationInterface { + name = 'TestMigration1610975184784' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`CREATE TABLE "post" ("id" SERIAL NOT NULL, "title" character varying NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`DROP TABLE "post"\`); + } + +}`, + javascript: `const { MigrationInterface, QueryRunner } = require("typeorm"); + +module.exports = class TestMigration1610975184784 { + name = 'TestMigration1610975184784' + + async up(queryRunner) { + await queryRunner.query(\`CREATE TABLE "post" ("id" SERIAL NOT NULL, "title" character varying NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`); + } + + async down(queryRunner) { + await queryRunner.query(\`DROP TABLE "post"\`); + } +}`, + timestamp: `import { MigrationInterface, QueryRunner } from "typeorm"; + +export class TestMigration1641163894670 implements MigrationInterface { + name = 'TestMigration1641163894670' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`CREATE TABLE "post" ("id" SERIAL NOT NULL, "title" character varying NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`DROP TABLE "post"\`); + } + +}`, +} diff --git a/test/functional/commands/templates/generate/sqlite.ts b/test/functional/commands/templates/generate/sqlite.ts new file mode 100644 index 0000000000..26bd28e64c --- /dev/null +++ b/test/functional/commands/templates/generate/sqlite.ts @@ -0,0 +1,43 @@ +export const sqlite: Record = { + control: `import { MigrationInterface, QueryRunner } from "typeorm"; + +export class TestMigration1610975184784 implements MigrationInterface { + name = 'TestMigration1610975184784' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`CREATE TABLE "post" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar NOT NULL, "createdAt" datetime NOT NULL DEFAULT (datetime('now')))\`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`DROP TABLE "post"\`); + } + +}`, + javascript: `const { MigrationInterface, QueryRunner } = require("typeorm"); + +module.exports = class TestMigration1610975184784 { + name = 'TestMigration1610975184784' + + async up(queryRunner) { + await queryRunner.query(\`CREATE TABLE "post" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar NOT NULL, "createdAt" datetime NOT NULL DEFAULT (datetime('now')))\`); + } + + async down(queryRunner) { + await queryRunner.query(\`DROP TABLE "post"\`); + } +}`, + timestamp: `import { MigrationInterface, QueryRunner } from "typeorm"; + +export class TestMigration1641163894670 implements MigrationInterface { + name = 'TestMigration1641163894670' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`CREATE TABLE "post" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar NOT NULL, "createdAt" datetime NOT NULL DEFAULT (datetime('now')))\`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(\`DROP TABLE "post"\`); + } + +}`, +} diff --git a/test/functional/commands/templates/result-templates-create.ts b/test/functional/commands/templates/result-templates-create.ts index 8865bd9a5e..8d3ed7c931 100644 --- a/test/functional/commands/templates/result-templates-create.ts +++ b/test/functional/commands/templates/result-templates-create.ts @@ -1,7 +1,7 @@ export const resultsTemplates: Record = { - control: `import {MigrationInterface, QueryRunner} from "typeorm"; + control: `import { MigrationInterface, QueryRunner } from "typeorm"; -export class testMigration1610975184784 implements MigrationInterface { +export class TestMigration1610975184784 implements MigrationInterface { public async up(queryRunner: QueryRunner): Promise { } @@ -9,20 +9,23 @@ export class testMigration1610975184784 implements MigrationInterface { public async down(queryRunner: QueryRunner): Promise { } -}`, +} +`, javascript: `const { MigrationInterface, QueryRunner } = require("typeorm"); -module.exports = class testMigration1610975184784 { +module.exports = class TestMigration1610975184784 { async up(queryRunner) { } async down(queryRunner) { } -}`, - timestamp: `import {MigrationInterface, QueryRunner} from "typeorm"; -export class testMigration1641163894670 implements MigrationInterface { +} +`, + timestamp: `import { MigrationInterface, QueryRunner } from "typeorm"; + +export class TestMigration1641163894670 implements MigrationInterface { public async up(queryRunner: QueryRunner): Promise { } @@ -30,5 +33,6 @@ export class testMigration1641163894670 implements MigrationInterface { public async down(queryRunner: QueryRunner): Promise { } -}`, +} +`, } diff --git a/test/functional/commands/templates/result-templates-generate.ts b/test/functional/commands/templates/result-templates-generate.ts index f8ca1af97c..dc7ec1df6e 100644 --- a/test/functional/commands/templates/result-templates-generate.ts +++ b/test/functional/commands/templates/result-templates-generate.ts @@ -1,43 +1,17 @@ -export const resultsTemplates: Record = { - control: `import {MigrationInterface, QueryRunner} from "typeorm"; - -export class testMigration1610975184784 implements MigrationInterface { - name = 'testMigration1610975184784' - - public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query(\`CREATE TABLE \\\`post\\\` (\\\`id\\\` int NOT NULL AUTO_INCREMENT, \\\`title\\\` varchar(255) NOT NULL, \\\`createdAt\\\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), PRIMARY KEY (\\\`id\\\`)) ENGINE=InnoDB\`); - } - - public async down(queryRunner: QueryRunner): Promise { - await queryRunner.query(\`DROP TABLE \\\`post\\\`\`); - } - -}`, - javascript: `const { MigrationInterface, QueryRunner } = require("typeorm"); - -module.exports = class testMigration1610975184784 { - name = 'testMigration1610975184784' +import { mysql } from "./generate/mysql" +import { postgres } from "./generate/postgres" +import { sqlite } from "./generate/sqlite" +import { oracle } from "./generate/oracle" +import { cockroachdb } from "./generate/cockroachdb" +import { mssql } from "./generate/mssql.js" - async up(queryRunner) { - await queryRunner.query(\`CREATE TABLE \\\`post\\\` (\\\`id\\\` int NOT NULL AUTO_INCREMENT, \\\`title\\\` varchar(255) NOT NULL, \\\`createdAt\\\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), PRIMARY KEY (\\\`id\\\`)) ENGINE=InnoDB\`); - } - - async down(queryRunner) { - await queryRunner.query(\`DROP TABLE \\\`post\\\`\`); - } -}`, - timestamp: `import {MigrationInterface, QueryRunner} from "typeorm"; - -export class testMigration1641163894670 implements MigrationInterface { - name = 'testMigration1641163894670' - - public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query(\`CREATE TABLE \\\`post\\\` (\\\`id\\\` int NOT NULL AUTO_INCREMENT, \\\`title\\\` varchar(255) NOT NULL, \\\`createdAt\\\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), PRIMARY KEY (\\\`id\\\`)) ENGINE=InnoDB\`); - } - - public async down(queryRunner: QueryRunner): Promise { - await queryRunner.query(\`DROP TABLE \\\`post\\\`\`); - } - -}`, +export const resultsTemplates: Record = { + mysql, + mariadb: mysql, + mssql, + sqlite, + "better-sqlite3": sqlite, + postgres, + oracle, + cockroachdb, } diff --git a/test/functional/connection/replication.ts b/test/functional/connection/replication.ts new file mode 100644 index 0000000000..e30bab37a2 --- /dev/null +++ b/test/functional/connection/replication.ts @@ -0,0 +1,217 @@ +import "reflect-metadata" +import "../../utils/test-setup" +import { expect } from "chai" +import { Post } from "./entity/Post" +import { Category } from "./entity/Category" +import { + closeTestingConnections, + createTestingConnections, + getTypeOrmConfig, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { QueryRunner } from "../../../src" + +const expectCurrentApplicationName = async ( + queryRunner: QueryRunner, + name: string, +) => { + const result = await queryRunner.query( + "SELECT current_setting('application_name') as application_name;", + ) + expect(result[0].application_name).to.equal(name) +} + +describe("Connection replication", () => { + describe("after connection is established successfully", function () { + let connection: DataSource + beforeEach(async () => { + const ormConfigConnectionOptionsArray = getTypeOrmConfig() + const postgres = ormConfigConnectionOptionsArray.find( + (options) => options.type == "postgres", + ) + if (!postgres) + throw new Error( + "need a postgres connection in the test connection options to test replication", + ) + + connection = ( + await createTestingConnections({ + entities: [Post, Category], + enabledDrivers: ["postgres"], + schemaCreate: true, + dropSchema: true, + driverSpecific: { + replication: { + master: { ...postgres, applicationName: "master" }, + slaves: [{ ...postgres, applicationName: "slave" }], + }, + }, + }) + )[0] + + if (!connection) return + + const post = new Post() + post.title = "TypeORM Intro" + + await connection + .createQueryBuilder() + .insert() + .into(Post) + .values(post) + .execute() + }) + + afterEach(() => closeTestingConnections([connection])) + + it("connection.isConnected should be true", () => { + if (!connection || connection.driver.options.type !== "postgres") { + return + } + connection.isInitialized.should.be.true + }) + + it("query runners should go to the master by default", async () => { + if (!connection || connection.driver.options.type !== "postgres") { + return + } + const queryRunner = connection.createQueryRunner() + expect(queryRunner.getReplicationMode()).to.equal("master") + + await expectCurrentApplicationName(queryRunner, "master") + await queryRunner.release() + }) + + it("query runners can have their replication mode overridden", async () => { + if (!connection || connection.driver.options.type !== "postgres") { + return + } + let queryRunner = connection.createQueryRunner("master") + queryRunner.getReplicationMode().should.equal("master") + await expectCurrentApplicationName(queryRunner, "master") + await queryRunner.release() + + queryRunner = connection.createQueryRunner("slave") + queryRunner.getReplicationMode().should.equal("slave") + await expectCurrentApplicationName(queryRunner, "slave") + await queryRunner.release() + }) + + it("read queries should go to the slaves by default", async () => { + if (!connection || connection.driver.options.type !== "postgres") { + return + } + const result = await connection.manager + .createQueryBuilder(Post, "post") + .select("id") + .addSelect( + "current_setting('application_name')", + "current_setting", + ) + .execute() + expect(result[0].current_setting).to.equal("slave") + }) + + it("write queries should go to the master", async () => { + if (!connection || connection.driver.options.type !== "postgres") { + return + } + const result = await connection.manager + .createQueryBuilder(Post, "post") + .insert() + .into(Post) + .values({ + title: () => "current_setting('application_name')", + }) + .returning("title") + .execute() + + expect(result.raw[0].title).to.equal("master") + }) + }) + + describe("with custom replication default mode", function () { + let connection: DataSource + beforeEach(async () => { + const ormConfigConnectionOptionsArray = getTypeOrmConfig() + const postgres = ormConfigConnectionOptionsArray.find( + (options) => options.type == "postgres", + ) + if (!postgres) + throw new Error( + "need a postgres connection in the test connection options to test replication", + ) + + connection = ( + await createTestingConnections({ + entities: [Post, Category], + enabledDrivers: ["postgres"], + schemaCreate: true, + dropSchema: true, + driverSpecific: { + replication: { + defaultMode: "master", + master: { ...postgres, applicationName: "master" }, + slaves: [{ ...postgres, applicationName: "slave" }], + }, + }, + }) + )[0] + + if (!connection) return + + const post = new Post() + post.title = "TypeORM Intro" + + await connection + .createQueryBuilder() + .insert() + .into(Post) + .values(post) + .execute() + }) + + afterEach(() => closeTestingConnections([connection])) + + it("query runners should go to the master by default", async () => { + if (!connection || connection.driver.options.type !== "postgres") { + return + } + const queryRunner = connection.createQueryRunner() + expect(queryRunner.getReplicationMode()).to.equal("master") + + await expectCurrentApplicationName(queryRunner, "master") + await queryRunner.release() + }) + + it("query runners can have their replication mode overridden", async () => { + if (!connection || connection.driver.options.type !== "postgres") { + return + } + let queryRunner = connection.createQueryRunner("master") + queryRunner.getReplicationMode().should.equal("master") + await expectCurrentApplicationName(queryRunner, "master") + await queryRunner.release() + + queryRunner = connection.createQueryRunner("slave") + queryRunner.getReplicationMode().should.equal("slave") + await expectCurrentApplicationName(queryRunner, "slave") + await queryRunner.release() + }) + + it("read queries should go to the master by default", async () => { + if (!connection || connection.driver.options.type !== "postgres") { + return + } + const result = await connection.manager + .createQueryBuilder(Post, "post") + .select("id") + .addSelect( + "current_setting('application_name')", + "current_setting", + ) + .execute() + expect(result[0].current_setting).to.equal("master") + }) + }) +}) diff --git a/test/functional/cube/postgres/cube-postgres.ts b/test/functional/cube/postgres/cube-postgres.ts index d5e81a68cf..fb08fc15df 100644 --- a/test/functional/cube/postgres/cube-postgres.ts +++ b/test/functional/cube/postgres/cube-postgres.ts @@ -111,7 +111,7 @@ describe("cube-postgres", () => { // to be working on Postgres version >=10.6. const [{ version }] = await connection.query("SELECT version()") const semverArray = version - .replace(/^PostgreSQL ([\d\.]+) .*$/, "$1") + .replace(/^PostgreSQL ([\d.]+) .*$/, "$1") .split(".") .map(Number) if (!(semverArray[0] >= 10 && semverArray[1] >= 6)) { diff --git a/test/functional/database-schema/column-types/oracle/column-types-oracle.ts b/test/functional/database-schema/column-types/oracle/column-types-oracle.ts index 254a253bb9..68ac04b562 100644 --- a/test/functional/database-schema/column-types/oracle/column-types-oracle.ts +++ b/test/functional/database-schema/column-types/oracle/column-types-oracle.ts @@ -27,6 +27,8 @@ describe("database schema > column types > oracle", () => { const postRepository = connection.getRepository(Post) const queryRunner = connection.createQueryRunner() const table = await queryRunner.getTable("post") + const simpleJson = { id: 1, name: "simple-json" } + const json = { id: 1, name: "json" } await queryRunner.release() const post = new Post() @@ -60,12 +62,14 @@ describe("database schema > column types > oracle", () => { post.clob = "This is clob" post.nclob = "This is nclob" post.simpleArray = ["A", "B", "C"] + post.simpleJson = simpleJson + post.json = json + await postRepository.save(post) const loadedPost = (await postRepository.findOneBy({ id: 1, }))! - loadedPost.id.should.be.equal(post.id) loadedPost.name.should.be.equal(post.name) loadedPost.number.should.be.equal(post.number) loadedPost.numeric.should.be.equal(post.numeric) @@ -105,6 +109,8 @@ describe("database schema > column types > oracle", () => { loadedPost.simpleArray[1].should.be.equal(post.simpleArray[1]) loadedPost.simpleArray[2].should.be.equal(post.simpleArray[2]) + loadedPost.simpleJson.should.be.deep.equal(simpleJson) + loadedPost.json.should.be.deep.equal(json) table!.findColumnByName("id")!.type.should.be.equal("number") table! .findColumnByName("name")! @@ -158,6 +164,10 @@ describe("database schema > column types > oracle", () => { table! .findColumnByName("simpleArray")! .type.should.be.equal("clob") + table! + .findColumnByName("simpleJson")! + .type.should.be.equal("clob") + table!.findColumnByName("json")!.type.should.be.equal("json") }), )) diff --git a/test/functional/database-schema/column-types/oracle/entity/Post.ts b/test/functional/database-schema/column-types/oracle/entity/Post.ts index 0ba832a0d3..4486f6bd23 100644 --- a/test/functional/database-schema/column-types/oracle/entity/Post.ts +++ b/test/functional/database-schema/column-types/oracle/entity/Post.ts @@ -98,10 +98,15 @@ export class Post { @Column("nclob") nclob: string + @Column("json") + json: any // ------------------------------------------------------------------------- // TypeOrm Specific Type // ------------------------------------------------------------------------- @Column("simple-array") simpleArray: string[] + + @Column("simple-json") + simpleJson: any } diff --git a/test/functional/database-schema/column-types/postgres/column-types-postgres.ts b/test/functional/database-schema/column-types/postgres/column-types-postgres.ts index 776884f380..36d859a9fe 100644 --- a/test/functional/database-schema/column-types/postgres/column-types-postgres.ts +++ b/test/functional/database-schema/column-types/postgres/column-types-postgres.ts @@ -98,6 +98,15 @@ describe("database schema > column types > postgres", () => { post.tstzrange = "[2010-01-01 14:30:00+00,2010-01-01 15:30:00+00)" post.daterange = "[2010-01-01,2010-01-05)" + post.int4multirange = "{[10,20),[25,30)}" + post.int8multirange = "{[200000,500000),[600000,700000)}" + post.nummultirange = "{(10.5,20.2),(30.5,40.2)}" + post.tsmultirange = + '{["2010-01-01 14:30:00","2010-01-01 15:30:00"),["2010-01-01 16:30:00","2010-01-01 17:30:00")}' + post.tstzmultirange = + '{["2010-01-01 14:30:00+00","2010-01-01 15:30:00+00"),["2010-01-01 16:30:00+00","2010-01-01 17:30:00+00")}' + post.datemultirange = + "{[2010-01-01,2010-01-05),[2010-01-10,2010-01-15)}" post.xml = "Manual..." post.array = [1, 2, 3] @@ -185,6 +194,12 @@ describe("database schema > column types > postgres", () => { `["2010-01-01 14:30:00+00","2010-01-01 15:30:00+00")`, ) loadedPost.daterange.should.be.eql(post.daterange) + loadedPost.int4multirange.should.be.eql(post.int4multirange) + loadedPost.int8multirange.should.be.eql(post.int8multirange) + loadedPost.nummultirange.should.be.eql(post.nummultirange) + loadedPost.tsmultirange.should.be.eql(post.tsmultirange) + loadedPost.tstzmultirange.should.be.eql(post.tstzmultirange) + loadedPost.datemultirange.should.be.eql(post.datemultirange) loadedPost.xml.should.be.equal(post.xml) loadedPost.array[0].should.be.equal(post.array[0]) loadedPost.array[1].should.be.equal(post.array[1]) @@ -322,6 +337,24 @@ describe("database schema > column types > postgres", () => { table! .findColumnByName("daterange")! .type.should.be.equal("daterange") + table! + .findColumnByName("int4multirange")! + .type.should.be.equal("int4multirange") + table! + .findColumnByName("int8multirange")! + .type.should.be.equal("int8multirange") + table! + .findColumnByName("nummultirange")! + .type.should.be.equal("nummultirange") + table! + .findColumnByName("tsmultirange")! + .type.should.be.equal("tsmultirange") + table! + .findColumnByName("tstzmultirange")! + .type.should.be.equal("tstzmultirange") + table! + .findColumnByName("datemultirange")! + .type.should.be.equal("datemultirange") table! .findColumnByName("array")! .type.should.be.equal("integer") diff --git a/test/functional/database-schema/column-types/postgres/entity/Post.ts b/test/functional/database-schema/column-types/postgres/entity/Post.ts index 99bcaa85b7..333e19f0e0 100644 --- a/test/functional/database-schema/column-types/postgres/entity/Post.ts +++ b/test/functional/database-schema/column-types/postgres/entity/Post.ts @@ -234,6 +234,28 @@ export class Post { @Column("daterange") daterange: string + // ------------------------------------------------------------------------- + // Multirange Type + // ------------------------------------------------------------------------- + + @Column("int4multirange") + int4multirange: string + + @Column("int8multirange") + int8multirange: string + + @Column("nummultirange") + nummultirange: string + + @Column("tsmultirange") + tsmultirange: string + + @Column("tstzmultirange") + tstzmultirange: string + + @Column("datemultirange") + datemultirange: string + // ------------------------------------------------------------------------- // Array Type // ------------------------------------------------------------------------- diff --git a/test/functional/database-schema/enums/entity/EnumEntity.ts b/test/functional/database-schema/enums/entity/EnumEntity.ts index 3d9cb9fa6c..aefcfec4de 100644 --- a/test/functional/database-schema/enums/entity/EnumEntity.ts +++ b/test/functional/database-schema/enums/entity/EnumEntity.ts @@ -81,7 +81,7 @@ export class EnumEntity { type: "enum", enum: StringEnum, }) - enumWithoutdefault: StringEnum + enumWithoutDefault: StringEnum @Column({ type: "enum", diff --git a/test/functional/database-schema/enums/enums.ts b/test/functional/database-schema/enums/enums.ts index 1c58d4ee5c..ea7540999f 100644 --- a/test/functional/database-schema/enums/enums.ts +++ b/test/functional/database-schema/enums/enums.ts @@ -32,7 +32,7 @@ describe("database schema > enums", () => { const enumEntity = new EnumEntity() enumEntity.id = 1 - enumEntity.enumWithoutdefault = StringEnum.EDITOR + enumEntity.enumWithoutDefault = StringEnum.EDITOR await enumEntityRepository.save(enumEntity) const loadedEnumEntity = await enumEntityRepository.findOneBy({ @@ -67,7 +67,7 @@ describe("database schema > enums", () => { enumEntity.heterogeneousEnum = HeterogeneousEnum.YES enumEntity.arrayDefinedStringEnum = "editor" enumEntity.arrayDefinedNumericEnum = 13 - enumEntity.enumWithoutdefault = StringEnum.ADMIN + enumEntity.enumWithoutDefault = StringEnum.ADMIN await enumEntityRepository.save(enumEntity) const loadedEnumEntity = await enumEntityRepository.findOneBy({ @@ -95,6 +95,8 @@ describe("database schema > enums", () => { .createSchemaBuilder() .log() + console.log(sqlInMemory.upQueries) + sqlInMemory.upQueries.length.should.be.equal(0) sqlInMemory.downQueries.length.should.be.equal(0) }), diff --git a/test/functional/entity-subscriber/query-data/query-data.ts b/test/functional/entity-subscriber/query-data/query-data.ts index ad7be58df2..66da306482 100644 --- a/test/functional/entity-subscriber/query-data/query-data.ts +++ b/test/functional/entity-subscriber/query-data/query-data.ts @@ -16,7 +16,6 @@ describe("entity subscriber > query data", () => { subscribers: [MockSubscriber], dropSchema: true, schemaCreate: true, - enabledDrivers: ["sqlite"], })), ) beforeEach(() => { diff --git a/test/functional/entity-subscriber/transaction-flow/entity-subscriber-transaction-flow.ts b/test/functional/entity-subscriber/transaction-flow/entity-subscriber-transaction-flow.ts index 4834abcbb8..3556327b03 100644 --- a/test/functional/entity-subscriber/transaction-flow/entity-subscriber-transaction-flow.ts +++ b/test/functional/entity-subscriber/transaction-flow/entity-subscriber-transaction-flow.ts @@ -7,41 +7,49 @@ import { closeTestingConnections, createTestingConnections, } from "../../../utils/test-utils" +import { Example } from "../query-data/entity/Example" import sinon from "sinon" import { expect } from "chai" describe("entity subscriber > transaction flow", () => { let beforeTransactionStart = sinon.spy() let afterTransactionStart = sinon.spy() + let afterInsert = sinon.spy() let beforeTransactionCommit = sinon.spy() let afterTransactionCommit = sinon.spy() let beforeTransactionRollback = sinon.spy() let afterTransactionRollback = sinon.spy() + let afterInsertQueryRunnerData: any = undefined @EventSubscriber() class PostSubscriber implements EntitySubscriberInterface { beforeTransactionStart() { - if (beforeTransactionStart) beforeTransactionStart() + if (beforeTransactionStart) beforeTransactionStart(arguments) } afterTransactionStart() { - if (afterTransactionStart) afterTransactionStart() + if (afterTransactionStart) afterTransactionStart(arguments) + } + + afterInsert() { + afterInsertQueryRunnerData = arguments[0].queryRunner.data + if (afterInsert) afterInsert(arguments) } beforeTransactionCommit() { - if (beforeTransactionCommit) beforeTransactionCommit() + if (beforeTransactionCommit) beforeTransactionCommit(arguments) } afterTransactionCommit() { - if (afterTransactionCommit) afterTransactionCommit() + if (afterTransactionCommit) afterTransactionCommit(arguments) } beforeTransactionRollback() { - if (beforeTransactionRollback) beforeTransactionRollback() + if (beforeTransactionRollback) beforeTransactionRollback(arguments) } afterTransactionRollback() { - if (afterTransactionRollback) afterTransactionRollback() + if (afterTransactionRollback) afterTransactionRollback(arguments) } } @@ -49,6 +57,7 @@ describe("entity subscriber > transaction flow", () => { before( async () => (connections = await createTestingConnections({ + entities: [Example], subscribers: [PostSubscriber], dropSchema: true, schemaCreate: true, @@ -61,8 +70,9 @@ describe("entity subscriber > transaction flow", () => { if ( connection.driver.options.type === "mssql" || connection.driver.options.type === "spanner" - ) - return + ) { + continue + } beforeTransactionStart.resetHistory() afterTransactionStart.resetHistory() @@ -75,7 +85,7 @@ describe("entity subscriber > transaction flow", () => { isolationLevel = "READ COMMITTED" } - const queryRunner = await connection.createQueryRunner() + const queryRunner = connection.createQueryRunner() if ( connection.driver.options.type === "aurora-postgres" || @@ -147,13 +157,14 @@ describe("entity subscriber > transaction flow", () => { if ( connection.driver.options.type === "mssql" || connection.driver.options.type === "spanner" - ) - return + ) { + continue + } beforeTransactionCommit.resetHistory() afterTransactionCommit.resetHistory() - const queryRunner = await connection.createQueryRunner() + const queryRunner = connection.createQueryRunner() await queryRunner.startTransaction() if ( @@ -215,13 +226,14 @@ describe("entity subscriber > transaction flow", () => { if ( connection.driver.options.type === "mssql" || connection.driver.options.type === "spanner" - ) - return + ) { + continue + } beforeTransactionRollback.resetHistory() afterTransactionRollback.resetHistory() - const queryRunner = await connection.createQueryRunner() + const queryRunner = connection.createQueryRunner() await queryRunner.startTransaction() if ( @@ -280,4 +292,28 @@ describe("entity subscriber > transaction flow", () => { await queryRunner.release() } }) + + it("query data in subscribers", async () => { + const example = new Example() + const data = { hello: ["world"] } + + for (let connection of connections) { + beforeTransactionCommit.resetHistory() + afterTransactionCommit.resetHistory() + afterInsert.resetHistory() + + afterInsertQueryRunnerData = undefined + const queryRunner = connection.createQueryRunner() + await queryRunner.startTransaction() + + await queryRunner.manager.save(example, { data }) + + await queryRunner.commitTransaction() + + expect(afterInsertQueryRunnerData).to.eql(data) + + afterInsertQueryRunnerData = undefined + await queryRunner.release() + } + }) }) diff --git a/test/functional/multi-database/multi-database-basic-functionality/multi-database-basic-functionality.ts b/test/functional/multi-database/multi-database-basic-functionality/multi-database-basic-functionality.ts index 8e491b2953..e76e86040c 100644 --- a/test/functional/multi-database/multi-database-basic-functionality/multi-database-basic-functionality.ts +++ b/test/functional/multi-database/multi-database-basic-functionality/multi-database-basic-functionality.ts @@ -100,7 +100,7 @@ describe("multi-database > basic-functionality", () => { const expectedMainPath = path.join( tempPath, (connections[0].options.database as string).match( - /^.*[\\|\/](?[^\\|\/]+)$/, + /^.*[\\|/](?[^\\|/]+)$/, )!.groups!["filename"], ) diff --git a/test/functional/naming-strategy/legacy-oracle-naming-strategy/create-table/create-table.ts b/test/functional/naming-strategy/legacy-oracle-naming-strategy/create-table/create-table.ts deleted file mode 100644 index e939c75693..0000000000 --- a/test/functional/naming-strategy/legacy-oracle-naming-strategy/create-table/create-table.ts +++ /dev/null @@ -1,30 +0,0 @@ -import "reflect-metadata" -import { expect } from "chai" -import { - closeTestingConnections, - createTestingConnections, - reloadTestingDatabases, -} from "../../../../utils/test-utils" -import { DataSource } from "../../../../../src/data-source" - -describe("LegacyOracleNamingStrategy > create table using default naming strategy", () => { - let connections: DataSource[] - before( - async () => - (connections = await createTestingConnections({ - entities: [__dirname + "/entity/*{.js,.ts}"], - enabledDrivers: ["oracle"], - })), - ) - // without reloadTestingDatabases(connections) -> tables should be created later - after(() => closeTestingConnections(connections)) - - it("should not create the table and fail due to ORA-00972", () => - Promise.all( - connections.map(async (connection) => { - await expect( - reloadTestingDatabases([connection]), - ).to.be.rejectedWith(/ORA-00972/gi) - }), - )) -}) diff --git a/test/functional/query-builder/comment/query-builder-comment.ts b/test/functional/query-builder/comment/query-builder-comment.ts index f51f8a0942..27f0b40281 100644 --- a/test/functional/query-builder/comment/query-builder-comment.ts +++ b/test/functional/query-builder/comment/query-builder-comment.ts @@ -24,10 +24,10 @@ describe("query builder > comment", () => { connections.map(async (connection) => { const sql = connection.manager .createQueryBuilder(Test, "test") - .comment("Hello World */") + .comment("Hello World */ */") .getSql() - expect(sql).to.match(/^\/\* Hello World \*\/ /) + expect(sql).to.match(/^\/\* Hello World \*\/ /) }), )) diff --git a/test/functional/query-builder/cte/recursive-cte.ts b/test/functional/query-builder/cte/recursive-cte.ts index 0e79a273c6..0fa929f698 100644 --- a/test/functional/query-builder/cte/recursive-cte.ts +++ b/test/functional/query-builder/cte/recursive-cte.ts @@ -1,5 +1,5 @@ import { expect } from "chai" -import { Connection } from "../../../../src" +import { DataSource } from "../../../../src" import { closeTestingConnections, createTestingConnections, @@ -8,43 +8,60 @@ import { import { filterByCteCapabilities } from "./helpers" describe("query builder > cte > recursive", () => { - let connections: Connection[] + let dataSources: DataSource[] before( async () => - (connections = await createTestingConnections({ + (dataSources = await createTestingConnections({ entities: [__dirname + "/entity/*{.js,.ts}"], schemaCreate: true, dropSchema: true, })), ) - beforeEach(() => reloadTestingDatabases(connections)) - after(() => closeTestingConnections(connections)) + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) it("should work with simple recursive query", () => Promise.all( - connections + dataSources .filter(filterByCteCapabilities("enabled")) - .map(async (connection) => { + .map(async (dataSource) => { // CTE cannot reference itself in Spanner - if (connection.options.type === "spanner") return + if (dataSource.options.type === "spanner") return - const qb = await connection - .createQueryBuilder() - .select([]) - .from("cte", "cte") - .addCommonTableExpression( - ` - SELECT 1 - UNION ALL - SELECT cte.foo + 1 - FROM cte - WHERE cte.foo < 10 - `, - "cte", - { recursive: true, columnNames: ["foo"] }, - ) - .addSelect("cte.foo", "foo") - .getRawMany<{ foo: number }>() + let qb: { foo: number }[] + if (dataSource.options.type === "oracle") { + qb = await dataSource + .createQueryBuilder() + .select([]) + .from("cte", "cte") + .addCommonTableExpression( + `SELECT 1 FROM "DUAL"` + + ` UNION ALL` + + ` SELECT "cte"."foo" + 1` + + ` FROM "cte"` + + ` WHERE "cte"."foo" < 10`, + "cte", + { recursive: true, columnNames: ["foo"] }, + ) + .addSelect(`"cte"."foo"`, "foo") + .getRawMany<{ foo: number }>() + } else { + qb = await dataSource + .createQueryBuilder() + .select([]) + .from("cte", "cte") + .addCommonTableExpression( + `SELECT 1` + + ` UNION ALL` + + ` SELECT cte.foo + 1` + + ` FROM cte` + + ` WHERE cte.foo < 10`, + "cte", + { recursive: true, columnNames: ["foo"] }, + ) + .addSelect("cte.foo", "foo") + .getRawMany<{ foo: number }>() + } expect(qb).to.have.length(10) }), diff --git a/test/functional/query-builder/cte/simple-cte.ts b/test/functional/query-builder/cte/simple-cte.ts index f83814d5a2..9c8e899f46 100644 --- a/test/functional/query-builder/cte/simple-cte.ts +++ b/test/functional/query-builder/cte/simple-cte.ts @@ -5,53 +5,62 @@ import { closeTestingConnections, reloadTestingDatabases, } from "../../../utils/test-utils" -import { Connection } from "../../../../src/connection/Connection" import { Foo } from "./entity/foo" import { filterByCteCapabilities } from "./helpers" +import { DataSource } from "../../../../src/index.js" describe("query builder > cte > simple", () => { - let connections: Connection[] + let dataSources: DataSource[] before( async () => - (connections = await createTestingConnections({ + (dataSources = await createTestingConnections({ entities: [__dirname + "/entity/*{.js,.ts}"], schemaCreate: true, dropSchema: true, })), ) - beforeEach(() => reloadTestingDatabases(connections)) - after(() => closeTestingConnections(connections)) + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) it("show allow select from CTE", () => Promise.all( - connections + dataSources .filter(filterByCteCapabilities("enabled")) - .map(async (connection) => { - await connection + .map(async (dataSource) => { + await dataSource .getRepository(Foo) .insert( [1, 2, 3].map((i) => ({ id: i, bar: String(i) })), ) - const cteQuery = connection + + let cteSelection = + dataSource.driver.options.type === "oracle" + ? `"foo"."bar"` + : `foo.bar` + + const cteQuery = dataSource .createQueryBuilder() .select() - .addSelect(`foo.bar`, "bar") + .addSelect(cteSelection, "bar") .from(Foo, "foo") - .where(`foo.bar = :value`, { value: "2" }) + .where(`${cteSelection} = :value`, { value: "2" }) // Spanner does not support column names in CTE const cteOptions = - connection.driver.options.type === "spanner" + dataSource.driver.options.type === "spanner" ? undefined : { columnNames: ["raz"], } - const cteSelection = - connection.driver.options.type === "spanner" + + cteSelection = + dataSource.driver.options.type === "spanner" ? "qaz.bar" + : dataSource.driver.options.type === "oracle" + ? `"qaz"."raz"` : "qaz.raz" - const qb = await connection + const qb = dataSource .createQueryBuilder() .addCommonTableExpression(cteQuery, "qaz", cteOptions) .from("qaz", "qaz") @@ -64,37 +73,59 @@ describe("query builder > cte > simple", () => { it("should allow join with CTE", () => Promise.all( - connections + dataSources .filter(filterByCteCapabilities("enabled")) - .map(async (connection) => { - await connection + .map(async (dataSource) => { + await dataSource .getRepository(Foo) .insert( [1, 2, 3].map((i) => ({ id: i, bar: String(i) })), ) - const cteQuery = connection + + let cteSelection = + dataSource.driver.options.type === "oracle" + ? `"foo"."bar"` + : `foo.bar` + + const cteQuery = dataSource .createQueryBuilder() .select() - .addSelect("bar", "bar") + .addSelect( + dataSource.driver.options.type === "oracle" + ? `"bar"` + : "bar", + "bar", + ) .from(Foo, "foo") - .where(`foo.bar = '2'`) + .where(`${cteSelection} = '2'`) // Spanner does not support column names in CTE const cteOptions = - connection.driver.options.type === "spanner" + dataSource.driver.options.type === "spanner" ? undefined : { columnNames: ["raz"], } - const cteSelection = - connection.driver.options.type === "spanner" + + cteSelection = + dataSource.driver.options.type === "spanner" ? "qaz.bar" + : dataSource.driver.options.type === "oracle" + ? `"qaz"."raz"` : "qaz.raz" - const results = await connection + const results = await dataSource .createQueryBuilder(Foo, "foo") .addCommonTableExpression(cteQuery, "qaz", cteOptions) - .innerJoin("qaz", "qaz", `${cteSelection} = foo.bar`) + .innerJoin( + "qaz", + "qaz", + `${cteSelection} = ${ + dataSource.driver.options.type === "oracle" + ? `"foo"."bar"` + : `foo.bar` + }`, + ) .getMany() expect(results).to.have.length(1) @@ -107,7 +138,7 @@ describe("query builder > cte > simple", () => { it("should allow to use INSERT with RETURNING clause in CTE", () => Promise.all( - connections + dataSources .filter(filterByCteCapabilities("writable")) .map(async (connection) => { const bar = Math.random().toString() @@ -138,14 +169,14 @@ describe("query builder > cte > simple", () => { it("should allow string for CTE", () => Promise.all( - connections + dataSources .filter(filterByCteCapabilities("enabled")) - .map(async (connection) => { + .map(async (dataSource) => { // Spanner does not support column names in CTE - let results: { row: any }[] = [] - if (connection.driver.options.type === "spanner") { - results = await connection + let results: { row: any }[] + if (dataSource.driver.options.type === "spanner") { + results = await dataSource .createQueryBuilder() .select() .addCommonTableExpression( @@ -159,8 +190,24 @@ describe("query builder > cte > simple", () => { .from("cte", "cte") .addSelect("foo", "row") .getRawMany<{ row: any }>() + } else if (dataSource.driver.options.type === "oracle") { + results = await dataSource + .createQueryBuilder() + .select() + .addCommonTableExpression( + ` + SELECT 1 FROM DUAL + UNION + SELECT 2 FROM DUAL + `, + "cte", + { columnNames: ["foo"] }, + ) + .from("cte", "cte") + .addSelect(`"foo"`, "row") + .getRawMany<{ row: any }>() } else { - results = await connection + results = await dataSource .createQueryBuilder() .select() .addCommonTableExpression( diff --git a/test/functional/query-builder/exists/query-builder-exists.ts b/test/functional/query-builder/exists/query-builder-exists.ts index d782e0094a..96e19432d1 100644 --- a/test/functional/query-builder/exists/query-builder-exists.ts +++ b/test/functional/query-builder/exists/query-builder-exists.ts @@ -7,7 +7,7 @@ import { DataSource } from "../../../../src/data-source/DataSource" import { expect } from "chai" import { Test } from "./entity/Test" -describe("query builder > exist", () => { +describe("query builder > exists", () => { let connections: DataSource[] before( async () => @@ -25,8 +25,8 @@ describe("query builder > exist", () => { connections.map(async (connection) => { const repo = connection.getRepository(Test) - const exist = await repo.exist() - expect(exist).to.be.equal(false) + const exists = await repo.exists() + expect(exists).to.be.equal(false) }), )) @@ -38,8 +38,8 @@ describe("query builder > exist", () => { await repo.save({ id: "ok" }) await repo.save({ id: "nok" }) - const exist = await repo.exist() - expect(exist).to.be.equal(true) + const exists = await repo.exists() + expect(exists).to.be.equal(true) }), )) }) diff --git a/test/functional/query-builder/isolated-where/entity/User.ts b/test/functional/query-builder/isolated-where/entity/User.ts new file mode 100644 index 0000000000..8958728bef --- /dev/null +++ b/test/functional/query-builder/isolated-where/entity/User.ts @@ -0,0 +1,18 @@ +import { Entity } from "../../../../../src/decorator/entity/Entity" +import { PrimaryGeneratedColumn } from "../../../../../src/decorator/columns/PrimaryGeneratedColumn" +import { Column } from "../../../../../src/decorator/columns/Column" + +@Entity() +export class User { + @PrimaryGeneratedColumn() + id: number + + @Column() + firstName: string + + @Column() + lastName: string + + @Column() + isAdmin: boolean +} diff --git a/test/functional/query-builder/isolated-where/query-builder-isolated-where.ts b/test/functional/query-builder/isolated-where/query-builder-isolated-where.ts new file mode 100644 index 0000000000..dc5a074511 --- /dev/null +++ b/test/functional/query-builder/isolated-where/query-builder-isolated-where.ts @@ -0,0 +1,48 @@ +import "../../../utils/test-setup" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../../utils/test-utils" +import { expect } from "chai" +import { DataSource } from "../../../../src" +import { User } from "./entity/User" + +describe("query builder > isolated-where", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [User], + enabledDrivers: ["sqlite"], + isolateWhereStatements: true, + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should correctly apply brackets when where statement isolation is enabled", () => + Promise.all( + connections.map(async (connection) => { + const sql = connection.manager + .createQueryBuilder(User, "user") + .where("user.id = :userId", { userId: "user-id" }) + .andWhere( + "user.firstName = :search OR user.lastName = :search", + { + search: "search-term", + }, + ) + .disableEscaping() + .getSql() + + expect(sql).to.be.equal( + "SELECT user.id AS user_id, user.firstName AS user_firstName, " + + "user.lastName AS user_lastName, user.isAdmin AS user_isAdmin " + + "FROM user user " + + "WHERE user.id = ? " + + "AND (user.firstName = ? OR user.lastName = ?)", + ) + }), + )) +}) diff --git a/test/functional/query-builder/locking/query-builder-locking.ts b/test/functional/query-builder/locking/query-builder-locking.ts index b141ff2064..84b2ae82f9 100644 --- a/test/functional/query-builder/locking/query-builder-locking.ts +++ b/test/functional/query-builder/locking/query-builder-locking.ts @@ -975,7 +975,10 @@ describe("query builder > locking", () => { .createQueryBuilder(Post, "post") .leftJoin("post.author", "user") .setLock("pessimistic_write") - .getOne(), + .getOne() + .should.be.rejectedWith( + "FOR UPDATE cannot be applied to the nullable side of an outer join", + ), ]) }) } diff --git a/test/functional/query-runner/stream.ts b/test/functional/query-runner/stream.ts index 5fda9c6965..366501d104 100644 --- a/test/functional/query-runner/stream.ts +++ b/test/functional/query-runner/stream.ts @@ -14,11 +14,12 @@ describe("query runner > stream", () => { connections = await createTestingConnections({ entities: [Book], enabledDrivers: [ - "mysql", "cockroachdb", - "postgres", "mssql", + "mysql", "oracle", + "postgres", + "sap", "spanner", ], }) diff --git a/test/functional/repository/aggregate-methods/repository-aggregate-methods.ts b/test/functional/repository/aggregate-methods/repository-aggregate-methods.ts index c65fee589d..fd0a061aef 100644 --- a/test/functional/repository/aggregate-methods/repository-aggregate-methods.ts +++ b/test/functional/repository/aggregate-methods/repository-aggregate-methods.ts @@ -3,87 +3,126 @@ import { closeTestingConnections, createTestingConnections, } from "../../../utils/test-utils" -import { Repository } from "../../../../src/repository/Repository" -import { DataSource } from "../../../../src/data-source/DataSource" import { Post } from "./entity/Post" -import { LessThan } from "../../../../src" +import { LessThan, DataSource } from "../../../../src" import { expect } from "chai" describe("repository > aggregate methods", () => { - debugger let connections: DataSource[] - let repository: Repository - before(async () => { connections = await createTestingConnections({ entities: [Post], schemaCreate: true, dropSchema: true, }) - repository = connections[0].getRepository(Post) - for (let i = 0; i < 100; i++) { - const post = new Post() - post.id = i - post.counter = i + 1 - await repository.save(post) - } + + await Promise.all( + connections.map(async (connection) => { + for (let i = 0; i < 100; i++) { + const post = new Post() + post.id = i + post.counter = i + 1 + await connection.getRepository(Post).save(post) + } + }), + ) }) after(() => closeTestingConnections(connections)) describe("sum", () => { - it("should return the aggregate sum", async () => { - const sum = await repository.sum("counter") - expect(sum).to.equal(5050) - }) + it("should return the aggregate sum", () => + Promise.all( + connections.map(async (connection) => { + const sum = await connection + .getRepository(Post) + .sum("counter") + expect(sum).to.equal(5050) + }), + )) - it("should return null when 0 rows match the query", async () => { - const sum = await repository.sum("counter", { id: LessThan(0) }) - expect(sum).to.be.null - }) + it("should return null when 0 rows match the query", () => + Promise.all( + connections.map(async (connection) => { + const sum = await connection + .getRepository(Post) + .sum("counter", { id: LessThan(0) }) + expect(sum).to.be.null + }), + )) }) describe("average", () => { - it("should return the aggregate average", async () => { - const average = await repository.average("counter") - // Some RDBMSs (e.g. SQL Server) will return an int when averaging an int column, so either - // answer is acceptable. - expect([50, 50.5]).to.include(average) - }) + it("should return the aggregate average", () => + Promise.all( + connections.map(async (connection) => { + const average = await connection + .getRepository(Post) + .average("counter") + // Some RDBMSs (e.g. SQL Server) will return an int when averaging an int column, so either + // answer is acceptable. + expect([50, 50.5]).to.include(average) + }), + )) - it("should return null when 0 rows match the query", async () => { - const average = await repository.average("counter", { - id: LessThan(0), - }) - expect(average).to.be.null - }) + it("should return null when 0 rows match the query", () => + Promise.all( + connections.map(async (connection) => { + const average = await connection + .getRepository(Post) + .average("counter", { + id: LessThan(0), + }) + expect(average).to.be.null + }), + )) }) describe("minimum", () => { - it("should return the aggregate minimum", async () => { - const minimum = await repository.minimum("counter") - expect(minimum).to.equal(1) - }) + it("should return the aggregate minimum", () => + Promise.all( + connections.map(async (connection) => { + const minimum = await connection + .getRepository(Post) + .minimum("counter") + expect(minimum).to.equal(1) + }), + )) - it("should return null when 0 rows match the query", async () => { - const minimum = await repository.minimum("counter", { - id: LessThan(0), - }) - expect(minimum).to.be.null - }) + it("should return null when 0 rows match the query", () => + Promise.all( + connections.map(async (connection) => { + const minimum = await connection + .getRepository(Post) + .minimum("counter", { + id: LessThan(0), + }) + expect(minimum).to.be.null + }), + )) }) describe("maximum", () => { - it("should return the aggregate maximum", async () => { - const maximum = await repository.maximum("counter") - expect(maximum).to.equal(100) - }) + it("should return the aggregate maximum", () => + Promise.all( + connections.map(async (connection) => { + const maximum = await connection + .getRepository(Post) + .maximum("counter") + expect(maximum).to.equal(100) + }), + )) - it("should return null when 0 rows match the query", async () => { - const maximum = await repository.maximum("counter", { - id: LessThan(0), - }) - expect(maximum).to.be.null - }) + it("should return null when 0 rows match the query", () => + Promise.all( + connections.map(async (connection) => { + const maximum = await connection + .getRepository(Post) + .maximum("counter", { + id: LessThan(0), + }) + expect(maximum).to.be.null + }), + )) }) }) diff --git a/test/functional/repository/basic-methods/model-schema/QuestionSchema.ts b/test/functional/repository/basic-methods/model-schema/QuestionSchema.ts index 45731a1a93..f87509e99e 100644 --- a/test/functional/repository/basic-methods/model-schema/QuestionSchema.ts +++ b/test/functional/repository/basic-methods/model-schema/QuestionSchema.ts @@ -14,7 +14,7 @@ export default { nullable: false, }, }, - target: function Question() { + target: function Question(this: any) { this.type = "question" }, } diff --git a/test/functional/repository/find-methods/repostiory-find-methods.ts b/test/functional/repository/find-methods/repostiory-find-methods.ts index e0d59b2c09..39de95ad5d 100644 --- a/test/functional/repository/find-methods/repostiory-find-methods.ts +++ b/test/functional/repository/find-methods/repostiory-find-methods.ts @@ -1,5 +1,5 @@ import "reflect-metadata" -import { expect } from "chai" +import { assert, expect } from "chai" import { closeTestingConnections, createTestingConnections, @@ -149,8 +149,8 @@ describe("repository > find methods", () => { await postRepository.save(post) } - // check exist method - const exists = await postRepository.exist({ + // check exists method + const exists = await postRepository.exists({ order: { id: "ASC" }, }) exists.should.be.equal(true) @@ -169,8 +169,8 @@ describe("repository > find methods", () => { await postRepository.save(post) } - // check exist method - const exists = await postRepository.exist({ + // check exists method + const exists = await postRepository.exists({ where: { categoryName: "odd" }, order: { id: "ASC" }, }) @@ -191,8 +191,8 @@ describe("repository > find methods", () => { await postRepository.save(post) } - // check exist method - const exists = await postRepository.exist({ + // check exists method + const exists = await postRepository.exists({ where: { categoryName: "odd", isNew: true }, order: { id: "ASC" }, }) @@ -215,8 +215,8 @@ describe("repository > find methods", () => { await postRepository.save(post) } - // check exist method - const exists = await postRepository.exist() + // check exists method + const exists = await postRepository.exists() exists.should.be.equal(true) }), )) @@ -236,8 +236,8 @@ describe("repository > find methods", () => { await postRepository.save(post) } - // check exist method - const exists = await postRepository.exist({ + // check exists method + const exists = await postRepository.exists({ where: { categoryName: "even", isNew: true }, skip: 1, take: 2, @@ -751,14 +751,20 @@ describe("repository > find methods", () => { loadedUser!.firstName.should.be.equal("name #0") loadedUser!.secondName.should.be.equal("Doe") - await userRepository - .findOneOrFail({ - where: { - id: 1, - secondName: "Dorian", - }, - }) - .should.eventually.be.rejectedWith(EntityNotFoundError) + const options = { + where: { + id: 1, + secondName: "Dorian", + }, + } + try { + await userRepository.findOneOrFail(options) + assert.fail("Should have thrown an error.") + } catch (err) { + expect(err).to.be.an.instanceOf(EntityNotFoundError) + expect(err).to.have.property("entityClass", "User") + expect(err).to.have.property("criteria", options) + } }), )) diff --git a/test/functional/repository/find-options-locking/find-options-locking.ts b/test/functional/repository/find-options-locking/find-options-locking.ts index 233eb369a3..16886f8386 100644 --- a/test/functional/repository/find-options-locking/find-options-locking.ts +++ b/test/functional/repository/find-options-locking/find-options-locking.ts @@ -11,6 +11,7 @@ import { OptimisticLockCanNotBeUsedError, OptimisticLockVersionMismatchError, PessimisticLockTransactionRequiredError, + QueryRunner, } from "../../../../src" import { PostWithVersion } from "./entity/PostWithVersion" import { expect } from "chai" @@ -135,7 +136,9 @@ describe("repository > find options > locking", () => { const originalQuery = entityManager.queryRunner!.query.bind( entityManager.queryRunner, ) - entityManager.queryRunner!.query = (...args: any[]) => { + entityManager.queryRunner!.query = ( + ...args: Parameters + ) => { executedSql.push(args[0]) return originalQuery(...args) } @@ -175,7 +178,9 @@ describe("repository > find options > locking", () => { const originalQuery = entityManager.queryRunner!.query.bind( entityManager.queryRunner, ) - entityManager.queryRunner!.query = (...args: any[]) => { + entityManager.queryRunner!.query = ( + ...args: Parameters + ) => { executedSql.push(args[0]) return originalQuery(...args) } @@ -204,7 +209,9 @@ describe("repository > find options > locking", () => { const originalQuery = entityManager.queryRunner!.query.bind( entityManager.queryRunner, ) - entityManager.queryRunner!.query = (...args: any[]) => { + entityManager.queryRunner!.query = ( + ...args: Parameters + ) => { executedSql.push(args[0]) return originalQuery(...args) } @@ -243,7 +250,9 @@ describe("repository > find options > locking", () => { const originalQuery = entityManager.queryRunner!.query.bind( entityManager.queryRunner, ) - entityManager.queryRunner!.query = (...args: any[]) => { + entityManager.queryRunner!.query = ( + ...args: Parameters + ) => { executedSql.push(args[0]) return originalQuery(...args) } @@ -285,7 +294,9 @@ describe("repository > find options > locking", () => { const originalQuery = entityManager.queryRunner!.query.bind( entityManager.queryRunner, ) - entityManager.queryRunner!.query = (...args: any[]) => { + entityManager.queryRunner!.query = ( + ...args: Parameters + ) => { executedSql.push(args[0]) return originalQuery(...args) } @@ -322,7 +333,9 @@ describe("repository > find options > locking", () => { const originalQuery = entityManager.queryRunner!.query.bind( entityManager.queryRunner, ) - entityManager.queryRunner!.query = (...args: any[]) => { + entityManager.queryRunner!.query = ( + ...args: Parameters + ) => { executedSql.push(args[0]) return originalQuery(...args) } @@ -360,7 +373,9 @@ describe("repository > find options > locking", () => { const originalQuery = entityManager.queryRunner!.query.bind( entityManager.queryRunner, ) - entityManager.queryRunner!.query = (...args: any[]) => { + entityManager.queryRunner!.query = ( + ...args: Parameters + ) => { executedSql.push(args[0]) return originalQuery(...args) } @@ -623,11 +638,16 @@ describe("repository > find options > locking", () => { tables: ["post"], }, }), - entityManager.getRepository(Post).findOne({ - where: { id: 1 }, - relations: { author: true }, - lock: { mode: "pessimistic_write" }, - }), + entityManager + .getRepository(Post) + .findOne({ + where: { id: 1 }, + relations: { author: true }, + lock: { mode: "pessimistic_write" }, + }) + .should.be.rejectedWith( + "FOR UPDATE cannot be applied to the nullable side of an outer join", + ), ]) }) } diff --git a/test/functional/repository/find-options/repository-find-options.ts b/test/functional/repository/find-options/repository-find-options.ts index 7a01d58c92..ed485d83ff 100644 --- a/test/functional/repository/find-options/repository-find-options.ts +++ b/test/functional/repository/find-options/repository-find-options.ts @@ -14,6 +14,7 @@ import { Photo } from "./entity/Photo" import sinon from "sinon" import { FileLogger } from "../../../../src" import { promisify } from "util" +import fs from "fs" import { readFile, unlink } from "fs" describe("repository > find options", () => { @@ -71,7 +72,7 @@ describe("repository > find options", () => { user.name = "Alex Messer" await connection.manager.save(user) - const queryRunner = await connection.createQueryRunner() + const queryRunner = connection.createQueryRunner() const startTransactionFn = sinon.spy( queryRunner, @@ -255,7 +256,9 @@ describe("repository > find options > comment", () => { beforeEach(() => reloadTestingDatabases(connections)) after(async () => { await closeTestingConnections(connections) - await promisify(unlink)(logPath) + if (fs.existsSync(logPath)) { + await promisify(unlink)(logPath) + } }) it("repository should insert comment", () => @@ -269,7 +272,7 @@ describe("repository > find options > comment", () => { const lines = logs.toString().split("\n") const lastLine = lines[lines.length - 2] // last line is blank after newline // remove timestamp and prefix - const sql = lastLine.replace(/^.*\[QUERY\]\: /, "") + const sql = lastLine.replace(/^.*\[QUERY\]: /, "") expect(sql).to.match(/^\/\* This is a query comment. \*\//) }), )) diff --git a/test/functional/schema-builder/add-column.ts b/test/functional/schema-builder/add-column.ts index 587ae32466..6f589de267 100644 --- a/test/functional/schema-builder/add-column.ts +++ b/test/functional/schema-builder/add-column.ts @@ -33,7 +33,9 @@ describe("schema builder > add column", () => { } let stringType = "varchar" - if (connection.driver.options.type === "spanner") { + if (connection.driver.options.type === "sap") { + stringType = "nvarchar" + } else if (connection.driver.options.type === "spanner") { stringType = "string" } diff --git a/test/functional/schema-builder/change-column.ts b/test/functional/schema-builder/change-column.ts index e23d0c18e3..585ea570e4 100644 --- a/test/functional/schema-builder/change-column.ts +++ b/test/functional/schema-builder/change-column.ts @@ -121,6 +121,9 @@ describe("schema builder > change column", () => { if (connection.driver.options.type === "spanner") { versionColumn.type = "string" postVersionColumn.type = "string" + } else if (connection.driver.options.type === "sap") { + versionColumn.type = "nvarchar" + postVersionColumn.type = "nvarchar" } else { versionColumn.type = "varchar" postVersionColumn.type = "varchar" @@ -257,6 +260,8 @@ describe("schema builder > change column", () => { idColumn.type = "uuid" } else if (connection.driver.options.type === "mssql") { idColumn.type = "uniqueidentifier" + } else if (connection.driver.options.type === "sap") { + idColumn.type = "nvarchar" } else { idColumn.type = "varchar" } @@ -321,6 +326,9 @@ describe("schema builder > change column", () => { } else if (connection.driver.options.type === "mssql") { idColumn.type = "uniqueidentifier" teacherColumn.type = "uniqueidentifier" + } else if (connection.driver.options.type === "sap") { + idColumn.type = "nvarchar" + teacherColumn.type = "nvarchar" } else { idColumn.type = "varchar" teacherColumn.type = "varchar" @@ -362,42 +370,64 @@ describe("schema builder > change column", () => { it("should correctly change column comment", () => Promise.all( connections.map(async (connection) => { - // Skip thie contents of this test if not one of the drivers that support comments + // Skip the contents of this test if not one of the drivers that support comments if ( !( connection.driver.options.type === "cockroachdb" || connection.driver.options.type === "postgres" || + connection.driver.options.type === "sap" || DriverUtils.isMySQLFamily(connection.driver) ) ) { return } + const postMetadata = connection.getMetadata("post") const teacherMetadata = connection.getMetadata("teacher") const idColumn = teacherMetadata.findColumnWithPropertyName("id")! + const tagColumn = + postMetadata.findColumnWithPropertyName("tag")! + tagColumn.comment = "" + tagColumn.isNullable = true // check changing the comment in combination with another option idColumn.comment = "The Teacher's Key" await connection.synchronize() const queryRunnerA = connection.createQueryRunner() + const postTableA = await queryRunnerA.getTable("post") + const persistedTagColumnA = postTableA!.findColumnByName("tag")! const teacherTableA = await queryRunnerA.getTable("teacher") await queryRunnerA.release() + expect(persistedTagColumnA.comment).to.be.equal( + undefined, + connection.name, + ) + expect(persistedTagColumnA.isNullable).to.be.equal( + true, + connection.name, + ) expect( teacherTableA!.findColumnByName("id")!.comment, ).to.be.equal("The Teacher's Key", connection.name) // revert changes + tagColumn.comment = "Tag" + tagColumn.isNullable = false idColumn.comment = "" await connection.synchronize() const queryRunnerB = connection.createQueryRunner() + const postTableB = await queryRunnerB.getTable("post") + const persistedTagColumnB = postTableB!.findColumnByName("tag")! const teacherTableB = await queryRunnerB.getTable("teacher") await queryRunnerB.release() + expect(persistedTagColumnB.comment).to.be.equal("Tag") + expect(persistedTagColumnB.isNullable).to.be.false expect(teacherTableB!.findColumnByName("id")!.comment).to.be .undefined }), diff --git a/test/functional/schema-builder/entity/Post.ts b/test/functional/schema-builder/entity/Post.ts index 59f4e4a05e..081f999645 100644 --- a/test/functional/schema-builder/entity/Post.ts +++ b/test/functional/schema-builder/entity/Post.ts @@ -23,7 +23,7 @@ export class Post { @Column({ nullable: true }) text: string - @Column() + @Column({ comment: "Tag" }) tag: string @Column() diff --git a/test/functional/transaction/database-specific-isolation/oracle-isolation.ts b/test/functional/transaction/database-specific-isolation/oracle-isolation.ts index 959d078355..8e10054a9f 100644 --- a/test/functional/transaction/database-specific-isolation/oracle-isolation.ts +++ b/test/functional/transaction/database-specific-isolation/oracle-isolation.ts @@ -69,6 +69,15 @@ describe("transaction > transaction with oracle connection partial isolation sup let postId: number | undefined = undefined, categoryId: number | undefined = undefined + // Initial inserts are required to prevent ORA-08177 errors in Oracle 21c when using a serializable connection + // immediately after DDL statements. This ensures proper synchronization and helps avoid conflicts. + await connection.manager + .getRepository(Post) + .save({ title: "Post #0" }) + await connection.manager + .getRepository(Category) + .save({ name: "Category #0" }) + await connection.manager.transaction( "SERIALIZABLE", async (entityManager) => { diff --git a/test/functional/tree-tables/nested-set/nested-set.ts b/test/functional/tree-tables/nested-set/nested-set.ts index fb498634ce..97a153c8db 100644 --- a/test/functional/tree-tables/nested-set/nested-set.ts +++ b/test/functional/tree-tables/nested-set/nested-set.ts @@ -54,16 +54,18 @@ describe("tree tables > nested-set", () => { ]) const a11Parent = await categoryRepository.findAncestors(a11) - a11Parent.length.should.be.equal(2) - a11Parent.should.deep.include({ id: 1, name: "a1" }) - a11Parent.should.deep.include({ id: 2, name: "a11" }) + const a11ParentNames = a11Parent.map((i) => i.name) + a11ParentNames.length.should.be.equal(2) + a11ParentNames.should.deep.include("a1") + a11ParentNames.should.deep.include("a11") const a1Children = await categoryRepository.findDescendants(a1) - a1Children.length.should.be.equal(4) - a1Children.should.deep.include({ id: 1, name: "a1" }) - a1Children.should.deep.include({ id: 2, name: "a11" }) - a1Children.should.deep.include({ id: 3, name: "a111" }) - a1Children.should.deep.include({ id: 4, name: "a12" }) + const a1ChildrenNames = a1Children.map((i) => i.name) + a1ChildrenNames.length.should.be.equal(4) + a1ChildrenNames.should.deep.include("a1") + a1ChildrenNames.should.deep.include("a11") + a1ChildrenNames.should.deep.include("a111") + a1ChildrenNames.should.deep.include("a12") }), )) @@ -95,15 +97,17 @@ describe("tree tables > nested-set", () => { ]) const a11Parent = await categoryRepository.findAncestors(a11) - a11Parent.length.should.be.equal(2) - a11Parent.should.deep.include({ id: 1, name: "a1" }) - a11Parent.should.deep.include({ id: 2, name: "a11" }) + const a11ParentNames = a11Parent.map((i) => i.name) + a11ParentNames.length.should.be.equal(2) + a11ParentNames.should.deep.include("a1") + a11ParentNames.should.deep.include("a11") const a1Children = await categoryRepository.findDescendants(a1) - a1Children.length.should.be.equal(3) - a1Children.should.deep.include({ id: 1, name: "a1" }) - a1Children.should.deep.include({ id: 2, name: "a11" }) - a1Children.should.deep.include({ id: 3, name: "a12" }) + const a1ChildrenNames = a1Children.map((i) => i.name) + a1ChildrenNames.length.should.be.equal(3) + a1ChildrenNames.should.deep.include("a1") + a1ChildrenNames.should.deep.include("a11") + a1ChildrenNames.should.deep.include("a12") }), )) @@ -135,15 +139,17 @@ describe("tree tables > nested-set", () => { ]) const a11Parent = await categoryRepository.findAncestors(a11) - a11Parent.length.should.be.equal(2) - a11Parent.should.deep.include({ id: 1, name: "a1" }) - a11Parent.should.deep.include({ id: 2, name: "a11" }) + const a11ParentNames = a11Parent.map((i) => i.name) + a11ParentNames.length.should.be.equal(2) + a11ParentNames.should.deep.include("a1") + a11ParentNames.should.deep.include("a11") const a1Children = await categoryRepository.findDescendants(a1) - a1Children.length.should.be.equal(3) - a1Children.should.deep.include({ id: 1, name: "a1" }) - a1Children.should.deep.include({ id: 2, name: "a11" }) - a1Children.should.deep.include({ id: 3, name: "a12" }) + const a1ChildrenNames = a1Children.map((i) => i.name) + a1ChildrenNames.length.should.be.equal(3) + a1ChildrenNames.should.deep.include("a1") + a1ChildrenNames.should.deep.include("a11") + a1ChildrenNames.should.deep.include("a12") }), )) @@ -181,9 +187,10 @@ describe("tree tables > nested-set", () => { ]) const a11Parent = await categoryRepository.findAncestors(a11) - a11Parent.length.should.be.equal(2) - a11Parent.should.deep.include({ id: 1, name: "a1" }) - a11Parent.should.deep.include({ id: 2, name: "a11" }) + const a11ParentNames = a11Parent.map((child) => child.name) + a11ParentNames.length.should.be.equal(2) + a11ParentNames.should.deep.include("a1") + a11ParentNames.should.deep.include("a11") const a1Children = await categoryRepository.findDescendants(a1) const a1ChildrenNames = a1Children.map((child) => child.name) diff --git a/test/github-issues/10043/entity/Foo.ts b/test/github-issues/10043/entity/Foo.ts new file mode 100644 index 0000000000..dca348ac0d --- /dev/null +++ b/test/github-issues/10043/entity/Foo.ts @@ -0,0 +1,14 @@ +import { Column, Entity, PrimaryGeneratedColumn } from "../../../../src" + +@Entity() +export class Foo { + @PrimaryGeneratedColumn("uuid", { primaryKeyConstraintName: "PK_foo" }) + id: string + + @Column("numeric", { + precision: 12, + scale: 7, + array: true, + }) + bar: number[] +} diff --git a/test/github-issues/10043/issue-10043.ts b/test/github-issues/10043/issue-10043.ts new file mode 100644 index 0000000000..bbe0b0a9f1 --- /dev/null +++ b/test/github-issues/10043/issue-10043.ts @@ -0,0 +1,35 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" + +describe("github issues > #10043 Numeric array column type creates migration repeatedly", () => { + let dataSources: DataSource[] + before( + async () => + (dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + migrations: [__dirname + "/migration/*{.js,.ts}"], + schemaCreate: false, + dropSchema: true, + enabledDrivers: ["postgres"], + })), + ) + after(() => closeTestingConnections(dataSources)) + + it("should not generate migration for synchronized sized-numeric array column", () => + Promise.all( + dataSources.map(async (dataSource) => { + await dataSource.runMigrations() + + const sqlInMemory = await dataSource.driver + .createSchemaBuilder() + .log() + + sqlInMemory.upQueries.length.should.equal(0) + sqlInMemory.downQueries.length.should.equal(0) + }), + )) +}) diff --git a/test/github-issues/10043/migration/1699343893360-create-table.ts b/test/github-issues/10043/migration/1699343893360-create-table.ts new file mode 100644 index 0000000000..205e5df285 --- /dev/null +++ b/test/github-issues/10043/migration/1699343893360-create-table.ts @@ -0,0 +1,15 @@ +import { MigrationInterface, QueryRunner } from "../../../../src" + +export class CreateTable1699343893360 implements MigrationInterface { + name = "CreateTable1699343893360" + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `CREATE TABLE "foo" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "bar" numeric(12,7) array NOT NULL, CONSTRAINT "PK_foo" PRIMARY KEY ("id"))`, + ) + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`DROP TABLE "foo"`) + } +} diff --git a/test/github-issues/10054/entity/Person.ts b/test/github-issues/10054/entity/Person.ts new file mode 100644 index 0000000000..0267efd559 --- /dev/null +++ b/test/github-issues/10054/entity/Person.ts @@ -0,0 +1,13 @@ +import { Entity, Column, PrimaryGeneratedColumn } from "../../../../src" + +@Entity({ name: "person" }) +export class Person { + @PrimaryGeneratedColumn() + id: number + + @Column() + name: string + + @Column({ type: "int", nullable: true }) + age: number | null +} diff --git a/test/github-issues/10054/issue-10054.ts b/test/github-issues/10054/issue-10054.ts new file mode 100644 index 0000000000..80f0af7fec --- /dev/null +++ b/test/github-issues/10054/issue-10054.ts @@ -0,0 +1,64 @@ +import { Or, DataSource, ILike, Equal } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { Person } from "./entity/Person" +import { expect } from "chai" + +describe("github issues > #10054 Nested 'Or' Condition/Operation Support in Repository Where condition", () => { + let dataSources: DataSource[] + + before(async () => { + dataSources = await createTestingConnections({ + entities: [Person], + enabledDrivers: ["postgres", "mysql"], + schemaCreate: true, + dropSchema: true, + }) + }) + + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should find person where name starts with foo or equal to jane", async () => { + await Promise.all( + dataSources.map(async (dataSource) => { + const foo = new Person() + foo.name = "Foo" + foo.age = null + + const john = new Person() + john.name = "John" + john.age = 11 + + const dave = new Person() + dave.name = "Jane" + dave.age = 12 + + const foobar = new Person() + foobar.name = "FooBar" + foobar.age = 14 + + await dataSource.manager.save([foo, john, dave, foobar]) + const persons = await dataSource.manager.find(Person, { + where: { + name: Or(ILike("foo%"), Equal("Jane")), + }, + }) + + expect(persons).to.have.length(3) + + expect(persons.find((user) => user.name === "Foo")).to.be.not + .undefined + + expect(persons.find((user) => user.name === "Jane")).to.be.not + .undefined + + expect(persons.find((user) => user.name === "FooBar")).to.be.not + .undefined + }), + ) + }) +}) diff --git a/test/github-issues/10131/entity/Example.ts b/test/github-issues/10131/entity/Example.ts new file mode 100644 index 0000000000..723c5aead2 --- /dev/null +++ b/test/github-issues/10131/entity/Example.ts @@ -0,0 +1,13 @@ +import { Entity, PrimaryGeneratedColumn, Column } from "../../../../src" + +@Entity() +export class Example { + @PrimaryGeneratedColumn("uuid") + id?: string + + @Column("varchar", { length: 10 }) + varCharField: string = "" + + @Column("char", { length: 10 }) + charField: string = "" +} diff --git a/test/github-issues/10131/issue-10131.ts b/test/github-issues/10131/issue-10131.ts new file mode 100644 index 0000000000..47bc662663 --- /dev/null +++ b/test/github-issues/10131/issue-10131.ts @@ -0,0 +1,109 @@ +import "reflect-metadata" +import { DataSource } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { Example } from "./entity/Example" +import { SqlServerDriver } from "../../../src/driver/sqlserver/SqlServerDriver" +import sinon from "sinon" + +describe("github issues > #10131 optional to disable ascii to unicode parameter conversion", () => { + let connections: DataSource[] + + beforeEach(() => reloadTestingDatabases(connections)) + afterEach(() => sinon.restore()) + + describe("when disableAsciiToUnicodeParamConversion is true", () => { + let driver: SqlServerDriver + + before(async () => { + connections = await createTestingConnections({ + entities: [Example], + enabledDrivers: ["mssql"], + schemaCreate: false, + dropSchema: true, + driverSpecific: { + options: { + disableAsciiToUnicodeParamConversion: true, + }, + }, + }) + }) + after(() => closeTestingConnections(connections)) + + it("should disable ascii to unicode parameter conversion", () => + Promise.all( + connections.map(async (connection) => { + driver = new SqlServerDriver(connection) + + const driverNCharSpy = sinon.spy(driver.mssql, "NChar") + const driverNVarCharSpy = sinon.spy( + driver.mssql, + "NVarChar", + ) + const driverCharSpy = sinon.spy(driver.mssql, "Char") + const driverVarCharSpy = sinon.spy(driver.mssql, "VarChar") + + const entity = new Example() + entity.varCharField = "test" + entity.charField = "test" + + const repo = connection.getRepository(Example) + await repo.save(entity) + + sinon.assert.called(driverCharSpy) + sinon.assert.called(driverVarCharSpy) + sinon.assert.notCalled(driverNCharSpy) + sinon.assert.notCalled(driverNVarCharSpy) + }), + )) + }) + + describe("when disableAsciiToUnicodeParamConversion is false", () => { + let driver: SqlServerDriver + + before(async () => { + connections = await createTestingConnections({ + entities: [Example], + enabledDrivers: ["mssql"], + schemaCreate: false, + dropSchema: true, + driverSpecific: { + options: { + disableAsciiToUnicodeParamConversion: false, + }, + }, + }) + }) + after(() => closeTestingConnections(connections)) + + it("should not disable ascii to unicode parameter conversion", () => + Promise.all( + connections.map(async (connection) => { + driver = new SqlServerDriver(connection) + + const driverNCharSpy = sinon.spy(driver.mssql, "NChar") + const driverNVarCharSpy = sinon.spy( + driver.mssql, + "NVarChar", + ) + const driverCharSpy = sinon.spy(driver.mssql, "Char") + const driverVarCharSpy = sinon.spy(driver.mssql, "VarChar") + + const entity = new Example() + entity.varCharField = "test" + entity.charField = "test" + + const repo = connection.getRepository(Example) + await repo.save(entity) + + sinon.assert.notCalled(driverCharSpy) + sinon.assert.notCalled(driverVarCharSpy) + sinon.assert.called(driverNCharSpy) + sinon.assert.called(driverNVarCharSpy) + }), + )) + }) +}) diff --git a/test/github-issues/10191/entity/Example.ts b/test/github-issues/10191/entity/Example.ts new file mode 100644 index 0000000000..155bca399c --- /dev/null +++ b/test/github-issues/10191/entity/Example.ts @@ -0,0 +1,20 @@ +import { Column, Entity, Index, PrimaryGeneratedColumn } from "../../../../src" + +@Entity() +@Index(["nonNullable", "nullable"], { + unique: true, + where: '"nullable" IS NOT NULL', +}) +export class Example { + @PrimaryGeneratedColumn("uuid") + id?: string + + @Column({ type: "text" }) + nonNullable: string + + @Column({ type: "text", nullable: true }) + nullable: string | null + + @Column({ type: "text" }) + value: string +} diff --git a/test/github-issues/10191/index-10191.ts b/test/github-issues/10191/index-10191.ts new file mode 100644 index 0000000000..b3fa9312b5 --- /dev/null +++ b/test/github-issues/10191/index-10191.ts @@ -0,0 +1,44 @@ +import "reflect-metadata" +import { DataSource } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { Example } from "./entity/Example" + +describe("github issues > #10191 incorrect escaping of indexPredicate", () => { + let connections: DataSource[] + + before( + async () => + (connections = await createTestingConnections({ + entities: [Example], + enabledDrivers: ["postgres"], + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should not fail", () => + Promise.all( + connections.map(async (connection) => { + await connection.manager.upsert( + Example, + { + nonNullable: "nonNullable", + nullable: "nullable", + value: "value", + }, + { + conflictPaths: { + nonNullable: true, + nullable: true, + }, + skipUpdateIfNoValuesChanged: true, + indexPredicate: '"nullable" IS NOT NULL', + }, + ) + }), + )) +}) diff --git a/test/github-issues/10209/entity/asset.ts b/test/github-issues/10209/entity/asset.ts new file mode 100644 index 0000000000..1b37ad2789 --- /dev/null +++ b/test/github-issues/10209/entity/asset.ts @@ -0,0 +1,44 @@ +import { + Column, + CreateDateColumn, + DeleteDateColumn, + Entity, + JoinColumn, + ManyToOne, + PrimaryGeneratedColumn, + UpdateDateColumn, +} from "../../../../src" +import { ConfigurationEntity } from "./configuration" + +export enum AssetStatus { + new = 0, + deleted = -999, +} + +@Entity("assets") +export class AssetEntity { + @PrimaryGeneratedColumn("uuid") + id!: string + + @Column({ length: 255 }) + name!: string + + @Column({ type: "uuid" }) + configuration_id!: string + + @Column() + status!: AssetStatus + + @CreateDateColumn() + created_at!: Date + + @UpdateDateColumn() + updated_at!: Date + + @DeleteDateColumn() + deleted_at!: Date | null + + @ManyToOne(() => ConfigurationEntity, { nullable: false }) + @JoinColumn({ name: "configuration_id" }) + configuration!: ConfigurationEntity +} diff --git a/test/github-issues/10209/entity/configuration.ts b/test/github-issues/10209/entity/configuration.ts new file mode 100644 index 0000000000..e56f96c7df --- /dev/null +++ b/test/github-issues/10209/entity/configuration.ts @@ -0,0 +1,50 @@ +import { + Column, + CreateDateColumn, + Entity, + JoinColumn, + ManyToOne, + OneToMany, + PrimaryGeneratedColumn, + UpdateDateColumn, +} from "../../../../src" +import { AssetEntity } from "./asset" +import { LocationEntity } from "./location" + +export enum ConfigurationStatus { + deleted = -999, + new = 0, +} + +@Entity("configurations") +export class ConfigurationEntity { + @PrimaryGeneratedColumn("uuid") + id!: string + + @Column({ length: 255 }) + name!: string + + @Column() + status!: ConfigurationStatus + + @Column({ type: "uuid", nullable: false }) + location_id!: string + + @ManyToOne(() => LocationEntity, { nullable: false }) + @JoinColumn({ name: "location_id" }) + location!: LocationEntity + + @Column({ default: true }) + active!: boolean + + @OneToMany(() => AssetEntity, (asset) => asset.configuration, { + cascade: true, + }) + assets!: AssetEntity[] + + @CreateDateColumn() + created_at!: Date + + @UpdateDateColumn() + updated_at!: Date +} diff --git a/test/github-issues/10209/entity/location.ts b/test/github-issues/10209/entity/location.ts new file mode 100644 index 0000000000..b6f6f60f84 --- /dev/null +++ b/test/github-issues/10209/entity/location.ts @@ -0,0 +1,34 @@ +import { + Column, + CreateDateColumn, + Entity, + OneToMany, + PrimaryGeneratedColumn, + UpdateDateColumn, +} from "../../../../src" +import { ConfigurationEntity } from "./configuration" + +@Entity("locations") +export class LocationEntity { + @PrimaryGeneratedColumn("uuid") + id!: string + + @Column({ length: 255 }) + name!: string + + @Column({ default: true }) + active!: boolean + + @CreateDateColumn() + created_at!: Date + + @UpdateDateColumn() + updated_at!: Date + + @OneToMany( + () => ConfigurationEntity, + (configuration) => configuration.location, + { cascade: true }, + ) + configurations!: ConfigurationEntity[] +} diff --git a/test/github-issues/10209/issue-10209.ts b/test/github-issues/10209/issue-10209.ts new file mode 100644 index 0000000000..fb30c38d9b --- /dev/null +++ b/test/github-issues/10209/issue-10209.ts @@ -0,0 +1,90 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { expect } from "chai" +import { LocationEntity } from "./entity/location" +import { + ConfigurationEntity, + ConfigurationStatus, +} from "./entity/configuration" +import { AssetEntity, AssetStatus } from "./entity/asset" + +describe("github issues > #10209", () => { + let dataSources: DataSource[] + before( + async () => + (dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + })), + ) + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should not fail to run multiple nested transactions in parallel", function () { + this.retries(3) // Fix for SQLite + return Promise.all( + dataSources.map(async (dataSource) => { + const manager = dataSource.createEntityManager() + + await manager.transaction(async (txManager) => { + const location = txManager.create(LocationEntity) + location.name = "location-0" + location.configurations = [] + for (let c = 0; c < 3; c++) { + const config = txManager.create(ConfigurationEntity) + config.name = `config-${c}` + config.status = ConfigurationStatus.new + config.assets = [] + for (let a = 0; a < 5; a++) { + const asset = txManager.create(AssetEntity) + asset.name = `asset-${c}-${a}` + asset.status = AssetStatus.new + config.assets.push(asset) + } + location.configurations.push(config) + } + + await txManager.save(location) + }) + + const location = + (await manager.findOne(LocationEntity, { + where: { + name: "location-0", + }, + relations: ["configurations", "configurations.assets"], + })) || ({} as LocationEntity) + + await manager.transaction(async (txManager) => { + return Promise.all( + location.configurations.map(async (config) => { + await txManager.transaction(async (txManager2) => { + await Promise.all( + config.assets.map(async (asset) => { + asset.status = AssetStatus.deleted + await txManager2.save(asset) + await txManager2.softDelete( + AssetEntity, + asset, + ) + }), + ) + }) + + config.status = ConfigurationStatus.deleted + return await txManager.save(config) + }), + ) + }) + // We only care that the transaction above didn't fail + expect(true).to.be.true + }), + ) + }) +}) diff --git a/test/github-issues/10249/entity/example.ts b/test/github-issues/10249/entity/example.ts new file mode 100644 index 0000000000..7ea0a02f00 --- /dev/null +++ b/test/github-issues/10249/entity/example.ts @@ -0,0 +1,13 @@ +import { Column, Entity, PrimaryColumn } from "../../../../src" + +@Entity() +export class Example { + @PrimaryColumn() + id: string + + @Column({ update: false }) + notUpdatable: string + + @Column() + updatable: string +} diff --git a/test/github-issues/10249/issue-10249.ts b/test/github-issues/10249/issue-10249.ts new file mode 100644 index 0000000000..dbff232c59 --- /dev/null +++ b/test/github-issues/10249/issue-10249.ts @@ -0,0 +1,64 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { expect } from "chai" +import { Example } from "./entity/example" + +describe("github issues > #10249 Saving an entity is not possible if only columns with update: false are changed", () => { + let dataSources: DataSource[] + before( + async () => + (dataSources = await createTestingConnections({ + entities: [Example], + enabledDrivers: ["postgres"], + schemaCreate: true, + dropSchema: true, + })), + ) + + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should ignore changes for columns with `update: false` on saving entity", () => + Promise.all( + dataSources.map(async (dataSource) => { + await Promise.all( + dataSources.map(async (dataSource) => { + const manager = dataSource.manager + + // create entity + let exampleEntity = new Example() + exampleEntity.id = "1" + exampleEntity.notUpdatable = "value1" + exampleEntity.updatable = "value1" + await manager.save(exampleEntity) + + // updates only updatable value + exampleEntity.notUpdatable = "value2" + exampleEntity.updatable = "value2" + await manager.save(exampleEntity) + + exampleEntity = (await manager.findOneBy(Example, { + id: "1", + }))! + expect(exampleEntity.notUpdatable).to.be.eql("value1") + expect(exampleEntity.updatable).to.be.eql("value2") + + // if `update: false` column only specified, do nothing + exampleEntity.notUpdatable = "value3" + await manager.save(exampleEntity) + + exampleEntity = (await manager.findOneBy(Example, { + id: "1", + }))! + expect(exampleEntity.notUpdatable).to.be.eql("value1") + expect(exampleEntity.updatable).to.be.eql("value2") + }), + ) + }), + )) +}) diff --git a/test/github-issues/10322/issue-10322.ts b/test/github-issues/10322/issue-10322.ts new file mode 100644 index 0000000000..a85e4020db --- /dev/null +++ b/test/github-issues/10322/issue-10322.ts @@ -0,0 +1,56 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { AbstractLogger, DataSource, LogLevel, LogMessage } from "../../../src" +import sinon from "sinon" +import { expect } from "chai" + +describe("github issues > #10322 logMigration of AbstractLogger has wrong logging condition.", () => { + let dataSources: DataSource[] + const fakeLog = sinon.fake() + + class TestLogger extends AbstractLogger { + protected writeLog( + level: LogLevel, + logMessage: LogMessage | LogMessage[], + ) { + const messages = this.prepareLogMessages(logMessage, { + highlightSql: false, + }) + + for (let message of messages) { + switch (message.type ?? level) { + case "migration": + fakeLog(message.message) + break + } + } + } + } + + before(async () => { + dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + migrations: [__dirname + "/migration/*{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + createLogger: () => new TestLogger(), + }) + }) + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should call fakeLog when migration failed", () => + Promise.all( + dataSources.map(async (dataSource) => { + try { + await dataSource.runMigrations() + } catch (e) { + expect(fakeLog.called).to.be.true + } + }), + )) +}) diff --git a/test/github-issues/10322/migration/1530542855524-FailMigration.ts b/test/github-issues/10322/migration/1530542855524-FailMigration.ts new file mode 100644 index 0000000000..0c5c4a0268 --- /dev/null +++ b/test/github-issues/10322/migration/1530542855524-FailMigration.ts @@ -0,0 +1,10 @@ +import { MigrationInterface, QueryRunner } from "../../../../src" + +export class FailMigration1530542855524 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise { + throw new Error("migration error") + } + public async down(queryRunner: QueryRunner): Promise { + throw new Error("migration error") + } +} diff --git a/test/github-issues/10431/entity/Category.ts b/test/github-issues/10431/entity/Category.ts new file mode 100644 index 0000000000..7afdfe3533 --- /dev/null +++ b/test/github-issues/10431/entity/Category.ts @@ -0,0 +1,26 @@ +import { + Column, + Entity, + ManyToMany, + PrimaryGeneratedColumn, + VirtualColumn, +} from "../../../../src" +import { Product } from "./Product" + +@Entity() +export class Category { + @PrimaryGeneratedColumn() + id: number + + @VirtualColumn({ + query: (alias) => + `SELECT COUNT(*) FROM category WHERE id = ${alias}.id`, + }) + randomVirtualColumn: number + + @ManyToMany(() => Product, (product: Product) => product.categories) + products?: Product[] + + @Column("varchar") + name: string +} diff --git a/test/github-issues/10431/entity/Product.ts b/test/github-issues/10431/entity/Product.ts new file mode 100644 index 0000000000..86e0c4700d --- /dev/null +++ b/test/github-issues/10431/entity/Product.ts @@ -0,0 +1,25 @@ +import { + Column, + Entity, + JoinTable, + ManyToMany, + PrimaryGeneratedColumn, +} from "../../../../src" +import { Category } from "./Category" + +@Entity() +export class Product { + @PrimaryGeneratedColumn() + id: number + + @Column("varchar") + name: string + + @ManyToMany(() => Category, (category: Category) => category.products, { + eager: true, + cascade: ["insert", "update", "remove"], + orphanedRowAction: "delete", + }) + @JoinTable() + categories: Category[] +} diff --git a/test/github-issues/10431/entity/index.ts b/test/github-issues/10431/entity/index.ts new file mode 100644 index 0000000000..aa04377bb7 --- /dev/null +++ b/test/github-issues/10431/entity/index.ts @@ -0,0 +1,2 @@ +export * from "./Category" +export * from "./Product" diff --git a/test/github-issues/10431/issue-10431.ts b/test/github-issues/10431/issue-10431.ts new file mode 100644 index 0000000000..5487032f92 --- /dev/null +++ b/test/github-issues/10431/issue-10431.ts @@ -0,0 +1,42 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src" +import { expect } from "chai" + +import { Category, Product } from "./entity" + +describe("github issues > #10431 When requesting nested relations on foreign key primary entities, relation becomes empty entity rather than null", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [Category, Product], + schemaCreate: true, + dropSchema: true, + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should return [] when requested nested relations are empty on ManyToMany relation with @VirtualColumn definitions", () => + Promise.all( + connections.map(async (connection) => { + const productRepo = connection.getRepository(Product) + const testProduct = new Product() + testProduct.name = "foo" + await productRepo.save(testProduct) + const foundProduct = await productRepo.findOne({ + where: { + id: testProduct.id, + }, + relations: { categories: true }, + }) + expect(foundProduct?.name).eq("foo") + expect(foundProduct?.categories).eql([]) + }), + )) +}) diff --git a/test/github-issues/10493/entity/User.ts b/test/github-issues/10493/entity/User.ts new file mode 100644 index 0000000000..cb24b4406d --- /dev/null +++ b/test/github-issues/10493/entity/User.ts @@ -0,0 +1,26 @@ +import { + Entity, + PrimaryGeneratedColumn, + Column, + CreateDateColumn, + Index, +} from "../../../../src" + +@Entity() +export class User { + @PrimaryGeneratedColumn() + id: number + + @Column() + firstName: string + + @Column() + lastName: string + + @Column() + age: number + + @CreateDateColumn({ type: "timestamp with time zone" }) + @Index("IX_User_createdAt") + createdAt: Date +} diff --git a/test/github-issues/10493/issue-10493.ts b/test/github-issues/10493/issue-10493.ts new file mode 100644 index 0000000000..0e3ca55848 --- /dev/null +++ b/test/github-issues/10493/issue-10493.ts @@ -0,0 +1,47 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { expect } from "chai" +import { User } from "./entity/User" + +describe("github issues > #10493 Broken migrations for indices on TIMESTAMP WITH TIMEZONE Oracle Database columns", () => { + let dataSources: DataSource[] + + before( + async () => + (dataSources = await createTestingConnections({ + entities: [User], + enabledDrivers: ["oracle"], + schemaCreate: true, + dropSchema: true, + })), + ) + + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should ignore virtual columns when indexing Oracle TIMESTAMP WITH TIME ZONE columns", () => + Promise.all( + dataSources.map(async (dataSource) => { + // Prior to this fix, TypeORM would attempt to drop the virtual + // column and recreate the index. + // + // Usually, this would fail because it should not have any info + // about the virtual column on the "typeorm_metadata" table. + // + // But even after creating the metadata table manually, it + // would still fail because Oracle does not allow dropping + // virtual columns that were automatically generated. + const sqlInMemory = await dataSource.driver + .createSchemaBuilder() + .log() + + expect(sqlInMemory.upQueries).to.have.length(0) + expect(sqlInMemory.downQueries).to.have.length(0) + }), + )) +}) diff --git a/test/github-issues/10494/entity/A.ts b/test/github-issues/10494/entity/A.ts new file mode 100644 index 0000000000..dad40f34c1 --- /dev/null +++ b/test/github-issues/10494/entity/A.ts @@ -0,0 +1,7 @@ +import { Base } from "./Base" + +export class A extends Base { + constructor(public a: boolean) { + super() + } +} diff --git a/test/github-issues/10494/entity/B.ts b/test/github-issues/10494/entity/B.ts new file mode 100644 index 0000000000..1e6804bea8 --- /dev/null +++ b/test/github-issues/10494/entity/B.ts @@ -0,0 +1,7 @@ +import { Base } from "./Base" + +export class B extends Base { + constructor(public b: number) { + super() + } +} diff --git a/test/github-issues/10494/entity/Base.ts b/test/github-issues/10494/entity/Base.ts new file mode 100644 index 0000000000..0ba0fc8445 --- /dev/null +++ b/test/github-issues/10494/entity/Base.ts @@ -0,0 +1,6 @@ +export abstract class Base { + id!: number + type!: string + createdAt!: Date + updatedAt!: Date +} diff --git a/test/github-issues/10494/entity/C.ts b/test/github-issues/10494/entity/C.ts new file mode 100644 index 0000000000..70409a6d71 --- /dev/null +++ b/test/github-issues/10494/entity/C.ts @@ -0,0 +1,7 @@ +import { Base } from "./Base" + +export class C extends Base { + constructor(public c: string) { + super() + } +} diff --git a/test/github-issues/10494/entity/index.ts b/test/github-issues/10494/entity/index.ts new file mode 100644 index 0000000000..834d40cb37 --- /dev/null +++ b/test/github-issues/10494/entity/index.ts @@ -0,0 +1,5 @@ +export * from "./Base" + +export * from "./A" +export * from "./B" +export * from "./C" diff --git a/test/github-issues/10494/issues-10494.ts b/test/github-issues/10494/issues-10494.ts new file mode 100644 index 0000000000..468a68f8e6 --- /dev/null +++ b/test/github-issues/10494/issues-10494.ts @@ -0,0 +1,72 @@ +import "reflect-metadata" + +import { expect } from "chai" + +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { Repository } from "../../../src" + +import { Base, A, B, C } from "./entity" +import { BaseSchema, ASchema, BSchema, CSchema } from "./schema" + +describe("github issues > #10494 Custom discriminator values when using Single Table Inheritance with Entity Schemas", () => { + let dataSources: DataSource[] + + before( + async () => + (dataSources = await createTestingConnections({ + entities: [BaseSchema, ASchema, BSchema, CSchema], + schemaCreate: true, + dropSchema: true, + enabledDrivers: [ + "better-sqlite3", + "cockroachdb", + "mariadb", + "mssql", + "mysql", + "oracle", + "postgres", + "spanner", + "sqlite", + ], + })), + ) + + beforeEach(() => reloadTestingDatabases(dataSources)) + + after(() => closeTestingConnections(dataSources)) + + it("should use custom discriminator values, when specified", () => + Promise.all( + dataSources.map(async (dataSource) => { + // Arrange + const repository: Repository = + dataSource.getRepository(Base) + + const entities: Base[] = [new A(true), new B(42), new C("foo")] + + await repository.save(entities) + + // Act + const loadedEntities = await repository.find({ + order: { type: "ASC" }, + }) + + // Assert + // B doesn't specify a discriminator value, so it should + // default to its class name + expect(loadedEntities[0]).to.be.instanceOf(B) + expect(loadedEntities[0].type).to.be.equal("B") + + expect(loadedEntities[1]).to.be.instanceOf(A) + expect(loadedEntities[1].type).to.be.equal("custom-a") + + expect(loadedEntities[2]).to.be.instanceOf(C) + expect(loadedEntities[2].type).to.be.equal("custom-c") + }), + )) +}) diff --git a/test/github-issues/10494/schema/A.ts b/test/github-issues/10494/schema/A.ts new file mode 100644 index 0000000000..4c65f3b791 --- /dev/null +++ b/test/github-issues/10494/schema/A.ts @@ -0,0 +1,18 @@ +import { EntitySchema } from "../../../../src" + +import { A } from "../entity" + +import { BaseSchema } from "./Base" + +export const ASchema = new EntitySchema({ + target: A, + name: "A", + type: "entity-child", + discriminatorValue: "custom-a", + columns: { + ...BaseSchema.options.columns, + a: { + type: Boolean, + }, + }, +}) diff --git a/test/github-issues/10494/schema/B.ts b/test/github-issues/10494/schema/B.ts new file mode 100644 index 0000000000..8f7fcbf3d5 --- /dev/null +++ b/test/github-issues/10494/schema/B.ts @@ -0,0 +1,17 @@ +import { EntitySchema } from "../../../../src" + +import { B } from "../entity" + +import { BaseSchema } from "./Base" + +export const BSchema = new EntitySchema({ + target: B, + name: "B", + type: "entity-child", + columns: { + ...BaseSchema.options.columns, + b: { + type: Number, + }, + }, +}) diff --git a/test/github-issues/10494/schema/Base.ts b/test/github-issues/10494/schema/Base.ts new file mode 100644 index 0000000000..ec455a8ebf --- /dev/null +++ b/test/github-issues/10494/schema/Base.ts @@ -0,0 +1,30 @@ +import { EntitySchema } from "../../../../src" + +import { Base } from "../entity" + +export const BaseSchema = new EntitySchema({ + target: Base, + name: "Base", + columns: { + id: { + type: Number, + primary: true, + generated: "increment", + }, + type: { + type: String, + }, + createdAt: { + type: Date, + createDate: true, + }, + updatedAt: { + type: Date, + updateDate: true, + }, + }, + inheritance: { + pattern: "STI", + column: "type", + }, +}) diff --git a/test/github-issues/10494/schema/C.ts b/test/github-issues/10494/schema/C.ts new file mode 100644 index 0000000000..1e0d13797a --- /dev/null +++ b/test/github-issues/10494/schema/C.ts @@ -0,0 +1,18 @@ +import { EntitySchema } from "../../../../src" + +import { C } from "../entity" + +import { BaseSchema } from "./Base" + +export const CSchema = new EntitySchema({ + target: C, + name: "C", + type: "entity-child", + discriminatorValue: "custom-c", + columns: { + ...BaseSchema.options.columns, + c: { + type: String, + }, + }, +}) diff --git a/test/github-issues/10494/schema/index.ts b/test/github-issues/10494/schema/index.ts new file mode 100644 index 0000000000..834d40cb37 --- /dev/null +++ b/test/github-issues/10494/schema/index.ts @@ -0,0 +1,5 @@ +export * from "./Base" + +export * from "./A" +export * from "./B" +export * from "./C" diff --git a/test/github-issues/10496/entity/A.ts b/test/github-issues/10496/entity/A.ts new file mode 100644 index 0000000000..e339d5430d --- /dev/null +++ b/test/github-issues/10496/entity/A.ts @@ -0,0 +1,15 @@ +import { ChildEntity, Column } from "../../../../src" + +import { Base } from "./Base" + +@ChildEntity() +export class A extends Base { + @Column() + a!: boolean + + constructor(a: boolean) { + super() + + this.a = a + } +} diff --git a/test/github-issues/10496/entity/B.ts b/test/github-issues/10496/entity/B.ts new file mode 100644 index 0000000000..009f2e9d5f --- /dev/null +++ b/test/github-issues/10496/entity/B.ts @@ -0,0 +1,16 @@ +import { ChildEntity, Column, Index } from "../../../../src" + +import { Base } from "./Base" + +@ChildEntity() +export class B extends Base { + @Column() + @Index("IX_Base_b") + b!: number + + constructor(b: number) { + super() + + this.b = b + } +} diff --git a/test/github-issues/10496/entity/Base.ts b/test/github-issues/10496/entity/Base.ts new file mode 100644 index 0000000000..6f9f2a34ae --- /dev/null +++ b/test/github-issues/10496/entity/Base.ts @@ -0,0 +1,26 @@ +import { + Column, + CreateDateColumn, + Entity, + Index, + PrimaryGeneratedColumn, + TableInheritance, + UpdateDateColumn, +} from "../../../../src" + +@Entity() +@TableInheritance({ column: { type: String, name: "type" } }) +export abstract class Base { + @PrimaryGeneratedColumn() + id!: number + + @Column() + @Index("IX_Base_type") + type!: string + + @CreateDateColumn() + createdAt!: Date + + @UpdateDateColumn() + updatedAt!: Date +} diff --git a/test/github-issues/10496/entity/C.ts b/test/github-issues/10496/entity/C.ts new file mode 100644 index 0000000000..247252a238 --- /dev/null +++ b/test/github-issues/10496/entity/C.ts @@ -0,0 +1,15 @@ +import { ChildEntity, Column } from "../../../../src" + +import { Base } from "./Base" + +@ChildEntity() +export class C extends Base { + @Column() + c!: string + + constructor(c: string) { + super() + + this.c = c + } +} diff --git a/test/github-issues/10496/entity/index.ts b/test/github-issues/10496/entity/index.ts new file mode 100644 index 0000000000..834d40cb37 --- /dev/null +++ b/test/github-issues/10496/entity/index.ts @@ -0,0 +1,5 @@ +export * from "./Base" + +export * from "./A" +export * from "./B" +export * from "./C" diff --git a/test/github-issues/10496/issue-10496.ts b/test/github-issues/10496/issue-10496.ts new file mode 100644 index 0000000000..5b714bbde2 --- /dev/null +++ b/test/github-issues/10496/issue-10496.ts @@ -0,0 +1,63 @@ +import "reflect-metadata" + +import { expect } from "chai" + +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" + +import { Base, A, B, C } from "./entity" + +describe("github issues > #10496 User-defined index name for Single Table Inheritance discriminator columns", () => { + let dataSources: DataSource[] + + before( + async () => + (dataSources = await createTestingConnections({ + entities: [Base, A, B, C], + schemaCreate: true, + dropSchema: true, + enabledDrivers: [ + "better-sqlite3", + "cockroachdb", + "mariadb", + "mssql", + "mysql", + "oracle", + "postgres", + "spanner", + "sqlite", + ], + })), + ) + + beforeEach(() => reloadTestingDatabases(dataSources)) + + after(() => closeTestingConnections(dataSources)) + + it("should create a single index for the discriminator column, with the specified column name", () => + Promise.all( + dataSources.map(async (dataSource) => { + const queryRunner = dataSource.createQueryRunner() + await queryRunner.connect() + + const table = (await queryRunner.getTable("base"))! + + await queryRunner.release() + + const discriminatorColumnIndices = table.indices.filter( + (index) => + index.columnNames.length === 1 && + index.columnNames[0] === "type", + ) + + expect(discriminatorColumnIndices).to.have.length(1) + expect(discriminatorColumnIndices[0].name).to.be.equal( + "IX_Base_type", + ) + }), + )) +}) diff --git a/test/github-issues/10563/entity/family.ts b/test/github-issues/10563/entity/family.ts new file mode 100644 index 0000000000..bdc1bcbdcc --- /dev/null +++ b/test/github-issues/10563/entity/family.ts @@ -0,0 +1,23 @@ +import { Column, Entity, PrimaryColumn } from "../../../../src" + +@Entity() +export class FamilyMember { + @PrimaryColumn() + name: string + + @Column({ + default: "PERSON", + }) + type: string +} + +@Entity() +export class Dog extends FamilyMember { + @PrimaryColumn() + name: string + + @Column({ + default: "PET", + }) + type: string +} diff --git a/test/github-issues/10563/issue-10563.ts b/test/github-issues/10563/issue-10563.ts new file mode 100644 index 0000000000..7df8d802b4 --- /dev/null +++ b/test/github-issues/10563/issue-10563.ts @@ -0,0 +1,41 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src" +import { assert } from "chai" +import { Dog } from "./entity/family" + +describe("github issues > #10653 Default value in child table/entity column decorator for multiple table inheritance is ignored for inherited columns", () => { + let dataSources: DataSource[] + before( + async () => + (dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + logging: true, + })), + ) + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should honor distinct default value configured on inherited column of child entity", async () => + await Promise.all( + dataSources.map(async (dataSource) => { + const manager = dataSource.manager + let dog: Dog = new Dog() + dog.name = "Fifi" + await manager.save(dog) + let fifi = await manager.findOneBy(Dog, { + name: "Fifi", + }) + assert( + fifi instanceof Dog && fifi["type"] == "PET", + `Fifi=${JSON.stringify(fifi)}`, + ) + }), + )) +}) diff --git a/test/github-issues/10567/entity/address-history.ts b/test/github-issues/10567/entity/address-history.ts new file mode 100644 index 0000000000..378b04e3d0 --- /dev/null +++ b/test/github-issues/10567/entity/address-history.ts @@ -0,0 +1,48 @@ +import { Column, Entity, Index, PrimaryGeneratedColumn } from "../../../../src" + +@Entity() +export class AddressHistory { + @PrimaryGeneratedColumn("uuid") + uuid: string + + @Index() + @Column({ type: "uuid" }) + entityUuid: string + + @Index() + @Column({ type: "uuid" }) + addressUuid: string + + @Index({ spatial: true }) + @Column({ type: "int4range" }) + int4range: string + + @Index({ spatial: true }) + @Column({ type: "int8range" }) + int8range: string + + @Index({ spatial: true }) + @Column({ type: "numrange" }) + numrange: string + + @Index({ spatial: true }) + @Column({ type: "tsrange" }) + tsrange: string + + @Index({ spatial: true }) + @Column({ type: "tstzrange" }) + tstzrange: string + + @Index({ spatial: true }) + @Column({ type: "daterange" }) + daterange: string + + @Index({ spatial: true }) + @Column({ + type: "geometry", + spatialFeatureType: "Point", + srid: 4326, + nullable: true, + }) + point: string +} diff --git a/test/github-issues/10567/issue-10567.ts b/test/github-issues/10567/issue-10567.ts new file mode 100644 index 0000000000..b2a03ae140 --- /dev/null +++ b/test/github-issues/10567/issue-10567.ts @@ -0,0 +1,48 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/index.js" + +describe("github issues > #10567 Postgres: Gist index on daterange column recreated every migration", () => { + let dataSources: DataSource[] + + before( + async () => + (dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: false, + dropSchema: true, + enabledDrivers: ["postgres"], + })), + ) + + after(() => closeTestingConnections(dataSources)) + + it("can recognize model changes", () => + Promise.all( + dataSources.map(async (dataSource) => { + const sqlInMemory = await dataSource.driver + .createSchemaBuilder() + .log() + + sqlInMemory.upQueries.length.should.be.greaterThan(0) + sqlInMemory.downQueries.length.should.be.greaterThan(0) + }), + )) + + it("does not generate when no model changes", () => + Promise.all( + dataSources.map(async (dataSource) => { + await dataSource.driver.createSchemaBuilder().build() + + const sqlInMemory = await dataSource.driver + .createSchemaBuilder() + .log() + + sqlInMemory.upQueries.length.should.be.equal(0) + sqlInMemory.downQueries.length.should.be.equal(0) + }), + )) +}) diff --git a/test/github-issues/10569/contract/create-user-contract.ts b/test/github-issues/10569/contract/create-user-contract.ts new file mode 100644 index 0000000000..beaa7476fc --- /dev/null +++ b/test/github-issues/10569/contract/create-user-contract.ts @@ -0,0 +1,3 @@ +export type CreateUserContract = { + name: string +} diff --git a/test/github-issues/10569/entity/user.ts b/test/github-issues/10569/entity/user.ts new file mode 100644 index 0000000000..d91bf2c0a7 --- /dev/null +++ b/test/github-issues/10569/entity/user.ts @@ -0,0 +1,10 @@ +import { Column, Entity, PrimaryGeneratedColumn } from "../../../../src" + +@Entity({ name: "user" }) +export class User { + @PrimaryGeneratedColumn("uuid") + id: string + + @Column("varchar") + name: string +} diff --git a/test/github-issues/10569/ussue-10569.ts b/test/github-issues/10569/ussue-10569.ts new file mode 100644 index 0000000000..43dea6b41b --- /dev/null +++ b/test/github-issues/10569/ussue-10569.ts @@ -0,0 +1,42 @@ +import "reflect-metadata" + +import { expect } from "chai" +import { v4 } from "uuid" + +import { DataSource } from "../../../src/data-source/DataSource" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { CreateUserContract } from "./contract/create-user-contract" +import { User } from "./entity/user" + +describe("github issues > #10569 Fix type inferencing of EntityManager#create", () => { + let dataSources: DataSource[] + before( + async () => + (dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + })), + ) + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should correctly inference entity type", () => + Promise.all( + dataSources.map(async (dataSource) => { + const createUserContract: CreateUserContract = { + name: "John Doe", + } + + const user = dataSource.manager.create(User, createUserContract) + + user.id = v4() + + expect(user.id).to.exist + }), + )) +}) diff --git a/test/github-issues/10612/entity/ExampleEntity.ts b/test/github-issues/10612/entity/ExampleEntity.ts new file mode 100644 index 0000000000..9ce5ae839e --- /dev/null +++ b/test/github-issues/10612/entity/ExampleEntity.ts @@ -0,0 +1,8 @@ +import { Entity } from "../../../../src/decorator/entity/Entity" +import { PrimaryGeneratedColumn } from "../../../../src/decorator/columns/PrimaryGeneratedColumn" + +@Entity({ name: "example", comment: "table comment" }) +export class ExampleEntity { + @PrimaryGeneratedColumn() + id: number +} diff --git a/test/github-issues/10612/issue-10612.ts b/test/github-issues/10612/issue-10612.ts new file mode 100644 index 0000000000..a44d1ed689 --- /dev/null +++ b/test/github-issues/10612/issue-10612.ts @@ -0,0 +1,86 @@ +import { DataSource } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { ExampleEntity } from "./entity/ExampleEntity" +import { expect } from "chai" + +describe("github issues > #10612", () => { + let dataSources: DataSource[] + + before(async () => { + dataSources = await createTestingConnections({ + entities: [ExampleEntity], + enabledDrivers: ["postgres"], + }) + }) + + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("add table comment", async () => { + await Promise.all( + dataSources.map(async (dataSource) => { + const sql = + "SELECT obj_description('example'::regclass::oid, 'pg_class') AS table_comment" + + const result = await dataSource.manager.query(sql) + expect(result).to.be.eql([{ table_comment: "table comment" }]) + }), + ) + }) + + it("should correctly change table comment and change", async () => { + await Promise.all( + dataSources.map(async (dataSource) => { + const queryRunner = dataSource.createQueryRunner() + const table = await queryRunner.getTable("example") + + await queryRunner.changeTableComment( + table!, + "new table comment", + ) + const sql = + "SELECT obj_description('example'::regclass::oid, 'pg_class') AS table_comment" + + let result = await dataSource.manager.query(sql) + expect(result).to.be.eql([ + { table_comment: "new table comment" }, + ]) + + // revert changes + await queryRunner.executeMemoryDownSql() + + result = await dataSource.manager.query(sql) + expect(result).to.be.eql([{ table_comment: "table comment" }]) + + await queryRunner.release() + }), + ) + }) + + it("should correctly synchronize when table comment change", async () => { + await Promise.all( + dataSources.map(async (dataSource) => { + const queryRunner = dataSource.createQueryRunner() + + const exampleMetadata = dataSource.getMetadata(ExampleEntity) + exampleMetadata.comment = "change table comment" + + await dataSource.synchronize() + + const sql = + "SELECT obj_description('example'::regclass::oid, 'pg_class') AS table_comment" + + const result = await dataSource.manager.query(sql) + expect(result).to.be.eql([ + { table_comment: "change table comment" }, + ]) + + await queryRunner.release() + }), + ) + }) +}) diff --git a/test/github-issues/10626/entity/user.ts b/test/github-issues/10626/entity/user.ts new file mode 100644 index 0000000000..ae8d78db5e --- /dev/null +++ b/test/github-issues/10626/entity/user.ts @@ -0,0 +1,13 @@ +import { Column, Entity, Index, PrimaryGeneratedColumn } from "../../../../src" + +@Entity({ + name: "user", +}) +export class User { + @PrimaryGeneratedColumn() + id: number + + @Index("concurrentTest", { concurrent: true }) + @Column({ nullable: true }) + name: string +} diff --git a/test/github-issues/10626/issue-10626.ts b/test/github-issues/10626/issue-10626.ts new file mode 100644 index 0000000000..12dd3e0765 --- /dev/null +++ b/test/github-issues/10626/issue-10626.ts @@ -0,0 +1,62 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/index.js" +import { expect } from "chai" + +describe("github issues > #10626 Postgres CREATE INDEX CONCURRENTLY bug", () => { + let dataSources: DataSource[] + + before( + async () => + (dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: false, + dropSchema: true, + enabledDrivers: ["postgres"], + logging: true, + })), + ) + + after(() => closeTestingConnections(dataSources)) + + it("has to create INDEX CONCURRENTLY", () => + Promise.all( + dataSources.map(async (dataSource) => { + await dataSource.setOptions({ + ...dataSource.options, + migrationsTransactionMode: "none", + }) + await dataSource.synchronize() + const concurrentTestIndexes = await dataSource.query( + `SELECT * FROM pg_indexes WHERE indexname = 'concurrentTest'`, + ) + expect(concurrentTestIndexes).has.length(1) + }), + )) + + it("has to drop INDEX CONCURRENTLY", () => + Promise.all( + dataSources.map(async (dataSource) => { + await dataSource.setOptions({ + ...dataSource.options, + migrationsTransactionMode: "none", + }) + await dataSource.synchronize() + + const queryRunner = dataSource.createQueryRunner() + let table = await queryRunner.getTable("user") + if (table) { + await queryRunner.dropIndex(table, table?.indices[0]) + } + const queries = queryRunner.getMemorySql().upQueries + expect(queries[0].query).to.be.eql( + 'DROP INDEX "public"."concurrentTest"', + ) + + await queryRunner.release() + }), + )) +}) diff --git a/test/github-issues/1551/issue-1551.ts b/test/github-issues/1551/issue-1551.ts index 4118a3f0de..89077d77cf 100644 --- a/test/github-issues/1551/issue-1551.ts +++ b/test/github-issues/1551/issue-1551.ts @@ -16,7 +16,7 @@ describe("github issues > #1551 complex example of cascades + multiple primary k async () => (connections = await createTestingConnections({ __dirname, - enabledDrivers: ["mysql"], + // enabledDrivers: ["mysql"], })), ) beforeEach(() => reloadTestingDatabases(connections)) diff --git a/test/github-issues/2200/naming/NamingStrategyUnderTest.ts b/test/github-issues/2200/naming/NamingStrategyUnderTest.ts index 75a881806d..24bf152d07 100644 --- a/test/github-issues/2200/naming/NamingStrategyUnderTest.ts +++ b/test/github-issues/2200/naming/NamingStrategyUnderTest.ts @@ -3,9 +3,4 @@ import { NamingStrategyInterface } from "../../../../src/naming-strategy/NamingS export class NamingStrategyUnderTest extends DefaultNamingStrategy - implements NamingStrategyInterface -{ - eagerJoinRelationAlias(alias: string, propertyPath: string): string { - return alias + "__" + propertyPath.replace(".", "_") - } -} + implements NamingStrategyInterface {} diff --git a/test/github-issues/3302/entity/Post.ts b/test/github-issues/3302/entity/Post.ts new file mode 100644 index 0000000000..eb34c8b27c --- /dev/null +++ b/test/github-issues/3302/entity/Post.ts @@ -0,0 +1,12 @@ +import { Column } from "../../../../src/decorator/columns/Column" +import { PrimaryColumn } from "../../../../src/decorator/columns/PrimaryColumn" +import { Entity } from "../../../../src/decorator/entity/Entity" + +@Entity() +export class Post { + @PrimaryColumn() + id: number + + @Column() + title: string +} diff --git a/test/github-issues/3302/issue-3302.ts b/test/github-issues/3302/issue-3302.ts new file mode 100644 index 0000000000..67a56b842c --- /dev/null +++ b/test/github-issues/3302/issue-3302.ts @@ -0,0 +1,55 @@ +import "reflect-metadata" +import appRootPath from "app-root-path" +import sinon from "sinon" +import { DataSource } from "../../../src" +import { + createTestingConnections, + reloadTestingDatabases, + closeTestingConnections, +} from "../../utils/test-utils" +import { PlatformTools } from "../../../src/platform/PlatformTools" + +describe("github issues > #3302 Tracking query time for slow queries and statsd timers", () => { + let connections: DataSource[] + let stub: sinon.SinonStub + let sandbox: sinon.SinonSandbox + const beforeQueryLogPath = appRootPath + "/before-query.log" + const afterQueryLogPath = appRootPath + "/after-query.log" + + before(async () => { + connections = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + subscribers: [__dirname + "/subscriber/*{.js,.ts}"], + }) + sandbox = sinon.createSandbox() + stub = sandbox.stub(PlatformTools, "appendFileSync") + }) + beforeEach(() => reloadTestingDatabases(connections)) + afterEach(async () => { + stub.resetHistory() + sandbox.restore() + await closeTestingConnections(connections) + }) + + it("if query executed, should write query to file", async () => + Promise.all( + connections.map(async (connection) => { + const testQuery = `SELECT COUNT(*) FROM ${connection.driver.escape( + "post", + )}` + + await connection.query(testQuery) + + sinon.assert.calledWith( + stub, + beforeQueryLogPath, + sinon.match(testQuery), + ) + sinon.assert.calledWith( + stub, + afterQueryLogPath, + sinon.match(testQuery), + ) + }), + )) +}) diff --git a/test/github-issues/3302/subscriber/PostSubscriber.ts b/test/github-issues/3302/subscriber/PostSubscriber.ts new file mode 100644 index 0000000000..eeff7c8f7f --- /dev/null +++ b/test/github-issues/3302/subscriber/PostSubscriber.ts @@ -0,0 +1,28 @@ +import { Post } from "../entity/Post" +import { EntitySubscriberInterface, EventSubscriber } from "../../../../src" +import { + AfterQueryEvent, + BeforeQueryEvent, +} from "../../../../src/subscriber/event/QueryEvent" +import { PlatformTools } from "../../../../src/platform/PlatformTools" +import appRootPath from "app-root-path" +@EventSubscriber() +export class PostSubscriber implements EntitySubscriberInterface { + listenTo() { + return Post + } + + beforeQuery(event: BeforeQueryEvent): void | Promise { + PlatformTools.appendFileSync( + appRootPath.path + "/before-query.log", + event.query, + ) + } + + afterQuery(event: AfterQueryEvent): void | Promise { + PlatformTools.appendFileSync( + appRootPath.path + "/after-query.log", + event.query, + ) + } +} diff --git a/test/github-issues/3363/issue-3363.ts b/test/github-issues/3363/issue-3363.ts index e937b63954..3fe51d4482 100644 --- a/test/github-issues/3363/issue-3363.ts +++ b/test/github-issues/3363/issue-3363.ts @@ -76,6 +76,15 @@ describe("github issues > #3363 Isolation Level in transaction() from Connection let postId: number | undefined = undefined, categoryId: number | undefined = undefined + // Initial inserts are required to prevent ORA-08177 errors in Oracle 21c when using a serializable connection + // immediately after DDL statements. This ensures proper synchronization and helps avoid conflicts. + await connection.manager + .getRepository(Post) + .save({ title: "Post #0" }) + await connection.manager + .getRepository(Category) + .save({ name: "Category #0" }) + await connection.transaction( "SERIALIZABLE", async (entityManager) => { diff --git a/test/github-issues/4410/issue-4410.ts b/test/github-issues/4410/issue-4410.ts index df603e7721..46eaeddbf1 100644 --- a/test/github-issues/4410/issue-4410.ts +++ b/test/github-issues/4410/issue-4410.ts @@ -13,6 +13,7 @@ import { PlatformTools } from "../../../src/platform/PlatformTools" describe("github issues > #4410 allow custom filepath for FileLogger", () => { let connections: DataSource[] let stub: sinon.SinonStub + let sandbox: sinon.SinonSandbox const testingOptions: TestingOptions = { entities: [Username], @@ -20,10 +21,14 @@ describe("github issues > #4410 allow custom filepath for FileLogger", () => { dropSchema: true, } - before(() => (stub = sinon.stub(PlatformTools, "appendFileSync"))) + before(() => { + sandbox = sinon.createSandbox() + stub = sandbox.stub(PlatformTools, "appendFileSync") + }) beforeEach(() => reloadTestingDatabases(connections)) afterEach(async () => { stub.resetHistory() + await closeTestingConnections(connections) }) diff --git a/test/github-issues/5704/entity/Category.ts b/test/github-issues/5704/entity/Category.ts new file mode 100644 index 0000000000..5f132ce499 --- /dev/null +++ b/test/github-issues/5704/entity/Category.ts @@ -0,0 +1,21 @@ +import { + Column, + ManyToMany, + Entity, + PrimaryGeneratedColumn, +} from "../../../../src" +import { Post } from "./Post" + +@Entity() +export class Category { + @PrimaryGeneratedColumn() + id: number + + @Column() + name: string + + @ManyToMany(() => Post, (o) => o.categories) + posts!: Promise + + addedProp: boolean = false +} diff --git a/test/github-issues/5704/entity/Post.ts b/test/github-issues/5704/entity/Post.ts new file mode 100644 index 0000000000..621b46e340 --- /dev/null +++ b/test/github-issues/5704/entity/Post.ts @@ -0,0 +1,23 @@ +import { + Column, + Entity, + JoinTable, + ManyToMany, + PrimaryGeneratedColumn, +} from "../../../../src" +import { Category } from "./Category" + +@Entity() +export class Post { + @PrimaryGeneratedColumn() + id: number + + @Column() + title: string + + @ManyToMany(() => Category, (o) => o.posts, { + cascade: true, + }) + @JoinTable() + categories!: Promise +} diff --git a/test/github-issues/5704/issue-5704.ts b/test/github-issues/5704/issue-5704.ts new file mode 100644 index 0000000000..9de36630ea --- /dev/null +++ b/test/github-issues/5704/issue-5704.ts @@ -0,0 +1,66 @@ +import "reflect-metadata" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src" +import { Post } from "./entity/Post" +import { Category } from "./entity/Category" +import { assert } from "chai" + +describe("github issues > #5704 Many-to-many gives error ER_DUP_ENTRY everytime I save. This one also related to inverseJoinColumn.", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + subscribers: [__dirname + "/subscriber/*{.js,.ts}"], + enabledDrivers: ["mysql"], + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should work as expected", () => + Promise.all( + connections.map(async (connection) => { + const postName = "post for issue #5704" + const catName = "cat for issue #5704" + + let post1 = await connection.manager.findOne(Post, { + where: { title: postName }, + }) + + let category1 = await connection.manager.findOne(Category, { + where: { name: catName }, + }) + + if (!category1) { + category1 = new Category() + category1.name = catName + await connection.manager.save(category1) + } + + if (!post1) { + post1 = new Post() + post1.title = postName + post1.categories = Promise.resolve([category1]) + await connection.manager.save(post1) + } + + const categoryTest = await connection.manager.findOne( + Category, + { + where: { name: catName }, + }, + ) + assert.isTrue(categoryTest instanceof Category) + + post1.categories = Promise.resolve([categoryTest as Category]) + + // This is the line that causes the error "QueryFailedError: ER_DUP_ENTRY: Duplicate entry '1-1' for key 'PRIMARY'" with previous code + await connection.manager.save(post1) + }), + )) +}) diff --git a/test/github-issues/5704/subscriber/CategorySubscriber.ts b/test/github-issues/5704/subscriber/CategorySubscriber.ts new file mode 100644 index 0000000000..ce52c6cc55 --- /dev/null +++ b/test/github-issues/5704/subscriber/CategorySubscriber.ts @@ -0,0 +1,13 @@ +import { Category } from "../entity/Category" +import { EntitySubscriberInterface, EventSubscriber } from "../../../../src" + +@EventSubscriber() +export class CategorySubscriber implements EntitySubscriberInterface { + listenTo() { + return Category + } + + async afterLoad(entity: Category): Promise { + entity.addedProp = true + } +} diff --git a/test/github-issues/7068/issue-7068.ts b/test/github-issues/7068/issue-7068.ts index 74952454ea..65d1cd4770 100644 --- a/test/github-issues/7068/issue-7068.ts +++ b/test/github-issues/7068/issue-7068.ts @@ -1,4 +1,4 @@ -import "reflect-metadata" +import "../../utils/test-setup" import { Category } from "./entity/Category" import { DataSource } from "../../../src/data-source/DataSource" import { @@ -47,15 +47,17 @@ describe("github issues > #7068", () => { ]) const a11Parent = await categoryRepository.findAncestors(a11) - a11Parent.length.should.be.equal(2) - a11Parent.should.deep.include({ id: 1, name: "a1" }) - a11Parent.should.deep.include({ id: 2, name: "a11" }) + const names1 = a11Parent.map((child) => child.name) + names1.length.should.be.equal(2) + names1.should.deep.include("a1") + names1.should.deep.include("a11") const a1Children = await categoryRepository.findDescendants(a1) - a1Children.length.should.be.equal(3) - a1Children.should.deep.include({ id: 1, name: "a1" }) - a1Children.should.deep.include({ id: 2, name: "a11" }) - a1Children.should.deep.include({ id: 3, name: "a12" }) + const names2 = a1Children.map((child) => child.name) + names2.length.should.be.equal(3) + names2.should.deep.include("a1") + names2.should.deep.include("a11") + names2.should.deep.include("a12") }), )) @@ -87,15 +89,17 @@ describe("github issues > #7068", () => { ]) const a11Parent = await categoryRepository.findAncestors(a11) - a11Parent.length.should.be.equal(2) - a11Parent.should.deep.include({ id: 1, name: "a1" }) - a11Parent.should.deep.include({ id: 2, name: "a11" }) + const names1 = a11Parent.map((child) => child.name) + names1.length.should.be.equal(2) + names1.should.deep.include("a1") + names1.should.deep.include("a11") const a1Children = await categoryRepository.findDescendants(a1) - a1Children.length.should.be.equal(3) - a1Children.should.deep.include({ id: 1, name: "a1" }) - a1Children.should.deep.include({ id: 2, name: "a11" }) - a1Children.should.deep.include({ id: 3, name: "a12" }) + const names2 = a1Children.map((child) => child.name) + names2.length.should.be.equal(3) + names2.should.deep.include("a1") + names2.should.deep.include("a11") + names2.should.deep.include("a12") }), )) @@ -133,9 +137,10 @@ describe("github issues > #7068", () => { ]) const a11Parent = await categoryRepository.findAncestors(a11) - a11Parent.length.should.be.equal(2) - a11Parent.should.deep.include({ id: 1, name: "a1" }) - a11Parent.should.deep.include({ id: 2, name: "a11" }) + const names1 = a11Parent.map((child) => child.name) + names1.length.should.be.equal(2) + names1.should.deep.include("a1") + names1.should.deep.include("a11") const a1Children = await categoryRepository.findDescendants(a1) const a1ChildrenNames = a1Children.map((child) => child.name) diff --git a/test/github-issues/7308/entity/weather.ts b/test/github-issues/7308/entity/weather.ts new file mode 100644 index 0000000000..e03d871cf6 --- /dev/null +++ b/test/github-issues/7308/entity/weather.ts @@ -0,0 +1,10 @@ +import { Column, Entity, PrimaryColumn } from "../../../../src" + +@Entity() +export class Weather { + @PrimaryColumn() + id: string + + @Column({ type: "float" }) + temperature: number +} diff --git a/test/github-issues/7308/issue-7308.ts b/test/github-issues/7308/issue-7308.ts new file mode 100644 index 0000000000..62c4a5d055 --- /dev/null +++ b/test/github-issues/7308/issue-7308.ts @@ -0,0 +1,70 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { Weather } from "./entity/weather" +import { expect } from "chai" + +describe("github issues > #7308 queryBuilder makes different parameter identifiers for same parameter, causing problems with groupby", () => { + describe("Postgres & cockroachdb", () => { + let dataSources: DataSource[] + before( + async () => + (dataSources = await createTestingConnections({ + entities: [Weather], + enabledDrivers: [ + "postgres", + "cockroachdb", + "spanner", + "mssql", + "oracle", + ], + schemaCreate: true, + dropSchema: true, + })), + ) + + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should not create different parameters identifiers for the same parameter", () => + Promise.all( + dataSources.map(async (dataSource) => { + const [query, parameters] = dataSource + .getRepository(Weather) + .createQueryBuilder() + .select("round(temperature, :floatNumber)") + .addSelect("count(*)", "count") + .groupBy("round(temperature, :floatNumber)") + .setParameters({ floatNumber: 2.4 }) + .getQueryAndParameters() + query.should.not.be.undefined + + if ( + dataSource.driver.options.type === "postgres" || + dataSource.driver.options.type === "cockroachdb" + ) { + expect(query).to.equal( + 'SELECT round(temperature, $1), count(*) AS "count" FROM "weather" "Weather" GROUP BY round(temperature, $1)', + ) + } else if (dataSource.driver.options.type === "spanner") { + expect(query).to.equal( + 'SELECT round(temperature, @param0), count(*) AS "count" FROM "weather" "Weather" GROUP BY round(temperature, @param0)', + ) + } else if (dataSource.driver.options.type === "oracle") { + expect(query).to.equal( + 'SELECT round(temperature, :1), count(*) AS "count" FROM "weather" "Weather" GROUP BY round(temperature, :1)', + ) + } else if (dataSource.driver.options.type === "mssql") { + expect(query).to.equal( + 'SELECT round(temperature, @0), count(*) AS "count" FROM "weather" "Weather" GROUP BY round(temperature, @0)', + ) + } + return parameters.length.should.eql(1) + }), + )) + }) +}) diff --git a/test/github-issues/7401/issue-7401.ts b/test/github-issues/7401/issue-7401.ts index 1a2b33b91c..df4e551bab 100644 --- a/test/github-issues/7401/issue-7401.ts +++ b/test/github-issues/7401/issue-7401.ts @@ -4,7 +4,7 @@ import { expect } from "chai" describe('github issues > #7401 MongoDB replica set connection string not support with method "parseConnectionUrl" & "buildConnectionUrl"', () => { it("should parse replicaSet and host list in ConnectionUrl", () => { - var options = DriverUtils.buildMongoDBDriverOptions({ + const options = DriverUtils.buildMongoDBDriverOptions({ url: "mongodb://testuser:testpwd@test-primary.example.com:27017,test-secondary-1.example.com:27017,test-secondary-2.example.com:27017/testdb?replicaSet=testreplicaset", }) diff --git a/test/github-issues/7437/issue-7437.ts b/test/github-issues/7437/issue-7437.ts index cb308f3192..741a0d542a 100644 --- a/test/github-issues/7437/issue-7437.ts +++ b/test/github-issues/7437/issue-7437.ts @@ -4,7 +4,7 @@ import { expect } from "chai" describe("github issues > #7437 MongoDB options never parse in connectionUrl and after my fix was parse incorrect", () => { it("should parse options in ConnectionUrl", () => { - var options = DriverUtils.buildMongoDBDriverOptions({ + const options = DriverUtils.buildMongoDBDriverOptions({ url: "mongodb://testuser:testpwd@test-primary.example.com:27017/testdb?retryWrites=true&w=majority&useUnifiedTopology=true", }) diff --git a/test/github-issues/8221/entity/SettingSubscriber.ts b/test/github-issues/8221/entity/SettingSubscriber.ts index e2e1647204..524bc28056 100644 --- a/test/github-issues/8221/entity/SettingSubscriber.ts +++ b/test/github-issues/8221/entity/SettingSubscriber.ts @@ -1,6 +1,7 @@ import { EntitySubscriberInterface, EventSubscriber, + InsertEvent, LoadEvent, UpdateEvent, } from "../../../../src" @@ -27,7 +28,7 @@ export class SettingSubscriber implements EntitySubscriberInterface { this.counter.updates++ } - beforeInsert(event: UpdateEvent): void { + beforeInsert(event: InsertEvent): void { this.counter.inserts++ } diff --git a/test/github-issues/8444/issue-8444.ts b/test/github-issues/8444/issue-8444.ts index 70c5c96f7e..38d7c7331f 100644 --- a/test/github-issues/8444/issue-8444.ts +++ b/test/github-issues/8444/issue-8444.ts @@ -5,7 +5,7 @@ import { createTestingConnections, } from "../../utils/test-utils" import { StrictlyInitializedEntity } from "./entity/StrictlyInitializedEntity" -import { DataSource } from "../../../src/data-source/DataSource" +import { DataSource } from "../../../src" describe("github issues > #8444 entitySkipConstructor not working", () => { describe("without entitySkipConstructor", () => { @@ -23,9 +23,17 @@ describe("github issues > #8444 entitySkipConstructor not working", () => { }) } - await expect( - bootstrapWithoutEntitySkipConstructor(), - ).to.be.rejectedWith("someColumn cannot be undefined") + try { + const dataSources = + await bootstrapWithoutEntitySkipConstructor() + // if we have zero data sources - it means we are testing in mongodb-only mode - we are fine here + // if we have any data sources - it means test didn't go as we expected + if (dataSources.length > 0) { + expect(true).to.be.false + } + } catch (err) { + expect(err.message).to.contain("someColumn cannot be undefined") + } }) }) diff --git a/test/github-issues/8450/entity/UserEntity.ts b/test/github-issues/8450/entity/UserEntity.ts new file mode 100644 index 0000000000..1aa949ef34 --- /dev/null +++ b/test/github-issues/8450/entity/UserEntity.ts @@ -0,0 +1,16 @@ +import { Entity } from "../../../../src/decorator/entity/Entity" +import { PrimaryColumn } from "../../../../src/decorator/columns/PrimaryColumn" +import { Column } from "../../../../src/decorator/columns/Column" + +@Entity("user") +export class UserEntity { + @PrimaryColumn("int") + id: number + + @Column({ + type: "int", + generatedType: "STORED", + asExpression: "id * 2", + }) + generated: number +} diff --git a/test/github-issues/8450/issue-8450.ts b/test/github-issues/8450/issue-8450.ts new file mode 100644 index 0000000000..4c19ecfba1 --- /dev/null +++ b/test/github-issues/8450/issue-8450.ts @@ -0,0 +1,38 @@ +import "reflect-metadata" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { UserEntity } from "./entity/UserEntity" +import { expect } from "chai" +import { DataSource } from "../../../src" + +describe("github issues > #8450 Generated column not in RETURNING clause on save", () => { + let connections: DataSource[] + + before( + async () => + (connections = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + enabledDrivers: ["postgres", "mysql"], + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should populate an object with generated column values after saving", () => + Promise.all( + connections.map(async (connection) => { + const user = new UserEntity() + user.id = 100 + + expect(user.generated).to.be.undefined + + await connection.manager.save(user) + + expect(user.generated).to.be.a("number") + expect(user.generated).to.be.equal(user.id * 2) + }), + )) +}) diff --git a/test/github-issues/8485/issue-8485.ts b/test/github-issues/8485/issue-8485.ts index f3738975e6..976ccda066 100644 --- a/test/github-issues/8485/issue-8485.ts +++ b/test/github-issues/8485/issue-8485.ts @@ -13,7 +13,13 @@ describe("github issues > #8485 second migration is generated for a combination async () => (dataSources = await createTestingConnections({ entities: [User, UserProfile], - enabledDrivers: ["mariadb", "mysql", "oracle", "postgres"], + enabledDrivers: [ + "mariadb", + "mysql", + "oracle", + "postgres", + "sap", + ], dropSchema: true, schemaCreate: false, })), diff --git a/test/github-issues/8522/issue-8522.ts b/test/github-issues/8522/issue-8522.ts index aac3488f38..d631f71839 100644 --- a/test/github-issues/8522/issue-8522.ts +++ b/test/github-issues/8522/issue-8522.ts @@ -10,7 +10,7 @@ import { InternalUser } from "./entity/InternalUser" import { InternalRole } from "./entity/InternalRole" import { User } from "./entity/User" import { Role } from "./entity/Role" -import { BaseEntity, TypeORMError } from "../../../src" +import { BaseEntity } from "../../../src" import { ClientRole } from "./entity/ClientRole" import { afterEach } from "mocha" @@ -92,14 +92,28 @@ describe("github issues > #8522 Single table inheritance returns the same discri describe("Related tables", () => { it("Should throw error when related tables have the same discriminator", async () => { - await createTestingConnections({ - entities: [BaseEntity, ClientRole, InternalRole, Role, User], - schemaCreate: true, - dropSchema: true, - }).should.be.rejectedWith( - TypeORMError, - `Entities ClientRole and InternalRole have the same discriminator values. Make sure they are different while using the @ChildEntity decorator.`, - ) + try { + const dataSources = await createTestingConnections({ + entities: [ + BaseEntity, + ClientRole, + InternalRole, + Role, + User, + ], + schemaCreate: true, + dropSchema: true, + }) + // if we have zero data sources - it means we are testing in mongodb-only mode - we are fine here + // if we have any data sources - it means test didn't go as we expected + if (dataSources.length > 0) { + expect(true).to.be.false + } + } catch (err) { + expect(err.message).to.contain( + "Entities ClientRole and InternalRole have the same discriminator values. Make sure they are different while using the @ChildEntity decorator.", + ) + } }) }) }) diff --git a/test/github-issues/9015/entity/Post.ts b/test/github-issues/9015/entity/Post.ts new file mode 100644 index 0000000000..e1eb7de239 --- /dev/null +++ b/test/github-issues/9015/entity/Post.ts @@ -0,0 +1,22 @@ +import { + BaseEntity, + Entity, + Column, + UpdateDateColumn, + PrimaryGeneratedColumn, +} from "../../../../src" + +@Entity() +export class Post extends BaseEntity { + @PrimaryGeneratedColumn() + id: number + + @Column({ type: "varchar", unique: true }) + title: string + + @Column({ type: "varchar" }) + description: string + + @UpdateDateColumn() + updated_at: Date +} diff --git a/test/github-issues/9015/issue-9015.ts b/test/github-issues/9015/issue-9015.ts new file mode 100644 index 0000000000..0a56d0c797 --- /dev/null +++ b/test/github-issues/9015/issue-9015.ts @@ -0,0 +1,65 @@ +import "reflect-metadata" +import { expect } from "chai" +import { DataSource, Repository } from "../../../src" +import { Post } from "./entity/Post" +import { + reloadTestingDatabases, + closeTestingConnections, + setupSingleTestingConnection, +} from "../../utils/test-utils" + +describe("github issues > #9015 @UpdateDateColumn not updating on upsert", () => { + let dataSource: DataSource + let repository: Repository + + before(async () => { + const options = setupSingleTestingConnection("postgres", { + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + }) + + if (!options) return + + dataSource = new DataSource(options) + await dataSource.initialize() + }) + beforeEach(async () => { + if (!dataSource) return + await reloadTestingDatabases([dataSource]) + repository = dataSource.getRepository(Post) + }) + after(() => closeTestingConnections([dataSource])) + + it("should update the @UpdateDateColumn", async () => { + if (!dataSource) return + + const oldDate = new Date("1970-01-01") + const post = new Post() + post.id = 1 + post.title = "Some post" + post.description = "Some description" + post.updated_at = oldDate + + await repository.save(post) + await repository.upsert( + { + title: post.title, + description: "Some new description", + }, + { + conflictPaths: { title: true }, + skipUpdateIfNoValuesChanged: true, + }, + ) + const postReloaded = await repository.findOne({ + where: { id: post.id }, + }) + + expect(postReloaded).to.exist + expect(postReloaded!.description).to.be.equal("Some new description") + expect(postReloaded!.updated_at.toString()).to.not.equal( + oldDate.toString(), + ) + }) +}) diff --git a/test/github-issues/9318/issue-9318.ts b/test/github-issues/9318/issue-9318.ts index 7f8315fd57..2a0e0229d8 100644 --- a/test/github-issues/9318/issue-9318.ts +++ b/test/github-issues/9318/issue-9318.ts @@ -31,7 +31,7 @@ describe("github issues > #9318 Change version query from SHOW server_version to connection.driver as PostgresDriver const result = await connection.query("SELECT VERSION()") const dbVersion = result[0]["version"].replace( - /^PostgreSQL ([\d\.]+) .*$/, + /^PostgreSQL ([\d.]+) .*$/, "$1", ) const versionGreaterOfEqualTo12 = VersionUtils.isGreaterOrEqual( diff --git a/test/github-issues/9323/issue-9323.ts b/test/github-issues/9323/issue-9323.ts index e704366d59..d7b80ec04d 100644 --- a/test/github-issues/9323/issue-9323.ts +++ b/test/github-issues/9323/issue-9323.ts @@ -229,7 +229,7 @@ describe("github issues > #9323 Add new VirtualColumn decorator feature", () => }), )) - it("should be able to save and find sub-select data in the databse (with query builder)", () => + it("should be able to save and find sub-select data in the database (with query builder)", () => Promise.all( connections.map(async (connection) => { const companyName = "My Company 2" @@ -272,9 +272,15 @@ describe("github issues > #9323 Add new VirtualColumn decorator feature", () => const companyQueryData = await connection .createQueryBuilder(Company, "company") - .leftJoinAndSelect("company.employees", "employee") - .leftJoinAndSelect("employee.timesheets", "timesheet") - .leftJoinAndSelect("timesheet.activities", "activity") + .select([ + "company.name", + "company.totalEmployeesCount", + "employee.name", + "timesheet.id", + "timesheet.totalActvityHours", + ]) + .leftJoin("company.employees", "employee") + .leftJoin("employee.timesheets", "timesheet") .where("company.name = :name", { name: companyName }) // we won't be supporting where & order bys with VirtualColumns (you will have to make your subquery a function that gets added to the query builder) //.andWhere("company.totalEmployeesCount > 2") diff --git a/test/github-issues/9601/entity/Foo.ts b/test/github-issues/9601/entity/Foo.ts index cf9d225ad2..ce93f1f7ad 100644 --- a/test/github-issues/9601/entity/Foo.ts +++ b/test/github-issues/9601/entity/Foo.ts @@ -4,7 +4,7 @@ import { UpdateDateColumn, } from "../../../../src" -@Entity({ name: "foo", schema: "SYSTEM" }) +@Entity({ name: "foo", schema: "TYPEORM" }) export class Foo { @PrimaryGeneratedColumn({ name: "id" }) id: number diff --git a/test/github-issues/9601/entity/FooView.ts b/test/github-issues/9601/entity/FooView.ts index f016b4bf8b..06c7072ad1 100644 --- a/test/github-issues/9601/entity/FooView.ts +++ b/test/github-issues/9601/entity/FooView.ts @@ -3,7 +3,7 @@ import { Foo } from "./Foo" @ViewEntity({ name: "foo_view", - schema: "SYSTEM", + schema: "TYPEORM", expression: (connection: DataSource) => connection.createQueryBuilder(Foo, "foo").select(`foo.updatedAt`), }) diff --git a/test/github-issues/9910/entity/User.ts b/test/github-issues/9910/entity/User.ts new file mode 100644 index 0000000000..e6a39507c9 --- /dev/null +++ b/test/github-issues/9910/entity/User.ts @@ -0,0 +1,10 @@ +import { Entity, PrimaryGeneratedColumn, Column } from "../../../../src" + +@Entity() +export class User { + @PrimaryGeneratedColumn() + id: number + + @Column() + name: string +} diff --git a/test/github-issues/9910/issue-9910.ts b/test/github-issues/9910/issue-9910.ts new file mode 100644 index 0000000000..baf4113736 --- /dev/null +++ b/test/github-issues/9910/issue-9910.ts @@ -0,0 +1,58 @@ +import "reflect-metadata" +import { expect } from "chai" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { User } from "./entity/User" + +describe("github issues > #9910 Incorrect behaivor of 'alwaysEnabled: true' after change from issue #9023", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + cache: { + alwaysEnabled: true, + }, + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should automatically cache if alwaysEnabled", () => + Promise.all( + connections.map(async (connection) => { + if (connection.driver.options.type === "spanner") { + return + } + const user1 = new User() + user1.name = "Foo" + await connection.manager.save(user1) + + const users1 = await connection + .createQueryBuilder(User, "user") + .getMany() + expect(users1.length).to.be.equal(1) + + const user2 = new User() + user2.name = "Bar" + await connection.manager.save(user2) + + // result should be cached and second user should not be retrieved + const users2 = await connection + .createQueryBuilder(User, "user") + .getMany() + expect(users2.length).to.be.equal(1) + + // with cache explicitly disabled, the second user should be retrieved + const users3 = await connection + .createQueryBuilder(User, "user") + .cache(false) + .getMany() + expect(users3.length).to.be.equal(2) + }), + )) +}) diff --git a/test/github-issues/9927/entity/ExampleEntity.ts b/test/github-issues/9927/entity/ExampleEntity.ts new file mode 100644 index 0000000000..7695ae894d --- /dev/null +++ b/test/github-issues/9927/entity/ExampleEntity.ts @@ -0,0 +1,17 @@ +import { Entity } from "../../../../src/decorator/entity/Entity" +import { Column } from "../../../../src/decorator/columns/Column" +import { PrimaryGeneratedColumn } from "../../../../src/decorator/columns/PrimaryGeneratedColumn" + +@Entity() +export class ExampleEntity { + @PrimaryGeneratedColumn() + id: number + + @Column({ + type: "int", + name: "serial_no_id", + nullable: false, + default: 0, + }) + serialNoId: number +} diff --git a/test/github-issues/9927/issue-9927.ts b/test/github-issues/9927/issue-9927.ts new file mode 100644 index 0000000000..437decc0e5 --- /dev/null +++ b/test/github-issues/9927/issue-9927.ts @@ -0,0 +1,65 @@ +import { DataSource } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { ExampleEntity } from "./entity/ExampleEntity" + +describe("github issues > #9927 aggregate function throw error when column alias name is set", () => { + let dataSources: DataSource[] + + before(async () => { + dataSources = await createTestingConnections({ + entities: [ExampleEntity], + enabledDrivers: ["mariadb"], + }) + }) + + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should call `maximum` method successfully", async () => { + await Promise.all( + dataSources.map(async (dataSource) => { + await dataSource.manager.maximum( + ExampleEntity, + "serialNoId", + {}, + ) + }), + ) + }) + + it("should call `minimum` method successfully", async () => { + await Promise.all( + dataSources.map(async (dataSource) => { + await dataSource.manager.minimum( + ExampleEntity, + "serialNoId", + {}, + ) + }), + ) + }) + + it("should call `sum` method successfully", async () => { + await Promise.all( + dataSources.map(async (dataSource) => { + await dataSource.manager.sum(ExampleEntity, "serialNoId", {}) + }), + ) + }) + + it("should call `average` method successfully", async () => { + await Promise.all( + dataSources.map(async (dataSource) => { + await dataSource.manager.average( + ExampleEntity, + "serialNoId", + {}, + ) + }), + ) + }) +}) diff --git a/test/github-issues/9944/entity/A.ts b/test/github-issues/9944/entity/A.ts new file mode 100644 index 0000000000..27d7b6f647 --- /dev/null +++ b/test/github-issues/9944/entity/A.ts @@ -0,0 +1,12 @@ +import { Column, Entity, PrimaryGeneratedColumn } from "../../../../src" + +import { B } from "./B" + +@Entity() +export class A { + @PrimaryGeneratedColumn("increment") + id!: number + + @Column(() => B) + b!: B +} diff --git a/test/github-issues/9944/entity/B.ts b/test/github-issues/9944/entity/B.ts new file mode 100644 index 0000000000..a3866c7c6e --- /dev/null +++ b/test/github-issues/9944/entity/B.ts @@ -0,0 +1,10 @@ +import { OneToMany } from "../../../../src" +import { C } from "./C" + +export class B { + @OneToMany(() => C, (c: C) => c.a, { + cascade: true, + eager: true, + }) + cs!: C[] +} diff --git a/test/github-issues/9944/entity/C.ts b/test/github-issues/9944/entity/C.ts new file mode 100644 index 0000000000..729893d1e1 --- /dev/null +++ b/test/github-issues/9944/entity/C.ts @@ -0,0 +1,28 @@ +import { + Entity, + ManyToOne, + OneToMany, + PrimaryGeneratedColumn, +} from "../../../../src" +import { A } from "./A" +import { D } from "./D" + +@Entity() +export class C { + @PrimaryGeneratedColumn("increment") + id!: number + + @ManyToOne(() => A, (a) => a.b.cs, { + onDelete: "CASCADE", + onUpdate: "CASCADE", + nullable: false, + }) + a!: A + + @OneToMany(() => D, (d) => d.c, { + cascade: true, + orphanedRowAction: "delete", + eager: true, + }) + ds!: D[] +} diff --git a/test/github-issues/9944/entity/D.ts b/test/github-issues/9944/entity/D.ts new file mode 100644 index 0000000000..1e970c44f1 --- /dev/null +++ b/test/github-issues/9944/entity/D.ts @@ -0,0 +1,14 @@ +import { Entity, ManyToOne, PrimaryGeneratedColumn } from "../../../../src" +import { C } from "./C" + +@Entity() +export class D { + @PrimaryGeneratedColumn("increment") + id!: number + + @ManyToOne(() => C, (c) => c.ds, { + onDelete: "CASCADE", + onUpdate: "CASCADE", + }) + c!: C +} diff --git a/test/github-issues/9944/issue-9944.ts b/test/github-issues/9944/issue-9944.ts new file mode 100644 index 0000000000..f53221e793 --- /dev/null +++ b/test/github-issues/9944/issue-9944.ts @@ -0,0 +1,42 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { expect } from "chai" +import { A } from "./entity/A" +import { B } from "./entity/B" +import { C } from "./entity/C" + +describe("github issues > #9944 Alias Issue With Nested Entity And Relations", () => { + let dataSources: DataSource[] + before( + async () => + (dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + relationLoadStrategy: "query", + enabledDrivers: ["mysql", "postgres"], + })), + ) + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("Validate correct loading of eager, nested relations", () => + Promise.all( + dataSources.map(async (dataSource) => { + const aEntity = new A() + aEntity.b = new B() + aEntity.b.cs = [new C()] + await dataSource.manager.save(aEntity) + + const [fetchedA] = await dataSource.manager.find(A) + expect(fetchedA.b).exist // Validates correct relation A.b is loaded + expect(fetchedA.b.cs).exist // Validates correct relation A.b.cs is loaded + expect(fetchedA.b.cs[0]).exist + }), + )) +}) diff --git a/test/github-issues/9965/entity/Book.ts b/test/github-issues/9965/entity/Book.ts new file mode 100644 index 0000000000..7625fecefc --- /dev/null +++ b/test/github-issues/9965/entity/Book.ts @@ -0,0 +1,10 @@ +import { Column, Entity, PrimaryGeneratedColumn } from "../../../../src" + +@Entity() +export class Book { + @PrimaryGeneratedColumn("uuid") + id: string + + @Column() + name: string +} diff --git a/test/github-issues/9965/entity/User.ts b/test/github-issues/9965/entity/User.ts new file mode 100644 index 0000000000..3aaeb00876 --- /dev/null +++ b/test/github-issues/9965/entity/User.ts @@ -0,0 +1,23 @@ +import { + Column, + Entity, + JoinTable, + ManyToMany, + PrimaryGeneratedColumn, +} from "../../../../src" +import { Book } from "./Book" + +export const BORROWED = "borrowed" + +@Entity() +export class User { + @PrimaryGeneratedColumn("uuid") + id: string + + @Column() + name: string + + @ManyToMany((_type) => Book, {}) + @JoinTable({ name: BORROWED }) + public borrowed: Book[] +} diff --git a/test/github-issues/9965/issue-9965.ts b/test/github-issues/9965/issue-9965.ts new file mode 100644 index 0000000000..33158062c3 --- /dev/null +++ b/test/github-issues/9965/issue-9965.ts @@ -0,0 +1,62 @@ +import Sinon, { spy } from "sinon" +import { DataSource } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { Book } from "./entity/Book" +import { User } from "./entity/User" +import { BorrowedSubscriber } from "./subscriber/BorrrowedSubscriber" +import { expect } from "chai" + +describe("github issues > #9965", () => { + let dataSources: DataSource[] + + before(async () => { + dataSources = await createTestingConnections({ + entities: [Book, User], + subscribers: [BorrowedSubscriber], + enabledDrivers: ["postgres"], + schemaCreate: true, + dropSchema: true, + }) + }) + + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should pass entityId to afterInsert method", () => + Promise.all( + dataSources.map(async (dataSource) => { + const testBook = dataSource.manager.create(Book, { + name: "TestPost", + }) + await dataSource.manager.save(testBook) + + const testUser = dataSource.manager.create(User, { + name: "TestUser", + }) + await dataSource.manager.save(testUser) + + testUser.borrowed = [testBook] + + const [subscriber] = dataSource.subscribers + const beforeInsert = spy(subscriber, "afterInsert") + + await dataSource.manager.save(testUser) + + expect(beforeInsert.called).to.be.true + expect( + beforeInsert.calledWith( + Sinon.match((event) => { + return ( + typeof event.entityId?.userId === "string" && + typeof event.entityId?.bookId === "string" + ) + }), + ), + ).to.be.ok + }), + )) +}) diff --git a/test/github-issues/9965/subscriber/BorrrowedSubscriber.ts b/test/github-issues/9965/subscriber/BorrrowedSubscriber.ts new file mode 100644 index 0000000000..b8c6ed0725 --- /dev/null +++ b/test/github-issues/9965/subscriber/BorrrowedSubscriber.ts @@ -0,0 +1,11 @@ +import { EntitySubscriberInterface, EventSubscriber } from "../../../../src" +import { BORROWED } from "../entity/User" + +@EventSubscriber() +export class BorrowedSubscriber implements EntitySubscriberInterface { + listenTo(): string | Function { + return BORROWED + } + + afterInsert(): void | Promise {} +} diff --git a/test/github-issues/9988/issue-9988.ts b/test/github-issues/9988/issue-9988.ts index 31979803c5..d0d0348256 100644 --- a/test/github-issues/9988/issue-9988.ts +++ b/test/github-issues/9988/issue-9988.ts @@ -8,6 +8,7 @@ import { DataSource } from "../../../src/data-source/DataSource" import { expect } from "chai" import { Product } from "./entity/product" import { Category } from "./entity/category" +import { FindManyOptions } from "../../../src" describe("github issues > #9988 RelationIdLoader reuses the same queryplanner within a transaction", () => { let dataSources: DataSource[] @@ -38,22 +39,23 @@ describe("github issues > #9988 RelationIdLoader reuses the same queryplanner wi const productTwoId = 2 await categoryRepo.save(categoryOne) await categoryRepo.save(categoryTwo) - const options = (id: number) => ({ - relationLoadStrategy: "query", - where: { id: productOneId }, - relations: { categories: true }, - }) + const options = (id: number) => + ({ + relationLoadStrategy: "query", + where: { id }, + relations: { categories: true }, + } as FindManyOptions) // Create a custom repository that uses a query builder without query planner // For both methods, relationLoadStrategy is set to "query", where the bug lies. const productRepo = dataSource.getRepository(Product).extend({ - async getOne(): Promise { + async getOne() { return this.createQueryBuilder("product") .setFindOptions(options(productOneId)) .getOne() }, - async getMany(): Promise { + async getMany() { return this.createQueryBuilder("product") .setFindOptions(options(productTwoId)) .getMany() @@ -75,7 +77,7 @@ describe("github issues > #9988 RelationIdLoader reuses the same queryplanner wi }, ) - expect(getOneProduct.categories.length).to.be.eql(1) + expect(getOneProduct?.categories.length).to.be.eql(1) const getManyProduct = await manager.transaction( async (txnManager) => { @@ -83,7 +85,10 @@ describe("github issues > #9988 RelationIdLoader reuses the same queryplanner wi txnManager.withRepository(productRepo) const product = customProductRepo.create({ id: productTwoId, - categories: [{ id: categoryOne.id }], + categories: [ + { id: categoryOne.id }, + { id: categoryTwo.id }, + ], }) await customProductRepo.save(product) @@ -91,7 +96,7 @@ describe("github issues > #9988 RelationIdLoader reuses the same queryplanner wi }, ) - expect(getManyProduct[0].categories.length).to.be.eql(1) + expect(getManyProduct[0].categories.length).to.be.eql(2) }), ) }) diff --git a/test/github-issues/9991/entity/ExampleEntity.ts b/test/github-issues/9991/entity/ExampleEntity.ts new file mode 100644 index 0000000000..9ce5ae839e --- /dev/null +++ b/test/github-issues/9991/entity/ExampleEntity.ts @@ -0,0 +1,8 @@ +import { Entity } from "../../../../src/decorator/entity/Entity" +import { PrimaryGeneratedColumn } from "../../../../src/decorator/columns/PrimaryGeneratedColumn" + +@Entity({ name: "example", comment: "table comment" }) +export class ExampleEntity { + @PrimaryGeneratedColumn() + id: number +} diff --git a/test/github-issues/9991/issue-9991.ts b/test/github-issues/9991/issue-9991.ts new file mode 100644 index 0000000000..7b1641de90 --- /dev/null +++ b/test/github-issues/9991/issue-9991.ts @@ -0,0 +1,86 @@ +import { DataSource } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { ExampleEntity } from "./entity/ExampleEntity" +import { expect } from "chai" + +describe("github issues > #9991", () => { + let dataSources: DataSource[] + + before(async () => { + dataSources = await createTestingConnections({ + entities: [ExampleEntity], + enabledDrivers: ["mysql", "mariadb"], + }) + }) + + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("add table comment", async () => { + await Promise.all( + dataSources.map(async (dataSource) => { + const sql = + 'SELECT `TABLE_COMMENT` FROM `INFORMATION_SCHEMA`.`TABLES` WHERE TABLE_NAME = "example"' + + const result = await dataSource.manager.query(sql) + expect(result).to.be.eql([{ TABLE_COMMENT: "table comment" }]) + }), + ) + }) + + it("should correctly change table comment and change", async () => { + await Promise.all( + dataSources.map(async (dataSource) => { + const queryRunner = dataSource.createQueryRunner() + let table = await queryRunner.getTable("example") + + await queryRunner.changeTableComment( + table!, + "new table comment", + ) + const sql = + 'SELECT `TABLE_COMMENT` FROM `INFORMATION_SCHEMA`.`TABLES` WHERE TABLE_NAME = "example"' + + let result = await dataSource.manager.query(sql) + expect(result).to.be.eql([ + { TABLE_COMMENT: "new table comment" }, + ]) + + // revert changes + await queryRunner.executeMemoryDownSql() + + result = await dataSource.manager.query(sql) + expect(result).to.be.eql([{ TABLE_COMMENT: "table comment" }]) + + await queryRunner.release() + }), + ) + }) + + it("should correctly synchronize when table comment change", async () => { + await Promise.all( + dataSources.map(async (dataSource) => { + const queryRunner = dataSource.createQueryRunner() + + const exampleMetadata = dataSource.getMetadata(ExampleEntity) + exampleMetadata.comment = "change table comment" + + await dataSource.synchronize() + + const sql = + 'SELECT `TABLE_COMMENT` FROM `INFORMATION_SCHEMA`.`TABLES` WHERE TABLE_NAME = "example"' + + const result = await dataSource.manager.query(sql) + expect(result).to.be.eql([ + { TABLE_COMMENT: "change table comment" }, + ]) + + await queryRunner.release() + }), + ) + }) +}) diff --git a/test/integration/sample2-one-to-one.ts b/test/integration/sample2-one-to-one.ts index 469a9d8a22..24f18452d2 100644 --- a/test/integration/sample2-one-to-one.ts +++ b/test/integration/sample2-one-to-one.ts @@ -198,6 +198,48 @@ describe("one-to-one", function () { .getOne() .should.eventually.eql(expectedDetails) }) + + it("should load post and its details with no hangup if query used", async function () { + if (!dataSource) return + const expectedPost = new Post() + expectedPost.id = savedPost.id + expectedPost.text = savedPost.text + expectedPost.title = savedPost.title + expectedPost.details = new PostDetails() + expectedPost.details!.id = savedPost.details!.id + expectedPost.details!.authorName = savedPost.details!.authorName + expectedPost.details!.comment = savedPost.details!.comment + expectedPost.details!.metadata = savedPost.details!.metadata + + const findOne = () => + postRepository.findOne({ + where: { + id: savedPost.id, + }, + relations: { + details: true, + }, + relationLoadStrategy: "query", + }) + + const posts = await Promise.all([ + findOne(), + findOne(), + findOne(), + findOne(), + findOne(), + findOne(), + findOne(), + findOne(), + findOne(), + findOne(), + ]) + + posts.forEach((post) => { + expect(post).not.to.be.null + post!.should.eql(expectedPost) + }) + }) }) describe("insert post and category (one-side relation)", function () { diff --git a/test/integration/sample3-many-to-one.ts b/test/integration/sample3-many-to-one.ts index 5417f9a623..a2f0580547 100644 --- a/test/integration/sample3-many-to-one.ts +++ b/test/integration/sample3-many-to-one.ts @@ -200,6 +200,48 @@ describe("many-to-one", function () { .getOne() .should.eventually.eql(expectedDetails) }) + + it("should load post and its details with no hangup if query used", async function () { + if (!dataSource) return + const expectedPost = new Post() + expectedPost.id = savedPost.id + expectedPost.text = savedPost.text + expectedPost.title = savedPost.title + expectedPost.details = new PostDetails() + expectedPost.details!.id = savedPost.details!.id + expectedPost.details!.authorName = savedPost.details!.authorName + expectedPost.details!.comment = savedPost.details!.comment + expectedPost.details!.metadata = savedPost.details!.metadata + + const findOne = () => + postRepository.findOne({ + where: { + id: savedPost.id, + }, + relations: { + details: true, + }, + relationLoadStrategy: "query", + }) + + const posts = await Promise.all([ + findOne(), + findOne(), + findOne(), + findOne(), + findOne(), + findOne(), + findOne(), + findOne(), + findOne(), + findOne(), + ]) + + posts.forEach((post) => { + expect(post).not.to.be.null + post!.should.eql(expectedPost) + }) + }) }) describe("insert post and category (one-side relation)", function () { diff --git a/test/other-issues/composite-keys/composite-keys.ts b/test/other-issues/composite-keys/composite-keys.ts new file mode 100644 index 0000000000..ece198e3dc --- /dev/null +++ b/test/other-issues/composite-keys/composite-keys.ts @@ -0,0 +1,109 @@ +import "reflect-metadata" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { Policy } from "./entity/Policy" +import { Group } from "./entity/Group" +import { PolicyGroup } from "./entity/PolicyGroup" + +describe("other issues > composite keys doesn't work as expected in 0.3 compared to 0.2", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should properly save new relation items", () => + Promise.all( + connections.map(async function (connection) { + const group1 = new Group() + group1.id = 1 + const group2 = new Group() + group2.id = 2 + + const policy1 = new Policy() + policy1.id = 1 + const policy2 = new Policy() + policy2.id = 2 + + await connection.manager.save([ + group1, + group2, + policy1, + policy2, + ]) + + const policyGroup1 = new PolicyGroup() + policyGroup1.groupId = group1.id + policyGroup1.policyId = policy1.id + + await connection.manager.save([policyGroup1]) + + // re-load policy + const loadedPolicy = await connection.manager + .getRepository(Policy) + .findOneOrFail({ + where: { id: 1 }, + loadEagerRelations: false, + }) + + const loadedPolicyGroups = await connection.manager + .getRepository(PolicyGroup) + .find({ + where: { + policyId: loadedPolicy.id, + }, + loadEagerRelations: false, + }) + + const policyGroups2 = new PolicyGroup() + policyGroups2.groupId = group2.id + policyGroups2.policyId = policy1.id + + loadedPolicy.groups = [...loadedPolicyGroups, policyGroups2] + + await connection.manager.save(loadedPolicy) + }), + )) + + it("should properly save new relation items - Drata", async () => { + for (const connection of connections) { + let policy = new Policy() + policy.id = 1 + + const group = new Group() + group.id = 1 + + let policyGroup = new PolicyGroup() + policyGroup.policy = policy + policyGroup.group = group + + await connection.manager.save(policy) + await connection.manager.save(group) + await connection.manager.save(policyGroup) + + /** + * Query everything back out to start fresh + */ + policy = await connection.manager.findOneByOrFail(Policy, {}) + policyGroup = await connection.manager.findOneByOrFail( + PolicyGroup, + {}, + ) + + policy.groups = [policyGroup] + + /** + * This save fails + */ + await connection.manager.save(policy) + } + }) +}) diff --git a/test/other-issues/composite-keys/entity/Group.ts b/test/other-issues/composite-keys/entity/Group.ts new file mode 100644 index 0000000000..a316e3f4c4 --- /dev/null +++ b/test/other-issues/composite-keys/entity/Group.ts @@ -0,0 +1,15 @@ +import { OneToMany, PrimaryColumn } from "../../../../src" +import { Entity } from "../../../../src/decorator/entity/Entity" +import { PolicyGroup } from "./PolicyGroup" + +@Entity() +export class Group { + @PrimaryColumn() + id: number + + @OneToMany(() => PolicyGroup, (policyGroup) => policyGroup.policy) + groups: PolicyGroup[] + + @OneToMany(() => PolicyGroup, (policyGroup) => policyGroup.group) + policies: PolicyGroup[] +} diff --git a/test/other-issues/composite-keys/entity/Policy.ts b/test/other-issues/composite-keys/entity/Policy.ts new file mode 100644 index 0000000000..a2d1c7b637 --- /dev/null +++ b/test/other-issues/composite-keys/entity/Policy.ts @@ -0,0 +1,15 @@ +import { Entity } from "../../../../src/decorator/entity/Entity" +import { OneToMany, PrimaryColumn } from "../../../../src/index" +import { PolicyGroup } from "./PolicyGroup" + +@Entity() +export class Policy { + @PrimaryColumn() + id: number + + @OneToMany(() => PolicyGroup, (policyGroup) => policyGroup.policy) + groups: PolicyGroup[] + + @OneToMany(() => PolicyGroup, (policyGroup) => policyGroup.group) + policies: PolicyGroup[] +} diff --git a/test/other-issues/composite-keys/entity/PolicyGroup.ts b/test/other-issues/composite-keys/entity/PolicyGroup.ts new file mode 100644 index 0000000000..6bc159829d --- /dev/null +++ b/test/other-issues/composite-keys/entity/PolicyGroup.ts @@ -0,0 +1,26 @@ +import { Entity } from "../../../../src/decorator/entity/Entity" +import { JoinColumn, ManyToOne, PrimaryColumn } from "../../../../src/index" +import { Policy } from "./Policy" +import { Group } from "./Group" + +@Entity() +export class PolicyGroup { + @PrimaryColumn() + policyId: number + + @ManyToOne(() => Policy, (policy) => policy.id, { + eager: true, + nullable: false, + }) + @JoinColumn() + policy: Policy + + @PrimaryColumn() + groupId: number + + @ManyToOne(() => Group, (group) => group.id, { + eager: true, + nullable: false, + }) + group: Group +} diff --git a/test/unit/orm-utils.ts b/test/unit/orm-utils.ts new file mode 100644 index 0000000000..28fa04e309 --- /dev/null +++ b/test/unit/orm-utils.ts @@ -0,0 +1,75 @@ +import { OrmUtils } from "../../src/util/OrmUtils" +import { expect } from "chai" + +describe(`orm-utils`, () => { + describe("parseSqlCheckExpression", () => { + it("parses a simple CHECK constraint", () => { + // Spaces between CHECK values + expect( + OrmUtils.parseSqlCheckExpression( + `CREATE TABLE "foo_table" ( + "id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, + "col" varchar CHECK("col" IN ('FOO', 'BAR', 'BAZ')) NOT NULL, + "some_other_col" integer NOT NULL + );`, + "col", + ), + ).to.have.same.members(["FOO", "BAR", "BAZ"]) + + // No spaces between CHECK values + expect( + OrmUtils.parseSqlCheckExpression( + `CREATE TABLE "foo_table" ( + "id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, + "col" varchar CHECK("col" IN ('FOO','BAR','BAZ')) NOT NULL, + "some_other_col" integer NOT NULL + );`, + "col", + ), + ).to.have.same.members(["FOO", "BAR", "BAZ"]) + }) + + it("returns undefined when the column doesn't have a CHECK", () => { + expect( + OrmUtils.parseSqlCheckExpression( + `CREATE TABLE "foo_table" ( + "id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, + "col" varchar NOT NULL, + "some_other_col" integer NOT NULL + );`, + "col", + ), + ).to.equal(undefined) + }) + + it("parses a CHECK constraint with values containing special characters", () => { + expect( + OrmUtils.parseSqlCheckExpression( + `CREATE TABLE "foo_table" ( + "id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, + "col" varchar CHECK("col" IN ( + 'a,b', + ',c,', + 'd''d', + '''e''', + 'f'',''f', + ''')', + ')''' + ) + ) NOT NULL, + "some_other_col" integer NOT NULL + );`, + "col", + ), + ).to.have.same.members([ + "a,b", + ",c,", + "d'd", + "'e'", + "f','f", + "')", + ")'", + ]) + }) + }) +}) diff --git a/test/utils/test-utils.ts b/test/utils/test-utils.ts index ff00a240e0..49680e1fca 100644 --- a/test/utils/test-utils.ts +++ b/test/utils/test-utils.ts @@ -159,6 +159,11 @@ export interface TestingOptions { | Logger relationLoadStrategy?: "join" | "query" + + /** + * Allows automatic isolation of where clauses + */ + isolateWhereStatements?: boolean } /** @@ -295,6 +300,9 @@ export function setupTestingConnections( newOptions.metadataTableName = options.metadataTableName if (options && options.relationLoadStrategy) newOptions.relationLoadStrategy = options.relationLoadStrategy + if (options && options.isolateWhereStatements) + newOptions.isolateWhereStatements = + options.isolateWhereStatements newOptions.baseDirectory = path.dirname(getOrmFilepath()) @@ -430,9 +438,6 @@ export async function createTestingConnections( await queryRunner.query( `SET CLUSTER SETTING kv.range_merge.queue_interval = '200ms'`, ) - await queryRunner.query( - `SET CLUSTER SETTING kv.raft_log.disable_synchronization_unsafe = 'true'`, - ) await queryRunner.query( `SET CLUSTER SETTING sql.defaults.experimental_temporary_tables.enabled = 'true';`, ) diff --git a/test/utils/xfail.ts b/test/utils/xfail.ts index 4c8a38500a..87cf936208 100644 --- a/test/utils/xfail.ts +++ b/test/utils/xfail.ts @@ -21,9 +21,11 @@ const wrap = ( return new Promise((ok, fail) => { if (fn.length > 1) { - fn.call(context, (err: any) => (err ? fail(err) : ok())) + ;(fn as Func).call(context as unknown as Context, (err: any) => + err ? fail(err) : ok(), + ) } else { - ok(fn.call(context)) + ok((fn as AsyncFunc).call(context as unknown as Context)) } }).then( (e: any) => assert.fail("Expected this test to fail"), diff --git a/tsconfig.json b/tsconfig.json index 07d136b9f5..0d6657570f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,35 +1,36 @@ { + "extends": "@tsconfig/node16/tsconfig.json", "compilerOptions": { - "lib": ["es5", "es6"], - "outDir": "build/compiled", "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "target": "ES2019", - "module": "commonjs", - "moduleResolution": "node", - "importHelpers": true, + "declaration": true, + "downlevelIteration": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, - "sourceMap": true, - "noImplicitAny": true, - "declaration": true, + "importHelpers": true, + "module": "commonjs", + "moduleResolution": "node", "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, "noImplicitReturns": true, - "stripInternal": true, - "pretty": true, - "strictNullChecks": true, "noUnusedLocals": true, - "downlevelIteration": true + "outDir": "build/compiled", + "pretty": true, + "sourceMap": true, + "strictFunctionTypes": false, + "strictPropertyInitialization": false, + "stripInternal": true, + "useUnknownInCatchVariables": false }, "include": [ "sample", "src", - "test" + "test", + "*.ts" ], "exclude": [ - "tmp", - "temp", "build", - "node_modules" + "node_modules", + "temp", + "tmp" ] }