diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 58256e0dd97..00000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,215 +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" }} - - run: - name: Verify `package.json` and `package-lock.json` are in sync - command: npx lock-verify - - run: - # This uses `npm install` instead of `npm ci` - # because of https://github.com/npm/cli/issues/558 - name: Install Node Packages - command: | - if [ ! -d node_modules ]; then - npm install - fi - - run: - # This is pretty terrible but OracleDB requires you to grab the binaries OOB - # from the normal installation, place them in the LD Path - # also - not super well documented - grab `libaio` as well - # Because this is technically the same image as the runner we'll snag - # the libaio1 and place them in the same instantclient directory. - name: Download Required OracleDB Binaries - command: | - if [ ! -d node_modules/oracledb/instantclient_19_8 ]; then - curl -sf -o node_modules/oracledb/instantclient.zip $BLOB_URL - unzip -qqo node_modules/oracledb/instantclient.zip -d node_modules/oracledb/ - rm node_modules/oracledb/instantclient.zip - - DEBIAN_FRONTEND=noninteractive sudo apt-get -qq -y install libaio1 - cp /lib/*/libaio.so.* node_modules/oracledb/instantclient_19_8/ - fi - environment: - BLOB_URL: https://download.oracle.com/otn_software/linux/instantclient/19800/instantclient-basiclite-linux.x64-19.8.0.0.0dbru.zip - - save_cache: - name: Save node_modules cache - key: node_modules-{{ checksum "package-lock.json" }} - paths: - - node_modules - -jobs: - lint: - working_directory: ~/typeorm - docker: - - image: circleci/node:12 - steps: - - checkout - - install-packages: - cache-key: node12 - - run: npm run lint - - build: - working_directory: ~/typeorm - docker: - - image: circleci/node:12 - steps: - - checkout - - install-packages: - cache-key: node12 - - run: npm run compile - - persist_to_workspace: - root: ~/typeorm - paths: - - build/ - - test: - parameters: - databases: - type: string - default: "" - node-version: - type: string - default: "10" - working_directory: ~/typeorm - docker: - - image: circleci/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 \ - circleci/node:<< parameters.node-version >> \ - /bin/bash -c "sudo chmod 777 /typeorm && sudo chown circleci /typeorm" - docker cp ./ typeorm-code:/typeorm - - run: - name: Wait for Services to be Available - command: | - COMMANDS=$( - cat ormconfig.json \ - | jq -r ' - map(select(.skip == false) - | select(.host) - | select(.port) - | "nc -z " + .host + " " + (.port|tostring) + " && echo " + .host + " " + (.port|tostring) + " is up") - | join(" && ") - ' - ) - echo "Running '$COMMANDS'" - - docker run \ - --network typeorm_default \ - --tty \ - ubuntu:trusty \ - timeout 60 sh -c "until ($COMMANDS); do echo \"Waiting for Services to be Available ...\"; sleep 5; done" - # Download and cache dependencies - - run: - name: "Run Tests with Coverage" - command: | - docker run \ - --env LD_LIBRARY_PATH='/typeorm/node_modules/oracledb/instantclient_19_8/:$LD_LIBRARY_PATH' \ - --volumes-from typeorm-code \ - --network typeorm_default \ - --tty \ - --workdir /typeorm \ - --name typeorm-testrunner \ - circleci/node:<< parameters.node-version >> \ - npx nyc npm run test-fast - - docker cp typeorm-testrunner:/typeorm/coverage/ ./ - - run: - name: Stop all Relevant Services - command: docker-compose down - - store_artifacts: - path: coverage - - codecov/upload - -workflows: - version: 2 - test: - jobs: - - lint - - build - - test: - name: test (mysql mariadb postgres mssql mongodb sqlite better-sqlite3 sqljs) - Node v<< matrix.node-version >> - requires: - - lint - - build - databases: "mysql mariadb postgres mssql mongodb sqlite better-sqlite3 sqljs" - matrix: - parameters: - node-version: - - "10" - - "12" - - "13" - - test: - name: test (cockroachdb) - Node v12 - requires: - - lint - - build - databases: "cockroachdb" - node-version: "12" - - test: - name: test (oracle) - Node v12 - requires: - - lint - - build - databases: "oracle" - node-version: "12" diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 06473d20bf9..00000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,54 +0,0 @@ -module.exports = { - "env": { - "node": true - }, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": "tsconfig.json", - "sourceType": "module" - }, - "plugins": [ - "@typescript-eslint" - ], - "rules": { - "@typescript-eslint/no-unused-vars": [ - "error", - { - "args": "none" - } - ], - "@typescript-eslint/prefer-namespace-keyword": "error", - "@typescript-eslint/quotes": [ - "error", - "double", - { - "avoidEscape": true, - "allowTemplateLiterals": true - } - ], - "@typescript-eslint/semi": [ - "error" - ], - "@typescript-eslint/type-annotation-spacing": "error", - "@typescript-eslint/no-redeclare": "error", - "eqeqeq": [ - "error", - "smart" - ], - "id-blacklist": [ - "error", - "any", - "Number", - "number", - "String", - "string", - "Boolean", - "boolean", - "Undefined", - "undefined" - ], - "id-match": "error", - "no-eval": "error", - "no-var": "error" - } -}; diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index aa3d4af1355..00000000000 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -name: "🐛 Bug Report" -about: Report a reproducible bug or regression. -title: '' -labels: requires triage, bug -assignees: '' - ---- - - - -## Issue Description - -### Expected Behavior - - - - -### Actual Behavior - - - -``` -// include the output in code tags like these! -``` - - -### Steps to Reproduce - - - -1. -2. - -```typescript -// insert code here -``` - -### My Environment - - - -| Dependency | Version | -| --- | --- | -| Operating System | | -| Node.js version | vX.Y.ZZZ | -| Typescript version | vX.Y.ZZZ | -| TypeORM version | vX.Y.ZZZ | - - -### Additional Context - - - - -### Relevant Database Driver(s) - - - -- [ ] `aurora-data-api` -- [ ] `aurora-data-api-pg` -- [ ] `better-sqlite3` -- [ ] `cockroachdb` -- [ ] `cordova` -- [ ] `expo` -- [ ] `mongodb` -- [ ] `mysql` -- [ ] `nativescript` -- [ ] `oracle` -- [ ] `postgres` -- [ ] `react-native` -- [ ] `sap` -- [ ] `sqlite` -- [ ] `sqlite-abstract` -- [ ] `sqljs` -- [ ] `sqlserver` - - -### Are you willing to resolve this issue by submitting a Pull Request? - - - -- [ ] Yes, I have the time, and I know how to start. -- [ ] Yes, I have the time, but I don't know how to start. I would need guidance. -- [ ] No, I don't have the time, although I believe I could do it if I had the time... -- [ ] No, I don't have the time and I wouldn't even know how to start. - - - diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 00000000000..d613f98c14b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,133 @@ +name: 🐛 Bug Report +description: Report a reproducible bug or regression. +labels: + - requires triage + - bug +body: + - type: markdown + attributes: + value: |2- + Have a question? This is the TypeORM issue tracker – and not the right place for general support or questions. Instead, check the ["Support" Documentation]( https://github.com/typeorm/typeorm/blob/master/docs/support.md + ) on the best places to ask questions! + - type: input + id: description + attributes: + label: Issue description + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: " A clear and concise description of what you expected to happen." + validations: + required: true + - type: textarea + id: actual + attributes: + label: Actual Behavior + description: >- + A clear and concise description of what actually happened. Please wrap + any error messages or output in code tags, instead of images. + validations: + required: true + - type: textarea + id: steps + attributes: + label: Steps to reproduce + description: >- + Your bug will be investigated much faster if we can run your code and it + doesn't have dependencies other than TypeORM. Issues without + reproduction steps or code examples may be closed as not actionable. + placeholder: >- + Please try to provide a Minimal, Complete, and Verifiable example. + http://stackoverflow.com/help/mcve + validations: + required: true + - type: textarea + id: env + attributes: + label: My Environment + description: >- + Please add any other relevant dependencies to this table at the end. For + example: Electron, React Native, or NestJS. + value: | + | Dependency | Version | + | --- | --- | + | Operating System | | + | Node.js version | x.y.zzz | + | Typescript version | x.y.zzz | + | TypeORM version | x.y.zzz | + validations: + required: true + - type: textarea + id: context + attributes: + label: Additional Context + description: >- + Add any other context about the bug report here. Add any other context + about the bug report here. + - type: checkboxes + id: drivers + attributes: + label: Relevant Database Driver(s) + options: + - label: aurora-mysql + required: false + - label: aurora-postgres + required: false + - label: better-sqlite3 + required: false + - label: cockroachdb + required: false + - label: cordova + required: false + - label: expo + required: false + - label: mongodb + required: false + - label: mysql + required: false + - label: nativescript + required: false + - label: oracle + required: false + - label: postgres + required: false + - label: react-native + required: false + - label: sap + required: false + - label: spanner + required: false + - label: sqlite + required: false + - label: sqlite-abstract + required: false + - label: sqljs + required: false + - label: sqlserver + required: false + - type: dropdown + id: pr + attributes: + label: Are you willing to resolve this issue by submitting a Pull Request? + options: + - Yes, I have the time, and I know how to start. + - >- + Yes, I have the time, but I don't know how to start. I would need + guidance. + - >- + No, I don’t have the time, but I can support (using donations) + development. + - >- + No, I don’t have the time and I’m okay to wait for the community / + maintainers to resolve this issue. + validations: + required: true + - type: markdown + attributes: + value: |2- + Remember that first-time contributors are welcome! 🙌 + + 👋 Have a great day and thank you for the bug report! diff --git a/.github/ISSUE_TEMPLATE/documentation-issue.md b/.github/ISSUE_TEMPLATE/documentation-issue.md deleted file mode 100644 index cf314029803..00000000000 --- a/.github/ISSUE_TEMPLATE/documentation-issue.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -name: 📝 Documentation Issue -about: Documentation is unclear or otherwise insufficient. -title: '' -labels: documentation, requires triage -assignees: '' - ---- - - - -## Documentation Issue - -### What was unclear or otherwise insufficient? - - - - -### Recommended Fix - - - - -### Additional Context - - - - -### Relevant Database Driver(s) - - - -- [ ] `aurora-data-api` -- [ ] `aurora-data-api-pg` -- [ ] `better-sqlite3` -- [ ] `cockroachdb` -- [ ] `cordova` -- [ ] `expo` -- [ ] `mongodb` -- [ ] `mysql` -- [ ] `nativescript` -- [ ] `oracle` -- [ ] `postgres` -- [ ] `react-native` -- [ ] `sap` -- [ ] `sqlite` -- [ ] `sqlite-abstract` -- [ ] `sqljs` -- [ ] `sqlserver` - - -### Are you willing to resolve this issue by submitting a Pull Request? - - - -- [ ] Yes, I have the time, and I know how to start. -- [ ] Yes, I have the time, but I don't know how to start. I would need guidance. -- [ ] No, I don't have the time, although I believe I could do it if I had the time... -- [ ] No, I don't have the time and I wouldn't even know how to start. - - - diff --git a/.github/ISSUE_TEMPLATE/documentation-issue.yml b/.github/ISSUE_TEMPLATE/documentation-issue.yml new file mode 100644 index 00000000000..2c99a73cf51 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation-issue.yml @@ -0,0 +1,63 @@ +name: 📝 Documentation Issue +description: Documentation is unclear or otherwise insufficient. +labels: + - documentation + - requires triage +body: + - type: markdown + attributes: + value: >- + Have a question? This is the TypeORM issue tracker - and not the right + place for general support or questions. Instead, check the [“Support" + Documentation](https://github.com/typeorm/typeorm/blob/master/docs/support.md + + ) on the best places to ask questions! + - type: textarea + id: details + attributes: + label: What was unclear or otherwise insufficient? + description: >- + If relevant, Please be clear about the documentation file, as well as + the location within the file. Link to the documentation in the + repository. + placeholder: >- + If the page does not exist, please be clear why a new documentation + section is needed. + validations: + required: true + - type: textarea + id: recommendation + attributes: + label: Recommended Fix + description: How should we fix this documentation issue? + placeholder: Should we add examples, clarify the language, or drop the page entirely? + validations: + required: true + - type: textarea + id: context + attributes: + label: Additional Context + description: Add any other context about the documentation issue here. + - type: dropdown + id: pr + attributes: + label: Are you willing to resolve this issue by submitting a Pull Request? + options: + - Yes, I have the time, and I know how to start. + - >- + Yes, I have the time, but I don't know how to start. I would need + guidance. + - >- + No, I don’t have the time, but I can support (using donations) + development. + - >- + No, I don’t have the time and I’m okay to wait for the community / + maintainers to resolve this issue. + validations: + required: true + - type: markdown + attributes: + value: |- + Remember that first-time contributors are welcome! 🙌 + + 👋 Have a great day and thank you for the documentation problem report! diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md deleted file mode 100644 index c2b13944b72..00000000000 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -name: 🌈 Feature request -about: Suggest an amazing new idea for this project -title: '' -labels: new feature, requires triage -assignees: '' - ---- - - - -## Feature Description - -### The Problem - - - - -### The Solution - - - - -### Considered Alternatives - - - - -### Additional Context - - - - -### Relevant Database Driver(s) - - - -- [ ] `aurora-data-api` -- [ ] `aurora-data-api-pg` -- [ ] `better-sqlite3` -- [ ] `cockroachdb` -- [ ] `cordova` -- [ ] `expo` -- [ ] `mongodb` -- [ ] `mysql` -- [ ] `nativescript` -- [ ] `oracle` -- [ ] `postgres` -- [ ] `react-native` -- [ ] `sap` -- [ ] `sqlite` -- [ ] `sqlite-abstract` -- [ ] `sqljs` -- [ ] `sqlserver` - - -### Are you willing to resolve this issue by submitting a Pull Request? - - - -- [ ] Yes, I have the time, and I know how to start. -- [ ] Yes, I have the time, but I don't know how to start. I would need guidance. -- [ ] No, I don't have the time, although I believe I could do it if I had the time... -- [ ] No, I don't have the time and I wouldn't even know how to start. - - - diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 00000000000..e5f0aa9c94c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,112 @@ +name: 🌈 Feature request +description: Suggest an amazing new idea for this project +labels: + - new feature + - requires triage +body: + - type: markdown + attributes: + value: >- + Have a question? This is the TypeORM issue tracker - and not the right + place for general support or questions. Instead, check the [“Support" + Documentation](https://github.com/typeorm/typeorm/blob/master/docs/support.md) + on the best places to ask questions! + - type: textarea + id: problem + attributes: + label: Feature Description + description: >- + A clear and concise description of what the problem is, and why it needs + to be implemented as a new feature for TypeORM. + placeholder: For example, "I'm always frustrated when ..." + validations: + required: true + - type: textarea + id: solution + attributes: + label: The Solution + description: A clear and concise description of what you want to happen. + placeholder: >- + How can the requested feature be used to approach the problem it's + supposed to solve? + validations: + required: true + - type: textarea + id: alt + attributes: + label: Considered Alternatives + description: >- + A clear and concise description of any alternative solutions or features + you've considered. + placeholder: If any workaround exists to the best of your knowledge, include it here. + validations: + required: true + - type: textarea + id: context + attributes: + label: Additional Context + description: Add any other context about the feature request here + - type: checkboxes + id: drivers + attributes: + label: Relevant Database Driver(s) + options: + - label: aurora-mysql + required: false + - label: aurora-postgres + required: false + - label: better-sqlite3 + required: false + - label: cockroachdb + required: false + - label: cordova + required: false + - label: expo + required: false + - label: mongodb + required: false + - label: mysql + required: false + - label: nativescript + required: false + - label: oracle + required: false + - label: postgres + required: false + - label: react-native + required: false + - label: sap + required: false + - label: spanner + required: false + - label: sqlite + required: false + - label: sqlite-abstract + required: false + - label: sqljs + required: false + - label: sqlserver + required: false + - type: dropdown + id: pr + attributes: + label: Are you willing to resolve this issue by submitting a Pull Request? + options: + - Yes, I have the time, and I know how to start. + - >- + Yes, I have the time, but I don't know how to start. I would need + guidance. + - >- + No, I don’t have the time, but I can support (using donations) + development. + - >- + No, I don’t have the time and I’m okay to wait for the community / + maintainers to resolve this issue. + validations: + required: true + - type: markdown + attributes: + value: |- + Remember that first-time contributors are welcome! 🙌 + + 👋 Have a great day and thank you for the feature request! diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index fd33e7cbf69..2d2835648d1 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -7,25 +7,22 @@ If unsure about something.. just do as best as you're able, or reach out through our community support channels! https://github.com/typeorm/typeorm/blob/master/docs/support.md + https://github.com/typeorm/typeorm/blob/master/CONTRIBUTING.md --> ### Description of change - ### Pull-Request Checklist -- [ ] Code is up-to-date with the `master` branch -- [ ] `npm run lint` passes with this change -- [ ] `npm run test` passes with this change -- [ ] This pull request links relevant issues as `Fixes #0000` -- [ ] There are new or updated unit tests validating the change -- [ ] Documentation has been updated to reflect this change -- [ ] The new commits follow conventions explained in [CONTRIBUTING.md](https://github.com/typeorm/typeorm/blob/master/CONTRIBUTING.md) +- [ ] Code is up-to-date with the `master` branch +- [ ] This pull request links relevant issues as `Fixes #00000` +- [ ] There are new or updated unit tests validating the change +- [ ] Documentation has been updated to reflect this change