Skip to content

Commit

Permalink
chore(deps): update devdependencies (#446)
Browse files Browse the repository at this point in the history
* chore(deps): update devdependencies

* fix lint errors

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Misha Kaletsky <mmkal@users.noreply.github.com>
  • Loading branch information
3 people committed Dec 16, 2021
1 parent b9dd193 commit ec2c572
Show file tree
Hide file tree
Showing 9 changed files with 759 additions and 890 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ module.exports = {
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/unified-signatures': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/object-curly-spacing': 'off',

// nice-to-haves, require some refactoring/tweaking of rules
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-require-imports': 'off',

// xo defaults that overlap with prettier
'comma-dangle': 'off',
Expand Down Expand Up @@ -106,6 +111,7 @@ module.exports = {
rules: {
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
},
},
{
Expand All @@ -118,6 +124,7 @@ module.exports = {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
},
},
{
Expand Down
1,582 changes: 717 additions & 865 deletions package-lock.json

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,35 +23,35 @@
"verror": "^1.10.0"
},
"devDependencies": {
"@types/jest": "26.0.20",
"@types/lodash": "4.14.168",
"@types/uuid": "8.3.0",
"@typescript-eslint/eslint-plugin": "4.15.0",
"@typescript-eslint/parser": "4.15.0",
"@types/jest": "26.0.24",
"@types/lodash": "4.14.178",
"@types/uuid": "8.3.3",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",
"del-cli": "3.0.1",
"eslint": "7.20.0",
"eslint-config-xo": "0.34.0",
"eslint-config-xo-typescript": "0.37.0",
"eslint-plugin-codegen": "0.15.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jest": "24.1.3",
"eslint-plugin-mocha": "8.0.0",
"eslint-plugin-prettier": "3.3.1",
"eslint": "7.32.0",
"eslint-config-xo": "0.39.0",
"eslint-config-xo-typescript": "0.47.1",
"eslint-plugin-codegen": "0.16.1",
"eslint-plugin-import": "2.25.3",
"eslint-plugin-jest": "24.7.0",
"eslint-plugin-mocha": "8.2.0",
"eslint-plugin-prettier": "3.4.1",
"eslint-plugin-unicorn": "24.0.0",
"expect-type": "0.11.0",
"fs-syncer": "0.3.4",
"expect-type": "0.13.0",
"fs-syncer": "0.4.0",
"jest": "26.6.3",
"lodash": "4.17.21",
"np": "7.4.0",
"prettier": "2.2.1",
"np": "7.6.0",
"prettier": "2.5.1",
"sequelize": "5.22.4",
"sinon": "9.2.4",
"source-map-support": "0.5.19",
"sqlite3": "^5.0.2",
"strip-ansi": "6.0.0",
"ts-jest": "26.5.1",
"source-map-support": "0.5.21",
"sqlite3": "5.0.2",
"strip-ansi": "6.0.1",
"ts-jest": "26.5.6",
"ts-node": "9.1.1",
"typescript": "4.1.5",
"typescript": "4.5.4",
"uuid": "8.3.2"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export class CreateAction extends cli.CommandLineAction {
}

async onExecute(): Promise<void> {
const umzug = this.umzug;
const { umzug } = this;

await umzug
.create({
Expand All @@ -229,7 +229,7 @@ export class CreateAction extends cli.CommandLineAction {
allowConfusingOrdering: this._params.allowConfusingOrdering.value,
skipVerify: this._params.skipVerify.value,
})
.catch(e => {
.catch((e: Error) => {
Object.entries(this._params)
.filter(entry => entry[0] !== 'name')
.forEach(([name, param]) => {
Expand Down
1 change: 1 addition & 0 deletions src/storage/mongodb.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { UmzugStorage } from './contract';

type AnyObject = Record<string, any>;
Expand Down
2 changes: 2 additions & 0 deletions src/storage/sequelize.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { UmzugStorage } from './contract';
import { SetRequired } from 'type-fest';

Expand Down Expand Up @@ -122,6 +123,7 @@ export class SequelizeStorage implements UmzugStorage {

getModel(): ModelClassType {
if (this.sequelize.isDefined(this.modelName)) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return this.sequelize.model(this.modelName);
}

Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export const RerunBehavior = {
ALLOW: 'ALLOW',
} as const;

// eslint-disable-next-line @typescript-eslint/no-redeclare
export type RerunBehavior = keyof typeof RerunBehavior;

export type MigrateUpOptions = MergeExclusive<
Expand Down
2 changes: 2 additions & 0 deletions src/umzug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export class Umzug<Ctx extends object = object> extends emittery<UmzugEvents<Ctx

const getModule = () => {
try {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return require(filepath);
} catch (e: unknown) {
if (e instanceof SyntaxError && filepath.endsWith('.ts')) {
Expand Down Expand Up @@ -462,6 +463,7 @@ export class Umzug<Ctx extends object = object> extends emittery<UmzugEvents<Ctx

private async getContext(): Promise<Ctx> {
const { context = {} } = this.options;
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return typeof context === 'function' ? context() : context;
}

Expand Down
6 changes: 5 additions & 1 deletion test/umzug.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jest.mock('../src/storage', () => {
// to simplify test setup, override JSONStorage with memoryStorage to use the default storage but avoid hitting the disk
return {
...storage,
// eslint-disable-next-line object-shorthand
JSONStorage: function () {
Object.assign(this, memoryStorage());
},
Expand Down Expand Up @@ -950,7 +951,10 @@ describe('error cases', () => {
describe('events', () => {
test('events', async () => {
const mock = jest.fn();
const spy = (label: string) => (...args: unknown[]) => mock(label, ...args);
const spy =
(label: string) =>
(...args: unknown[]) =>
mock(label, ...args);

const umzug = new Umzug({
migrations: [
Expand Down

0 comments on commit ec2c572

Please sign in to comment.