Newsletter #6
This is newsletter #6 - about crafting (and) JavaScript - April 3rd, 2017. Every Monday you will receive a hand-selected collection of links about JavaScript and how to craft better software. Let's get started ...
This is newsletter #6 - about crafting (and) JavaScript - April 3rd, 2017. Every Monday you will receive a hand-selected collection of links about JavaScript and how to craft better software. Let's get started ...
This is newsletter #5 - about crafting (and) JavaScript - March 27th, 2017. Every Monday you will receive a hand-selected collection of links about JavaScript and how to craft better software. Let's get started ...
This post is my 2nd write-down inspired by "Purescript by Example",
the book by Phil Freeman, the author of purescript.
Now about chapter 2, where I install Purescript and touch the tools
for the first time. I am gonna use yarn
instead of npm
,
let's see how that goes :).
Nothing to add to this post
In order to keep all your meta data of your project in one place and only create files that actually just copy those data you can use projectz where you maintain data like title, description, author(s), badges, ... in one CSON file and with a special markup you can update fill in the templates files like README, package.json, ...
I am gladly using codeberg (as github alternative)
for as many projects as I can, really support their mission.
"Independent and powered by your donations and contributions".
I struggled a little bit to figure out the URL that works
for a package
that is not on npm yet, but exists just as a codeberg repo.
Continue reading →
While working on
pico-tester
I realized I am not as knowledgable in nodejs' support
for ECMAScript Modules (esm).
I think it's very simple in the browser.
There is
<script type=module>
which understands import
and there is
<script nomodule>
which nicely gradually falls back to before ESM times. But what about nodejs?
There is a package.json
with properties such as
main: <filename>
, exports: {}
type: module
, type: commonjs
,
and any combination of them. For a long time I am using
the package esm
to allow me to use ESM on nodejs, but when publishing a package such as
pico-tester, I must be compatible with as many ways as possible, in which nodejs can be used.
So first there is terminology to get right (esm, cjs, ...) and than provide the right type of package or packaging
so it can be used there. I might update this over time with more learnings.
Continue reading →
process.cpuUsage
and process.memoryUsage
Learning stuff about nodejs (or v8) while writing tests that ensure runtime behaviour,
using process.cpuUsage and process.memoryUsage. Curious how brittle those tests become over time.
Glad the app ALWAYS runs in the same docker container (dev and prod).
Continue reading →
done
Parameter
Why a #mocha #test times out, when I write it like this: it('...', _ => {});
but it does NOT time out,
when I write: it('...', () => {});
? Exactly, because the _
is the magic done
, that one needs to call.
Continue reading →