Skip to content

Commit

Permalink
Merge branch 'main' into disable-swipeable-clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
ephys authored Apr 11, 2024
2 parents 534aee8 + b47b4cb commit 85ac236
Show file tree
Hide file tree
Showing 475 changed files with 19,360 additions and 11,694 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @sequelize/code-reviewers
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: sequelize
patreon: # Replace with a single Patreon username
open_collective: sequelize
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: 💬 Help & Questions
url: https://github.com/sequelize/sequelize/discussions
about: This issue tracker is for documentation issues. Use GitHub Discussions for question and help requests.
- name: 🔧 Having issues with Sequelize features?
url: https://github.com/sequelize/sequelize/issues/new/choose
about: Please file an issue in the Sequelize repository.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation_issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: 📗 Documentation Issue
about: Documentation is unclear, or otherwise insufficient/misleading, examples aren't working as expected
title: ""
labels: ""
assignees: ""
---

## Issue Description

<--
Try to be as clear as possible. Don't assume that the maintainers will immediately understand the problem. Write your issue in a way that new contributors can also help (add links to helpful resources when applicable).
-->

### What was unclear/insufficient/not covered in the documentation



### If possible: Provide some suggestion on how we can enhance the docs



### Additional context

<-- Add any other context or screenshots about the issue here. -->
40 changes: 40 additions & 0 deletions .github/workflows/autoupdate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: auto-update PRs & label conflicts
on:
push:
branches:
- main
# can also be used with the pull_request event
pull_request_target:
types:
- synchronize
# allow the workflow to correct any label incorrectly added or removed by a user.
- labeled
- unlabeled
# update the PR as soon as the auto-merge is enabled.
- auto_merge_enabled
# process the PR once they appear in the search filters
- ready_for_review
- opened
- reopened
jobs:
autoupdate:
runs-on: ubuntu-latest
steps:
- name: Generate Sequelize Bot Token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: '${{ secrets.SEQUELIZE_BOT_APP_ID }}'
private-key: '${{ secrets.SEQUELIZE_BOT_PRIVATE_KEY }}'
- uses: sequelize/pr-auto-update-and-handle-conflicts@257ac5f68859672393e3320495164251140bd801 # 1.0.1
with:
conflict-label: 'conflicted'
conflict-requires-ready-state: 'ready_for_review'
conflict-excluded-authors: 'bot/renovate'
update-pr-branches: true
update-requires-auto-merge: true
update-requires-ready-state: 'ready_for_review'
update-excluded-authors: 'bot/renovate'
update-excluded-labels: 'no-autoupdate'
env:
GITHUB_TOKEN: '${{ steps.generate-token.outputs.token }}'
19 changes: 10 additions & 9 deletions .github/workflows/draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,42 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x
cache: yarn
- run: yarn install --frozen-lockfile
- run: yarn lint-no-fix
- run: yarn lint-scss-no-fix
- run: yarn typecheck
- run: yarn sync
- run: yarn build
- name: Deploy to Draft to Netlify
if: '! github.event.pull_request.head.repo.fork'
id: deployment
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
shell: bash
run: |
netlify deploy --dir build --message '${{ github.event.commits[0].message }}' > log.tmp.txt 2>&1
cat log.tmp.txt | grep -E 'Logs|Website Draft URL' > log.txt
cat log.tmp.txt | grep -E 'Website draft URL:' > log.txt
- name: Read deployment log
if: '! github.event.pull_request.head.repo.fork'
id: logs
uses: juliangruber/read-file-action@v1
with:
path: log.txt
- name: Comment PR with draft publish logs
if: '! github.event.pull_request.head.repo.fork'
id: create-comment
uses: peter-evans/create-or-update-comment@v2
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
${{ steps.logs.outputs.content }}
- name: Comment debug
if: '! github.event.pull_request.head.repo.fork'
run: |
echo "Comment ID - ${{ steps.create-comment.outputs.comment-id }}"
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x
cache: yarn
- run: yarn install --frozen-lockfile
- run: yarn lint-no-fix
Expand Down
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"singleQuote": true
"singleQuote": true
}
16 changes: 16 additions & 0 deletions docs/_fragments/_decorator-info.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
:::info

Sequelize currently only supports the [_legacy/experimental decorator format_](https://github.com/tc39/proposal-decorators#how-does-this-proposal-compare-to-other-versions-of-decorators).
Support for the [_new decorator format_](https://github.com/tc39/proposal-decorators) will be added in a future release.

All decorators must be imported from `@sequelize/core/decorators-legacy`:

```ts
import { Attribute, Table } from '@sequelize/core/decorators-legacy';
```

Using legacy decorators requires to use a transpiler such as [TypeScript](https://www.typescriptlang.org/docs/handbook/decorators.html#decorators),
[Babel](https://babeljs.io/docs/babel-plugin-proposal-decorators) or others to compile them to JavaScript.
Alternatively, Sequelize also supports [a legacy approach](../other-topics/legacy-model-definitions.mdx) that does not require using decorators, but this is discouraged.

:::
9 changes: 9 additions & 0 deletions docs/_fragments/_js-default-caution.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:::caution

The generation of values for `DataTypes.NOW` and other JavaScript functions are not handled by the Database,
but by Sequelize itself. This means that they will only be used when using Model methods. They will not be used in [raw queries](../querying/raw-queries.mdx),
in [migrations](../models/migrations.md), and all other places where Sequelize does not have access to the Model.

Read about SQL based alternatives in [Dynamic SQL default values](../models/defining-models.mdx#dynamic-sql-default-values).

:::
10 changes: 10 additions & 0 deletions docs/_fragments/_uuid-support-table.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { DialectTableFilter } from '@site/src/components/dialect-table-filter.tsx';

<DialectTableFilter>

| | PostgreSQL | MariaDB | MySQL | MSSQL | SQLite | Snowflake | db2 | ibmi |
|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|--------|-----------|-----|------|
| `uuidV1` | [`uuid_generate_v1`](https://www.postgresql.org/docs/current/uuid-ossp.html) (requires `uuid-ossp`) | [`UUID`](https://mariadb.com/kb/en/uuid/) | [`UUID`](https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.html#function_uuid) | N/A | N/A | N/A | N/A | N/A |
| `uuidV4` | __pg >= v13__: [`gen_random_uuid`](https://www.postgresql.org/docs/current/functions-uuid.html) <br/>__pg &lt; v13__: [`uuid_generate_v4`](https://www.postgresql.org/docs/current/uuid-ossp.html) (requires `uuid-ossp`) | N/A | N/A | [`NEWID`](https://learn.microsoft.com/en-us/sql/t-sql/functions/newid-transact-sql?view=sql-server-ver16) | N/A | N/A | N/A | N/A |

</DialectTableFilter>
Loading

0 comments on commit 85ac236

Please sign in to comment.