Skip to content

Commit 1b33382

Browse files
fix: re-apply constraint improvements tuning (#382)
* chore: roll forward semlrel * fix: package dependency conflicts/unmet deps * fix: derive constraint name from where clause/upserted columns * refactor: appease linter * feat: add coverage tooling * fix: mismatched data types * chore: add type decl Co-authored-by: Michael Gagliardo <[email protected]>
1 parent b3dc66a commit 1b33382

13 files changed

+1071
-408
lines changed

.eslintrc.cjs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
root: true,
3+
parser: "@typescript-eslint/parser",
4+
plugins: ["@typescript-eslint"],
5+
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
6+
};

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules
22
*.log
33
build
4-
postgraphile.graphql
4+
postgraphile.graphql
5+
coverage

.vscode/launch.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
"type": "node",
99
"request": "launch",
1010
"name": "ava - file",
11-
"program": "${workspaceRoot}/node_modules/ava/profile.js",
12-
"args": ["${workspaceRoot}/build/__tests__/main.test.js"],
11+
"program": "${workspaceFolder}/node_modules/ava/entrypoints/cli.mjs",
12+
"args": ["--serial", "${file}"],
13+
"outputCapture": "std",
14+
"console": "integratedTerminal", // optional
1315
"skipFiles": ["<node_internals>/**/*.js"],
1416
"env": {
1517
"DEBUG": "*"

commitlint.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
/* eslint-disable no-undef */
12
module.exports = { extends: ["@commitlint/config-conventional"] };

package.json

+21-4
Original file line numberDiff line numberDiff line change
@@ -18,41 +18,58 @@
1818
"devDependencies": {
1919
"@commitlint/cli": "17.0.2",
2020
"@commitlint/config-conventional": "17.0.2",
21+
"@timbeyer/commitlint-circle": "^4.1.1",
2122
"@types/bluebird": "3.5.36",
2223
"@types/dockerode": "3.3.9",
2324
"@types/nanographql": "2.0.1",
2425
"@types/node": "16.11.39",
2526
"@types/node-fetch": "2.6.1",
2627
"@types/pg": "8.6.1",
2728
"@types/wait-on": "5.3.1",
29+
"@typescript-eslint/eslint-plugin": "5.28.0",
2830
"@typescript-eslint/parser": "5.27.1",
2931
"ava": "4.3.0",
3032
"bluebird": "3.7.2",
31-
"commitlint-circle": "1.0.0",
33+
"c8": "7.11.3",
3234
"dockerode": "3.3.2",
35+
"eslint": "^8.17.0",
3336
"execa": "5.1.1",
3437
"freeport": "1.0.5",
3538
"graphile-build": "4.12.2",
36-
"graphql": "16.5.0",
39+
"graphql": "15.8.0",
3740
"husky": "8.0.1",
41+
"json-decycle": "2.0.1",
3842
"nanographql": "2.0.0",
3943
"node-fetch": "2.6.7",
4044
"pg": "8.7.1",
4145
"postgraphile": "4.12.9",
4246
"postgraphile-core": "4.12.2",
4347
"prettier": "2.6.2",
48+
"prettier-plugin-organize-imports": "3.0.0",
4449
"semantic-release": "19.0.3",
4550
"standard": "17.0.0",
51+
"ts-node": "10.8.1",
4652
"typescript": "4.3.5"
4753
},
4854
"scripts": {
4955
"build": "tsc",
5056
"format": "prettier --write .",
51-
"test": "ava --timeout=2m build/**/*.test.js",
57+
"test": "c8 -r=lcov -r=text-summary ava --timeout=2m",
5258
"semantic-release": "semantic-release",
53-
"lint": "prettier --check .",
59+
"lint": "prettier --check . && eslint '**/*.{ts,js}'",
5460
"prepare": "husky install"
5561
},
62+
"ava": {
63+
"extensions": [
64+
"ts"
65+
],
66+
"require": [
67+
"ts-node/register"
68+
],
69+
"files": [
70+
"src/__tests__/**/*.test.ts"
71+
]
72+
},
5673
"repository": {
5774
"type": "git",
5875
"url": "https://github.com/cdaringe/postgraphile-upsert.git"

0 commit comments

Comments
 (0)