From b79f17bb40e44b95bf423d108edb236cb5f07a85 Mon Sep 17 00:00:00 2001 From: Ulad Kasach Date: Mon, 16 Sep 2024 04:54:13 -0400 Subject: [PATCH] fix(practs): bump practs to latest best --- .eslintrc.js | 1 + .gitattributes | 2 + .github/workflows/.install.yml | 46 ++++++++++ .github/workflows/.publish-npm.yml | 9 +- .github/workflows/.test.yml | 83 ++++++------------ .gitignore | 1 + .husky/check.lockfile.sh | 2 +- .husky/check.nvm.sh | 4 + .husky/check.yalc.sh | 7 ++ .husky/post-checkout | 1 + .husky/pre-commit | 4 + .nvmrc | 2 +- jest.acceptance.config.ts | 3 + jest.integration.config.ts | 3 + jest.unit.config.ts | 3 + package-lock.json | 134 ++++++++++++++++++++++------- package.json | 33 +++---- 17 files changed, 229 insertions(+), 109 deletions(-) create mode 100644 .gitattributes create mode 100644 .github/workflows/.install.yml create mode 100755 .husky/check.nvm.sh create mode 100755 .husky/check.yalc.sh create mode 100755 .husky/pre-commit diff --git a/.eslintrc.js b/.eslintrc.js index 1a70980..c1fa6fc 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -43,5 +43,6 @@ module.exports = { '@typescript-eslint/lines-between-class-members': 'off', 'no-return-await': 'off', // this does not help anything and actually leads to bugs if we subsequently wrap the return in a try catch without remembering to _then_ add await '@typescript-eslint/return-await': 'off', + '@typescript-eslint/no-unsafe-declaration-merging': 'off', // dobjs are built off of this }, }; diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6843c74 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# exclude package-lock from git diff; https://stackoverflow.com/a/72834452/3068233 +package-lock.json -diff diff --git a/.github/workflows/.install.yml b/.github/workflows/.install.yml new file mode 100644 index 0000000..bc60def --- /dev/null +++ b/.github/workflows/.install.yml @@ -0,0 +1,46 @@ +name: .install + +on: + workflow_call: + outputs: + node-modules-cache-key: + description: a max(stable) cache key to the node modules of this commit's dependencies + value: ${{ jobs.npm.outputs.node-modules-cache-key }} + +jobs: + npm: + runs-on: ubuntu-20.04 + outputs: + node-modules-cache-key: ${{ steps.cache.outputs.cache-primary-key }} + steps: + - name: checkout + uses: actions/checkout@v3 + + - name: set node-version + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: node-modules deps hash + id: deps-hash + run: | + PACKAGE_DEPS_HASH=$(jq '.packages' package-lock.json | jq 'del(."".version)' | md5sum | awk '{print $1}'); + echo "PACKAGE_DEPS_HASH=$PACKAGE_DEPS_HASH" + echo "package-deps-hash=$PACKAGE_DEPS_HASH" >> "$GITHUB_OUTPUT" + - name: node-modules cache get + uses: actions/cache/restore@v4 + id: cache + with: + path: ./node_modules + key: ${{ runner.os }}-node-${{ steps.deps-hash.outputs.package-deps-hash }} + + - name: node-modules cache miss install + if: steps.cache.outputs.cache-hit != 'true' + run: npm ci --ignore-scripts --prefer-offline --no-audit + + - name: node-modules cache set + if: steps.cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: ./node_modules + key: ${{ steps.cache.outputs.cache-primary-key }} diff --git a/.github/workflows/.publish-npm.yml b/.github/workflows/.publish-npm.yml index d904def..4c3eb76 100644 --- a/.github/workflows/.publish-npm.yml +++ b/.github/workflows/.publish-npm.yml @@ -8,8 +8,12 @@ on: description: required credentials to authenticate with the aws account under which to publish jobs: + install: + uses: ./.github/workflows/.install.yml + publish: runs-on: ubuntu-20.04 + needs: [install] steps: - name: checkout uses: actions/checkout@v3 @@ -19,14 +23,13 @@ jobs: with: registry-url: 'https://registry.npmjs.org/' node-version-file: '.nvmrc' - cache: 'npm' - name: node-modules cache get - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 id: cache with: path: ./node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + key: ${{ needs.install.outputs.node-modules-cache-key }} - name: node-modules cache miss install if: steps.cache.outputs.cache-hit != 'true' diff --git a/.github/workflows/.test.yml b/.github/workflows/.test.yml index 11cdad6..fbb08a9 100644 --- a/.github/workflows/.test.yml +++ b/.github/workflows/.test.yml @@ -20,39 +20,13 @@ on: description: required credentials to authenticate with aws the aws account against which to run the tests jobs: + # install the dependencies install: - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: set node-version - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: node-modules cache get - uses: actions/cache/restore@v3 - id: cache - with: - path: ./node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - - - name: node-modules cache miss install - if: steps.cache.outputs.cache-hit != 'true' - run: npm ci --ignore-scripts --prefer-offline --no-audit - - - name: node-modules cache set - if: steps.cache.outputs.cache-hit != 'true' - uses: actions/cache/save@v3 - with: - path: ./node_modules - key: ${{ steps.cache.outputs.cache-primary-key }} + uses: ./.github/workflows/.install.yml # run tests in parallel test-commits: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 needs: [install] steps: - name: checkout @@ -64,19 +38,18 @@ jobs: uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' - cache: 'npm' - name: get node-modules from cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: ./node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + key: ${{ needs.install.outputs.node-modules-cache-key }} - name: test:commits run: npm run test:commits test-types: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 needs: [install] steps: - name: checkout @@ -86,19 +59,18 @@ jobs: uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' - cache: 'npm' - name: get node-modules from cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: ./node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + key: ${{ needs.install.outputs.node-modules-cache-key }} - name: test:types run: npm run test:types test-format: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 needs: [install] steps: - name: checkout @@ -108,19 +80,18 @@ jobs: uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' - cache: 'npm' - name: get node-modules from cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: ./node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + key: ${{ needs.install.outputs.node-modules-cache-key }} - name: test:format run: npm run test:format test-lint: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 needs: [install] steps: - name: checkout @@ -130,19 +101,18 @@ jobs: uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' - cache: 'npm' - name: get node-modules from cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: ./node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + key: ${{ needs.install.outputs.node-modules-cache-key }} - name: test:lint run: npm run test:lint test-unit: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 needs: [install] steps: - name: checkout @@ -152,19 +122,18 @@ jobs: uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' - cache: 'npm' - name: get node-modules from cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: ./node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + key: ${{ needs.install.outputs.node-modules-cache-key }} - name: test:unit - run: npm run test:unit + run: THOROUGH=true npm run test:unit test-integration: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 needs: [install] steps: - name: checkout @@ -174,13 +143,12 @@ jobs: uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' - cache: 'npm' - name: get node-modules from cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: ./node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + key: ${{ needs.install.outputs.node-modules-cache-key }} - name: configure aws credentials if: "${{ inputs.aws-account-id != '' }}" @@ -202,10 +170,10 @@ jobs: run: npm run provision:integration-test-db --if-present - name: test:integration - run: npm run test:integration + run: THOROUGH=true npm run test:integration test-acceptance-locally: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 needs: [install] steps: - name: checkout @@ -215,13 +183,12 @@ jobs: uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' - cache: 'npm' - name: get node-modules from cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: ./node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + key: ${{ needs.install.outputs.node-modules-cache-key }} - name: configure aws credentials if: "${{ inputs.aws-account-id != '' }}" diff --git a/.gitignore b/.gitignore index 12e7cdf..3698728 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ .serverless .terraform .terraform.lock +.yalc coverage dist node_modules diff --git a/.husky/check.lockfile.sh b/.husky/check.lockfile.sh index 672b589..2cd2afc 100755 --- a/.husky/check.lockfile.sh +++ b/.husky/check.lockfile.sh @@ -6,5 +6,5 @@ changed () { } if changed 'package-lock.json'; then - echo "📦 package-lock.json changed. Run npm install to update your locally installed dependencies." + echo "📦 package-lock.json changed. Run 'npm install' to update your locally installed dependencies." fi diff --git a/.husky/check.nvm.sh b/.husky/check.nvm.sh new file mode 100755 index 0000000..d25f79d --- /dev/null +++ b/.husky/check.nvm.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# if exists a .nvmrc, then `nvm use`, to use the specified version +# [[ -f ".nvmrc" ]] && nvm use # todo: find a way to share nvm permissions diff --git a/.husky/check.yalc.sh b/.husky/check.yalc.sh new file mode 100755 index 0000000..6bb3287 --- /dev/null +++ b/.husky/check.yalc.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# https://github.com/wclr/yalc +if [ "$(npx yalc check)" ]; then + echo "✋ package.json has yalc references. Run 'npx yalc remove --all' to remove these local testing references." +fi + diff --git a/.husky/post-checkout b/.husky/post-checkout index 825c2ec..9ef84af 100755 --- a/.husky/post-checkout +++ b/.husky/post-checkout @@ -1,4 +1,5 @@ #!/bin/sh . "$(dirname -- "$0")/_/husky.sh" +. "$(dirname -- "$0")/check.nvm.sh" . "$(dirname -- "$0")/check.lockfile.sh" diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..766c5ea --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname -- "$0")/_/husky.sh" + +. "$(dirname -- "$0")/check.yalc.sh" diff --git a/.nvmrc b/.nvmrc index b009dfb..a81deba 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -lts/* +v20.12.2 diff --git a/jest.acceptance.config.ts b/jest.acceptance.config.ts index a8ae45a..4a62e00 100644 --- a/jest.acceptance.config.ts +++ b/jest.acceptance.config.ts @@ -3,6 +3,9 @@ import type { Config } from 'jest'; // ensure tests run in utc, like they will on cicd and on server; https://stackoverflow.com/a/56277249/15593329 process.env.TZ = 'UTC'; +// ensure tests run like on local machines, so snapshots are equal on local && cicd +process.env.FORCE_COLOR = 'true'; + // https://jestjs.io/docs/configuration const config: Config = { verbose: true, diff --git a/jest.integration.config.ts b/jest.integration.config.ts index 6715b55..ef32f9c 100644 --- a/jest.integration.config.ts +++ b/jest.integration.config.ts @@ -3,6 +3,9 @@ import type { Config } from 'jest'; // ensure tests run in utc, like they will on cicd and on server; https://stackoverflow.com/a/56277249/15593329 process.env.TZ = 'UTC'; +// ensure tests run like on local machines, so snapshots are equal on local && cicd +process.env.FORCE_COLOR = 'true'; + // https://jestjs.io/docs/configuration const config: Config = { verbose: true, diff --git a/jest.unit.config.ts b/jest.unit.config.ts index eb408ec..8267acc 100644 --- a/jest.unit.config.ts +++ b/jest.unit.config.ts @@ -3,6 +3,9 @@ import type { Config } from 'jest'; // ensure tests run in utc, like they will on cicd and on server; https://stackoverflow.com/a/56277249/15593329 process.env.TZ = 'UTC'; +// ensure tests run like on local machines, so snapshots are equal on local && cicd +process.env.FORCE_COLOR = 'true'; + // https://jestjs.io/docs/configuration const config: Config = { verbose: true, diff --git a/package-lock.json b/package-lock.json index 59af3a5..908a008 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,8 +22,8 @@ "@typescript-eslint/parser": "5.46.1", "core-js": "3.26.1", "cz-conventional-changelog": "3.3.0", - "declapract": "0.11.5", - "declapract-typescript-ehmpathy": "0.33.4", + "declapract": "0.12.0", + "declapract-typescript-ehmpathy": "0.36.5", "depcheck": "1.4.3", "eslint": "8.30.0", "eslint-config-airbnb-typescript": "17.0.0", @@ -6819,13 +6819,13 @@ } }, "node_modules/declapract": { - "version": "0.11.5", - "resolved": "https://registry.npmjs.org/declapract/-/declapract-0.11.5.tgz", - "integrity": "sha512-X2ab85VlFD5OohuFovNZz476zPiHbPqWn4ytDTD+Bl1wo+kTrxd1lh3iM+sIrAoI/KDr9yxTrX77Mrl4Z1U7tA==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/declapract/-/declapract-0.12.0.tgz", + "integrity": "sha512-Lr1uCXMgUPJxjrR1/2cnQ4yk5cWYlhawE2gYBtDiecnKpp6fvTfx6kX/slS5NDBLgxdw6yCovxJGtsizfNqhyw==", "dev": true, "hasInstallScript": true, "dependencies": { - "@ehmpathy/error-fns": "1.0.2", + "@ehmpathy/error-fns": "1.3.2", "@oclif/core": "2.0.11", "@oclif/plugin-help": "3.3.1", "chalk": "2.4.2", @@ -6844,7 +6844,7 @@ "shelljs": "0.8.5", "simple-leveled-log-methods": "0.1.4", "ts-node": "8.6.2", - "type-fns": "1.16.0", + "type-fns": "1.17.0", "uuid": "9.0.0", "yaml": "1.6.0" }, @@ -6856,31 +6856,18 @@ } }, "node_modules/declapract-typescript-ehmpathy": { - "version": "0.33.4", - "resolved": "https://registry.npmjs.org/declapract-typescript-ehmpathy/-/declapract-typescript-ehmpathy-0.33.4.tgz", - "integrity": "sha512-oSbFGza1jf2C4dNQ7dY605zkvwcjcYHXwbcBbmuYv2p7GO6W5cHVqcHgYzWAgEUE/NBZZIPVjiP0T3Ko9T2K5g==", + "version": "0.36.5", + "resolved": "https://registry.npmjs.org/declapract-typescript-ehmpathy/-/declapract-typescript-ehmpathy-0.36.5.tgz", + "integrity": "sha512-/eZI05kACSZrtxnXygkWvdyQPDOemSNcWwFXhxnhJl3KLUYSMvIVlFXMMYC0v/v0d+J8K0XUqwykK5aYGUJxLA==", "dev": true, "hasInstallScript": true, "dependencies": { - "@ehmpathy/error-fns": "1.3.1", + "domain-objects": "0.22.1", "expect": "29.4.2", "flat": "5.0.2" }, "peerDependencies": { - "declapract": "0.11.5" - } - }, - "node_modules/declapract-typescript-ehmpathy/node_modules/@ehmpathy/error-fns": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@ehmpathy/error-fns/-/error-fns-1.3.1.tgz", - "integrity": "sha512-WSQQ95mAVU9JammqFeEfeyf23YeVIRSnCtH1TZurlgCpFuilui8hId77cfq6RlaOkPZd5zdFEs6pjTTDXLchqA==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "type-fns": "0.9.0" - }, - "engines": { - "node": ">=8.0.0" + "declapract": ">=0.11.5" } }, "node_modules/declapract-typescript-ehmpathy/node_modules/expect": { @@ -6899,7 +6886,33 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/declapract-typescript-ehmpathy/node_modules/type-fns": { + "node_modules/declapract/node_modules/@ehmpathy/error-fns": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@ehmpathy/error-fns/-/error-fns-1.3.2.tgz", + "integrity": "sha512-U8jO5pqcQvZnqZiy2Vryz8KaPu0AdT8m/xWwp5cNJu0klqcEpskUrLimAIeR6+ymkHeBfGawzUaYa5/0uBQPow==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "type-fns": "1.16.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/declapract/node_modules/@ehmpathy/error-fns/node_modules/@ehmpathy/error-fns": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@ehmpathy/error-fns/-/error-fns-1.0.2.tgz", + "integrity": "sha512-v3aJIqUvD9a3drx1pyS8La+9u9WTTvNE35NksiD4Oo3VanNe8Rmue/atRHPg4nNYQ/xPv4+RoqC+OBj6cAY8VA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "type-fns": "0.9.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/declapract/node_modules/@ehmpathy/error-fns/node_modules/@ehmpathy/error-fns/node_modules/type-fns": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/type-fns/-/type-fns-0.9.0.tgz", "integrity": "sha512-ndhY4JBIbKix0LuGA5smh/XhFFnbeudnih++WxVoGTfdrITsZe/s3qje9GZNdWwsO+YWGyQkNXwAjnWyM/dipw==", @@ -6908,6 +6921,18 @@ "node": ">=8.0.0" } }, + "node_modules/declapract/node_modules/@ehmpathy/error-fns/node_modules/type-fns": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/type-fns/-/type-fns-1.16.0.tgz", + "integrity": "sha512-4erPa91wW979ZHH/zVI340b3s4HQGFYUMH5rBUUP0tyqPGzpZJddUpZXBliu8KF/oXEMOq3Elydb7OgdgKpung==", + "dev": true, + "dependencies": { + "@ehmpathy/error-fns": "1.0.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/declapract/node_modules/ts-node": { "version": "8.6.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.6.2.tgz", @@ -6931,6 +6956,55 @@ "typescript": ">=2.7" } }, + "node_modules/declapract/node_modules/type-fns": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/type-fns/-/type-fns-1.17.0.tgz", + "integrity": "sha512-zscRD2lGbnD2Ktyvb79cZ7R1kGm0OBnfisG3g3LdFS9C9pR8YKdXtUojDStvgQtaqyb/a77E5gYTsBY3jrZMsA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@ehmpathy/error-fns": "1.0.2", + "type-fns": "1.16.0", + "uuid": "9.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/declapract/node_modules/type-fns/node_modules/@ehmpathy/error-fns": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@ehmpathy/error-fns/-/error-fns-1.0.2.tgz", + "integrity": "sha512-v3aJIqUvD9a3drx1pyS8La+9u9WTTvNE35NksiD4Oo3VanNe8Rmue/atRHPg4nNYQ/xPv4+RoqC+OBj6cAY8VA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "type-fns": "0.9.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/declapract/node_modules/type-fns/node_modules/@ehmpathy/error-fns/node_modules/type-fns": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/type-fns/-/type-fns-0.9.0.tgz", + "integrity": "sha512-ndhY4JBIbKix0LuGA5smh/XhFFnbeudnih++WxVoGTfdrITsZe/s3qje9GZNdWwsO+YWGyQkNXwAjnWyM/dipw==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/declapract/node_modules/type-fns/node_modules/type-fns": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/type-fns/-/type-fns-1.16.0.tgz", + "integrity": "sha512-4erPa91wW979ZHH/zVI340b3s4HQGFYUMH5rBUUP0tyqPGzpZJddUpZXBliu8KF/oXEMOq3Elydb7OgdgKpung==", + "dev": true, + "dependencies": { + "@ehmpathy/error-fns": "1.0.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/declapract/node_modules/uuid": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", @@ -12532,12 +12606,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": { diff --git a/package.json b/package.json index cf0847e..f461d4f 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "typescript" ], "bugs": "https://github.com/ehmpathy/error-fns/issues", + "license": "MIT", "main": "dist/index.js", "engines": { "node": ">=8.0.0" @@ -39,8 +40,8 @@ "test:lint:deps": "npx depcheck -c ./depcheckrc.yml", "test:lint:eslint": "eslint -c ./.eslintrc.js src/**/*.ts", "test:lint": "npm run test:lint:eslint && npm run test:lint:deps", - "test:unit": "jest -c ./jest.unit.config.ts --forceExit --verbose --passWithNoTests", - "test:integration": "jest -c ./jest.integration.config.ts --forceExit --verbose --passWithNoTests", + "test:unit": "jest -c ./jest.unit.config.ts --forceExit --verbose --passWithNoTests $([ -z $THOROUGH ] && echo '--changedSince=main')", + "test:integration": "jest -c ./jest.integration.config.ts --forceExit --verbose --passWithNoTests $([ -z $THOROUGH ] && echo '--changedSince=main')", "test:acceptance:locally": "npm run build && LOCALLY=true jest -c ./jest.acceptance.config.ts --forceExit --verbose --runInBand --passWithNoTests", "test": "npm run test:commits && npm run test:types && npm run test:format && npm run test:lint && npm run test:unit && npm run test:integration && npm run test:acceptance:locally", "test:acceptance": "npm run build && jest -c ./jest.acceptance.config.ts --forceExit --verbose --runInBand --passWithNoTests", @@ -48,40 +49,40 @@ "prepublish": "npm run build", "preversion": "npm run prepush", "postversion": "git push origin HEAD --tags --no-verify", - "postinstall": "[ -d .git ] && npx husky install || exit 0" + "postinstall": "[ -d .git ] && npm run prepare:husky || exit 0", + "prepare:husky": "npx husky install && chmod ug+x .husky/*" }, "dependencies": { - "type-fns": "1.16.0" + "type-fns": "1.17.0" }, "devDependencies": { - "@commitlint/cli": "17.7.1", + "@commitlint/cli": "19.3.0", "@commitlint/config-conventional": "13.1.0", "@trivago/prettier-plugin-sort-imports": "4.3.0", "@tsconfig/node-lts-strictest": "18.12.1", "@types/jest": "29.2.4", - "@typescript-eslint/eslint-plugin": "5.46.1", - "@typescript-eslint/parser": "5.46.1", + "@typescript-eslint/eslint-plugin": "7.8.0", + "@typescript-eslint/parser": "7.8.0", "core-js": "3.26.1", "cz-conventional-changelog": "3.3.0", - "declapract": "0.11.5", - "declapract-typescript-ehmpathy": "0.33.4", + "declapract": "0.12.0", + "declapract-typescript-ehmpathy": "0.36.5", "depcheck": "1.4.3", - "eslint": "8.30.0", - "eslint-config-airbnb-typescript": "17.0.0", + "eslint": "8.56.0", + "eslint-config-airbnb-typescript": "18.0.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-import": "2.26.0", "eslint-plugin-prettier": "4.2.1", "husky": "8.0.3", "jest": "29.3.1", "prettier": "2.8.1", - "ts-jest": "29.0.3", - "ts-node": "10.9.1", - "typescript": "4.9.4" + "ts-jest": "29.1.3", + "ts-node": "10.9.2", + "typescript": "5.4.5" }, "config": { "commitizen": { "path": "./node_modules/cz-conventional-changelog" } - }, - "license": "MIT" + } }