Skip to content

Commit

Permalink
Merge pull request #534 from nyxx-discord/rewrite
Browse files Browse the repository at this point in the history
Merge rewrite into next
  • Loading branch information
l7ssha authored Sep 10, 2023
2 parents c485d64 + 9d79001 commit cca3200
Show file tree
Hide file tree
Showing 416 changed files with 29,457 additions and 22,764 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.

38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
## 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.0.1
__18.03.2023__

- documentation: Channel invites (#448)
- bug: Correctly dispose all resources on bot stop (#451)

## 4.5.1
__19.03.2023__

- bug: Correctly dispose all resources on bot stop (#451)

## 5.0.0
__04.03.2023__

Expand Down
Loading

0 comments on commit cca3200

Please sign in to comment.