Skip to content

Commit

Permalink
Merge branch 'main' into v7
Browse files Browse the repository at this point in the history
  • Loading branch information
ephys committed Dec 22, 2022
2 parents 1ce257f + 1a47fd3 commit 3fdfb14
Show file tree
Hide file tree
Showing 493 changed files with 27,707 additions and 21,833 deletions.
18 changes: 6 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,24 @@ module.exports = {
'jsdoc/valid-types': 'error',
'jsdoc/no-types': 'error',

// We need to enable this in the next Major, it resolves a code smell
'unicorn/custom-error-definition': 'off',
// enable this as an error, or keep disabled (not warning)
'unicorn/no-unsafe-regex': 'off',

// Enable this one if you want to prevent creating throwaway objects (perf)
'unicorn/no-object-as-default-parameter': 'off',

// sequelize needs to support node >= 12.
// sequelize 7 needs to support node >= 14.
// Object.hasOwn, Array#at, String#replaceAll are available in node >= 16.
// `node:` protocol is available in node >= 14.
'prefer-object-has-own': 'off',
'unicorn/prefer-at': 'off',
'unicorn/prefer-string-replace-all': 'off',
'unicorn/prefer-node-protocol': 'off',

// Too opinionated.
'unicorn/prevent-abbreviations': 'off',
'unicorn/prefer-switch': 'off',
'consistent-return': 'off',

// This rule is incompatible with DataTypes
'babel/new-cap': 'off',

// Too slow for the scale of this codebase
'import/no-deprecated': 'off',
'import/named': 'off',
// Too opinionated
'unicorn/prefer-set-has': 'off',
},
overrides: [{
files: ['**/*.{js,mjs,cjs}'],
Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: Bug report
name: 🐛 Bug report
about: Create a bug report to help us improve
title: ""
labels: ""
labels: ["type: bug", "pending-approval"]
assignees: ""
---

Expand Down Expand Up @@ -58,9 +58,9 @@ To find the version numbers for the three systems below use the following comman
- `npm list sequelize` / `yarn list --pattern sequelize` (v6 stable)
- `npm list @sequelize/core` / `yarn list --pattern @sequelize/core` (v7 alpha)
- `node -v`
- `npm list typescript` / `yarn list --pattern typescript`
- `npm list typescript` / `yarn list --pattern typescript`
- 'Database' is which actual database system you're using. e.g. 'PostgreSQL 14', 'MariaDB 8', etc…
- 'Connector library' is the dependency sequelize requires you to install to interact with a given database type.
- 'Connector library' is the dependency sequelize requires you to install to interact with a given database type.
e.g. 'pg' or 'pg-native' for PostgreSQL, 'mysql2' for MySQL, 'tedious' for SQL Server, etc… (see README for complete list).
--->

Expand Down
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: 💬 Help & Questions
url: https://github.com/sequelize/sequelize/discussions
about: The issue tracker is for bug reports and feature requests. Use GitHub Discussions for question and help requests.
- name: 🔧 Having issues with Sequelize CLI?
url: https://github.com/sequelize/cli/issues
about: Please file an issue in the Sequelize CLI repository.
- name: 📗 Found an issue in our documentation?
url: https://github.com/sequelize/website/issues
about: Please file an issue in the Sequelize website repository.
31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/docs_issue.md

This file was deleted.

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: Feature request
name: 🚀 Feature request
about: Suggest an idea for this project
title: ""
labels: ""
labels: ["type: feature", "pending-approval"]
assignees: ""
---

Expand Down
50 changes: 0 additions & 50 deletions .github/ISSUE_TEMPLATE/other_issue.md

This file was deleted.

54 changes: 6 additions & 48 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ts-version: ["4.5", "4.6", "4.7", "4.8"]
ts-version: ["4.6", "4.7", "4.8", "4.9"]
name: TS Typings (${{ matrix.ts-version }})
runs-on: ubuntu-latest
needs: lint
Expand Down Expand Up @@ -223,58 +223,15 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- name: MySQL 5.7
image: mysql:5.7.37
dialect: mysql
node-version: 14
- name: MySQL 5.7
image: mysql:5.7.37
dialect: mysql
node-version: 18
- name: MySQL 8.0
image: mysql:8.0.28
dialect: mysql
node-version: 14
- name: MySQL 8.0
image: mysql:8.0.28
dialect: mysql
node-version: 18
- name: MariaDB 10.3
image: mariadb:10.3.34
dialect: mariadb
node-version: 14
- name: MariaDB 10.3
image: mariadb:10.3.34
dialect: mariadb
node-version: 18
- name: MariaDB 10.5
image: mariadb:10.5
dialect: mariadb
node-version: 14
- name: MariaDB 10.5
image: mariadb:10.5
dialect: mariadb
node-version: 18
name: ${{ matrix.name }} (Node ${{ matrix.node-version }})
node-version: [14, 18]
database-version: [oldest, latest]
dialect: [mysql, mariadb]
name: ${{ matrix.dialect }} ${{ matrix.database-version }} (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
needs: [ unit-test, test-typings ]
services:
mysql:
image: ${{ matrix.image }}
env:
MYSQL_DATABASE: sequelize_test
MYSQL_USER: sequelize_test
MYSQL_PASSWORD: sequelize_test
MYSQL_ROOT_PASSWORD: sequelize_test
ports:
- 3306:3306
options: --health-cmd="mysqladmin -usequelize_test -psequelize_test status" --health-interval 10s --health-timeout 5s --health-retries 5 --tmpfs /var/lib/mysql:rw
env:
SEQ_PORT: 3306
DIALECT: ${{ matrix.dialect }}
steps:
- run: mysql --host 127.0.0.1 --port 3306 -uroot -psequelize_test -e "GRANT ALL ON *.* TO 'sequelize_test'@'%' with grant option; FLUSH PRIVILEGES;"
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
Expand All @@ -285,6 +242,7 @@ jobs:
name: install-build-artifact-node-${{ matrix.node-version }}
- name: Extract artifact
run: tar -xf install-build-node-${{ matrix.node-version }}.tar
- run: yarn start-${{ matrix.dialect }}-${{ matrix.database-version }}
- name: Integration Tests
run: yarn test-integration
test-mssql:
Expand Down
46 changes: 39 additions & 7 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,47 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@main
id: stale
id: stale-bug
with:
stale-issue-label: "stale"
stale-issue-message: 'This issue has been automatically marked as stale because it has been open for 14 days without activity. It will be closed if no further activity occurs within the next 14 days. If this is still an issue, just leave a comment or remove the "stale" label. 🙂'
days-before-stale: 14
days-before-close: 14
stale-issue-message: 'This bug report has not been verified by maintainers yet, and has been open for 14 days without activity. It will be closed if no further activity occurs within the next 14 days. If this is still an issue, consider commenting with more information to help us verify it.'
days-before-issue-stale: 14
days-before-issue-close: 14
operations-per-run: 1000
days-before-pr-stale: -1
days-before-pr-close: -1
exempt-issue-labels: 'type: bug, type: docs, type: feature, type: other, type: performance, type: refactor, type: typescript, RFC' # All 'type: ' and 'RFC' labels
- name: Print outputs
run: echo ${{ join(steps.stale.outputs.*, ',') }}
only-issue-labels: 'type: bug'
any-of-issue-labels: 'pending-approval'
- uses: actions/stale@main
id: stale-feature
with:
stale-issue-label: "stale"
stale-issue-message: 'This feature request has not been approved by maintainers yet, and has been open for 14 days without activity. It will be closed as "not planned" if no further activity occurs within the next 14 days.'
stale-pr-message: 'This pull request has been marked as maybe-abandoned and has not seen any activity for 14 days. It will be closed if no further activity occurs within the next 30 days. If you would still like to work on this, please comment to let us know and the label will be removed.'
days-before-issue-stale: 14
days-before-issue-close: 14
operations-per-run: 1000
days-before-pr-stale: 14
days-before-pr-close: 30
only-issue-labels: 'type: feature'
any-of-issue-labels: 'pending-approval'
any-of-pr-labels: 'maybe-abandoned'
- uses: actions/stale@main
id: invalid
with:
stale-issue-label: "stale"
stale-issue-message: 'This issue has been marked as invalid ([see our contributing guidelines](https://github.com/sequelize/sequelize/blob/main/CONTRIBUTING.md)) and has not been active in 2 weeks. It will be closed if no further activity occurs within the next 2 weeks.'
stale-pr-message: 'This pull request has been marked as invalid ([see our contributing guidelines](https://github.com/sequelize/sequelize/blob/main/CONTRIBUTING.md)) and has not been active in 2 weeks. It will be closed if no further activity occurs within the next 2 weeks.'
days-before-issue-stale: 14
days-before-issue-close: 14
operations-per-run: 1000
days-before-pr-stale: 14
days-before-pr-close: 14
any-of-issue-labels: 'invalid'
any-of-pr-labels: 'invalid'
- name: Print outputs (stale-bug)
run: echo ${{ join(steps.stale-bug.outputs.*, ',') }}
- name: Print outputs (stale-feature)
run: echo ${{ join(steps.stale-feature.outputs.*, ',') }}
- name: Print outputs (invalid)
run: echo ${{ join(steps.invalid.outputs.*, ',') }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ npm-debug.log*
*~
test.sqlite
*.sublime*
package-lock.json
pnpm-lock.yaml

.nyc_output
coverage-*
Expand Down
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

11 changes: 11 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -1240,5 +1240,16 @@ Alex <alexgladin17@gmail.com>
Reto Fahrni <82324518+retfah@users.noreply.github.com>
Kevin Kee <kevinkee9@gmail.com>
Sourav Singh Rawat <aidenfrostbite@gmail.com>
Rik Smale <github@riksmale.info>
Harry Kao <harry@hairycow.name>
Luke Hart <50547373+lohart13@users.noreply.github.com>
Bailey Kuebelbeck <71611929+baileykue@users.noreply.github.com>
Ricardo Spear <spear.ricardo@gmail.com>
Ricardo Spear <rspear@adventhealth.com>
Markus Suonto <markus.suonto@eficode.com>
Markus Suonto <markus.suonto@withsecure.com>
elijahb <maurolewinzon@gmail.com>
Ethan Setnik <esetnik@gmail.com>
Evan Rittenhouse <evanrittenhouse@gmail.com>

# Generated by dev/update-authors.js
2 changes: 1 addition & 1 deletion CONTACT.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ You can use the information below to contact maintainers directly. We will try t

## Via Slack

Most of the team is also reachable privately through [our Slack](https://sequelize-slack.herokuapp.com/)
Most of the team is also reachable privately through [our Slack](https://join.slack.com/t/sequelize/shared_invite/zt-1igt9hx8h-tGWU4AI1bRPvkRdEK5wnuQ)
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ We are happy to see that you might be interested in contributing to Sequelize! T
- Reviewing (i.e. commenting on) open Pull Requests, to help their creators improve it if needed and allow maintainers to take less time looking into them
- Helping to clarify issues opened by others, commenting and asking for clarification
- Answering [questions tagged with `sequelize.js` on StackOverflow](https://stackoverflow.com/questions/tagged/sequelize.js)
- Helping people in our [public Slack channel](https://sequelize.slack.com/) (note: if you don't have access, get yourself an invite automatically via [this link](http://sequelize-slack.herokuapp.com/))
- Helping people in our [public Slack channel](https://sequelize.slack.com/) (note: if you don't have access, get yourself an invite automatically via [this link](https://join.slack.com/t/sequelize/shared_invite/zt-1igt9hx8h-tGWU4AI1bRPvkRdEK5wnuQ))

Sequelize is strongly moved by contributions from people like you. All maintainers also work on their free time here.

Expand Down Expand Up @@ -99,7 +99,7 @@ Most operating systems provide all the needed tools (including Windows, Linux an

- Optional (recommended):

- [Docker](https://docs.docker.com/get-docker/)
- [Docker](https://docs.docker.com/get-docker/) and [Docker Compose Plugin](https://docs.docker.com/compose/install/)
- It is not mandatory because you can easily locally run tests against SQLite without it.
- It is practically mandatory if you want to locally run tests against any other database engine (MySQL, MariaDB, Postgres,Db2 and MSSQL), unless you happen to have the engine installed and is willing to make some manual configuration.
- [Visual Studio Code](https://code.visualstudio.com/)
Expand Down Expand Up @@ -129,7 +129,7 @@ If you have Docker installed, use any of the following commands to start fresh l

- `yarn start-mariadb-oldest` (for MariaDB 10.3) or `yarn start-mariadb-latest` (for MariaDB 10.9)
- `yarn start-mysql-oldest` (for MySQL 5.7) or `yarn start-mysql-latest` (for MySQL 8.0)
- `yarn start-postgres-oldest` (for Postgres 10) or `yarn start-postgres-latest` (for Postgres 12)
- `yarn start-postgres-oldest` (for Postgres 11) or `yarn start-postgres-latest` (for Postgres 15)
- `yarn start-mssql-oldest` (for MSSQL 2017) or `yarn start-mssql-latest` (for MSSQL 2022)
- `yarn start-db2-oldest`

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
</p>

[![npm version](https://badgen.net/npm/v/@sequelize/core)](https://www.npmjs.com/package/@sequelize/core)
[![Build Status](https://github.com/sequelize/sequelize/workflows/CI/badge.svg)](https://github.com/sequelize/sequelize/actions?query=workflow%3ACI)
[![npm downloads](https://badgen.net/npm/dm/@sequelize/core)](https://www.npmjs.com/package/@sequelize/core)
[![contributors](https://img.shields.io/github/contributors/sequelize/sequelize)](https://github.com/sequelize/sequelize/graphs/contributors)
[![Open Collective](https://img.shields.io/opencollective/backers/sequelize)](https://opencollective.com/sequelize#section-contributors)
Expand Down Expand Up @@ -43,7 +42,7 @@ Please find upgrade information to major versions here:
- [Databases Compatibility Table](https://sequelize.org/releases/)
- [Changelog](https://github.com/sequelize/sequelize/releases)
- [Discussions](https://github.com/sequelize/sequelize/discussions)
- [Slack Inviter](http://sequelize-slack.herokuapp.com/)
- [Slack](https://join.slack.com/t/sequelize/shared_invite/zt-1igt9hx8h-tGWU4AI1bRPvkRdEK5wnuQ)
- [Stack Overflow](https://stackoverflow.com/questions/tagged/sequelize.js)

### :wrench: Tools
Expand Down
8 changes: 4 additions & 4 deletions build.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use strict';

const glob = require('fast-glob');
const { promisify } = require('util');
const { promisify } = require('node:util');
const { build } = require('esbuild');
const fs = require('fs');
const fs = require('node:fs');
const copyFiles = promisify(require('copyfiles'));
const path = require('path');
const exec = promisify(require('child_process').exec);
const path = require('node:path');
const exec = promisify(require('node:child_process').exec);

const stat = promisify(fs.stat);

Expand Down

0 comments on commit 3fdfb14

Please sign in to comment.