Skip to content

Commit dc62a35

Browse files
authored
chore: upgrade all dependencies (#198)
2 parents c2b6368 + 10e4474 commit dc62a35

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+3468
-3751
lines changed

.eslintrc.js

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ module.exports = {
88
"plugin:import/errors",
99
"plugin:import/typescript",
1010
"prettier",
11-
"prettier/@typescript-eslint",
1211
],
1312
plugins: ["jest", "@typescript-eslint", "simple-import-sort", "import"],
1413
parserOptions: {
@@ -68,7 +67,8 @@ module.exports = {
6867
* simple-import-sort seems to be the most stable import sorting currently,
6968
* disable others
7069
*/
71-
"simple-import-sort/sort": "error",
70+
"simple-import-sort/imports": "error",
71+
"simple-import-sort/exports": "error",
7272
"sort-imports": "off",
7373
"import/order": "off",
7474

@@ -84,6 +84,14 @@ module.exports = {
8484
"@typescript-eslint/no-explicit-any": "off",
8585
"@typescript-eslint/no-non-null-assertion": "off",
8686
"@typescript-eslint/explicit-function-return-type": "off",
87+
"@typescript-eslint/no-unsafe-argument": "off",
88+
"@typescript-eslint/no-unsafe-assignment": "off",
89+
"@typescript-eslint/no-unsafe-call": "off",
90+
"@typescript-eslint/no-unsafe-enum-comparison": "off",
91+
"@typescript-eslint/no-unsafe-member-access": "off",
92+
"@typescript-eslint/no-unsafe-return": "off",
93+
"@typescript-eslint/no-floating-promises": "off",
94+
"@typescript-eslint/ban-ts-comment": "off",
8795
"import/no-duplicates": "off",
8896
},
8997
},
@@ -101,6 +109,19 @@ module.exports = {
101109
"@typescript-eslint/no-var-requires": "off",
102110
"@typescript-eslint/prefer-regexp-exec": "off",
103111
"@typescript-eslint/prefer-string-starts-ends-with": "off",
112+
"@typescript-eslint/no-base-to-string": "off",
113+
"@typescript-eslint/no-duplicate-type-constituents": "off",
114+
"@typescript-eslint/no-floating-promises": "off",
115+
"@typescript-eslint/no-implied-eval": "off",
116+
"@typescript-eslint/no-redundant-type-constituents": "off",
117+
"@typescript-eslint/no-unsafe-argument": "off",
118+
"@typescript-eslint/no-unsafe-assignment": "off",
119+
"@typescript-eslint/no-unsafe-call": "off",
120+
"@typescript-eslint/no-unsafe-enum-comparison": "off",
121+
"@typescript-eslint/no-unsafe-member-access": "off",
122+
"@typescript-eslint/no-unsafe-return": "off",
123+
"@typescript-eslint/restrict-plus-operands": "off",
124+
"@typescript-eslint/restrict-template-expressions": "off",
104125
},
105126
},
106127
],

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818

1919
strategy:
2020
matrix:
21-
node-version: [10.x, 16.x, 18.x]
22-
postgres-version: [10, 12, 15]
21+
node-version: [18.x, 20.x]
22+
postgres-version: [12, 15]
2323

2424
services:
2525
postgres:

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v1
14-
- name: Use Node.js 14.x
14+
- name: Use Node.js 18.x
1515
uses: actions/setup-node@v1
1616
with:
17-
node-version: 14.x
17+
node-version: 18.x
1818
- run: yarn --frozen-lockfile
1919
- run: yarn clean
2020
- run: yarn prepack

README.md

Lines changed: 40 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ Commands:
230230
graphile-migrate completion Generate shell completion script.
231231
232232
Options:
233-
--help Show help [boolean]
234-
--config, -c Optional path to gmrc file [string] [default: .gmrc[.js|.cjs]]
233+
--help Show help [boolean]
234+
-c, --config Optional path to gmrc file [string] [default: .gmrc[.js|.cjs]]
235235
236236
You are running graphile-migrate v1.4.1.
237237
```
@@ -246,9 +246,9 @@ Initializes a graphile-migrate project by creating a `.gmrc` file and
246246
`migrations` folder.
247247
248248
Options:
249-
--help Show help [boolean]
250-
--config, -c Optional path to gmrc file [string] [default: .gmrc[.js|.cjs]]
251-
--folder Use a folder rather than a file for the current migration.
249+
--help Show help [boolean]
250+
-c, --config Optional path to gmrc file [string] [default: .gmrc[.js|.cjs]]
251+
--folder Use a folder rather than a file for the current migration.
252252
[boolean] [default: false]
253253
```
254254

@@ -262,12 +262,14 @@ Runs any un-executed committed migrations. Does NOT run the current migration.
262262
For use in production and development.
263263
264264
Options:
265-
--help Show help [boolean]
266-
--config, -c Optional path to gmrc file [string] [default: .gmrc[.js|.cjs]]
267-
--shadow Apply migrations to the shadow DB (for development).
265+
--help Show help [boolean]
266+
-c, --config Optional path to gmrc file
267+
[string] [default: .gmrc[.js|.cjs]]
268+
--shadow Apply migrations to the shadow DB (for development).
269+
[boolean] [default: false]
270+
--forceActions Run beforeAllMigrations and afterAllMigrations actions
271+
even if no migration was necessary.
268272
[boolean] [default: false]
269-
--forceActions Run beforeAllMigrations and afterAllMigrations actions even if
270-
no migration was necessary. [boolean] [default: false]
271273
```
272274

273275

@@ -280,11 +282,11 @@ Runs any un-executed committed migrations and then runs and watches the current
280282
migration, re-running it on any change. For development.
281283
282284
Options:
283-
--help Show help [boolean]
284-
--config, -c Optional path to gmrc file [string] [default: .gmrc[.js|.cjs]]
285-
--once Runs the current migration and then exits.
285+
--help Show help [boolean]
286+
-c, --config Optional path to gmrc file [string] [default: .gmrc[.js|.cjs]]
287+
--once Runs the current migration and then exits.
286288
[boolean] [default: false]
287-
--shadow Applies changes to shadow DB. [boolean] [default: false]
289+
--shadow Applies changes to shadow DB. [boolean] [default: false]
288290
```
289291

290292

@@ -297,9 +299,9 @@ Commits the current migration into the `committed/` folder, resetting the
297299
current migration. Resets the shadow database.
298300
299301
Options:
300-
--help Show help [boolean]
301-
--config, -c Optional path to gmrc file [string] [default: .gmrc[.js|.cjs]]
302-
--message, -m Optional commit message to label migration, must not contain
302+
--help Show help [boolean]
303+
-c, --config Optional path to gmrc file [string] [default: .gmrc[.js|.cjs]]
304+
-m, --message Optional commit message to label migration, must not contain
303305
newlines. [string]
304306
```
305307

@@ -321,8 +323,8 @@ should result in the exact same hash. Development only, and liable to cause
321323
conflicts with other developers - be careful.
322324
323325
Options:
324-
--help Show help [boolean]
325-
--config, -c Optional path to gmrc file [string] [default: .gmrc[.js|.cjs]]
326+
--help Show help [boolean]
327+
-c, --config Optional path to gmrc file [string] [default: .gmrc[.js|.cjs]]
326328
```
327329

328330

@@ -335,10 +337,10 @@ Drops and re-creates the database, re-running all committed migrations from the
335337
start. **HIGHLY DESTRUCTIVE**.
336338
337339
Options:
338-
--help Show help [boolean]
339-
--config, -c Optional path to gmrc file [string] [default: .gmrc[.js|.cjs]]
340-
--shadow Applies migrations to shadow DB. [boolean] [default: false]
341-
--erase This is your double opt-in to make it clear this DELETES
340+
--help Show help [boolean]
341+
-c, --config Optional path to gmrc file [string] [default: .gmrc[.js|.cjs]]
342+
--shadow Applies migrations to shadow DB. [boolean] [default: false]
343+
--erase This is your double opt-in to make it clear this DELETES
342344
EVERYTHING. [boolean] [default: false]
343345
```
344346

@@ -359,9 +361,10 @@ are true, exit status will be 0 (success). Additional messages may also be
359361
output.
360362
361363
Options:
362-
--help Show help [boolean]
363-
--config, -c Optional path to gmrc file [string] [default: .gmrc[.js|.cjs]]
364-
--skipDatabase Skip checks that require a database connection.
364+
--help Show help [boolean]
365+
-c, --config Optional path to gmrc file
366+
[string] [default: .gmrc[.js|.cjs]]
367+
--skipDatabase Skip checks that require a database connection.
365368
[boolean] [default: false]
366369
```
367370

@@ -375,9 +378,9 @@ Compiles a SQL file, inserting all the placeholders and returning the result to
375378
STDOUT
376379
377380
Options:
378-
--help Show help [boolean]
379-
--config, -c Optional path to gmrc file [string] [default: .gmrc[.js|.cjs]]
380-
--shadow Apply shadow DB placeholders (for development).
381+
--help Show help [boolean]
382+
-c, --config Optional path to gmrc file [string] [default: .gmrc[.js|.cjs]]
383+
--shadow Apply shadow DB placeholders (for development).
381384
[boolean] [default: false]
382385
```
383386

@@ -393,14 +396,16 @@ run against the same database (via GM_DBURL envvar) unless --shadow or
393396
--rootDatabase are supplied.
394397
395398
Options:
396-
--help Show help [boolean]
397-
--config, -c Optional path to gmrc file [string] [default: .gmrc[.js|.cjs]]
398-
--shadow Apply to the shadow database (for development).
399+
--help Show help [boolean]
400+
-c, --config Optional path to gmrc file
401+
[string] [default: .gmrc[.js|.cjs]]
402+
--shadow Apply to the shadow database (for development).
399403
[boolean] [default: false]
400-
--root Run the file using the root user (but application database).
404+
--root Run the file using the root user (but application
405+
database). [boolean] [default: false]
406+
--rootDatabase Like --root, but also runs against the root database
407+
rather than application database.
401408
[boolean] [default: false]
402-
--rootDatabase Like --root, but also runs against the root database rather
403-
than application database. [boolean] [default: false]
404409
```
405410
<!-- CLI_USAGE_END -->
406411
<!-- prettier-ignore-end -->
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`refuses to run migration with invalid hash 1`] = `"Hash for 000002.sql does not match - sha1:cbed240dda7dfa510ff785783bbe6af7743b3a11 !== sha1:bddc1ead3310dc1c42cdc7f63537ebdff2e9fd7b; has the file been tampered with?"`;
4+
5+
exports[`runs migrations 1`] = `
6+
[
7+
{
8+
"filename": "000001.sql",
9+
"hash": "sha1:e00ec93314a423ee5cc68d1182ad52f16442d7df",
10+
"previous_hash": null,
11+
},
12+
{
13+
"filename": "000002.sql",
14+
"hash": "sha1:bddc1ead3310dc1c42cdc7f63537ebdff2e9fd7b",
15+
"previous_hash": "sha1:e00ec93314a423ee5cc68d1182ad52f16442d7df",
16+
},
17+
]
18+
`;
19+
20+
exports[`runs migrations 2`] = `
21+
[
22+
"foo",
23+
]
24+
`;
25+
26+
exports[`runs migrations 3`] = `
27+
[
28+
{
29+
"typname": "user_role",
30+
"value_count": "1",
31+
},
32+
]
33+
`;
34+
35+
exports[`runs migrations 4`] = `
36+
[
37+
{
38+
"filename": "000001.sql",
39+
"hash": "sha1:e00ec93314a423ee5cc68d1182ad52f16442d7df",
40+
"previous_hash": null,
41+
},
42+
{
43+
"filename": "000002.sql",
44+
"hash": "sha1:bddc1ead3310dc1c42cdc7f63537ebdff2e9fd7b",
45+
"previous_hash": "sha1:e00ec93314a423ee5cc68d1182ad52f16442d7df",
46+
},
47+
{
48+
"filename": "000003.sql",
49+
"hash": "sha1:2d248344ac299ebbad2aeba5bfec2ae3c3cb0a4f",
50+
"previous_hash": "sha1:bddc1ead3310dc1c42cdc7f63537ebdff2e9fd7b",
51+
},
52+
]
53+
`;
54+
55+
exports[`runs migrations 5`] = `
56+
[
57+
"foo",
58+
]
59+
`;
60+
61+
exports[`runs migrations 6`] = `
62+
[
63+
{
64+
"typname": "user_role",
65+
"value_count": "2",
66+
},
67+
]
68+
`;
69+
70+
exports[`will run a migration with invalid hash if told to do so 1`] = `
71+
[
72+
{
73+
"filename": "000001.sql",
74+
"hash": "sha1:e00ec93314a423ee5cc68d1182ad52f16442d7df",
75+
"previous_hash": null,
76+
},
77+
{
78+
"filename": "000002.sql",
79+
"hash": "sha1:bddc1ead3310dc1c42cdc7f63537ebdff2e9fd7b",
80+
"previous_hash": "sha1:e00ec93314a423ee5cc68d1182ad52f16442d7df",
81+
},
82+
{
83+
"filename": "000003.sql",
84+
"hash": "sha1:2d248344ac299ebbad2aeba5bfec2ae3c3cb0a4f",
85+
"previous_hash": "sha1:bddc1ead3310dc1c42cdc7f63537ebdff2e9fd7b",
86+
},
87+
]
88+
`;
89+
90+
exports[`will run a migration with invalid hash if told to do so 2`] = `
91+
[
92+
{
93+
"typname": "user_role",
94+
"value_count": "2",
95+
},
96+
]
97+
`;

0 commit comments

Comments
 (0)