Skip to content

Commit 7f524a5

Browse files
authored
Merge branch 'main' into v6
2 parents ce19b3d + 497b805 commit 7f524a5

23 files changed

+1003
-931
lines changed

Diff for: docs/FAQ.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ $ sequelize init
66
```
77

88
## How can I generate a model?
9-
Specify model name with `--name` argument. List of table fields can be passed with `--attributes` option
9+
Specify model name with `--name` argument. List of table fields can be passed with `--attributes` option (comma separated with no spaces at all)
1010
```
1111
$ sequelize model:create --name User --attributes name:string,state:boolean,birth:date,card:integer,role:enum:'{Admin,Guest}'
1212
```

Diff for: package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,36 @@
1111
"lib"
1212
],
1313
"dependencies": {
14-
"cli-color": "^2.0.1",
14+
"cli-color": "^2.0.3",
1515
"fs-extra": "^9.1.0",
16-
"js-beautify": "^1.14.0",
16+
"js-beautify": "^1.14.5",
1717
"lodash": "^4.17.21",
18-
"resolve": "^1.20.0",
18+
"resolve": "^1.22.1",
1919
"umzug": "^2.3.0",
2020
"yargs": "^16.2.0"
2121
},
2222
"devDependencies": {
23-
"@babel/cli": "7.17.10",
24-
"@babel/core": "7.18.5",
25-
"@babel/preset-env": "7.18.2",
26-
"@babel/register": "7.17.7",
27-
"@commitlint/cli": "17.0.2",
28-
"@commitlint/config-angular": "17.0.0",
23+
"@babel/cli": "7.18.10",
24+
"@babel/core": "7.19.1",
25+
"@babel/preset-env": "7.19.1",
26+
"@babel/register": "7.18.9",
27+
"@commitlint/cli": "17.1.2",
28+
"@commitlint/config-angular": "17.1.0",
2929
"bluebird": "3.7.2",
3030
"eslint": "7.32.0",
3131
"eslint-config-prettier": "8.5.0",
32-
"eslint-plugin-prettier": "4.0.0",
32+
"eslint-plugin-prettier": "4.2.1",
3333
"expect.js": "0.3.1",
3434
"gulp": "4.0.2",
3535
"husky": "8.0.1",
36-
"lint-staged": "13.0.2",
36+
"lint-staged": "13.0.3",
3737
"mocha": "9.2.2",
3838
"mysql2": "latest",
3939
"pg": "latest",
4040
"pg-hstore": "latest",
4141
"prettier": "2.7.1",
4242
"semver": "7.3.7",
43-
"sequelize": "6.21.0",
43+
"sequelize": "6.23.1",
4444
"sqlite3": "latest",
4545
"through2": "4.0.2"
4646
},

Diff for: src/assets/models/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const fs = require('fs');
44
const path = require('path');
55
const Sequelize = require('sequelize');
6+
const process = require('process');
67
const basename = path.basename(__filename);
78
const env = process.env.NODE_ENV || 'development';
89
const config = require(<%= configFile %>)[env];

Diff for: src/commands/database.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'process';
12
import { _baseOptions } from '../core/yargs';
23
import { logMigrator } from '../core/migrator';
34

Diff for: src/commands/init.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'process';
12
import { _baseOptions } from '../core/yargs';
23
import helpers from '../helpers';
34

Diff for: src/commands/migrate.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'process';
12
import { _baseOptions } from '../core/yargs';
23
import {
34
getMigrator,

Diff for: src/commands/migrate_undo.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'process';
12
import { _baseOptions } from '../core/yargs';
23
import { getMigrator, ensureCurrentMetaSchema } from '../core/migrator';
34

Diff for: src/commands/migrate_undo_all.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'process';
12
import { _baseOptions } from '../core/yargs';
23
import { getMigrator, ensureCurrentMetaSchema } from '../core/migrator';
34

Diff for: src/commands/migration_generate.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'process';
12
import { _baseOptions, _underscoreOption } from '../core/yargs';
23

34
import helpers from '../helpers';

Diff for: src/commands/model_generate.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'process';
12
import { _baseOptions, _underscoreOption } from '../core/yargs';
23

34
import helpers from '../helpers';

Diff for: src/commands/seed.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
import _ from 'lodash';
2+
import process from 'process';
13
import { _baseOptions } from '../core/yargs';
24
import { getMigrator } from '../core/migrator';
35

46
import helpers from '../helpers';
5-
import _ from 'lodash';
67

78
exports.builder = (yargs) => _baseOptions(yargs).argv;
89
exports.handler = async function (args) {

Diff for: src/commands/seed_generate.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'process';
12
import { _baseOptions } from '../core/yargs';
23

34
import helpers from '../helpers';

Diff for: src/commands/seed_one.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'process';
12
import { _baseOptions } from '../core/yargs';
23
import { getMigrator } from '../core/migrator';
34

Diff for: src/core/migrator.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Umzug from 'umzug';
22
import _ from 'lodash';
3+
import process from 'process';
34

45
import helpers from '../helpers/index';
56

Diff for: src/core/yargs.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import fs from 'fs';
22
import yargs from 'yargs';
33
import path from 'path';
4+
import process from 'process';
45

56
function loadRCFile(optionsPath) {
67
const rcFile = optionsPath || path.resolve(process.cwd(), '.sequelizerc');

Diff for: src/helpers/config-helper.js

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { promisify } from 'util';
66
import helpers from './index';
77
import getYArgs from '../core/yargs';
88
import importHelper from './import-helper';
9+
import process from 'process';
910

1011
const args = getYArgs().argv;
1112

Diff for: src/helpers/generic-helper.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import path from 'path';
2+
import process from 'process';
23

34
const resolve = require('resolve').sync;
45
import getYArgs from '../core/yargs';

Diff for: src/helpers/import-helper.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const url = require('url');
1+
import url from 'url';
22

33
async function supportsDynamicImport() {
44
try {

Diff for: src/helpers/path-helper.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import path from 'path';
22
import fs from 'fs';
3+
import process from 'process';
34

45
const resolve = require('resolve').sync;
56
import getYArgs from '../core/yargs';

Diff for: src/helpers/umzug-helper.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import path from 'path';
22
import _ from 'lodash';
33
import helpers from './index';
4+
import process from 'process';
45

56
const storage = {
67
migration: 'sequelize',

Diff for: src/helpers/version-helper.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import path from 'path';
22
import helpers from './index';
3+
import process from 'process';
34

45
const packageJson = require(path.resolve(
56
__dirname,

Diff for: src/helpers/view-helper.js

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import clc from 'cli-color';
22
import _ from 'lodash';
33
import helpers from './index';
44
import getYArgs from '../core/yargs';
5+
import process from 'process';
56

67
const args = getYArgs().argv;
78

@@ -36,6 +37,10 @@ module.exports = {
3637

3738
this.log();
3839
console.error(`${clc.red('ERROR:')} ${message}`);
40+
if (error.original.detail) {
41+
console.error(`${clc.red('ERROR DETAIL:')} ${error.original.detail}`);
42+
}
43+
3944
extraMessages.forEach((message) =>
4045
console.error(`${clc.red('EXTRA MESSAGE:')} ${message}`)
4146
);

0 commit comments

Comments
 (0)