Skip to content

Commit

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

* add glob types

* fix tsc/lint errors

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Misha Kaletsky <[email protected]>
  • Loading branch information
3 people authored Dec 16, 2021
1 parent ec2c572 commit e5a511a
Show file tree
Hide file tree
Showing 10 changed files with 11,067 additions and 2,747 deletions.
8 changes: 7 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ module.exports = {
// nice-to-haves, require some refactoring/tweaking of rules
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-require-imports': 'off',
'unicorn/prefer-node-protocol': 'off',
'unicorn/prefer-module': 'off',

// xo defaults that overlap with prettier
// defaults from configs/plugins that overlap with prettier
'comma-dangle': 'off',
'object-curly-spacing': 'off',
'operator-linebreak': 'off',
Expand All @@ -97,13 +99,17 @@ module.exports = {
'capitalized-comments': 'off',
'no-promise-executor-return': 'off',

// unicorn over-reaching, IMHO
'unicorn/catch-error-name': 'off',
'unicorn/consistent-function-scoping': 'off',
'unicorn/expiring-todo-comments': 'warn',
'unicorn/no-fn-reference-in-iterator': 'off',
'unicorn/no-null': 'off',
'unicorn/prevent-abbreviations': 'off',
'unicorn/no-useless-undefined': 'off',
'unicorn/prefer-spread': 'off',
'unicorn/no-await-expression-member': 'off',
'unicorn/no-array-for-each': 'off',
},
overrides: [
{
Expand Down
7,340 changes: 4,622 additions & 2,718 deletions package-lock.json

Large diffs are not rendered by default.

29 changes: 15 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,35 @@
"verror": "^1.10.0"
},
"devDependencies": {
"@types/jest": "26.0.24",
"@types/glob": "7.2.0",
"@types/jest": "27.0.3",
"@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.32.0",
"@typescript-eslint/eslint-plugin": "5.7.0",
"@typescript-eslint/parser": "5.7.0",
"del-cli": "4.0.1",
"eslint": "8.4.1",
"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",
"eslint-plugin-jest": "25.3.0",
"eslint-plugin-mocha": "10.0.3",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-unicorn": "39.0.0",
"expect-type": "0.13.0",
"fs-syncer": "0.4.0",
"jest": "26.6.3",
"jest": "27.4.5",
"lodash": "4.17.21",
"np": "7.6.0",
"prettier": "2.5.1",
"sequelize": "5.22.4",
"sinon": "9.2.4",
"sinon": "12.0.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",
"ts-jest": "27.1.1",
"ts-node": "10.4.0",
"typescript": "4.5.4",
"uuid": "8.3.2"
},
Expand Down Expand Up @@ -106,4 +107,4 @@
"src/**"
]
}
}
}
11 changes: 8 additions & 3 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@
"dependencyDashboardAutoclose": true,
"packageRules": [
{
"depTypeList": ["devDependencies"],
"depTypeList": [
"devDependencies"
],
"groupName": "devDependencies",
"excludePackageNames": ["sequelize"],
"excludePackageNames": [
"sequelize",
"strip-ansi"
],
"automerge": true
}
]
}
}
4 changes: 1 addition & 3 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,7 @@ export class CreateAction extends cli.CommandLineAction {
}

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

await umzug
await this.umzug
.create({
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
name: this._params.name.value!,
Expand Down
2 changes: 1 addition & 1 deletion src/storage/memory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export const memoryStorage = (): UmzugStorage => {
unlogMigration: async ({ name }) => {
executed = executed.filter(n => n !== name);
},
executed: async () => executed.slice(),
executed: async () => [...executed],
};
};
8 changes: 3 additions & 5 deletions src/storage/mongodb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,9 @@ export class MongoDBStorage implements UmzugStorage {
throw new Error('MongoDB Connection or Collection required');
}

if (isMongoDBCollectionOptions(options)) {
this.collection = options.collection;
} else {
this.collection = options.connection.collection(options.collectionName ?? 'migrations');
}
this.collection = isMongoDBCollectionOptions(options)
? options.collection
: options.connection.collection(options.collectionName ?? 'migrations');

this.connection = (options as any).connection; // TODO remove this
this.collectionName = (options as any).collectionName ?? 'migrations'; // TODO remove this
Expand Down
2 changes: 1 addition & 1 deletion test/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ describe('create migration file', () => {

// prettier-ignore
beforeEach(() => {
const dates = [...new Array(100)].map((_, i) => new Date(new Date('2000').getTime() + (1000 * 60 * 60 * 24 * i)).toISOString());
const dates = [...Array.from({length: 100})].map((_, i) => new Date(new Date('2000').getTime() + (1000 * 60 * 60 * 24 * i)).toISOString());
jest.spyOn(Date.prototype, 'toISOString').mockImplementation(() => dates.shift()!);
});

Expand Down
2 changes: 1 addition & 1 deletion test/umzug.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ describe('alternate migration inputs', () => {
test('up and down options', async () => {
const spy = jest.fn();
const umzug = new Umzug({
migrations: [...new Array(7)]
migrations: [...Array.from({ length: 7 })]
.map((_, i) => `m${i + 1}`)
.map(name => ({
name,
Expand Down
Loading

0 comments on commit e5a511a

Please sign in to comment.