jscodeshift, run programmatically

jscodeshift is a great tool for running migrations on frontend codebase. It saves days of team syncup, cross team collaboration and prioritization,my team is looking at building a tool to automatically upgrade applications that consume our libraries, instead of giving an upgrade doc and deadlines.the jscodeshift is a command line interface and works the same… Read More »

WebAssembly in javascript : load and run with ease

WebAssembly libraries looks like unicorns in the sky, but they need to be prepared to be used efficiently ;most of the time, you start by naively pass values in functions before realizing that only pointers are read. const webAssemblyModule = await WebAssembly.compile(wasmData);const instance = await WebAssembly.instantiate(webAssemblyModule,{env: {memory: newMemory}, exports: { memory: newMemory }});instance.exports.foo("bar"); // but… Read More »

next.js : dynamic site sections with just one javascript module

next.js has become a very simple and quiet tool to build showcase sites or documentation pages.The contract for writing pages only consists in writing ecmascript modules, which is widely accepted granularity in many node.js frameworks today.The next.js configuration almost resides entirely in the root directory, and you only have a few things that you have… Read More »

next.js : how to prevail against imported css in node_modules

Have you seen this message before ? https://nextjs.org/docs/messages/css-npm "One of your dependencies (node_modules) imports a CSS file." Well, what ? You are just importing styles in one of your node_modules package like this : import styles from "./file.css" Usually it is a source of frustration. css modules can only be imported from pages.When you try… Read More »

Content-Security-Policy builder tool in spring / java

The content security policy is a header that is used to coerce the resources that a webpage can read. It can be used to prevent malicious third party libraries, scripts, ads from capturing data or displaying content. Many languages offer tools to read or parse the Content-Security-Policy format which is described formally in https://www.w3.org/TR/CSP2/. But… Read More »

cheap node.js ‘fetch’ for people not wanting to use 3rd party libs

Using javascript/typescript ? rest ? using json ? Just http(s) >= 1.1 ? more and more people are getting tired with the idea of bundling external libraries in their own service / library. Can I just call another endpoint without adding 'fetch', 'axios' or anything ? Adding them is automatically enabling the burden of maintaining… Read More »

Bind all your gprc endpoints with a simple and magic coRouter

grpc-services are quite simple, focused and performance oriented services. Instead of calling them with a format that needs complex marshalling / unmarshalling, and making use of a standard http 1.1 connection, grpc has a dedicated (therefore faster) generated code for each type. This protocol also indexes data fields by number, which permits to shrink the… Read More »