- Build a search page for your astro static blog with fuse.js
Recently, I migrated this very blog to Astro, and I took the opportunity to modernize the search system. I was then using lunr, which was a bit unmaintained, and not playing well with modern build tools. Introducing fuse.js Looking for alternatives I found fuse.js, a fuzzy-search library, with zero …
category Archive — "tools"
— 2023 —
- My thoughts after migrating content-centric websites from Next.js to Astro
Context Around four years ago, I started to use Next.js in some projects, including this blog. These projects were not applications, but simple landing pages and documentation sites, where content written in markdown was a first class citizen. I remember that I was looking for a modern static site g…
- My current take when publishing packages to the npm registry
I have always struggled with how packages are versioned and published to the npm registry. My main concern is that you probably want to also add a git tag to your source code when you are releasing a new version, but npm packages have their own versioning system, and include a "version" field in the…
— 2022 —
- My experience migrating to Redux Toolkit (RTK)
A couple of weeks ago I migrated a React project using redux to Redux Toolkit. Redux has always been my preferred state management tool for React (which doesn't mean I "love" it), but one of its main problems is the amount of boilerplate code it requires. Because of that I had a couple of helper fun…
- How to reduce duplication in your GitHub Actions workflows
In 2019, GitHub published their own solution to run automated workflows called GitHub Actions, which allowed those hosting their code in GitHub, to be able to define and run their CI/CD pipelines in the same platform. When it was released, one of the main pain points to use it was that defining pipe…
- My experience migrating from enzyme to react testing library
Recently ReactJS v18 was released. I started to look into its improvements, and checked which of my projects could benefit from them. The main react-based project I maintain at the moment of writing this article is shlink-web-client, so I naturally created a new branch and started the process. The u…
— 2021 —
- Setting-up a preview environment for your client-side apps with GitHub Actions and GitHub Pages
In the last couple of days I have been playing around with the idea of combining GitHub Actions and GitHub Pages to be able to dynamically build preview environments every time a pull request is opened against a repository hosting a client-side web app. The idea is that you can quickly preview the c…
- What to take into account when versioning software
I remember many years ago, when I released my first open source project, that every time I had a new release ready, I was never sure what should be the new version number. Versioning software is not as straightforward as it might look when you don't have a lot of experience. In this article I'll try…
— 2020 —
- Running several steps of a Travis CI build in parallel
Let's not deny that GitHub actions are hitting hard in the tech community, and many projects are transitioning from other continuous integration systems like Circle CI or Travis CI. Personally I have been using Travis a lot during the past years, for all my OSS projects, and I have gotten very used …
— 2019 —
- Is spying on mocks a bad practice for unit tests?
For a long time, I have been trying to include tests in every project in which I've worked on. There are several types of automated tests (or what should actually be called automated checks). From unit tests, integration and functional tests, to end-to-end tests. Each one of them differs from the re…