Create React App with ts-loader and CRACO
Create React App is a fantastic way to get up and running building a web app with React. It also supports using TypeScript with React. Simply entering the following:
Create React App is a fantastic way to get up and running building a web app with React. It also supports using TypeScript with React. Simply entering the following:
This post explains how to integrate the tremendous test runner Jest with the continuous integration platform Azure Pipelines. Perhaps we're setting up a new project and we've created a new React app with Create React App. This ships with Jest support out of the box. How do we get that plugged into Pipelines such that:
Related: there is a post on Vitest and Azure Pipelines.
Consistent formatting in a codebase is a good thing. We can achieve this in dotnet using dotnet format
, used in combination with the npm packages husky
and lint-staged
. This post shows how.
By default Microsoft.Identity.Web
responds to unauthorized requests with a 302 (redirect). Do you want a 403 (forbidden) instead? Here's how.
'Tis the season to play with new compiler settings! I'm a very keen TypeScript user and have been merrily using strictNullChecks
since it shipped. I was dimly aware that C# was also getting a similar feature by the name of nullable reference types.
Some blog posts are insightful treatises on the future of web development, some are "here's how I solved my problem". This is most assuredly the latter.
I'm writing an custom pipelines task extension for Azure Pipelines. It's written with TypeScript and the azure-pipelines-task-lib.
I've recently found myself developing custom pipelines task extensions for Azure DevOps. The extensions being developed end up in the Azure DevOps Marketplace. What you see there when you look at existing extensions is some pretty lovely documentation.
Never neglect the possibilities of a code review. There are times when you raise a PR and all you want is for everyone to hit approve so you can merge, merge and ship, ship! This can be a missed opportunity. For as much as I'd like to imagine my code is perfect, it's patently not. There's always scope for improvement.
When an application loads data, typically relatively few HTTP requests will be made. For example, if we imagine we're making a student administration application, then a "view" screen might make a single HTTP request to load that student's data before displaying it.
The Azure DevOps Client library for Node.js has limitations and missing features, IGitApi.getRefs
is missing pagination and IWikiApi
is missing page create or update. This post details some of these issues and illustrates a workaround using the Azure DevOps REST API.
Safari wants a Content-Type
header in responses. Even if the response is Content-Length: 0
. Without this, Safari can attempt to trigger an empty download. Don't argue; just go with it; some browsers are strange.
I blogged a little while ago around to support integration tests using Autofac. This was specific to Autofac but documented a workaround for a long standing issue with ConfigureTestContainer
that was introduced into .NET core 3.0 which affects all third-party containers that use ConfigureTestContainer
in their tests.
I'm part of a team that builds an online platform. I'm often preoccupied by how to narrow the gap between our users and "us" - the people that build the platform. It's important we understand how people use and interact with what we've built. If we don't then we're liable to waste our time and energy building the wrong things. Or the wrong amount of the right things.
Many corporate machines arrive in engineers hands with a preponderance of pre-installed background tools; from virus checkers to backup utilities to port blockers; the list is long.
Devcontainers are cool. They are the infrastructure as code equivalent for developing software.
This post differs from my typical fayre. Most often I write "here's how to do a thing". This is not that. It's more "don't do this thing I did". And maybe also, "how can we avoid a situation like this happening again in future?". On this topic I very much don't have all the answers - but by putting my thoughts down maybe I'll learn and maybe others will educate me. I would love that!
Updated 2nd Oct 2020: for an approach that works with Autofac 6 and ConfigureTestContainer
see this post.
The tremendous Tanner Linsley recently released react-virtual
. react-virtual
provides "hooks for virtualizing scrollable elements in React".
This last four months has been quite the departure for me. Most typically I find myself building applications; for this last period of time I've been taking the platform that I work on, and been migrating it from running on our on premise servers to running in the cloud.
When you are building any kind of application it's typical to want to store information which persists beyond a single user session. Sometimes that will be information that you'll want to live in some kind of centralised database, but not always.