Skip to content

chore(release): v2.1.0 #913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "extends": ["@commitlint/config-conventional"] }
4 changes: 0 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@ indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
18 changes: 18 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# For more information see: https://github.com/marketplace/actions/commit-linter

name: 'Lint Commit Messages'

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: 'actions/checkout@v2'
with:
fetch-depth: 0
- uses: 'wagoid/commitlint-github-action@v2'
9 changes: 2 additions & 7 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,9 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: 'Cache dependencies'
uses: 'actions/[email protected]'
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}

- run: 'npm install'
- run: 'npm ci'
- run: 'npm run lint'
- run: 'npm run markdownlint'
- run: 'npm run build'
- run: 'DISABLE_LOGGING=1 npm run cover'
- run: 'npx nyc report --reporter=lcov > coverage.lcov && npx codecov'
8 changes: 1 addition & 7 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,12 @@ jobs:
steps:
- uses: 'actions/checkout@v2'

- name: 'Cache dependencies'
uses: 'actions/[email protected]'
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}

- uses: 'actions/[email protected]'
with:
node-version: 14
registry-url: 'https://registry.npmjs.org/'

- run: 'npm install'
- run: 'npm ci'
- run: 'npm run build'
- run: 'npm publish'
env:
Expand Down
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
npm run markdownlint
5 changes: 5 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"default": true,
"MD013": false,
"MD024": false
}
79 changes: 79 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Changelog

## [2.1.0](https://github.com/RobinBuschmann/sequelize-typescript/compare/v2.0.0-beta.1...v2.1.0) (2021-02-14)

Initial release with Changelog.

### Bug Fixes

- allow $set null (remove association) ([#774](https://github.com/RobinBuschmann/sequelize-typescript/issues/774)) ([ffe1c78](https://github.com/RobinBuschmann/sequelize-typescript/commit/ffe1c78df73df7f287b8ce345d6ac0df30283723))
- 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))
- 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))

### Features

- infer bigint data type ([#893](https://github.com/RobinBuschmann/sequelize-typescript/issues/893)) ([7c467d4](https://github.com/RobinBuschmann/sequelize-typescript/commit/7c467d404a200b3153cc7aa2605d1e542bef3da9))

## Older versions

### ⚠️ sequelize@5

`sequelize@5` requires `sequelize-typescript@1`. See
[documentation](https://github.com/RobinBuschmann/sequelize-typescript/tree/1.0.0) for version `1.0`.

```sh
npm install [email protected]
```

#### V5 Model definition

```typescript
import { Table, Model } from 'sequelize-typescript'

@Table
class Person extends Model<Person> {}
```

### ⚠️ sequelize@4

`sequelize@4` requires `[email protected]`. See
[documentation](https://github.com/RobinBuschmann/sequelize-typescript/tree/0.6.X) for version `0.6`.

```sh
npm install [email protected]
```

### Upgrade to `sequelize-typescript@2`

- `sequelize-typescript@2` only works with `[email protected]>=`.
For `sequelize@5` use `[email protected]`.

#### Breaking Changes

- All breaking changes of `sequelize@6` are also valid for `sequelize-typescript@2`.
See [Upgrade to v6](https://sequelize.org/master/manual/upgrade-to-v6.html) for details.
- `@types/bluebird` is no longer needed, `sequelize@6` removed usage of `bluebird`
- Sequelize v6.2 introduced additional model attributes typings, which affects how the model is defined.
- See below comparison between V5 and V6 model definition to show how to upgrade models.
- For more details, see [sequelize typescript docs](https://sequelize.org/master/manual/typescript.html).

### Upgrade to `sequelize-typescript@1`

`sequelize-typescript@1` only works with `sequelize@5>=`.
For `sequelize@4` & `sequelize@3` use `[email protected]`.

#### Breaking Changes @5

All breaking changes of `sequelize@5` are also valid for `sequelize-typescript@1`.
See [Upgrade to v5](https://sequelize.org/v5/manual/upgrade-to-v5.html) for details.

#### Official Sequelize Typings

sequelize-typescript now uses the official typings bundled with sequelize
(See [this](https://sequelize.org/v5/manual/upgrade-to-v5.html#typescript-support)).
Please note the following details:

- Most of the sequelize-typescript interfaces of the previous version are replaced by the official ones
- `@types/sequelize` is no longer used
- `@types/bluebird` is no longer an explicit dependency
- The official typings are less strict than the former sequelize-typescript ones
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
To contribute you can:
# To contribute you can

- Open issues and participate in discussion of other issues.
- Fork the project to open up PR's.
- Update the [types of Sequelize](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sequelize).
- Anything else constructively helpful.

In order to open a pull request please:

- Create a new branch.
- Run tests locally (`npm install && npm run build && npm run cover`) and ensure your commits don't break the tests.
- Document your work well with commit messages, a good PR description, comments in code when necessary, etc.

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
idea to open a PR into [sequelize](https://github.com/sequelize/sequelize) so that Sequelize can maintain its own types, but that
might be harder than getting updated types into microsoft's repo. The Typescript team is slowly trying to encourage
npm package maintainers to maintain their own typings, but Microsoft still has dedicated and good people maintaining the DT repo,
npm package maintainers to maintain their own typings, but Microsoft still has dedicated and good people maintaining the DT repo,
accepting PR's and keeping quality high.

**Keep in mind `sequelize-typescript` does not provide typings for `sequelize`** - these are seperate things.
Expand Down
33 changes: 22 additions & 11 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,44 @@

<!-- 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) -->

**Versions**
# Issue

## Versions

<!-- Please let us know which sequelize, sequelize-typescript and typescript version are you using -->
- sequelize:
- sequelize-typescript:
- typescript

**I'm submitting a ...**
- sequelize:
- sequelize-typescript:
- typescript:

## Issue type

<!-- (check one with "x") -->
[ ] bug report
[ ] feature request

**Actual behavior:**
- [ ] bug report
- [ ] feature request

## Actual behavior

<!-- Describe how the bug manifests. -->

**Expected behavior:**
## Expected behavior

<!-- Describe what the behavior would be without the bug. -->

**Steps to reproduce:**
## Steps to reproduce

<!-- Please explain the steps required to duplicate the issue, especially if you are able to provide a sample application. -->

**Related code:**
## Related code

<!-- 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:

- 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)
- A code snippet below (Please make sure, that the snippet at least includes tsconfig and the sequelize options)

-->

```ts
insert short code snippets here
```
Loading