Skip to content

Commit

Permalink
Release new alpha version with snowflake support (#13739)
Browse files Browse the repository at this point in the history
* feat(typescript): create alpha release with ts

* ci: add other ts versions to ci (#13686)

* fix: wrong interface used within mixin (#13685)

* fix(increment): fix key value broken query (#12985)

Co-authored-by: Sascha Depold <sdepold@users.noreply.github.com>

* fix(upsert): fall back to DO NOTHING if no update key values provided (#13594)

* fix(types): add instance member declaration (#13684)

* fix(types): add instance member declaration

* test(types): add static/instance members test cases

Co-authored-by: Sascha Depold <sdepold@users.noreply.github.com>

* Create aws-lambda.md (#12642)

* fix(docs): add aws-lamda route (#13693)

* fix(types): allow override json function with custom return type (#13694)

* fix(types): allow override to json function with custom return type

* fix(types): remove automatic linter changes

Co-authored-by: sander-mol <SMol@thepeoplegroup.nl>

* ci(docs): add doc generation to checks (#13704)

* docs: add logo (#13700)

* docs: add logo

* fix(docs): logo not show up (#13699)

* fix(build): markdownlint

* docs(readme): use internal link

* docs(index.md): use internal link

* docs(index): update logo rendering in docs

* Center logo and headline

Co-authored-by: Sascha Depold <sascha@depold.com>
Co-authored-by: Sascha Depold <sdepold@users.noreply.github.com>

* test: fix mocha (#13707)

Co-authored-by: Rik Smale <WikiRik@users.noreply.github.com>
Co-authored-by: Sascha Depold <sdepold@users.noreply.github.com>

* test: fix failing stack trace test (#13708)

* test: fix failing tests  (#13709)

* test: fix failing tests due to minification

Removes esbuild minification which was causing tests to fail and some changed behavior.

* Revert "fix(upsert): fall back to DO NOTHING if no update key values provided (#13594)"

This reverts commit 4071378.

* fix(upsert): fall back to DO NOTHING if no update key values provided (#13711)

* fix(upsert): fall back to DO NOTHING if no update key values provided (#13594)

* fix: remove erroneous .length in _.isEmpty

* refactor: use includes instead of or operators (#13706)

* docs(contributing): add section on adding/updating deps (#13715)

* docs(contributing): add Node versions

Fixes #13714

* docs(contributing): add section on adding/updating deps

* fix(types): add Col to where Ops (#13717)

* fix(types): add Col to where Ops

* fix(types): tests

* fix(data-types): unnecessary warning when getting data with DATE dataTypes (#13712)

* fix(data-types): unnecessary error when getting data with DATE dataTypes

* fix(data-types): date stringify mariadb

* fix(types): add missing schema field to sequelize options

Fixes #12606

Co-authored-by: Sascha Depold <sdepold@users.noreply.github.com>

* fix(example): fix coordinates format as per GeoJson (#13718)

* fix(example): fix coordinates format as per GeoJson

* Update data-types.js

Co-authored-by: Sascha Depold <sdepold@users.noreply.github.com>

* ci(node): use Node 16 instead of 12 (#13703)

* ci(node): add Node 14 and 16 to DB tests

* ci(node): move linting, test typing and release to Node 16

* ci(docs): use Node 16 for docs

* ci(node): run tests on Node 10 and 16

Co-authored-by: Rik Smale <WikiRik@users.noreply.github.com>

* refactor(postgres): move `clientMinMessages` from general to pg options (#13720)

* refactor(postgres): move `clientMinMessages` from general to pg options

* refactor(postgres): address review comments

* refactor(postgres): address review comments

* refactor(postgres): fix pipeline

* fix(dialect): try to fix flaky test

* fix(dialect): try to fix flaky test

Co-authored-by: Jesse Peng <jesse.peng@dynatrace.com>

* refactor(build): use rm instead of rmdir for Node 14 and up (#13702)

* fix(build): refactor rmdir to rm

* refactor(build): only use rm in Node 14 and up

* refactor(build): move consts inside function

* refactor(build): fix definition

Co-authored-by: Rik Smale <WikiRik@users.noreply.github.com>
Co-authored-by: Sascha Depold <sdepold@users.noreply.github.com>

* docs(postgres): warn about deprecated clientMinMessage option (#13727)

* docs(postgres): warn about deprecated clientMinMessage option

* docs(deprecation-warning): fix typo in deprecation warning

* docs(deprecation-warning): fix typo in deprecation warning

* meta(deps): upgrade (dev)deps (#13729)

Co-authored-by: Rik Smale <WikiRik@users.noreply.github.com>

* test(integration): mark and fix flaky test (#13735)

* feat(dialect): snowflake dialect support (#13406)

Co-authored-by: Mohamed El Mahallawy <mmahalwy@gmail.com>
Co-authored-by: bparan <bparan@softserveinc.com>
Co-authored-by: Matthew Blasius <matthew.blasius@expel.io>
Co-authored-by: WeRDyin <heyin223@gmail.com>
Co-authored-by: Marco Gonzalez <marcogrcr@gmail.com>
Co-authored-by: Constantin Metz <constantin@metzworld.com>
Co-authored-by: Sander Mol <Sandermol95@hotmail.com>
Co-authored-by: sander-mol <SMol@thepeoplegroup.nl>
Co-authored-by: Rik Smale <13023439+WikiRik@users.noreply.github.com>
Co-authored-by: Fauzan <fncolon@pm.me>
Co-authored-by: Rik Smale <WikiRik@users.noreply.github.com>
Co-authored-by: AllAwesome497 <47748690+AllAwesome497@users.noreply.github.com>
Co-authored-by: manish kakoti <madguy02@users.noreply.github.com>
Co-authored-by: Marco Kerwitz <marco@kerwitz.com>
Co-authored-by: Jesse Peng <vijcp@outlook.com>
Co-authored-by: Jesse Peng <jesse.peng@dynatrace.com>
  • Loading branch information
17 people committed Dec 3, 2021
1 parent 8b2854a commit f6489f2
Show file tree
Hide file tree
Showing 98 changed files with 6,394 additions and 1,640 deletions.
52 changes: 41 additions & 11 deletions .github/workflows/ci.yml
Expand Up @@ -14,30 +14,40 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x
- run: yarn install --frozen-lockfile --ignore-engines
- run: yarn lint
- run: yarn lint-docs
docs:
name: Generate docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16.x
- run: yarn install --frozen-lockfile --ignore-engines
- run: yarn docs
test-typings:
strategy:
fail-fast: false
matrix:
ts-version: ["3.9", "4.0", "4.1"]
ts-version: ["3.9", "4.0", "4.1", "4.2", "4.3", "4.4", "4.5"]
name: TS Typings (${{ matrix.ts-version }})
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x
- run: yarn install --frozen-lockfile --ignore-engines
- run: yarn add --dev typescript@~${{ matrix.ts-version }} --ignore-engines
- run: yarn test-typings
test-sqlite:
strategy:
fail-fast: false
matrix:
node-version: [10, 12]
node-version: [10, 16]
name: SQLite (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
env:
Expand All @@ -56,7 +66,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [10, 12]
node-version: [10, 16]
postgres-version: [9.5, 10] # Does not work with 12
minify-aliases: [true, false]
native: [true, false]
Expand Down Expand Up @@ -102,31 +112,31 @@ jobs:
- name: MySQL 5.7
image: mysql:5.7
dialect: mysql
node-version: 12
node-version: 16
- name: MySQL 8.0
image: mysql:8.0
dialect: mysql
node-version: 10
- name: MySQL 8.0
image: mysql:8.0
dialect: mysql
node-version: 12
node-version: 16
- name: MariaDB 10.3
image: mariadb:10.3
dialect: mariadb
node-version: 10
- name: MariaDB 10.3
image: mariadb:10.3
dialect: mariadb
node-version: 12
node-version: 16
- name: MariaDB 10.5
image: mariadb:10.5
dialect: mariadb
node-version: 10
- name: MariaDB 10.5
image: mariadb:10.5
dialect: mariadb
node-version: 12
node-version: 16
name: ${{ matrix.name }} (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
services:
Expand Down Expand Up @@ -158,7 +168,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [10, 12]
node-version: [10, 16]
mssql-version: [2017, 2019]
name: MSSQL ${{ matrix.mssql-version }} (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
Expand Down Expand Up @@ -192,12 +202,32 @@ jobs:
run: yarn test-unit
- name: Integration Tests
run: yarn test-integration
test-snowflake:
strategy:
fail-fast: false
matrix:
node-version: [10, 16]
name: SNOWFLAKE (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
env:
DIALECT: snowflake
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile --ignore-engines
- name: Unit Tests
run: yarn test-unit
# - name: Integration Tests
# run: yarn test-integration
release:
name: Release
runs-on: ubuntu-latest
needs:
[
lint,
docs,
test-typings,
test-sqlite,
test-postgres,
Expand All @@ -212,6 +242,6 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x
- run: yarn install --frozen-lockfile --ignore-engines
- run: npx semantic-release
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -14,4 +14,4 @@ test/binary/tmp/*
.vscode/
esdoc
node_modules
dist/*
dist
4 changes: 4 additions & 0 deletions .husky/commit-msg
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Expand Up @@ -94,7 +94,7 @@ Most operating systems provide all the needed tools (including Windows, Linux an

- Mandatory:

- [Node.js](http://nodejs.org)
- [Node.js](http://nodejs.org), it is preferred to use the current LTS version of Node
- [Git](https://git-scm.com/)

- Optional (recommended):
Expand All @@ -115,6 +115,10 @@ Clone the repository (if you haven't already) via `git clone https://github.com/

Run `npm install` (or `yarn install`) within the cloned repository folder.

#### 2.1 Adding and updating dependencies

[Yarn v1](https://classic.yarnpkg.com/en/) is used in the CI/CD pipeline so adding and updating dependencies must be done with Yarn v1. Depending on the Node version used, you might encounter a `Found incompatible module` error. To solve that, you can pass the `--ignore-engines` flag. This is not needed if you use Node `^14.17.0 || >=16.0.0`.

### 3. Prepare local databases to run tests

If you're happy to run tests only against an SQLite database, you can skip this section.
Expand Down
5 changes: 4 additions & 1 deletion README.md
@@ -1,4 +1,7 @@
# Sequelize
<p align="center">
<img src="docs/images/logo-small.png" width="100" />
<h1 align="center">Sequelize</h1>
</p>

[![npm version](https://badgen.net/npm/v/sequelize)](https://www.npmjs.com/package/sequelize)
[![Build Status](https://github.com/sequelize/sequelize/workflows/CI/badge.svg)](https://github.com/sequelize/sequelize/actions?query=workflow%3ACI)
Expand Down
21 changes: 10 additions & 11 deletions build.js
Expand Up @@ -8,7 +8,6 @@ const copyFiles = promisify( require('copyfiles'));
const path = require('path');
const exec = promisify(require('child_process').exec);

const rmdir = promisify(fs.rmdir);
const stat = promisify(fs.stat);

// if this script is moved, this will need to be adjusted
Expand All @@ -20,11 +19,16 @@ const nodeMajorVersion = Number(process.version.match(/(?<=^v)\d+/));
async function rmDistDir() {
try {
await stat(outdir);
if (nodeMajorVersion >= 12) {
await rmdir(outdir, { recursive: true });
if (nodeMajorVersion >= 14) {
const rm = promisify(fs.rm);
await rm(outdir, { recursive: true });
} else {
await rmdir(outdir);
}
const rmdir = promisify(fs.rmdir);
if (nodeMajorVersion >= 12) {
await rmdir(outdir, { recursive: true });
} else {
await rmdir(outdir);
}}
} catch {
/* no-op */
}
Expand Down Expand Up @@ -61,12 +65,7 @@ async function main() {
outdir,
entryPoints: filesToCompile
.concat('./index.js')
.map(file => path.resolve(file)),

// minify the compiled code
minify: true,
// Keep `constructor.name` the same (used for associations)
keepNames: true
.map(file => path.resolve(file))
}),

exec('tsc', {
Expand Down
24 changes: 16 additions & 8 deletions docs/css/style.css
@@ -1,15 +1,23 @@
@import url(https://fonts.googleapis.com/css?family=Titillium+Web);

div.logo {
display: flex;
align-content: center;
}

div.logo img {
width: 200px;
height: 200px;
width: 100px;
height: 100px;
box-shadow: none !important;
margin-right: 16px;
}

div.logo h1,
div.sequelize {
color: #399af3;
font-size: 60px;
font-family: 'Titillium Web', sans-serif;
font-family: "Titillium Web", sans-serif;
border-width: 0;
}

.center {
Expand Down Expand Up @@ -55,8 +63,8 @@ div.sequelize {
padding-bottom: 0;
}

.search-box>span {
display:block;
.search-box > span {
display: block;
width: 100%;
}

Expand Down Expand Up @@ -129,11 +137,11 @@ code {
display: inline-block;
}

.layout-container .navigation>div {
.layout-container .navigation > div {
display: none;
}

.layout-container .navigation.open>div {
.layout-container .navigation.open > div {
display: block;
}

Expand Down Expand Up @@ -175,4 +183,4 @@ header a {
a[href="source.html"],
a[href^="file/lib/"] {
display: none;
}
}
8 changes: 3 additions & 5 deletions docs/index.md
@@ -1,8 +1,6 @@
<div>
<div class="center logo">
![logo](manual/asset/logo-small.png)
</div>
<div class="center sequelize">Sequelize</div>
<div class="logo">
<img src="./manual/asset/logo.png" />
<div class="sequelize"><h1>Sequelize</h1></div>
</div>

[![npm version](https://badgen.net/npm/v/sequelize)](https://www.npmjs.com/package/sequelize)
Expand Down

0 comments on commit f6489f2

Please sign in to comment.