Bumps [date-fns](https://github.com/date-fns/date-fns) from 2.30.0 to 3.0.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/date-fns/date-fns/releases">date-fns's releases</a>.</em></p> <blockquote> <h2>v3.0.1</h2> <h2>Fixed</h2> <ul> <li><a href="https://redirect.github.com/date-fns/date-fns/pull/3618">Fixed an error</a> in certain environments caused by <code>d.mts</code> files exporting only types.</li> </ul> <h2>v3.0.0</h2> <h2>Changed</h2> <ul> <li> <p><strong>BREAKING</strong>: date-fns is now a dual-package with the support of both ESM and CommonJS. The files exports are now explicitly in the <code>package.json</code>. The ESM files now have <code>.mjs</code> extension.</p> </li> <li> <p><strong>BREAKING</strong>: The package now has a flat structure, meaning functions are now named <code>node_modules/date-fns/add.mjs</code>, locales are <code>node_modules/date-fns/locale/enUS.mjs</code>, etc.</p> </li> <li> <p><strong>BREAKING</strong>: Now all file content’s exported via named exports instead of <code>export default</code>, which will require change direct imports i.e. <code>const addDays = require(‘date-fns/addDays’)</code> to <code>const { addDays } = require(‘date-fns/addDays’)</code>.</p> </li> <li> <p><strong>BREAKING</strong>: TypeScript types are now completely rewritten, check out the <code>d.ts</code> files for more information.</p> </li> <li> <p><strong>BREAKING</strong>: <code>constants</code> now is not exported via the index, so to import one use <code>import { daysInYear } from "date-fns/constants";</code>. It improves compatibility with setups that modularize imports <a href="https://twitter.com/kossnocorp/status/1731181274579325260">like Next.js</a>.</p> </li> <li> <p><strong>BREAKING</strong>: Functions now don’t check the number of passed arguments, delegating this task to type checkers. The functions are now slimmer because of this.</p> </li> <li> <p><strong>BREAKING</strong> The arguments are not explicitly converted to the target types. Instead, they are passed as is, delegating this task to type checkers.</p> </li> <li> <p><strong>BREAKING</strong>: Functions that accept <code>Interval</code> arguments now do not throw an error if the start is before the end and handle it as a negative interval. If one of the properties in an <code>Invalid Date</code>, these functions also do not throw and handle them as invalid intervals.</p> <ul> <li> <p><code>areIntervalsOverlapping</code> normalize intervals before comparison, so <code>{ start: a, end: b }</code> is practically equivalent to <code>{ start: b, end: a }</code>. When comparing intervals with one of the properties being <code>Invalid Date</code>, the function will return false unless the others are valid and equal, given the <code>inclusive</code> option is passed. Otherwise, and when even one of the intervals has both properties invalid, the function will always return <code>false</code>.</p> </li> <li> <p><code>getOverlappingDaysInIntervals</code> now normalizes intervals before comparison, so <code>{ start: a, end: b }</code> is practically equivalent to <code>{ start: b, end: a }</code>. If any of the intervals’ properties is an <code>Invalid Date</code>, the function will always return 0.</p> </li> <li> <p><code>isWithinInterval</code> now normalizes intervals before comparison, so <code>{ start: a, end: b }</code> is practically equivalent to <code>{ start: b, end: a }</code>. If any of the intervals’ properties is an <code>Invalid Date</code>, the function will always return false.</p> </li> <li> <p><code>intervalToDuration</code> now returns negative durations for negative intervals. If one or both of the interval properties are invalid, the function will return an empty object.</p> </li> <li> <p>The eachXOfInterval functions (<code>eachDayOfInterval</code>, <code>eachHourOfInterval</code>, <code>eachMinuteOfInterval</code>, <code>eachMonthOfInterval</code>, <code>eachWeekendOfInterval</code>, <code>eachWeekendOfMonth</code>, <code>eachWeekendOfYear</code>, <code>eachWeekOfInterval</code>, <code>eachYearOfInterval</code>) now return a reversed array if the passed interval’s start is after the end. Invalid properties will result in an empty array. Functions that accept the <code>step</code> option now also allow negative, 0, and NaN values and return reversed results if the step is negative and an empty array otherwise.</p> </li> </ul> </li> <li> <p><strong>BREAKING</strong>: <code>intervalToDuration</code> now skips 0 values in the resulting duration, resulting in more compact objects with only relevant properties.</p> </li> <li> <p><strong>BREAKING</strong>: <code>roundToNearestMinutes</code> now returns <code>Invalid Date</code> instead of throwing an error when <code>nearestTo</code> option is less than 1 or more than 30.</p> </li> <li> <p><strong>BREAKING</strong>: IE is no longer supported.</p> </li> <li> <p><strong>BREAKING</strong>: Now all functions use <code>Math.trunc</code> rounding method where rounding is required. The behavior is configurable on a per-function basis.</p> </li> <li> <p><strong>BREAKING</strong>: Undocumented <code>onlyNumeric</code> option was removed from <code>nn</code> and <code>sv</code> locales. If you relied on it, <a href="https://github.com/date-fns/date-fns/blob/HEAD/mailto:koss@nocorp.me">please contact me</a>.</p> </li> <li> <p><strong>BREAKING</strong>: Flow is not supported anymore. If you relied on it, <a href="https://github.com/date-fns/date-fns/blob/HEAD/mailto:koss@nocorp.me">please contact me</a>.</p> </li> <li> <p><strong>BREAKING</strong>: The locales now use regular functions instead of the UTC version, which should not break any code unless you used locales directly.</p> </li> </ul> <h3>Added</h3> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/date-fns/date-fns/blob/main/CHANGELOG.md">date-fns's changelog</a>.</em></p> <blockquote> <h2>v3.0.1 - 2023-12-20</h2> <h2>Fixed</h2> <ul> <li><a href="https://redirect.github.com/date-fns/date-fns/pull/3618">Fixed an error</a> in certain environments caused by <code>d.mts</code> files exporting only types.</li> </ul> <h2>v3.0.0 - 2023-12-18</h2> <h2>Changed</h2> <ul> <li> <p><strong>BREAKING</strong>: date-fns is now a dual-package with the support of both ESM and CommonJS. The files exports are now explicitly in the <code>package.json</code>. The ESM files now have <code>.mjs</code> extension.</p> </li> <li> <p><strong>BREAKING</strong>: The package now has a flat structure, meaning functions are now named <code>node_modules/date-fns/add.mjs</code>, locales are <code>node_modules/date-fns/locale/enUS.mjs</code>, etc.</p> </li> <li> <p><strong>BREAKING</strong>: Now all file content’s exported via named exports instead of <code>export default</code>, which will require change direct imports i.e. <code>const addDays = require(‘date-fns/addDays’)</code> to <code>const { addDays } = require(‘date-fns/addDays’)</code>.</p> </li> <li> <p><strong>BREAKING</strong>: TypeScript types are now completely rewritten, check out the <code>d.ts</code> files for more information.</p> </li> <li> <p><strong>BREAKING</strong>: <code>constants</code> now is not exported via the index, so to import one use <code>import { daysInYear } from "date-fns/constants";</code>. It improves compatibility with setups that modularize imports <a href="https://twitter.com/kossnocorp/status/1731181274579325260">like Next.js</a>.</p> </li> <li> <p><strong>BREAKING</strong>: Functions now don’t check the number of passed arguments, delegating this task to type checkers. The functions are now slimmer because of this.</p> </li> <li> <p><strong>BREAKING</strong> The arguments are not explicitly converted to the target types. Instead, they are passed as is, delegating this task to type checkers.</p> </li> <li> <p><strong>BREAKING</strong>: Functions that accept <code>Interval</code> arguments now do not throw an error if the start is before the end and handle it as a negative interval. If one of the properties in an <code>Invalid Date</code>, these functions also do not throw and handle them as invalid intervals.</p> <ul> <li> <p><code>areIntervalsOverlapping</code> normalize intervals before comparison, so <code>{ start: a, end: b }</code> is practically equivalent to <code>{ start: b, end: a }</code>. When comparing intervals with one of the properties being <code>Invalid Date</code>, the function will return false unless the others are valid and equal, given the <code>inclusive</code> option is passed. Otherwise, and when even one of the intervals has both properties invalid, the function will always return <code>false</code>.</p> </li> <li> <p><code>getOverlappingDaysInIntervals</code> now normalizes intervals before comparison, so <code>{ start: a, end: b }</code> is practically equivalent to <code>{ start: b, end: a }</code>. If any of the intervals’ properties is an <code>Invalid Date</code>, the function will always return 0.</p> </li> <li> <p><code>isWithinInterval</code> now normalizes intervals before comparison, so <code>{ start: a, end: b }</code> is practically equivalent to <code>{ start: b, end: a }</code>. If any of the intervals’ properties is an <code>Invalid Date</code>, the function will always return false.</p> </li> <li> <p><code>intervalToDuration</code> now returns negative durations for negative intervals. If one or both of the interval properties are invalid, the function will return an empty object.</p> </li> <li> <p>The eachXOfInterval functions (<code>eachDayOfInterval</code>, <code>eachHourOfInterval</code>, <code>eachMinuteOfInterval</code>, <code>eachMonthOfInterval</code>, <code>eachWeekendOfInterval</code>, <code>eachWeekendOfMonth</code>, <code>eachWeekendOfYear</code>, <code>eachWeekOfInterval</code>, <code>eachYearOfInterval</code>) now return a reversed array if the passed interval’s start is after the end. Invalid properties will result in an empty array. Functions that accept the <code>step</code> option now also allow negative, 0, and NaN values and return reversed results if the step is negative and an empty array otherwise.</p> </li> </ul> </li> <li> <p><strong>BREAKING</strong>: <code>intervalToDuration</code> now skips 0 values in the resulting duration, resulting in more compact objects with only relevant properties.</p> </li> <li> <p><strong>BREAKING</strong>: <code>roundToNearestMinutes</code> now returns <code>Invalid Date</code> instead of throwing an error when <code>nearestTo</code> option is less than 1 or more than 30.</p> </li> <li> <p><strong>BREAKING</strong>: IE is no longer supported.</p> </li> <li> <p><strong>BREAKING</strong>: Now all functions use <code>Math.trunc</code> rounding method where rounding is required. The behavior is configurable on a per-function basis.</p> </li> <li> <p><strong>BREAKING</strong>: Undocumented <code>onlyNumeric</code> option was removed from <code>nn</code> and <code>sv</code> locales. If you relied on it, <a href="https://github.com/date-fns/date-fns/blob/main/mailto:koss@nocorp.me">please contact me</a>.</p> </li> <li> <p><strong>BREAKING</strong>: Flow is not supported anymore. If you relied on it, <a href="https://github.com/date-fns/date-fns/blob/main/mailto:koss@nocorp.me">please contact me</a>.</p> </li> <li> <p><strong>BREAKING</strong>: The locales now use regular functions instead of the UTC version, which should not break any code unless you used locales directly.</p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="be27ecff95"><code>be27ecf</code></a> Promote to v3.0.1</li> <li><a href="8dc9ab38b0"><code>8dc9ab3</code></a> Add .d.mts issue example</li> <li><a href="cb303e344f"><code>cb303e3</code></a> Fix d.mts errors</li> <li><a href="95b84c7e4c"><code>95b84c7</code></a> Fix change log for v3</li> <li><a href="c50c070c01"><code>c50c070</code></a> Promote to v3.0.0</li> <li><a href="5de6af4397"><code>5de6af4</code></a> Fix types</li> <li><a href="a44e98a4f8"><code>a44e98a</code></a> Upgrade size-limit</li> <li><a href="fcff3fda26"><code>fcff3fd</code></a> Upgrade <code>@date-fns/docs</code></li> <li><a href="db8ad0d307"><code>db8ad0d</code></a> Fix typeParam docs</li> <li><a href="59685ab2d5"><code>59685ab</code></a> Improve the interval docs</li> <li>Additional commits viewable in <a href="https://github.com/date-fns/date-fns/compare/v2.30.0...v3.0.1">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bracket
Tournament system meant to be easy to use. Bracket is written in async Python (with FastAPI) and Next.js as frontend using the Mantine library.
It has the following features:
- Supports single elimination, round-robin and swiss formats.
- Build your tournament structure with multiple stages that can have multiple groups/brackets in them.
- Drag-and-drop matches to different courts or reschedule them to another start time.
- Various dashboard pages are available that can be presented to the public, customized with a logo.
- Create/update teams, and add players to teams.
- Create multiple clubs, with multiple tournaments per club.
- Swiss tournaments can be handled dynamically, with automatic scheduling of matches.
Preview
Quickstart
To quickly run bracket to see how it works, clone it and run docker-compose up:
git clone git@github.com:evroon/bracket.git
cd bracket
sudo docker-compose up -d
This will start the backend and frontend of Bracket, as well as a postgres instance. You should now
be able to view bracket at http://localhost:3000. You can log in with username test@example.org
and password aeGhoe1ahng2Aezai0Dei6Aih6dieHoo.
To insert dummy rows into the database, run:
sudo docker exec bracket-backend pipenv run ./cli.py create-dev-db
Setup
Database
First create a bracket cluster:
sudo pg_createcluster -u postgres -p 5532 13 bracket
pg_ctlcluster 13 bracket start
Subsequently, create a new bracket_dev database:
sudo -Hu postgres psql -p 5532
CREATE USER bracket_dev WITH PASSWORD 'bracket_dev';
CREATE DATABASE bracket_dev OWNER bracket_dev;
You can do the same but replace the user and database name with:
bracket_ci: for running testsbracket_prod: for a production database
The database URL can be specified per environment in the .env files (see config).
Read the full documentation about setting up Bracket in the docs.
Config
Copy ci.env to prod.env and fill in the values:
PG_DSN: The URL of the PostgreSQL databaseJWT_SECRET: Create a random secret usingopenssl rand -hex 32CORS_ORIGINSandCORS_ORIGIN_REGEX: Specify allowed frontend domain names for CORS (see the FastAPI docs)ADMIN_EMAILandADMIN_PASSWORD: The credentials of the admin user, which is created when initializing the database
Read more about configuration in the docs.
Running the frontend and backend for development
The following starts the frontend and backend for local development:
Frontend
cd frontend
yarn run dev
Backend
cd backend
pipenv install -d
pipenv shell
./run.sh
License
Bracket is licensed under AGPL-v3.0 See LICENSE



