5 days ago

GNOME 45 Extensions: Problemsuche

Bei der Umsetzung des ESM-Standards scheint es noch zu hapern.

#GNOME_45 #Extensions #GNOME_Extensions #Esm #JavaSript_Modules #Linux

🤦🏻‍♂️ Ethan
1 week ago

Configuring #TypeScript and #ESM / #CJS is, frankly, a nightmare. 👿 :javascript: :typescript:

Here's a thoughtful discussion over at #hackernews

and here's my opinionated boilerplate to skip the configuration, and dive right in to writing #TS

#node #javascript #js

2 weeks ago
2 weeks ago
2 weeks ago

I think the first image is my favourite. It shows just how far away from the Moon Artemis 1 orbited (with Earth in the background there).

Artemis I anniversary backgrounds.
#ESA #Artemis1 #Moon #ESM

3 weeks ago

How to fix this giltch on ESM for Ubuntu 22.04? #dualboot #2204 #esm #ubuntupro

Zarin Loosli
4 weeks ago

I'm writing some #javascript #Express middleware that needs access to the body of #JSON requests. For testing purposes I was able to add `app.use(bodyParser.json());` to my server code, but as I get ready for a 1.0 release I want to eliminate this peer dependency.

I want to keep my project 100% #esm modules (long story), so importing `body-parser` inside the library is a no-go. Does anyone know of a library that would fix this for me?

Jérôme Herbinet | Open Source
1 month ago

😅 La durée de support de GNU/#Linux #Ubuntu dépasse toutes les espérances ! #LTS #ESM #OpenSource #LogicielsLibres #FreeSoftware #Update #Upgrade #Geek #GeekJoke #Humour #Joke #Joke #Blague

The only thing I miss from #CommonJS imports is ability to have optional dependencies.

let dep = null;
try {
dep = require('opt-dep')
} catch {}

The closest thing in #ESM you can get is import via top-level await, but it's not always available and causes all sorts of funky things.

Amadeus Paulussen
2 months ago

Should you be interested in helping to make a great #gnome #extension fit for #gnome45, here's a link for you. 😊️ #clipboardmanager #opensource #gnome #gnomeshell #extension #javascript #esm

2 months ago

🛰️🌑 Le module de service #ESM fournit par l’ESA du vaisseau #Orion de la mission #Artemis 2 a terminé son inspection finale des couches isolantes extérieures.
Ce module servira à propulser 4 astronautes d'une orbite basse vers la #Lune puis à revenir sur Terre fin 2024

Brian LeRoux 💚
2 months ago

Bundling code running in AWS Lambda has really poor downsides.

First downside is a build step. Second debugging is harder.

Yes sometimes sourcemaps can work, with additional setup, but that's also obviously slower than not needing to. Aside the fact they do not always work.

Better: not needing to bundle. We've found we don't need to with

1/2 #aws #lambda #serverless #esm

Hexagon :github:
2 months ago

Learn to create libraries compatible with both ESM and CommonJS, as well as different runtimes like Node.js, Deno, and browsers.

#deno #bun #node #esm #commonjs #javascript

A new post on how to create a React components library, although focusing on the aspects of publishing dual libraries (CJS+ESM) with types:

#JavaScript #TypeScript #ESM #CommonJS

3 months ago


I think I've found my #SPA #SSG #SSR holy grail:

- #Preact with no build step (#ESM only)
- HTM for JSX-like syntax
- preact-render-to-string for server-side rendering
- preact-router for all of the routing
- Preact's `hydrate` method

On the server (I use #koa, but #Fastify or #Express work too) routes can either serve

- pre-rendered static markup
- pre-rendered app routes that get hydrated on the client (switching to client-side rendering)
- fully client-side rendered apps

GJS (GNOME for JavaScript) 是为 GNOME 插件开发者等提供的,用于开发 GNOME 周边组件的 JavaScript 环境。

从 GNOME 45 起,GJS 将使用 ESM 替代原有的 GJS 自制模块系统。因此,GNOME 45+ 的插件和旧插件将不能兼容。开发者可以在 同时上传新旧版本的插件以供各版本的用户使用。

#GNOME #JavaScript #ESM

Telegram 原文

Nate Himmel
3 months ago

Latest preprint with studying insect OR evolution: we've found homologs across the entire tree of life! Insect receptors are just a majorly expanded branch of a 4 billion year old protein superfamily...

#phylogenetics #alphafold #esm #huggingface #LECA #LUCA #7TMIC #chemosensation #smell #taste #olfaction #insects #evolution #neuroscience

Doug Parker 🕸️
3 months ago

@jsparty @acemarke Great discussion about the difficulties with #ESM and I can definitely relate. Ultimately I think a lot of this just comes down to the fact that migrating ecosystems is just hard. I wish there were a clear cause or solution, but there just isn't. I also suspect the "article that explains how to do this right" is impossible because there _isn't_ a single approach which makes every tool happy.

Actually the package format standard and tooling you want actually does exist in the #Angular ecosystem. It's called #APF, Angular Package Format, and it can be generated with `ng-packagr`.

It's by no means perfect and relies heavily on constraints we enforce on Angular itself (TS versions, browser support, language levels, etc.) But this is a very powerful tool for when we need to make major changes to the Angular ecosystem, such as going ESM-only, which we landed successfully in v13 several years ago.

JS Party 🪩
3 months ago

🤘 New episode of JS Party!

@acemarke (web dev professor/historian, OSS Maintainer & engineer at Replay) joins us to talk about the shift from CommonJS to ESM ⏩

We discuss the history of module patterns in JS and the grueling effort to push the world’s biggest developer ecosystem forward 😣

Get ready to go to school kids, this one’s deep! 🏫

#javascript #packages #esm #nodejs #redux


Wolfgang Viechtbauer
3 months ago

For those working with intensive longitudinal data, as collected via the experience sampling method (ESM) / ecological momentary assessment (EMA): I will be teaching my 'ESM Data Analysis' course again this year (December 6-8). For further info, see:

where you will find a course description and schedule, some notes on the course prerequisites / how to prepare for the course, registration instructions, and some notes / frequently asked questions.

#ESM #EMA #statistics

Brian LeRoux 💚
3 months ago

Just me or are errors with esmodules in Node.js extremely bad? Linter is catching stuff runtime can't ?

#nodejs #esm #wtf

Amadeus Paulussen
4 months ago

Interesting: #gnome 45 will break all #extensions. 🫣️ See 😝️ and 🤓️ #gnomeshell #esm
Currently I only use #pano #clipboard manager.
Do you use a lot of extensions?

Auf Distanz
4 months ago

Neue Episode: Auf Distanz 0078: Die Rückkehr zum Mond, Artemis und das ESM

Dieses Mal geht es um das Europäische Service Modul #ESM und seine Rolle im Artemis-Programm, das Menschen wieder zum Mond bringen soll.

Ich sprach mit Mitarbeiter:innen von #Airbus Defense and Space und von der #ESA über das ESM und seine Geschichte, über die Beteiligung an Artemis, Ergebnisse der Mission #Artemis1 und warum Menschen zurück zum Mond reisen.

In 2009, #CommonJS was exactly what #JavaScript needed. The group took a tough problem and forced through a solution that continues to be used millions of times a day.

But with #ESM as the standard and the focus shifting towards cloud primitives — the edge, browsers, and #serverless compute — and CommonJS simply doesn’t cut it. ESM is a better solution for developers, as they can write browser-compliant code — and for users who get a better end experience.


Craig Doremus 🦕
5 months ago

Mark Erikson, prime maintainer of Redux says in this interview: "trying to get proper ESM/CommonJS compatibility -- whatever that actually means -- I've been living in fear of that for multiple years"
#deno #esm #javascript #nodejs

Markus Tacker
5 months ago

I have a new favorite puzzle: #ESM module import and export configurations in libraries, with TypeScript support, of course.


I started to support some project that are only written in #cjs now with #esm

Thanks to this is really easy 😍
And due to all my projects are written in #typescript, I don't even need to touch the code
It just works

Also check out provided by @bluwy :ablobcatattention:

I released and now support #esm aside from #cjs
But it only works up to #typescript v4.9 ⚠️

Luckily #vue3 has now much better #typescript support for #watch via #compositionapi, so you might not need it anyway anymore

Please open issues if you are running into issues

6 months ago

Les dejo un articulo que escribí - AWS Lambda - ESM Node.js

#aws #nodejs #lambda #esm #javascript

Craig Doremus 🦕
6 months ago

The trials and tribulations of converting legacy #javascript to #esm :

OMG! Ubuntu!
6 months ago

Ubuntu 18.04 General Support Ends, Enable ESM to Stay Protected

As anticipated, support for Ubuntu 18.04 LTS is now over — but don’t panic if you’re still using it, as this is not the end of the road. Ubuntu 18.04 ‘Bionic Beaver’ lives on through Expanded Security Maintenance1, or ESM. This provides users of the distro with a further five years (!) of core security updates from Canonical and Ubuntu developers. ESM isn’t automatic but it is easy to enrol. To benefit, you need to sign up for an Ubuntu Pro subscription — but don’t worry, this is free for regular users on up to 5 devices (more if you’re :sys_more_orange:
#News #BionicBeaver #Esm #Ubuntu18_04Lts #UbuntuPro


Media source:
Alberto de Murga
6 months ago

I am creating a library using #typescript I would like to generate using the same codebase a valid #deno import, an #javascript #ESM module and #CommonJS module for maximum compatibility. Does anyone have a magic tsconfig configuration in the best case, or any idea about an easy solution to achieve this?

Doug Parker 🕸️
7 months ago

I feel like I'm going insane today. I just found a global variable in #NodeJS which is apparently _not_ a global? #Jest #ESM documentation states that the `jest` symbol is _not_ exposed globally and you have to import it, but sometimes it sort-of is?

console.log(typeof jest); // object
console.log(jest); // object
console.log(globalThis.jest); // undefined - WTF?!?!

Not only that, but `jest` is only defined in certain files and not others, even when one directly imports another.

This kind of behavior should be impossible and I'm completely perplexed. Is this something with `--experimental-vm-modules` or do I need to check myself into a mental hospital?

Rick Osborne
7 months ago

As much as I love #TypeScript, I always forget what a lift it is to get a new project up and running. Especially right now with TS5 and #ESM, and if you need to target both node and the browser.

(Especially especially if you have some ethics and don’t want to just copy your working setup from work over to a home project.)

“Just use a scaffold.” Right. So it’ll appear to work, but I won’t understand how, so I’m just delaying my frustration until later when I’m much more invested.

Nemeth/Star Productions 🇪🇺
8 months ago

This is the Artemis 2 crew flying around the moon. Pictures from our live coverage of the Artemis 2 crew announcement.

Don't miss our live coverage and join our group on Signal.

#Artemis2Crew #Artemis #Artemis2 #WeAreGoing #Moon #ForwardToTheMoon #NASA #ESA #ESM #orion

Evert Pot
8 months ago

I wrote about publishing NPM packages that support CommonJS, ESM and are written in Typescript. Oh boy!

#esm #typescript

8 months ago

Today, #nodejs package hell drove me crazy. #commonjs and #esm bundling with only #esbuild seems to be impossible today; at least I didn't manage to get a configuration that supports
- browser environment (when installled in an app, for example with #vitejs)
- node environment (for services in node docker containers)
- bin script support

Especiallly the generated CommonJS of esbuild seems to be strange and lead to a lot of incompatibilites.

Patrick Onghena
9 months ago


What makes a good experience sampling item?

Anu Pauliina Hiekkaranta will hold a workshop focused on the qualitative evaluation of #ESM items.

Attendees will learn how to improve accuracy, comprehension, and practical application of ESM items!


9 months ago

Anyone have a pure #esm #assertion library to recommend?

To be quite honest, I made this room just so I could sort my hoard of in-game books

#OpenMW #ESM

The room from my previous post, now populated with knickknacks, and books.
Desk view. Alchemical devices and skulls decorate the top. Also transhat uwu
Different angle from the common area. There's also a Morag Tong operative there perusing the book shelves.
Renoir Boulanger
9 months ago

The other things I'm experimenting with @Suns be

Export templates, styles, behaviour, all without any framework, published on a controlled domain name, as an #ESM along with a #CustomElement and registration helper

If one project doesn't use customElement, but needs something from it, but in a framework, it's available. It gives liberty to use & extend. Best of both worlds.

That's what I'm aiming for: optimal re-use and to load only what's needed

The things that makes projects heavy and slow

Should be to no-ones surprise I'm playing as an Argonian :dragn8V:​

#OpenMW #ESM

A screencrab of my char. They're a light-scaled Argonian in light armor. Their head is hidden under a red hood and they're holding a lantern.

Spent like an hour in the starter town now robbing houses.

Truly not an Elder Scrolls experience without robbing everyone blind, and then selling the merchandise to the local shopkeep :blobCatGiggle:​

#OpenMW #ESM

Evert Pot
9 months ago

I wrote something!

Building a simple CLI tool with modern Node.js

#node #esm #typescript

Doug Parker 🕸️
9 months ago

After a lot of work, I've finally landed a release of #Bazel #rules_prerender which is compatible with #aspect_rules_js!

This has been a long time coming, and the issue shows how big a change this was ( It didn't help that I kept getting distracted with other things and forgot everything I was doing. 😅

#aspect_rules_js does seem like a solid improvement and it sets up #rules_prerender for a lot of awesome improvements in the future (#ESM, #bzlmod, better bundling, etc.) Super excited about where we can take this next!

Shout out to @alexeagle and Greg Magolan (who I don't think is on Mastodon?) for their help, couldn't have done it without you!

Renoir Boulanger
10 months ago

Anyone delved with publishing #ESM modules over https like does [1] with version in the URL along with publishing for NPM?

Probably need different URL for Browser, Deno, and make sure the release/testing checks for platform compatibility.

I can imagine writing a release of a package into a publicly available folder with package name platform, and version. Pretty much like deb/rpm. Heh.

Anyone experimented w/ that?


Can we predict if atmospheric CO2 grows faster or slower than what is expected from emissions' growth?

Yes, by assimilating observational data into an #ESM, we gain a predictive skill of 5 years for the air–sea CO2 flux, and 2 years for the air–land CO2 flux and atmospheric carbon growth rate.

Find out more on how we predict the global carbon cycle and evaluate modeled atmospheric CO2 in our new study

by @HongmeiLi @MPI_Meteo


Figure 1from Li et al.: Illustration of a prediction system based on the MPI Earth system model. The illustrated time series of the atmospheric CO2 growth rate shows annual means from model simulations plotted together with observations from the Global Carbon Project (GCP). We conduct three sets of simulations (from left to right in sequential order): (a) uninitialized “free” simulations, which are the same as the freely evolving Coupled Model Intercomparison Project (CMIP) historical type simulations, (b) an assimilation simulation to reconstruct the evolution of the climate and carbon cycle towards the real world by nudging the model towards observation and reanalysis data during its integration, and (c) initialized predictions started from reconstruction states produced by the assimilation simulation and integrated freely (i.e., no nudging towards observations) for 5 years. The time series in (a) shows that the uninitialized simulations capture the long-term trend well, but the year-to-year variations are out of phase with the observations. The time series in (b) shows that the assimilation simulation forces the variations in the uninitialized freely run simulation towards the real world and results in a reconstruction that is closer to the observations. Panel (c) shows the reconstruction together with the 5-year-long initialized predictions (i.e., hindcasts). To make the illustration more clear, only predictions with starting years at 10-year intervals are shown.
Axel Rauschmayer
10 months ago

2/ If a CommonJS module follows this rule, its exports can be name-imported from ESM modules:
#JavaScript #CommonJS #ESM #NodeJS

Axel Rauschmayer
10 months ago

1/ Happy to see that ESM modules have become popular in current code bases (*):
– Mostly ESM: 68%
– Mostly CommonJS: 17%
– A mix: 12%
– (No answer: 3%)

In my own (relatively simple) ESM-based Node.js projects I was delighted that I usually couldn’t even tell if a dependency was ESM or CommonJS.

#JavaScript #CommonJS #ESM #NodeJS

Evert Pot
10 months ago

Anyone know something about ESM, CommonJS, Typescript and how they interact?

Stuck on a problem, posted on Stack overflow:

#node #typescript #esm #commonjs

Emelia 👸🏻
10 months ago

SDK developers, how are you handling ESM + CJS? We're starting to see dependencies switch to ESM only, but because we support #CJS, we're unable to upgrade as #ESM can't be imported by CJS

Is the answer just to drop our transpiling to CJS/UMD and go ESM only? That feels like it should be the answer & would technically be a semver-major change.

Is there a better solution?

Andrew Wooldridge 🌱
10 months ago by jsDelivr - A New-Age CDN for JavaScript modules #javascript #esm

Are we really still using `form-data` to POST FormData using fetch() in #Nodejs in 2023?

Please tell me there's an #ESM package I can use. I don't want to get requires() on my *.mjs files 🤢

Wes Lambert
11 months ago

What do y'all think about a #C2 detection series including #SecurityOnion and #Velociraptor, illustrating the compliments and differences of host and network-based detection and response?


Craig Doremus 🦕
11 months ago

It's been 7 1/2 years since ES Modules were standardized and I still see new JS code and tutorials using require(). Why?!?

Ian VS
11 months ago

I've released version 0.2.6 of `@storybook/builder-vite`, which includes a fix to pin the react-docgen version, which has started to publish ESM only.

Use this version only if you're still using Storybook 6.5, rather than the 7.0 beta.

#storybook #vite #ESM

Ian VS
11 months ago

Why must some #npm packages insist on causing pain to developers just to make a point or "push the ecosystem forward"?

I'd be happy to avoid such packages, except I maintain tooling that needs to interoperate with them. #ESM

Ralf Greve
1 year ago

@alexwitze What an awesome, iconic shot! Just amazing. ✨✨✨

#Moon #Earth #Artemis #Artemis1 #ArtemisI #Orion #ESM #OrionESM #NASA #ESA

Ralf Greve
1 year ago

The lunar flyby later today will slow down #Orion to a near standstill. After that, the spacecraft will fall back to #Earth in an almost straight line. Looking forward to some nice photos!

Animation credit: Wikimedia Commons User:Phoenix7777
#Moon #Artemis #Artemis1 #ArtemisI #ESM #OrionESM #NASA #ESA

Orion trajectory in an Earth-centred inertial reference frame.
Axel Rauschmayer
1 year ago

Updated today: “Tips for typing import statements in JavaScript”

Question tackled by this blog post: “Does JavaScript’s `import` statement have the wrong syntax?”
#2ality #JavaScript #ESM

Axel Rauschmayer
1 year ago

Many node:fs functions accept URLs (as an alternative to paths):

Use case—accessing files located next to the current ESM module:

function readData() {
const url = new URL('data.txt', import.meta.url);
return fs.readFileSync(url, {encoding: 'UTF-8'});
} #nodejs #javascript #esm

Bryan Lawrence
1 year ago

Belated #introduction. Expat #kiwi living in Europe, albeit a bit with an identity crisis. Will toot about the #uk, sorry!

Into #climate, #ClimateScience & #ClimateModelling (particularly #ESM and #hydrology) using #CloudComputing & #HPC.
Also #DataScience, #DigitalCuration #metadata & the philosophy & practice of #simulation in all sci.

History: I brought the internet to the south island of NZ & invented and ran #jasmin for 10y ( Helped procure #Archer & #Archer2.