Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v15 is for Vika #1301

Merged
merged 68 commits into from
Dec 2, 2023
Merged

v15 is for Vika #1301

merged 68 commits into from
Dec 2, 2023

Conversation

RobinTail
Copy link
Owner

@RobinTail RobinTail commented Nov 10, 2023

The dedication

image

Vika was 24 years young transgender woman when her boyfriend (a policeman, by the way) murdered her. Moreover, in order to confuse the tracks and create the impression that the murdered woman was alive, the policeman cut off her finger, unlocked her mobile phone and sent messages to her friends. On the evening of October 13, 2020, he was detained, confessed and showed where he buried the girl’s body.

https://ngs.ru/text/criminal/2022/09/29/71695301/

Transgender women suffer too frequently from transphobic violence and cruelty, being the less protected social group. I'd like to raise an awareness of this problem. Humans should be creators — not killers. Protect transgender women.

Find out more about Vika's story from her interview: https://ngs.ru/text/relations/2019/06/25/66137377/


Version 15

Key features: supporting any compatible logger and any compatible testing framework, using module augmentation approach. Both jest and vitest are supported automatically. winston is optional. Dynamic loading for optional peer dependencies.
Means: createServer and attachRouting methods become asynchronous.

@RobinTail RobinTail added this to the v15 milestone Nov 10, 2023
- Making `compression` and `express-fileupload` to be optional peer
dependencies.
- Changing `upload` to `uploader` and `compression` to `compressor` in
config.
@RobinTail RobinTail added dependencies Pull requests that update a dependency file refactoring The better way to achieve the same result breaking Backward incompatible changes labels Nov 10, 2023
@RobinTail RobinTail added the coverage Additional tests label Nov 10, 2023
@RobinTail RobinTail changed the title Next: v15 v15 is for Vika Nov 16, 2023
There is a thing that I don't like in #1301 — the direction where config
goes.
In my initial concept, I wanted to achieve the simplicity of config,
being object of primitive properties.
Here I'd like to explore another direction by restoring back
`compression` and `upload` as `bool | Options`, but instead — trying to
import the corresponding peers dynamically.
For that, however, `createServer` has to become `async`, which is also
breaking, but I believe, might be much less breaking, and the outcome of
that should be nicer.
Copy link
Owner Author

@RobinTail RobinTail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed the whole PR

```
logger.info("Listening", 8090)
```

will work in v15
In v15 `createServer` becomes async (returns Promise).
~~I'd like to use that advantage to await for actual listening started
before fulfilling the Promise.~~

After some considerations I decided to postpone that feature and limit
the PR only to refactoring with a common starter.
Copy link
Owner Author

@RobinTail RobinTail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. time for another beta

@RobinTail
Copy link
Owner Author

✅ beta5 QA passed

I decided to restore `createLogger` exposition sync, but with `winston`
argument.
Thus, all async `loadPeer` are concentrated in `server.ts` file and
there are less breaking changes.
Copy link
Owner Author

@RobinTail RobinTail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@RobinTail
Copy link
Owner Author

✅ beta6 QA passed.
I'm pretty happy with it now.

@RobinTail
Copy link
Owner Author

During the final review I found an issue and fixed it in v14 #1348

@RobinTail
Copy link
Owner Author

✅ beta7 QA passed.
I hope it's ready now

Copy link
Owner Author

@RobinTail RobinTail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ready 🐎

@RobinTail RobinTail merged commit 7c0e0ed into master Dec 2, 2023
@RobinTail RobinTail deleted the prepare-v15 branch December 2, 2023 10:53
@RobinTail RobinTail mentioned this pull request Dec 10, 2023
RobinTail added a commit that referenced this pull request Dec 11, 2023
Working on compatibility support of vitest in #1301 I was surprised by
how good it works outta the box.
Meanwhile, I'm not satisfied by the ESM support in jest, which is
probably not going to be better [in Jest
30](https://github.com/jestjs/jest/milestone/15).
So I'm exploring the possibility to switch to vitest instead.
Compatibility with jest will remain.

Also
- I don't like jest globals
- I don't like that jest changes the behaviour of `node:assert`
(asserting with message:CustomError) against its documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Backward incompatible changes CI/CD coverage Additional tests dedication dependencies Pull requests that update a dependency file refactoring The better way to achieve the same result
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant