🤝 Open source advocate 👽 Maintainer of @stryker_mutator 💼 Manager and trainer @InfoSupportBV 💚 Loves green energy and vegetables

Holland and Belgium
Our first order from @PieterPot_, the waste free online supermarket. Very exciting! 🥰
1
3
This is kind of amazing! I'm very glad our mutation testing HTML report is helping more people! Want to implement mutation-testing-elements in your mutation testing framework? Take a look at our readme: github.com/stryker-mutator/m…
Local HTML report in @infection_php is really nice and helpful when working on an isolated piece of code, thanks @stryker_mutator and @maks_rafalko for making it a pleasure to strengthen our tests suites! 🤗
6
Who is this "Person Familiarwiththematter"? He sure seems to be knowledgeable about a lot of topics! 🤯
This changes (charges?) everything! 🔌🚗🌳
Non-Tesla vehicles can now charge at all Superchargers in the Netherlands via the Tesla app. Learn more at tesla.com/support/non-tesla-…
Using vscode? Why pimp the icon of your stryker config files? Install the vscode-icons plugin today! 💅 marketplace.visualstudio.com…
1
3
Note: `ts-node` needs the experimental `--loader` feature to work properly with esm. I decided to use plain JS instead.
StrykerJS's e2e tests used to have e2e tests written in TS which we run with `ts-node --transpileOnly` (no type checking). Now we have e2e tests written in JS which we lint with `tsc --noEmit` Much better! 😁
1
Migrate to esm they said. It will be easy they said. 😶
4
Can't wait for the RxJS training! 🤩
Van moderne applicaties wordt verwacht dat ze responsive, robust en resilient zijn. Reactive programming is een manier van programmeren die hierin ondersteunt. Wil je training hierover volgen, schrijf je in voor 4-5 april! tinyurl.com/2p9a56a6 #onlinetraining #javascript
3
1. Enums are a mistake. Use string literal unions instead. 2. TS error messages are actually pretty great. 3. Loaders like ts-node should generally be avoided. 4. TS should actually be 2 packages: compiler and checker.
Please quote tweet this with your most controversial typescript opinion, I love controversial typescript opinions
4
1
28
The result is .... no new features. Except for a small performance boost at StrykerJS startup. But I don't want to sound too bitter, I'm very happy with esm finally going mainstream. 🎉 StrykerJS 6 will land with native support for esm in the near future 🎉
10
To end with, I found a nasty race condition in nodejs's child_process module, see github.com/nodejs/node/issue…. I worked around it using a well-known workaround. This is actually fixed as of #nodejs 17.4 🎉 9/ 🧵
1
2
Since #TypeScript doesn't support `.cts` yet (support coming, see typescriptlang.org/docs/hand…), we moved those to separate directories with a `package.json` with `{ "type": "commonjs" }` and its own tsconfig.json file, which we load as a project reference. 8/ 🧵
1
2
Maybe the most painful one: we still need some files to be cjs. Since we're loading plugins in other tools. Tools that use `require` to load them. For example, custom @fbjest environments, a custom @cucumberbdd formatter, and a custom #log4js adapter 👇 7/🧵
1
1
We used `require` to load StrykerJS plugins _syncronously_. This won't ever work with esm. We had to rewrite parts of the StrykerJS internals to make that work and use `import('...')` expressions instead. 6/ 🧵
1
1
When importing from a commonjs module, named exports might not work. I.e `import { types } from '@babel/core'` no longer works. Now using a default import instead: `import babel from '@babel/core'` and `const { types } = babel`. @babeljs 5/ 🧵
1
1
We can no longer mock named exports. I.e. `export function mkDir(d: string) { }`. We previously could do this with sinon: `import * as utils from './file-utils.js'` and `sinon.stub(utils, 'mkDir')`. We now export an object with methods. `export const utils = { ... }`. 4/ 🧵
2
1
We use `require`, `require.resolve`, `__dirname` and `__filename` in a lot of places. This was all pretty straightforward to replace thanks to great nodejs docs and error messages ♥ 3/ 🧵
2
1
Most of the work was simply renaming of import identifiers. `import { ... } from './reporter'` becomes `import { ... } from './reporter.js'`. And `import { ... } from './di'` becomes `import { ... } from './di/index.js'`. Some regex find replace magic took care of that. 2/ 🧵
1
1
I've been migrating StrykerJS's codebase to native esm on #nodejs using #TypeScript. Overall I think it went about as well as anyone could expect. Got 80% done in 20% of the time. My remarks & findings 👇 1/ 🧵
1
4
25