Skip to content

Commit 06406b3

Browse files
authored
Merge branch 'sequelize:main' into add-dbinfo-command
2 parents afcb3d6 + 0591abf commit 06406b3

Some content is hidden

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

50 files changed

+7098
-182
lines changed

.babelrc

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,17 @@
1010
],
1111
"ignore": [
1212
"src/assets"
13-
]
13+
],
14+
"overrides": [{
15+
"test": "./src/helpers/import-helper.js",
16+
"presets": [
17+
["@babel/env", {
18+
"targets": {
19+
"node": "10.0"
20+
},
21+
"shippedProposals": true,
22+
"exclude": ["proposal-dynamic-import"],
23+
}]
24+
],
25+
}]
1426
}

.github/FUNDING.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: sequelize
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/renovate.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- v6
7+
- v7
8+
pull_request:
9+
10+
jobs:
11+
test-postgres:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
node-version: [10, 16]
16+
sequelize-version: [5, latest]
17+
name: Postgres (Node ${{ matrix.node-version }}, Sequelize ${{ matrix.sequelize-version }})
18+
runs-on: ubuntu-latest
19+
env:
20+
DIALECT: postgres
21+
SEQ_PORT: 54320
22+
steps:
23+
- uses: actions/checkout@v3
24+
- uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
- run: yarn install --frozen-lockfile --ignore-engines
28+
- 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
31+
- run: yarn test
32+
test-mysql:
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
node-version: [10, 16]
37+
sequelize-version: [5, latest]
38+
name: MySQL (Node ${{ matrix.node-version }}, Sequelize ${{ matrix.sequelize-version }})
39+
runs-on: ubuntu-latest
40+
env:
41+
DIALECT: mysql
42+
SEQ_PORT: 33060
43+
steps:
44+
- uses: actions/checkout@v3
45+
- uses: actions/setup-node@v3
46+
with:
47+
node-version: ${{ matrix.node-version }}
48+
- run: yarn install --frozen-lockfile --ignore-engines
49+
- 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
52+
- run: yarn test
53+
test-sqlite:
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
node-version: [10, 16]
58+
sequelize-version: [5, latest]
59+
name: SQLite (Node ${{ matrix.node-version }}, Sequelize ${{ matrix.sequelize-version }})
60+
runs-on: ubuntu-latest
61+
env:
62+
DIALECT: sqlite
63+
steps:
64+
- uses: actions/checkout@v3
65+
- uses: actions/setup-node@v3
66+
with:
67+
node-version: ${{ matrix.node-version }}
68+
- run: yarn install --frozen-lockfile --ignore-engines
69+
- run: yarn add sequelize@${{ matrix.sequelize-version }} --ignore-engines
70+
- run: yarn test
71+
release:
72+
name: Release
73+
runs-on: ubuntu-latest
74+
needs:
75+
[
76+
test-sqlite,
77+
test-postgres,
78+
test-mysql
79+
]
80+
if: github.event_name == 'push' && (github.ref == 'refs/heads/v6' || github.ref == 'refs/heads/v7')
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
84+
steps:
85+
- uses: actions/checkout@v3
86+
- uses: actions/setup-node@v3
87+
with:
88+
node-version: 16.x
89+
- run: yarn install --frozen-lockfile
90+
- run: npx semantic-release
91+
- id: sequelize
92+
uses: sdepold/github-action-get-latest-release@master
93+
with:
94+
repository: sequelize/cli
95+
- run: |
96+
curl -XPOST -u "sdepold:${{ secrets.GH_TOKEN }}" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/sequelize/cli/dispatches --data '{"event_type":"Release notifier","client_payload":{"release-id": ${{ steps.sequelize.outputs.id }}}}'

.github/workflows/codeql-analysis.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
analyze:
11+
name: Analyze
12+
runs-on: ubuntu-latest
13+
permissions:
14+
actions: read
15+
contents: read
16+
security-events: write
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
language: [ 'javascript' ]
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v3
24+
- name: Initialize CodeQL
25+
uses: github/codeql-action/init@v2
26+
with:
27+
languages: ${{ matrix.language }}
28+
- name: Autobuild
29+
uses: github/codeql-action/autobuild@v2
30+
- name: Perform CodeQL Analysis
31+
uses: github/codeql-action/analyze@v2

.github/workflows/notify.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Get releases:
2+
# curl -XGET -u "username:access-token" -H "Accept: application/vnd.github.everest-preview+json" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/sequelize/cli/releases
3+
4+
# Trigger manually:
5+
# curl -XPOST -u "username:access-token" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/sequelize/cli/dispatches --data '{"event_type":"Release notifier","client_payload":{"release-id": release-id}}'
6+
7+
name: Notify release channels
8+
on: repository_dispatch
9+
jobs:
10+
tweet:
11+
name: Tweet release
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: cardinalby/[email protected]
15+
id: releaseInfo
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
18+
with:
19+
releaseId: ${{ github.event.client_payload.release-id }}
20+
- uses: ethomson/send-tweet-action@v1
21+
with:
22+
status: "We have just released ${{ steps.releaseInfo.outputs.name }} of Sequelize CLI. https://github.com/sequelize/cli/releases/tag/${{ steps.releaseInfo.outputs.name }}"
23+
consumer-key: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
24+
consumer-secret: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
25+
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
26+
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
27+
notify-opencollective:
28+
name: Notify OpenCollective
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: sequelize/proxy-release-to-open-collective@main
32+
with:
33+
releaseId: ${{ github.event.client_payload.release-id }}
34+
projectSlug: sequelize/cli
35+
ocSlug: sequelize
36+
ocApiKey: ${{ secrets.OPEN_COLLECTIVE_KEY }}
37+
githubToken: ${{ secrets.GH_TOKEN }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pids
99

1010
# Editor files
1111
.vscode
12+
.idea
1213

1314
# Directory for instrumented libs generated by jscoverage/JSCover
1415
lib-cov
@@ -27,5 +28,4 @@ test/support/tmp/*
2728

2829
# Extra files
2930
package-lock.json
30-
yarn.lock
3131
npm-debug.log

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx commitlint --edit $1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

.mocharc.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
bail: true
2+
check-leaks: true
3+
color: true
4+
exit: true
5+
recursive: true
6+
require: '@babel/register'
7+
timeout: '30000'

.travis.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
44

55
## Future
66

7+
## v6.3.0 - Nov 3rd, 2021
8+
9+
### Fixed
10+
11+
- Formatting in documentation
12+
- Fix linting errors
13+
14+
### Chore
15+
16+
- Update dependencies
17+
718
## v6.2.0 - 5th, July 2020
819

920
### Feature
@@ -14,7 +25,7 @@ All notable changes to this project will be documented in this file.
1425

1526
### Fixed
1627

17-
- fix(timestamps): support for timestamps in migration tables [#899](https://github.com/sequelize/cli/issues/663)
28+
- fix(timestamps): support for timestamps in migration tables [#899](https://github.com/sequelize/cli/issues/899)
1829

1930
## v6.0.0 - 24th, June 2020
2031

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# sequelize/cli [![npm version](https://badge.fury.io/js/sequelize-cli.svg)](https://npmjs.com/package/sequelize-cli) [![Build Status](https://travis-ci.org/sequelize/cli.svg?branch=master)](https://travis-ci.org/sequelize/cli)
1+
# sequelize/cli [![npm version](https://badge.fury.io/js/sequelize-cli.svg)](https://npmjs.com/package/sequelize-cli) [![CI](https://github.com/sequelize/cli/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/sequelize/cli/actions/workflows/ci.yml)
22

33
The [Sequelize](https://sequelize.org) Command Line Interface (CLI)
44

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ services:
2222
environment:
2323
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
2424
MYSQL_DATABASE: sequelize_test
25-
MYSQL_USER: root
2625
ports:
2726
- "33060:3306"
2827
container_name: mysql

docs/FAQ.md

Lines changed: 1 addition & 1 deletion
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
```

0 commit comments

Comments
 (0)