JavaScript Icon

JavaScript

Tracking all things JavaScript
1141 Stories
All Topics

TypeScript github.com

ECMAScript proposal: Types as Comments

This proposal is brand new (stage 0), but I hear that a lot of work has been put into it behind the scenes by a lot of people, so it has that going for it…

This proposal aims to enable developers to add type annotations to their JavaScript code, allowing those annotations to be checked by a type checker that is external to JavaScript. At runtime, a JavaScript engine ignores them, treating the types as comments.

The aim of this proposal is to enable developers to run programs written in TypeScript, Flow, and other static typing supersets of JavaScript without any need for transpilation, if they stick within a certain reasonably large subset of the language.

The implications of this change are pretty massive, if it were to ever ship. And you better believe we’re putting together a JS Party episode to discuss it with the people involved.

Chris Ferdinandi gomakethings.com

SPAs were a mistake

Chris Ferdinandi:

For years, a trend in our industry has been to build single-page apps, or SPAs.

With an SPA, the entire site or app lives in a single HTML file. After the initial load, everything about the app is handled with JavaScript. This is, in theory, supposed to result in web apps that feel as fast and snappy as native apps.

Today, I want to explore why that’s nonsense. Let’s dig in!

I built one of the first big SPAs (remember Grooveshark?), but I’ve shied away from them ever since. I do think there are cases when they make sense (Trello and GMail come to mind), but overall I think too many people chose the architecture too many times because it was the it thing to do vs it was actually the best decision for their circumstance.

Heck, even Chris’s disclaimer of ‘when SPAs make sense’ section at the top is easily defeated by our Turbolinks implementation. But I digress… read this post it’s a good one for sure.

The Changelog The Changelog #482

Securing the open source supply chain

This week we’re joined by the “mad scientist” himself, Feross Aboukhadijeh…and we’re talking about the launch of Socket — the next big thing in the fight to secure and protect the open source supply chain.

While working on the frontlines of open source, Feross and team have witnessed firsthand how supply chain attacks have swept across the software community and have damaged the trust in open source. Socket turns the problem of securing open source software on its head, and asks…“What if we assume all open source may be malicious?” So, they built a system that proactively detects indicators of compromised open source packages and brings awareness to teams in real-time. We cover the whys, the hows, and what’s next for this ambitious and very much needed project.

Databases github.com

Grist is a lot like Airtable, but open source and more customizable

In their own words:

Grist is a modern relational spreadsheet. It combines the flexibility of a spreadsheet with the robustness of a database to organize your data and make you more productive.

Since so many people make the Airtable comparison that I did in the headline, the team behind Grist has written up a comparison of the two offerings.

forsigner github.com

Fomir – a schema-first library for building forms

Why create another form library? Here’s what Fomir’s author says to that:

I have tried many form libraries, like redux-form, formik, final-form, react-hook-form… None of them suit my taste. I would expect a forms library with these features:

  • Using schema
  • Easy to update form state
  • High Performance
  • More abstract

Fomir create form by passing a form schema which is a JSON tree. the form schema is very flexible, you can create any form by the schema.

I could see this as especially useful for form builders and similar tools where you’re providing a graphical way to build forms because your backend would just have to emit the correct JSON and let Fomir take it from there.

JS Party JS Party #210

What's in your package.json?

Tobie Langel, Open source strategist and Principal at UnlockOpen, joins Chris, Feross, and Amal to discuss recent widespread incidents affecting the JavaScript community (and breaking CI builds) around the globe. Two widely used npm libraries were self-sabotaged by their single maintainer, yet again, highlighting the many gaps in our OSS supply chain security, sustainability and overall practices. We explore all these topics and solution on what our ecosystem needs to be more resilient to these types of attacks in the future.

Zach Leatherman zachleat.com

Eleventy v1.0.0, the stable release

Eleventy creator, Zach Leatherman:

This project would not be possible without our lovely community. Thank you to everyone that built something with Eleventy (×476 authors on our web site!), wrote a blog post about Eleventy, contributed code to core or plugins, documentation, asked questions, answered questions, braved The Leaderboards, participated on Discord, filed issues, attended (or organized!) a meetup, said a kind word on Twitter ❤️.

Congrats to Zach and the entire Eleventy community on the big 1.0! 🎉

JavaScript fakerjs.dev

Faker.js is now a community maintained project

Eight people have stepped up to take over maintenance of the suddenly abandoned JS library that generates fake data. These transitions are tricky to make smoothly. Props to the new team on being very careful and thoughtful each step along the way, especially when it comes to funding the project. Here’s a nice note from the new team:

We’re excited to give new life to this idea and project.

This project can have a fresh start and it will become even cooler.

We felt we needed to do a public announcement because of all of the attention the project received in the media and from the community.

We believe that we have acted in the way that is best for the community.

JavaScript blog.jim-nielsen.com

The optional chaining operator, “modern” browsers, and my mom

Any debugging story that includes the phrase, “My Mom’s verbal JIRA ticket was right” has a lot of promise. This one by Jim Nielsen delivers the goods. Here’s the culprit:

In my brain, I always thought of Safari and Chrome as “modern” browsers. But even Chrome, an “evergreen” browser, failed because it wasn‘t on an “evergreen” operating system (or hardware).

and his takeaway:

The real-life impact of our technical decisions really hit home to me once again: my Mom had trouble volunteering and participating in her local community because somebody shipped the optional chaining operator in their production JavaScript.

Be thoughtful out there.

Gavin Henderson github.com

EyeCommander helps you communicate by blinking

At Ace Centre we have just launched an application that uses your webcam to detect when a user blinks. The application then triggers a switch press. This allows users who can’t access a physical switch or eye tracking to communicate using their chosen communication software.

We are really excited about the real world impact EyeCommander is already having and we would love to have more people contributing to the open source codebase

EyeCommander is an Electron app with a React frontend. It uses Mediapipe, which is a collection of pretrained ML models for landmark detection in videos, provided by Google. It is cross platform so you can get up and running on whatever platform you use.

EyeCommander helps you communicate by blinking

Terminal browsix.org

Browsix – Unix in a browser tab

Your first thought when reading that headline might’ve been _WebAssembly. Mine was! But no, that is not how Browsix does its thing:

Browsix is a framework that bridges the considerable gap between conventional operating systems and the browser, enabling unmodified programs expecting a Unix-like environment to run directly in the browser. Browsix does this by mapping low-level Unix primitives, like processes and system calls, onto existing browser APIs, like Web Workers and postMessage.

They have examples of this tech enabling a terminal in the browser, a Latex editor, and even a client/server-based meme generator written in JS and Go.

The New Stack Icon The New Stack

The case for Rust as the future of JavaScript infrastructure

Lee Robinson from Vercel/Next.js:

Rust is now replacing parts of the JavaScript web ecosystem like minification (Terser), transpilation (Babel), formatting (Prettier), bundling (webpack), linting (ESLint) and more. Let’s take a deep dive into why this trend is gaining popularity and wider adoption.

We just discussed this topic (and some apprehension about it) on JS Party last week. Definitely a trned worth brushing up on, if you haven’t already.

YouTube Icon YouTube

What really happened to Faker.js?

Fireship with a brief (3:48) rundown of the most recent instance of a popular open source library maintainer removing their code from public repositories in response to corporate (ab)use of their free labor:

Yesterday, a popular open-source package, Faker.js, was abruptly taken down from GitHub. Its readme simply said “What really happened to Aaron Swartz?”. Let’s take a look at why Open Source Software can be a bad deal for many independent developers.

0:00 / 0:00