-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from sern-handler/feat/version3
feat: version 3
- Loading branch information
Showing
93 changed files
with
6,269 additions
and
5,210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
--- | ||
slug: 3.0.0 | ||
title: Release 3.0.0 | ||
authors: [jacoobes] | ||
tags: [release] | ||
--- | ||
|
||
## 3.0 Release | ||
|
||
### Join our [discord](https://sern.dev/discord) <br /> | ||
|
||
### Features | ||
|
||
#### Dependency Management | ||
- `Service` API (recommended to use this over useContainer hooks) | ||
- Dependencies type must be globally augmented in order for Services api to function properly | ||
- new methods on ModuleManager | ||
- getPublishableCommands() | ||
- Init Hooks | ||
- implement starting behavior for dependencies | ||
- To enforce and type check this, use the `Initializable` type when making your Dependencies type! | ||
- Emitter interface | ||
- More generic interface to define any event emitter | ||
- You can now swap out the SernEmitter with whatever emitter now. | ||
```ts | ||
class DatabaseService implements Init { | ||
//some hypothetical database | ||
_pgsql : database() | ||
|
||
async init() { | ||
await _pgsql.load() | ||
} | ||
|
||
} | ||
|
||
await makeDependencies({ | ||
build: root => root.add({ | ||
db: new DatabaseService() //will be init'ed automatically | ||
}) | ||
}) | ||
|
||
``` | ||
- new SernEmitter event `modulesLoaded` , which allows users to customize behavior after all modules are loaded! | ||
```ts | ||
|
||
export default eventModule({ | ||
name: 'modulesLoaded', | ||
type: EventType.Sern, | ||
execute: () => { | ||
console.log('All modules loaded') | ||
} | ||
}) | ||
|
||
|
||
``` | ||
|
||
#### Quality of Life | ||
- faster module loading | ||
- I utilize async generators for reading files now. A lot faster than the first iteration. | ||
- better error handling | ||
- Less boilerplate | ||
- Services api cleans up v2 boilerplate | ||
- class modules devex got upgraded and work better than before | ||
- automatically ignore any files not ending in (mts, cts, mjs, cjs, ts, js) | ||
- ignore commands and events with `!` prefix on filename or directory (ie: `!filename.ts` or `!directory` will be ignored by sern) | ||
|
||
- `Service` API (recommended to use this over useContainer hooks) | ||
- Dependencies type must be globally augmented in order for Services api to function properly | ||
- Less boilerplate | ||
- new methods on ModuleManager | ||
- automatically ignore any files not ending in (mts, cts, mjs, cjs, ts, js) | ||
- ignore commands / events with `!` prefix on filename or directory (ie: `!filename.ts` or `!directory`) | ||
- new SernEmitter event `modulesLoaded` , which allows users to customize behavior after all modules are loaded! | ||
- Init Hooks | ||
- implement starting behavior for dependencies | ||
|
||
### Experimental | ||
- Experimental things may be subject to removal, need feedback and are not guaranteed stable | ||
- dev / prod mode | ||
- sern will behave differently depending on mode set | ||
- init sern from `file` option | ||
- reads from local sern.config.json | ||
|
||
```js | ||
Sern.init('file'); | ||
``` | ||
### Breaking changes | ||
- Sern.makeDependencies -> makeDependencies | ||
- it is asynchronous and top level function now. Make sure to await it before initing for proper synchronization. | ||
- module store and manager internally changed, so those using them may recieve breaking changes | ||
- BaseOptions type removed | ||
|
||
```diff | ||
- Sern.makeDependencies({ build: () => {} }) | ||
+ await makeDependencies({ build: () => {} }) | ||
``` | ||
|
||
### Deprecations | ||
- Removed all previous marked deprecations in v3 | ||
- ModuleStore will be removed as a dependency in v4. The only way to access modules should be through ModuleManager | ||
- Default Dependencies will be made internal in the v4. Users should only have access to its interface / contract | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
slug: newlogo | ||
title: New logo! | ||
authors: [sern] | ||
tags: [branding] | ||
--- | ||
|
||
Hey everyone! Today we have very special news for you all: We're changing our logo! | ||
|
||
# Why? | ||
|
||
You see, on today's standards, having a simple logo is essential. Our logo aligns perfectly with these design principles but it can always be improved. | ||
We were chilling, you know, cooking sern handler v3, sern gui, `npm create @sern/bot` and serncord when we thought about changing the logo to a sleek design with less colors. | ||
And here we are! | ||
|
||
# Who did our new branding? | ||
|
||
[Ropox](https://github.com/Murtatrxx)! | ||
Bro's the GOAT. This website is maintained by him, the domain costs are funded by him and also he started brainstorming how the logo would be on paper: | ||
![](/blog/newlogo/paperprototypes.jpg) | ||
And there it all clicked: | ||
![](/blog/newlogo/paperlogo.png) | ||
seren tried by the way! | ||
![](/blog/newlogo/serentried.png) | ||
|
||
# Anyways, here it is: | ||
|
||
![](/img/logo.png) | ||
|
||
Pretty nice! | ||
|
||
By the way, we have animations and variations on the way, so make sure to stay updated in the [discord server](https://sern.dev/discord)! | ||
|
||
# Finally, from the entire sern team, thank you for sticking around ❤️ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.