Skip to content

Commit f3ee651

Browse files
authored
chore(release): v2.1.0 (#913)
1 parent 1bb4e71 commit f3ee651

15 files changed

+13694
-781
lines changed

.commitlintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "extends": ["@commitlint/config-conventional"] }

.editorconfig

-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,3 @@ indent_size = 2
88
end_of_line = lf
99
insert_final_newline = true
1010
trim_trailing_whitespace = true
11-
12-
[*.md]
13-
insert_final_newline = false
14-
trim_trailing_whitespace = false

.github/workflows/commitlint.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# For more information see: https://github.com/marketplace/actions/commit-linter
2+
3+
name: 'Lint Commit Messages'
4+
5+
on:
6+
push:
7+
branches: [master]
8+
pull_request:
9+
branches: [master]
10+
11+
jobs:
12+
commitlint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: 'actions/checkout@v2'
16+
with:
17+
fetch-depth: 0
18+
- uses: 'wagoid/commitlint-github-action@v2'

.github/workflows/nodejs.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,9 @@ jobs:
2424
with:
2525
node-version: ${{ matrix.node-version }}
2626

27-
- name: 'Cache dependencies'
28-
uses: 'actions/[email protected]'
29-
with:
30-
path: '**/node_modules'
31-
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
32-
33-
- run: 'npm install'
27+
- run: 'npm ci'
3428
- run: 'npm run lint'
29+
- run: 'npm run markdownlint'
3530
- run: 'npm run build'
3631
- run: 'DISABLE_LOGGING=1 npm run cover'
3732
- run: 'npx nyc report --reporter=lcov > coverage.lcov && npx codecov'

.github/workflows/npm-publish.yml

+1-7
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,12 @@ jobs:
1212
steps:
1313
- uses: 'actions/checkout@v2'
1414

15-
- name: 'Cache dependencies'
16-
uses: 'actions/[email protected]'
17-
with:
18-
path: '**/node_modules'
19-
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
20-
2115
- uses: 'actions/[email protected]'
2216
with:
2317
node-version: 14
2418
registry-url: 'https://registry.npmjs.org/'
2519

26-
- run: 'npm install'
20+
- run: 'npm ci'
2721
- run: 'npm run build'
2822
- run: 'npm publish'
2923
env:

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit

.husky/pre-commit

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run lint
5+
npm run markdownlint

.markdownlint.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"default": true,
3+
"MD013": false,
4+
"MD024": false
5+
}

CHANGELOG.md

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Changelog
2+
3+
## [2.1.0](https://github.com/RobinBuschmann/sequelize-typescript/compare/v2.0.0-beta.1...v2.1.0) (2021-02-14)
4+
5+
Initial release with Changelog.
6+
7+
### Bug Fixes
8+
9+
- allow $set null (remove association) ([#774](https://github.com/RobinBuschmann/sequelize-typescript/issues/774)) ([ffe1c78](https://github.com/RobinBuschmann/sequelize-typescript/commit/ffe1c78df73df7f287b8ce345d6ac0df30283723))
10+
- model associations methods to reflect sequelize v6 ([#888](https://github.com/RobinBuschmann/sequelize-typescript/issues/888)) ([6b1e3ff](https://github.com/RobinBuschmann/sequelize-typescript/commit/6b1e3fffd974f087be2e18258306f81860923ba3))
11+
- typeof Model errors by using typeof Model generics ([#900](https://github.com/RobinBuschmann/sequelize-typescript/issues/900)) ([b865840](https://github.com/RobinBuschmann/sequelize-typescript/commit/b8658404f12e7a44893c9b8652714473bb25f495))
12+
13+
### Features
14+
15+
- infer bigint data type ([#893](https://github.com/RobinBuschmann/sequelize-typescript/issues/893)) ([7c467d4](https://github.com/RobinBuschmann/sequelize-typescript/commit/7c467d404a200b3153cc7aa2605d1e542bef3da9))
16+
17+
## Older versions
18+
19+
### ⚠️ sequelize@5
20+
21+
`sequelize@5` requires `sequelize-typescript@1`. See
22+
[documentation](https://github.com/RobinBuschmann/sequelize-typescript/tree/1.0.0) for version `1.0`.
23+
24+
```sh
25+
npm install [email protected]
26+
```
27+
28+
#### V5 Model definition
29+
30+
```typescript
31+
import { Table, Model } from 'sequelize-typescript'
32+
33+
@Table
34+
class Person extends Model<Person> {}
35+
```
36+
37+
### ⚠️ sequelize@4
38+
39+
`sequelize@4` requires `[email protected]`. See
40+
[documentation](https://github.com/RobinBuschmann/sequelize-typescript/tree/0.6.X) for version `0.6`.
41+
42+
```sh
43+
npm install [email protected]
44+
```
45+
46+
### Upgrade to `sequelize-typescript@2`
47+
48+
- `sequelize-typescript@2` only works with `[email protected]>=`.
49+
For `sequelize@5` use `[email protected]`.
50+
51+
#### Breaking Changes
52+
53+
- All breaking changes of `sequelize@6` are also valid for `sequelize-typescript@2`.
54+
See [Upgrade to v6](https://sequelize.org/master/manual/upgrade-to-v6.html) for details.
55+
- `@types/bluebird` is no longer needed, `sequelize@6` removed usage of `bluebird`
56+
- Sequelize v6.2 introduced additional model attributes typings, which affects how the model is defined.
57+
- See below comparison between V5 and V6 model definition to show how to upgrade models.
58+
- For more details, see [sequelize typescript docs](https://sequelize.org/master/manual/typescript.html).
59+
60+
### Upgrade to `sequelize-typescript@1`
61+
62+
`sequelize-typescript@1` only works with `sequelize@5>=`.
63+
For `sequelize@4` & `sequelize@3` use `[email protected]`.
64+
65+
#### Breaking Changes @5
66+
67+
All breaking changes of `sequelize@5` are also valid for `sequelize-typescript@1`.
68+
See [Upgrade to v5](https://sequelize.org/v5/manual/upgrade-to-v5.html) for details.
69+
70+
#### Official Sequelize Typings
71+
72+
sequelize-typescript now uses the official typings bundled with sequelize
73+
(See [this](https://sequelize.org/v5/manual/upgrade-to-v5.html#typescript-support)).
74+
Please note the following details:
75+
76+
- Most of the sequelize-typescript interfaces of the previous version are replaced by the official ones
77+
- `@types/sequelize` is no longer used
78+
- `@types/bluebird` is no longer an explicit dependency
79+
- The official typings are less strict than the former sequelize-typescript ones

CONTRIBUTING.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
To contribute you can:
1+
# To contribute you can
2+
23
- Open issues and participate in discussion of other issues.
34
- Fork the project to open up PR's.
45
- Update the [types of Sequelize](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sequelize).
56
- Anything else constructively helpful.
67

78
In order to open a pull request please:
9+
810
- Create a new branch.
911
- Run tests locally (`npm install && npm run build && npm run cover`) and ensure your commits don't break the tests.
1012
- Document your work well with commit messages, a good PR description, comments in code when necessary, etc.
1113

1214
In order to update the types for sequelize please go to [the Definitely Typed repo](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sequelize), it would also be a good
1315
idea to open a PR into [sequelize](https://github.com/sequelize/sequelize) so that Sequelize can maintain its own types, but that
1416
might be harder than getting updated types into microsoft's repo. The Typescript team is slowly trying to encourage
15-
npm package maintainers to maintain their own typings, but Microsoft still has dedicated and good people maintaining the DT repo,
17+
npm package maintainers to maintain their own typings, but Microsoft still has dedicated and good people maintaining the DT repo,
1618
accepting PR's and keeping quality high.
1719

1820
**Keep in mind `sequelize-typescript` does not provide typings for `sequelize`** - these are seperate things.

ISSUE_TEMPLATE.md

+22-11
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,44 @@
22

33
<!-- Please make sure you are posting an issue pertaining to sequelize-typescript. If you are having an issue with sequelize itself, please consult the sequelize team (https://github.com/sequelize/sequelize/issues) -->
44

5-
**Versions**
5+
# Issue
6+
7+
## Versions
8+
69
<!-- Please let us know which sequelize, sequelize-typescript and typescript version are you using -->
7-
- sequelize:
8-
- sequelize-typescript:
9-
- typescript
1010

11-
**I'm submitting a ...**
11+
- sequelize:
12+
- sequelize-typescript:
13+
- typescript:
14+
15+
## Issue type
16+
1217
<!-- (check one with "x") -->
13-
[ ] bug report
14-
[ ] feature request
1518

16-
**Actual behavior:**
19+
- [ ] bug report
20+
- [ ] feature request
21+
22+
## Actual behavior
23+
1724
<!-- Describe how the bug manifests. -->
1825

19-
**Expected behavior:**
26+
## Expected behavior
27+
2028
<!-- Describe what the behavior would be without the bug. -->
2129

22-
**Steps to reproduce:**
30+
## Steps to reproduce
31+
2332
<!-- Please explain the steps required to duplicate the issue, especially if you are able to provide a sample application. -->
2433

25-
**Related code:**
34+
## Related code
35+
2636
<!-- If you are able to illustrate the bug or feature request with an example, please provide a sample application via one of the following means:
2737
2838
- A sample application via GitHub (Best option, since its much easier for us to investigate, so that we can come back to you more recently)
2939
- A code snippet below (Please make sure, that the snippet at least includes tsconfig and the sequelize options)
3040
3141
-->
42+
3243
```ts
3344
insert short code snippets here
3445
```

0 commit comments

Comments
 (0)