From 99ce03500d7381c41ffa7af75eefc9520a5886a9 Mon Sep 17 00:00:00 2001 From: roikoren755 <26850796+roikoren755@users.noreply.github.com> Date: Mon, 12 Jul 2021 16:17:07 +0300 Subject: [PATCH] chore: add yarn deduplicate, update README.md (#45) * chore: add yarn deduplicate, update README.md * Create rotten-mayflies-lay.md --- .changeset/rotten-mayflies-lay.md | 5 +++++ .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/workflows/test.yml | 2 ++ .husky/pre-commit | 4 ++++ CONTRIBUTING.md | 6 +++--- README.md | 23 ++++++++++++++++++++++- docs/README.md | 23 ++++++++++++++++++++++- package.json | 6 ++++-- yarn.lock | 28 ++++++++++++++++++++++++---- 9 files changed, 87 insertions(+), 12 deletions(-) create mode 100644 .changeset/rotten-mayflies-lay.md diff --git a/.changeset/rotten-mayflies-lay.md b/.changeset/rotten-mayflies-lay.md new file mode 100644 index 0000000..7400ca5 --- /dev/null +++ b/.changeset/rotten-mayflies-lay.md @@ -0,0 +1,5 @@ +--- +"iql": patch +--- + +chore: add yarn deduplicate, update README.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 77d51a7..8cdb689 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -5,7 +5,7 @@ Before submitting a pull request, please make sure the following is done: 1. A relevant issue exists and is open. If not, please open an issue first. - 2. Fork [the repository](https://github.com/altnext/REPOSITORY) and create your branch from `main`. + 2. Fork [the repository](https://github.com/altnext/iql) and create your branch from `main`. 3. Run `yarn` in the repository root. 4. If you've fixed a bug or added code that should be tested, add tests! 5. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3754614..4766089 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,6 +33,8 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install run: yarn install --frozen-lockfile + - name: Deduplicate yarn.lock + run: yarn deduplicate --list --fail - name: Lint run: yarn lint - name: Type diff --git a/.husky/pre-commit b/.husky/pre-commit index 7b5ca69..329f502 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,5 +2,9 @@ . "$(dirname "$0")/_/husky.sh" yarn lint-staged + yarn docs git add docs/ + +yarn deduplicate +git add yarn.lock diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5384886..56da1ec 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -100,11 +100,11 @@ project: ```bash # Clone your fork of the repo into the current directory - git clone https://github.com// + git clone https://github.com//iql # Navigate to the newly cloned directory - cd + cd iql # Assign the original repo to a remote called "upstream" - git remote add upstream https://github.com/altnext/ + git remote add upstream https://github.com/altnext/iql ``` 2. If you cloned a while ago, get the latest changes from upstream: diff --git a/README.md b/README.md index 33b114a..ea43f15 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,30 @@ Inline Query Language This package aims to make SQL-like queries type safe and easy to build dynamically with an expressive API -[![Coverage Status](https://github.com/altnext/iql/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/AltNext/iql/actions/workflows/test.yml?query=branch%3Amain) +[![Test Status](https://github.com/altnext/iql/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/AltNext/iql/actions/workflows/test.yml?query=branch%3Amain) [![Coverage Status](https://coveralls.io/repos/github/AltNext/iql/badge.svg?branch=main)](https://coveralls.io/github/AltNext/iql?branch=main) +[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=AltNext_iql&metric=bugs)](https://sonarcloud.io/dashboard?id=AltNext_iql) +[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=AltNext_iql&metric=code_smells)](https://sonarcloud.io/dashboard?id=AltNext_iql) +[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=AltNext_iql&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=AltNext_iql) +[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=AltNext_iql&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=AltNext_iql) +[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=AltNext_iql&metric=security_rating)](https://sonarcloud.io/dashboard?id=AltNext_iql) +[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=AltNext_iql&metric=sqale_index)](https://sonarcloud.io/dashboard?id=AltNext_iql) +[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=AltNext_iql&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=AltNext_iql) + +[![Snyk Vulnerabilities for GitHub Repo](https://img.shields.io/snyk/vulnerabilities/github/altnext/iql)](https://app.snyk.io/org/altnext/project/https://app.snyk.io/org/altnext/project/615eb00b-5713-4b96-b95b-634bf66f43db) + +[![npm](https://img.shields.io/npm/v/iql)](https://www.npmjs.com/package/iql) +[![NPM](https://img.shields.io/npm/l/iql)](https://www.npmjs.com/package/iql) +[![npm](https://img.shields.io/npm/dm/iql)](https://www.npmjs.com/package/iql) +[![npm bundle size](https://img.shields.io/bundlephobia/minzip/iql)](https://www.npmjs.com/package/iql) + +[![GitHub issues](https://img.shields.io/github/issues-raw/altnext/iql)](https://www.github.com/altnext/iql) +[![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/altnext/iql)](https://www.github.com/altnext/iql) +[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/altnext/iql)](https://www.github.com/altnext/iql) +[![Lines of code](https://img.shields.io/tokei/lines/github/altnext/iql)](https://www.github.com/altnext/iql) +[![GitHub top language](https://img.shields.io/github/languages/top/altnext/iql)](https://www.github.com/altnext/iql) + ```typescript import { Client } from 'pg'; import { query } from 'iql'; diff --git a/docs/README.md b/docs/README.md index d6deaae..961f3e1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,9 +6,30 @@ Inline Query Language This package aims to make SQL-like queries type safe and easy to build dynamically with an expressive API -[![Coverage Status](https://github.com/altnext/iql/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/AltNext/iql/actions/workflows/test.yml?query=branch%3Amain) +[![Test Status](https://github.com/altnext/iql/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/AltNext/iql/actions/workflows/test.yml?query=branch%3Amain) [![Coverage Status](https://coveralls.io/repos/github/AltNext/iql/badge.svg?branch=main)](https://coveralls.io/github/AltNext/iql?branch=main) +[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=AltNext_iql&metric=bugs)](https://sonarcloud.io/dashboard?id=AltNext_iql) +[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=AltNext_iql&metric=code_smells)](https://sonarcloud.io/dashboard?id=AltNext_iql) +[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=AltNext_iql&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=AltNext_iql) +[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=AltNext_iql&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=AltNext_iql) +[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=AltNext_iql&metric=security_rating)](https://sonarcloud.io/dashboard?id=AltNext_iql) +[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=AltNext_iql&metric=sqale_index)](https://sonarcloud.io/dashboard?id=AltNext_iql) +[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=AltNext_iql&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=AltNext_iql) + +[![Snyk Vulnerabilities for GitHub Repo](https://img.shields.io/snyk/vulnerabilities/github/altnext/iql)](https://app.snyk.io/org/altnext/project/https://app.snyk.io/org/altnext/project/615eb00b-5713-4b96-b95b-634bf66f43db) + +[![npm](https://img.shields.io/npm/v/iql)](https://www.npmjs.com/package/iql) +[![NPM](https://img.shields.io/npm/l/iql)](https://www.npmjs.com/package/iql) +[![npm](https://img.shields.io/npm/dm/iql)](https://www.npmjs.com/package/iql) +[![npm bundle size](https://img.shields.io/bundlephobia/minzip/iql)](https://www.npmjs.com/package/iql) + +[![GitHub issues](https://img.shields.io/github/issues-raw/altnext/iql)](https://www.github.com/altnext/iql) +[![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/altnext/iql)](https://www.github.com/altnext/iql) +[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/altnext/iql)](https://www.github.com/altnext/iql) +[![Lines of code](https://img.shields.io/tokei/lines/github/altnext/iql)](https://www.github.com/altnext/iql) +[![GitHub top language](https://img.shields.io/github/languages/top/altnext/iql)](https://www.github.com/altnext/iql) + ```typescript import { Client } from 'pg'; import { query } from 'iql'; diff --git a/package.json b/package.json index a1a0cb4..5948e94 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "build": "tsc", "clean": "tsc --build --clean", "coverage": "jest --coverage", + "deduplicate": "yarn-deduplicate -s fewer", "docs": "yarn typedoc --disableSources index.ts", "lint": "eslint --ext .ts . --cache", "prepare": "husky install", @@ -44,9 +45,10 @@ "pg": "8.6.0", "ts-jest": "27.0.3", "ts-node": "10.1.0", - "typedoc": "0.21.3", + "typedoc": "0.21.2", "typedoc-plugin-markdown": "3.10.2", - "typescript": "4.3.5" + "typescript": "4.3.5", + "yarn-deduplicate": "3.1.0" }, "author": "Altnext Gorillaz", "license": "MIT", diff --git a/yarn.lock b/yarn.lock index 617bfaa..d18683d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1177,6 +1177,11 @@ "@typescript-eslint/types" "4.28.1" eslint-visitor-keys "^2.0.0" +"@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + JSONStream@^1.0.4: version "1.3.5" resolved "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -1756,6 +1761,11 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" +commander@^6.1.0: + version "6.2.1" + resolved "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" + integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== + commander@^7.2.0: version "7.2.0" resolved "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" @@ -5510,13 +5520,14 @@ typedoc-plugin-markdown@3.10.2: dependencies: handlebars "^4.7.7" -typedoc@0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.21.3.tgz#9d35e6789c70d3b5b908f69a830294652ef7128e" - integrity sha512-SE0MytBcr3LpZmo22KxOI5vOvy+4cHl7U3TwYfc7OpUWaZLsDgP1yVqswoIdAUl6qwqskZie6Lyw/nzW5y840w== +typedoc@0.21.2: + version "0.21.2" + resolved "https://registry.npmjs.org/typedoc/-/typedoc-0.21.2.tgz#cf5094314d3d63e95a8ef052ceff06a6cafd509d" + integrity sha512-SR1ByJB3USg+jxoxwzMRP07g/0f/cQUE5t7gOh1iTUyjTPyJohu9YSKRlK+MSXXqlhIq+m0jkEHEG5HoY7/Adg== dependencies: glob "^7.1.7" handlebars "^4.7.7" + lodash "^4.17.21" lunr "^2.3.9" marked "^2.1.1" minimatch "^3.0.0" @@ -5843,6 +5854,15 @@ yargs@^16.0.3, yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" +yarn-deduplicate@3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/yarn-deduplicate/-/yarn-deduplicate-3.1.0.tgz#3018d93e95f855f236a215b591fe8bc4bcabba3e" + integrity sha512-q2VZ6ThNzQpGfNpkPrkmV7x5HT9MOhCUsTxVTzyyZB0eSXz1NTodHn+r29DlLb+peKk8iXxzdUVhQG9pI7moFw== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + commander "^6.1.0" + semver "^7.3.2" + yn@3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"