Skip to content

Commit e55eb88

Browse files
committed
Merge branch 'main' into v6
2 parents 14c0b76 + 7c5d222 commit e55eb88

File tree

10 files changed

+1757
-1654
lines changed

10 files changed

+1757
-1654
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
node-version: ${{ matrix.node-version }}
2727
- run: yarn install --frozen-lockfile --ignore-engines
2828
- run: yarn add sequelize@${{ matrix.sequelize-version }} --ignore-engines
29-
- run: docker-compose up -d ${DIALECT}
30-
- run: docker run --link ${DIALECT}:db -e CHECK_PORT=${SEQ_PORT::-1} -e CHECK_HOST=db --net cli_default giorgos/takis
29+
- run: docker compose up -d ${DIALECT}
30+
- run: docker run --link ${DIALECT}:db --net cli_default jwilder/dockerize -wait tcp://${DIALECT}:${SEQ_PORT::-1} -timeout 2m
3131
- run: yarn test
3232
test-mysql:
3333
strategy:
@@ -47,8 +47,8 @@ jobs:
4747
node-version: ${{ matrix.node-version }}
4848
- run: yarn install --frozen-lockfile --ignore-engines
4949
- run: yarn add sequelize@${{ matrix.sequelize-version }} --ignore-engines
50-
- run: docker-compose up -d ${DIALECT}
51-
- run: docker run --link ${DIALECT}:db -e CHECK_PORT=${SEQ_PORT::-1} -e CHECK_HOST=db --net cli_default giorgos/takis
50+
- run: docker compose up -d ${DIALECT}
51+
- run: docker run --link ${DIALECT}:db --net cli_default jwilder/dockerize -wait tcp://${DIALECT}:${SEQ_PORT::-1} -timeout 2m
5252
- run: yarn test
5353
test-sqlite:
5454
strategy:

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222
- name: Checkout repository
2323
uses: actions/checkout@v4
2424
- name: Initialize CodeQL
25-
uses: github/codeql-action/init@v2
25+
uses: github/codeql-action/init@v3
2626
with:
2727
languages: ${{ matrix.language }}
2828
- name: Autobuild
29-
uses: github/codeql-action/autobuild@v2
29+
uses: github/codeql-action/autobuild@v3
3030
- name: Perform CodeQL Analysis
31-
uses: github/codeql-action/analyze@v2
31+
uses: github/codeql-action/analyze@v3

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ services:
1212
- "54320:5432"
1313
container_name: postgres
1414
command: >
15-
bash -c "sed -i -e 's/# \(zh_TW\|en_US\).UTF-8 UTF-8/\1.UTF-8 UTF-8/' /etc/locale.gen
15+
bash -c "sed -i -e 's/# \\(zh_TW\\|en_US\\).UTF-8 UTF-8/\\1.UTF-8 UTF-8/' /etc/locale.gen
1616
&& locale-gen
1717
&& docker-entrypoint.sh postgres"
1818

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,36 @@
1212
"types.d.ts"
1313
],
1414
"dependencies": {
15-
"cli-color": "^2.0.3",
1615
"fs-extra": "^9.1.0",
17-
"js-beautify": "^1.14.5",
16+
"js-beautify": "1.15.4",
1817
"lodash": "^4.17.21",
18+
"picocolors": "^1.1.1",
1919
"resolve": "^1.22.1",
2020
"umzug": "^2.3.0",
2121
"yargs": "^16.2.0"
2222
},
2323
"devDependencies": {
24-
"@babel/cli": "7.23.0",
25-
"@babel/core": "7.23.2",
26-
"@babel/preset-env": "7.23.2",
27-
"@babel/register": "7.22.15",
28-
"@commitlint/cli": "18.2.0",
29-
"@commitlint/config-angular": "18.1.0",
24+
"@babel/cli": "7.27.1",
25+
"@babel/core": "7.27.1",
26+
"@babel/preset-env": "7.27.1",
27+
"@babel/register": "7.27.1",
28+
"@commitlint/cli": "18.6.1",
29+
"@commitlint/config-angular": "18.6.1",
3030
"bluebird": "3.7.2",
3131
"eslint": "7.32.0",
32-
"eslint-config-prettier": "9.0.0",
32+
"eslint-config-prettier": "10.1.2",
3333
"eslint-plugin-prettier": "4.2.1",
3434
"expect.js": "0.3.1",
3535
"gulp": "4.0.2",
3636
"husky": "8.0.3",
37-
"lint-staged": "15.0.2",
37+
"lint-staged": "15.5.1",
3838
"mocha": "9.2.2",
3939
"mysql2": "3.2.0",
4040
"pg": "latest",
4141
"pg-hstore": "latest",
4242
"prettier": "2.8.8",
43-
"semver": "7.5.4",
44-
"sequelize": "6.33.0",
43+
"semver": "7.7.1",
44+
"sequelize": "6.37.7",
4545
"sqlite3": "latest",
4646
"through2": "4.0.2"
4747
},

src/commands/database.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { logMigrator } from '../core/migrator';
44

55
import helpers from '../helpers';
66
import { cloneDeep, defaults, pick } from 'lodash';
7-
import clc from 'cli-color';
7+
import colors from 'picocolors';
88

99
const Sequelize = helpers.generic.getSequelize();
1010

@@ -61,7 +61,11 @@ exports.handler = async function (args) {
6161
})
6262
.catch((e) => helpers.view.error(e));
6363

64-
helpers.view.log('Database', clc.blueBright(config.database), 'created.');
64+
helpers.view.log(
65+
'Database',
66+
colors.blueBright(config.database),
67+
'created.'
68+
);
6569

6670
break;
6771
case 'db:drop':
@@ -76,7 +80,11 @@ exports.handler = async function (args) {
7680
)
7781
.catch((e) => helpers.view.error(e));
7882

79-
helpers.view.log('Database', clc.blueBright(config.database), 'dropped.');
83+
helpers.view.log(
84+
'Database',
85+
colors.blueBright(config.database),
86+
'dropped.'
87+
);
8088

8189
break;
8290
}

src/commands/migration_generate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { _baseOptions, _underscoreOption } from '../core/yargs';
33

44
import helpers from '../helpers';
55
import fs from 'fs';
6-
import clc from 'cli-color';
6+
import colors from 'picocolors';
77

88
exports.builder = (yargs) =>
99
_underscoreOption(
@@ -30,7 +30,7 @@ exports.handler = function (args) {
3030

3131
helpers.view.log(
3232
'New migration was created at',
33-
clc.blueBright(helpers.path.getMigrationPath(args.name)),
33+
colors.blueBright(helpers.path.getMigrationPath(args.name)),
3434
'.'
3535
);
3636

src/commands/model_generate.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import process from 'process';
22
import { _baseOptions, _underscoreOption } from '../core/yargs';
33

44
import helpers from '../helpers';
5-
import clc from 'cli-color';
5+
import colors from 'picocolors';
66

77
exports.builder = (yargs) =>
88
_underscoreOption(
@@ -38,12 +38,12 @@ exports.handler = function (args) {
3838
helpers.migration.generateTableCreationFile(args);
3939
helpers.view.log(
4040
'New model was created at',
41-
clc.blueBright(helpers.path.getModelPath(args.name)),
41+
colors.blueBright(helpers.path.getModelPath(args.name)),
4242
'.'
4343
);
4444
helpers.view.log(
4545
'New migration was created at',
46-
clc.blueBright(
46+
colors.blueBright(
4747
helpers.path.getMigrationPath(
4848
helpers.migration.generateMigrationName(args)
4949
)
@@ -60,7 +60,7 @@ function ensureModelsFolder() {
6060
'Unable to find models path (' +
6161
helpers.path.getModelsPath() +
6262
'). Did you run ' +
63-
clc.blueBright('sequelize init') +
63+
colors.blueBright('sequelize init') +
6464
'?'
6565
);
6666
}
@@ -72,7 +72,7 @@ function ensureMigrationsFolder() {
7272
'Unable to find migrations path (' +
7373
helpers.path.getPath('migration') +
7474
'). Did you run ' +
75-
clc.blueBright('sequelize init') +
75+
colors.blueBright('sequelize init') +
7676
'?'
7777
);
7878
}

src/commands/seed_generate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { _baseOptions } from '../core/yargs';
33

44
import helpers from '../helpers';
55
import fs from 'fs';
6-
import clc from 'cli-color';
6+
import colors from 'picocolors';
77

88
exports.builder = (yargs) =>
99
_baseOptions(yargs).option('name', {
@@ -28,7 +28,7 @@ exports.handler = function (args) {
2828

2929
helpers.view.log(
3030
'New seed was created at',
31-
clc.blueBright(helpers.path.getSeederPath(args.name)),
31+
colors.blueBright(helpers.path.getSeederPath(args.name)),
3232
'.'
3333
);
3434

src/helpers/view-helper.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import clc from 'cli-color';
1+
import colors from 'picocolors';
22
import _ from 'lodash';
33
import helpers from './index';
44
import getYArgs from '../core/yargs';
@@ -15,7 +15,7 @@ module.exports = {
1515
];
1616

1717
this.log();
18-
this.log(clc.underline('Sequelize CLI [' + versions.join(', ') + ']'));
18+
this.log(colors.underline('Sequelize CLI [' + versions.join(', ') + ']'));
1919
this.log();
2020
},
2121

@@ -36,27 +36,27 @@ module.exports = {
3636
}
3737

3838
this.log();
39-
console.error(`${clc.red('ERROR:')} ${message}`);
39+
console.error(`${colors.red('ERROR:')} ${message}`);
4040
if (error.original && error.original.detail) {
41-
console.error(`${clc.red('ERROR DETAIL:')} ${error.original.detail}`);
41+
console.error(`${colors.red('ERROR DETAIL:')} ${error.original.detail}`);
4242
}
4343

4444
extraMessages.forEach((message) =>
45-
console.error(`${clc.red('EXTRA MESSAGE:')} ${message}`)
45+
console.error(`${colors.red('EXTRA MESSAGE:')} ${message}`)
4646
);
4747
this.log();
4848

4949
process.exit(1);
5050
},
5151

5252
warn(message) {
53-
this.log(`${clc.yellow('WARNING:')} ${message}`);
53+
this.log(`${colors.yellow('WARNING:')} ${message}`);
5454
},
5555

5656
notifyAboutExistingFile(file) {
5757
this.error(
5858
'The file ' +
59-
clc.blueBright(file) +
59+
colors.blueBright(file) +
6060
' already exists. ' +
6161
'Run command with --force to overwrite it.'
6262
);

0 commit comments

Comments
 (0)