Skip to content

Commit

Permalink
Merge pull request #569 from nyxx-discord/main
Browse files Browse the repository at this point in the history
dev
  • Loading branch information
l7ssha committed Oct 16, 2023
2 parents dbf39f8 + 4ec02a3 commit 11c026e
Show file tree
Hide file tree
Showing 426 changed files with 30,864 additions and 22,800 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: deploy dev docs
name: Deploy dev docs to nyxx.l7ssha.xyz

on:
push:
Expand Down
59 changes: 4 additions & 55 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,18 @@
name: unit tests
name: Integration tests

on:
push:
branches-ignore:
- main

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1

- name: Checkout
uses: actions/[email protected]

- name: Cache
uses: actions/cache@v2
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pubspec-
- name: Install dependencies
run: dart pub get

- name: Analyze project source
run: dart analyze

format:
name: Format
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1

- name: Checkout
uses: actions/[email protected]

- name: Cache
uses: actions/cache@v2
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pubspec-
- name: Install dependencies
run: dart pub get

- name: Format
run: dart format --set-exit-if-changed -l 160 ./lib

tests:
needs: [ format, analyze ]
name: Tests
name: Run integration tests
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_TEXT_CHANNEL: ${{ secrets.TEST_TEXT_CHANNEL }}
TEST_GUILD: ${{ secrets.TEST_GUILD }}
steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: publish
name: Publish nyxx to pub.dev

on:
push:
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: unit tests
name: Run unit tests

on:
push:
Expand All @@ -8,10 +8,8 @@ on:

jobs:
analyze:
name: Analyze
name: Analyze project source
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1
Expand All @@ -34,10 +32,8 @@ jobs:
run: dart analyze

format:
name: Format
name: Check project formatting
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1
Expand All @@ -61,10 +57,12 @@ jobs:

tests:
needs: [ format, analyze ]
name: Tests
name: Unit tests
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_TEXT_CHANNEL: ${{ secrets.TEST_TEXT_CHANNEL }}
TEST_GUILD: ${{ secrets.TEST_GUILD }}
steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1
Expand Down
59 changes: 39 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,53 @@
local/
.atom/
# See https://www.dartlang.org/guides/libraries/private-files

# Files and directories created by pub
.dart_tool/
.packages
build/
pubspec.lock

# Pubspec overrides for local testing
pubspec_overrides.yaml

# Directory created by dartdoc
doc/api/

# dotenv environment variables file
.env*

# Avoid committing generated Javascript files:
*.dart.js
*.info.json # Produced by the --dump-info flag.
*.js # When generated by dart2js. Don't specify *.js if your
# project includes source files written in JavaScript.
*.js_
*.js.deps
*.js.map

.flutter-plugins
.flutter-plugins-dependencies

# IDE configuration folders
.vscode/
.atom/
.idea/
*.iml

# Test output and coverage
log.txt
coverage/

local/
index.html
docs/
.buildlog
.packages
.project
.pub
**/build
**/packages
*.dart.js
*.part.js
*.js.deps
*.js.map
*.info.json
doc/api/
pubspec.lock
*.iml
.idea
*~
*#
.#*
.dart_tool/
/README.html
/log.txt
/nyxx.wiki/
/test/private.dart
/publish_docs.sh
Expand All @@ -32,8 +56,3 @@ pubspec.lock
private-*.dart
test-*.dart
[Rr]pc*
**/doc/api/**
**/coverage/**
coverage.json
lcov.info
.vscode/
40 changes: 0 additions & 40 deletions .pubignore

This file was deleted.

63 changes: 63 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,66 @@
## 6.0.0
__16.10.2023__

- rewrite: The entire library has been rewritten from the ground up. No pre-`6.0.0` code is compatible.
To explore the rewrite, check out [the API documentation](https://pub.dev/documentation/nyxx) or the [documentation website](https://nyxx.l7ssha.xyz).
For help migrating, use the [migration tool](https://github.com/abitofevrything/nyxx-migration-script) or join [our Discord server](https://discord.gg/nyxx) for additional help.

#### Changes since 6.0.0-dev.3
- bug: Fix `ModalBuilder` having the incorrect data type.
- feat: Add the new `state` field to `ActivityBuilder`.
- bug: Fix `activities` not being sent in the presence update payload.
- bug: Fix casts when parsing `Snowflake`s triggering errors when using ETF.
- bug: Fix incorrect payload preventing the client from muting/deafening itself.
- bug: Correctly export `NyxxPluginState`.
- feat: Implement all new features since the start of the rewrite (including premium subscriptions).
- bug: Fix incorrect parsing of `MessageUpdateEvent`s.
- feat: Add `logger` to plugins and make `name` inferred from `runtimeType` by default.

## 6.0.0-dev.3
__16.09.2023__

- rewrite: Interaction responses now throw errors instead of using assertions.
- rewrite: Improved plugin interface with support for plugin state and a simpler API.
- feat: Added constructors to most builders with multiple configurations.
- feat: Added support for authenticating via OAuth2.
- feat: Added `HttpHandler.onRateLimit` for tracking client rate limiting.
- feat: Parse emoji in reaction events.
- feat: Allow specifying `stdout` and `stderr` in `Logging`.
- feat: Add `NyxxRest.user` to get the current user.
- feat: `Attachment` now implements `CdnAsset` for easier fetching.
- bug: Fixed emoji in SelectMenuBuilder not being sent correctly.
- bug: Fixed parsing members in interaction data.
- bug: `DiscordColor` did not allow a value of `0xffffff` (white).
- bug: Fixed parsing role mentions as role objects in messages.


## 6.0.0-dev.2
__24.08.2023__

- rewrite: Changed `MessageBuilder.embeds` and `MessageUpdateBuilder.embeds` to use a new `EmbedBuilder` instead of `Embed` objects.
- rewrite: Changed all builders to be mutable.
- rewrite: Implement the interactions & message components API.
- rewrite: `ActivityBuilder` is now exported.
- rewrite: Fixed some typos: `ChannelManager.parseForumChanel` -> `ChannelManager.parseForumChannel` and `chanel` -> `channel` in the docs for `VoiceChannel.videoQualityMode`.
- rewrite: Added wrappers around CDN endpoints and assets.
- feat: Added `Permissions.allPermissions`, the set of permission flags with all permissions.
- feat: Added `HttpHandler.latency`, `HttpHandler.realLatency`, `Gateway.latency` and `Shard.latency` for tracking the client's latency.
- feat: `Flags` now has the `~` and the `^` operators.
- feat: Added `HttpHandler.onRequest` and `HttpHandler.onResponse` streams for tracking HTTP requests and responses.
- bug: Fixed `MessageUpdateEvent`s causing a parsing error.
- bug: Fixed classes creating uncaught async errors when `toString()` was invoked on them.
- bug: Empty caches are no longer stored.
- bug: Fixed stickers causing a parsing error.
- bug: Fixed rate limits not applying correctly when multiple requests were queued.
- bug: Fixed `applyGlobalRatelimit` in `HttpRequest` not doing anything.

## 6.0.0-dev.1
__03.07.2023__

- rewrite: The entire library has been rewritten from the ground up. No pre-`6.0.0-dev.1` code is compatible.
Join our Discord server for updates concerning the migration path and help upgrading.
For now, check out the new examples and play around with the rewrite to get a feel for it.

## 5.1.1
__11.08.2023__

Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ All issues marked with 'help-needed' badge are free to be picked up by any membe
Pull requests should be descriptive about changes that are made.
If adding new functionality or modifying existing, documentation should be added/modified to reflect changes.

When submitting a pull request, please, always create a new branch with the following format; `[scope]/name`.
`[scope]` must be the type of changes your PR alter. E.g, when adding a new feature, it must be `feat/`, for a bugfix, `bug/` or `fix/`, etc..

Do not push your changes on the three main branches, it can messes up with rebases.

## Coding style

We attempt to conform [Effective Dart Coding Style](https://dart.dev/guides/language/effective-dart/style) where possible.
Expand Down
Loading

0 comments on commit 11c026e

Please sign in to comment.