Skip to content

Commit

Permalink
fix(practs): bump practs to latest best
Browse files Browse the repository at this point in the history
  • Loading branch information
uladkasach committed Aug 3, 2024
1 parent 8619b06 commit aaf6aff
Show file tree
Hide file tree
Showing 8 changed files with 152 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .husky/check.nvm.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

# if exists a .nvmrc, then `nvm use`, to use the specified version
[[ -f ".nvmrc" ]] && nvm use
# [[ -f ".nvmrc" ]] && nvm use # todo: find a way to share nvm permissions
1 change: 1 addition & 0 deletions .husky/post-checkout
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
. "$(dirname -- "$0")/_/husky.sh"

. "$(dirname -- "$0")/check.nvm.sh"
. "$(dirname -- "$0")/check.lockfile.sh"
1 change: 0 additions & 1 deletion .husky/post-rewrite
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh
. "$(dirname -- "$0")/_/husky.sh"

. "$(dirname -- "$0")/check.nvm.sh"
. "$(dirname -- "$0")/check.lockfile.sh"
3 changes: 3 additions & 0 deletions jest.acceptance.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions jest.integration.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions jest.unit.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
181 changes: 126 additions & 55 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 15 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@
"fix:format": "npm run fix:format:prettier",
"fix:lint": "eslint -c ./.eslintrc.js src/**/*.ts --fix",
"build:artifact": "echo 'no artifact'",
"provision:docker:mysql:down": "docker-compose -f ./provision/docker/integration_test_db/mysql/docker-compose.yml down",
"provision:docker:mysql:up": "docker-compose -f ./provision/docker/integration_test_db/mysql/docker-compose.yml up -d --force-recreate --build --renew-anon-volumes",
"provision:docker:mysql:await": "docker-compose -f ./provision/docker/integration_test_db/mysql/docker-compose.yml exec -T mysql /root/wait-for-mysql.sh",
"provision:docker:mysql:down": "docker compose -f ./provision/docker/integration_test_db/mysql/docker-compose.yml down",
"provision:docker:mysql:up": "docker compose -f ./provision/docker/integration_test_db/mysql/docker-compose.yml up -d --force-recreate --build --renew-anon-volumes",
"provision:docker:mysql:await": "docker compose -f ./provision/docker/integration_test_db/mysql/docker-compose.yml exec -T mysql /root/wait-for-mysql.sh",
"provision:integration-test-db:mysql": "npm run provision:docker:mysql:up && npm run provision:docker:mysql:await",
"provision:docker:postgres:down": "docker-compose -f ./provision/docker/integration_test_db/postgres/docker-compose.yml down",
"provision:docker:postgres:up": "docker-compose -f ./provision/docker/integration_test_db/postgres/docker-compose.yml up -d --force-recreate --build --renew-anon-volumes",
"provision:docker:postgres:down": "docker compose -f ./provision/docker/integration_test_db/postgres/docker-compose.yml down",
"provision:docker:postgres:up": "docker compose -f ./provision/docker/integration_test_db/postgres/docker-compose.yml up -d --force-recreate --build --renew-anon-volumes",
"build:clean": "rm dist/ -rf",
"build:compile": "tsc -p ./tsconfig.build.json",
"build": "npm run build:clean && npm run build:compile",
"provision:docker:postgres:await": "docker-compose -f ./provision/docker/integration_test_db/postgres/docker-compose.yml exec -T postgres /root/wait-for-postgres.sh",
"provision:docker:postgres:init": "docker-compose -f ./provision/docker/integration_test_db/postgres/docker-compose.yml exec -T postgres /root/provision-init.sh",
"provision:docker:postgres:await": "docker compose -f ./provision/docker/integration_test_db/postgres/docker-compose.yml exec -T postgres /root/wait-for-postgres.sh",
"provision:docker:postgres:init": "docker compose -f ./provision/docker/integration_test_db/postgres/docker-compose.yml exec -T postgres /root/provision-init.sh",
"provision:integration-test-db:postgres": "npm run provision:docker:postgres:up && npm run provision:docker:postgres:await && npm run provision:docker:postgres:init",
"provision:integration-test-db": "npm run provision:integration-test-db:postgres && npm run provision:integration-test-db:mysql",
"test:commits": "LAST_TAG=$(git describe --tags --abbrev=0 @^ 2> /dev/null || git rev-list --max-parents=0 HEAD) && npx commitlint --from $LAST_TAG --to HEAD --verbose",
Expand All @@ -66,16 +66,17 @@
"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": "FORCE_COLOR=true jest -c ./jest.unit.config.ts --forceExit --verbose --passWithNoTests $([ -z $THOROUGH ] && echo '--changedSince=main')",
"test:integration": "FORCE_COLOR=true jest -c ./jest.integration.config.ts --forceExit --verbose --passWithNoTests --runInBand $([ -z $THOROUGH ] && echo '--changedSince=main')",
"test:acceptance:locally": "npm run build && FORCE_COLOR=true LOCALLY=true jest -c ./jest.acceptance.config.ts --forceExit --verbose --runInBand --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 --runInBand $([ -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 && FORCE_COLOR=true jest -c ./jest.acceptance.config.ts --forceExit --verbose --runInBand --passWithNoTests",
"test:acceptance": "npm run build && jest -c ./jest.acceptance.config.ts --forceExit --verbose --runInBand --passWithNoTests",
"prepush": "npm run test && npm run build",
"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": {
"@ehmpathy/error-fns": "1.0.2",
Expand All @@ -93,7 +94,7 @@
"sql-formatter": "^2.3.3",
"sql-strip-comments": "0.0.23",
"ts-node": "^10.9.1",
"type-fns": "1.16.0",
"type-fns": "^1.17.0",
"uuid": "9.0.0",
"yaml": "^1.6.0",
"yesql": "^3.2.2"
Expand All @@ -116,7 +117,7 @@
"core-js": "3.26.1",
"cz-conventional-changelog": "3.3.0",
"declapract": "^0.11.5",
"declapract-typescript-ehmpathy": "^0.33.9",
"declapract-typescript-ehmpathy": "^0.35.4",
"depcheck": "1.4.3",
"eslint": "8.56.0",
"eslint-config-airbnb-typescript": "18.0.0",
Expand Down

0 comments on commit aaf6aff

Please sign in to comment.