#commonjs — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #commonjs, aggregated by home.social.
-
9 Times the Web Platform Was Influenced by Libraries, by @jadjoubran.io:
https://jadjoubran.io/blog/web-platform-influenced-by-libraries
#webplatform #retrospectives #libraries #dojo #bootstrap #jquery #mootools #prototypejs #esm #commonjs
-
9 Times the Web Platform Was Influenced by Libraries, by @jadjoubran.io:
https://jadjoubran.io/blog/web-platform-influenced-by-libraries
#webplatform #retrospectives #libraries #dojo #bootstrap #jquery #mootools #prototypejs #esm #commonjs
-
9 Times the Web Platform Was Influenced by Libraries, by @jadjoubran.io:
https://jadjoubran.io/blog/web-platform-influenced-by-libraries
#webplatform #retrospectives #libraries #dojo #bootstrap #jquery #mootools #prototypejs #esm #commonjs
-
9 Times the Web Platform Was Influenced by Libraries, by @jadjoubran.io:
https://jadjoubran.io/blog/web-platform-influenced-by-libraries
#webplatform #retrospectives #libraries #dojo #bootstrap #jquery #mootools #prototypejs #esm #commonjs
-
9 Times the Web Platform Was Influenced by Libraries, by @jadjoubran.io:
https://jadjoubran.io/blog/web-platform-influenced-by-libraries
#webplatform #retrospectives #libraries #dojo #bootstrap #jquery #mootools #prototypejs #esm #commonjs
-
Node.js Package Configuration Guide, by @nodejs:
https://nodejs.github.io/package-examples/
#guides #packages #dependencies #configuration #commonjs #esm
-
It's almost 2026 and we are still dealing with #commonjs vs #ESM issues in #nodejs. 2026 will be the last year that Keyv (https://keyv.org ) attempts to support commonjs with v6 due out this year. In 2027 we will move to ESM only with v7. It is just too painful to support commonjs compatibility.
This will also mean that `cache-manager`, `cacheable`, etc... will all move to ESM only in 2027. That is a large amount of caching usage across projects.
-
#Development #Announcements
Storybook is going ESM-only · The popular UI builder drops CommonJS support https://ilo.im/16744v_____
#Storybook #JavaScript #ESM #CommonJS #Frameworks #UiComponents #DesignSystems #WebDev #Frontend -
Пока, dual packaging: в каком формате публиковать npm-библиотеки
Уже 10 лет в JS-экосистеме воюют два формата модулей: CommonJS и ES Modules. Чтобы и получить плюшки ESM, и не распугать пользователей, npm-пакеты часто используют dual packaging: собирают код в оба формата. Это решает одну проблему, но создает несколько новых. Сегодня расскажу Какие проблемы пришли к dual packaging, и не пора ли от него отказаться. В какой формат паковать npm-библиотеки в 2025 году. Статься будет полезна и для опенсорса, и для внутренних библиотек, и для простых разработчиков (хотя бы чтобы понимать, откуда у вас в node_modules 2 Гб).
-
Bridging CommonJS and ESM in Node.js, by @joyeecheung (@webhackfest):
-
Building the Bridge: Running JavaScript Modules From Dart, by (not found on Mastodon or Bluesky):
-
[Перевод] Публикация пакета npm с ESM и TypeScript
За последние 2 года поддержка ESM в TypeScript, Node.js и браузерах сильно улучшилась. В этой статье я объясню мою современную настройку, которая является относительно простой по сравнению с тем, что нам приходилось делать раньше: она предназначена для пакетов, которые могут пренебречь обратной совместимостью. Настройка хорошо работает для меня некоторое время — начиная с TS 4.7 (24.05.2022) помогает то, что Node.js теперь поддерживает require(esm) — запрос библиотек ESM из модулей CommonJS я использую только tsc , но упоминаю поддержку других инструментов в разделе "Компиляция TS с помощью других инструментов" Обратная связь приветствуется: что вы делаете по-другому? Что может быть улучшено? Пример пакета: в @rauschma/helpers используется настройка, описываемая в этой статье.
https://habr.com/ru/companies/timeweb/articles/884516/
#timeweb_статьи_перевод #javascript #typescript #ts #npm_package #npm_registry #npm #esm #commonjs #реестр_npm #пакет_npm
-
[Перевод] Публикация пакета npm с ESM и TypeScript
За последние 2 года поддержка ESM в TypeScript, Node.js и браузерах сильно улучшилась. В этой статье я объясню мою современную настройку, которая является относительно простой по сравнению с тем, что нам приходилось делать раньше: она предназначена для пакетов, которые могут пренебречь обратной совместимостью. Настройка хорошо работает для меня некоторое время — начиная с TS 4.7 (24.05.2022) помогает то, что Node.js теперь поддерживает require(esm) — запрос библиотек ESM из модулей CommonJS я использую только tsc , но упоминаю поддержку других инструментов в разделе "Компиляция TS с помощью других инструментов" Обратная связь приветствуется: что вы делаете по-другому? Что может быть улучшено? Пример пакета: в @rauschma/helpers используется настройка, описываемая в этой статье.
https://habr.com/ru/companies/timeweb/articles/884516/
#timeweb_статьи_перевод #javascript #typescript #ts #npm_package #npm_registry #npm #esm #commonjs #реестр_npm #пакет_npm
-
[Перевод] Публикация пакета npm с ESM и TypeScript
За последние 2 года поддержка ESM в TypeScript, Node.js и браузерах сильно улучшилась. В этой статье я объясню мою современную настройку, которая является относительно простой по сравнению с тем, что нам приходилось делать раньше: она предназначена для пакетов, которые могут пренебречь обратной совместимостью. Настройка хорошо работает для меня некоторое время — начиная с TS 4.7 (24.05.2022) помогает то, что Node.js теперь поддерживает require(esm) — запрос библиотек ESM из модулей CommonJS я использую только tsc , но упоминаю поддержку других инструментов в разделе "Компиляция TS с помощью других инструментов" Обратная связь приветствуется: что вы делаете по-другому? Что может быть улучшено? Пример пакета: в @rauschma/helpers используется настройка, описываемая в этой статье.
https://habr.com/ru/companies/timeweb/articles/884516/
#timeweb_статьи_перевод #javascript #typescript #ts #npm_package #npm_registry #npm #esm #commonjs #реестр_npm #пакет_npm
-
[Перевод] Публикация пакета npm с ESM и TypeScript
За последние 2 года поддержка ESM в TypeScript, Node.js и браузерах сильно улучшилась. В этой статье я объясню мою современную настройку, которая является относительно простой по сравнению с тем, что нам приходилось делать раньше: она предназначена для пакетов, которые могут пренебречь обратной совместимостью. Настройка хорошо работает для меня некоторое время — начиная с TS 4.7 (24.05.2022) помогает то, что Node.js теперь поддерживает require(esm) — запрос библиотек ESM из модулей CommonJS я использую только tsc , но упоминаю поддержку других инструментов в разделе "Компиляция TS с помощью других инструментов" Обратная связь приветствуется: что вы делаете по-другому? Что может быть улучшено? Пример пакета: в @rauschma/helpers используется настройка, описываемая в этой статье.
https://habr.com/ru/companies/timeweb/articles/884516/
#timeweb_статьи_перевод #javascript #typescript #ts #npm_package #npm_registry #npm #esm #commonjs #реестр_npm #пакет_npm
-
#Javascript seems like such a fucking mess when the way you're importing libraries can somehow vary for wtv reason??? I also can never quite comprehend wth's an #ESM or #CommonJS :frierencrying:
-
@tolmasky the amount of times I had to learn what is #CommonJS and what is #ESM to then forget it and get bitten again when I come to #JS is bleak in comparison, I'm sure, but it made me make a video (mostly for myself) to later watch: https://www.youtube.com/watch?v=SIows5N4BAY
😆
-
Spent tonight learning #11ty and working on https://www.jameskerrane.com
- Updated to @eleventy v3.0.0! 🥳
- Refactored project files to switch from #CommonJS syntax to the newly supported and standardized #ESM modules
- Streamlined how the site handles images
- Started work on moving away from #nunjucks for templates to liquid or something else
- Renamed the repositoryThe nature of all of these changes is that the site doesn't look different, but the developer experience is cooler! 🚀
-
It's 2024; #JavaScript #libraries should be shipping #ESModules *only*
#webDev #frontend #js #modules #esm #commonjs #modularity #nodejs #deno
-
Управление зависимостями в Javascript заходит на новый виток? Работа с ES модулями без сборщиков
Изначально эта статья задумывалась, как рассказ о различиях и назначении полей dependencies , devDependencies и peerDependencies в package.json . Эту тему выбрали ребята в моем телеграм-канале , кстати подписывайтесь, если еще не. Однако, когда я посмотрел количество контента на эту тему, то понял, что его достаточно даже в русском сегменте. При этом я прочитал одну статью , которая показалась мне очень хорошей, а также там были мысли на тему будущего управления зависимостями. В итоге, я решил кратко пересказать вышеупомянутую статью, чтобы лучше самому усвоить тему, а также набросать проект по управлению зависимостями прямо на клиенте, через ES Modules. Так что вы можете прочитать либо оригинальную и полную статью у автора, либо сокращенную версию в первой половине этой статьи. А разбор работы ESM будет во второй половине .
https://habr.com/ru/articles/825424/
#npm #yarn #pnpm #javascript #node #esm #commonjs #dependency_management #package_manager
-
Is it wrong if I'm kind of enjoying the drama about #ljharb?
Burn tc39 down! Make the web anew!
The only standard is death comes to everything!#webDev #javaScript #tc39 #nodejs #esm #esmodules #commonjs #cjs #modules
-
> enough libraries use ES Modules that for many projects you need to either use ES Modules, or figure out how to interoperate ES Modules with your CommonJS code. At the same time, enough code still uses CommonJS that you often need to figure out how to include that legacy code in your otherwise-ES Module project.
https://borischerny.com/javascript,/typescript/2024/06/19/ES-Modules-Are-A-Mess.html
#javaScript #nodeJS #esModules #webdev #web #typescript #esm #cjs #commonjs #package #npm
-
Mixed Imports: Loading JSON Directly in TypeScript and ES Modules https://link.medium.com/GU8QNAZOeKb
-
> Support for require()ing ESM graphs is now exposed by default in Node.js 22
https://openjsf.org/blog/nodejs-22-available
#nodejs #webDev #javaScript #esm #esmodules #commonJS #js #web #node
-
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
https://hexagon.56k.guru/posts/dual-mode-cross-runtime-packages/
-
A new post on how to create a React components library, although focusing on the aspects of publishing dual libraries (CJS+ESM) with types: https://blog.coderspirit.xyz/blog/2023/09/15/create-a-react-component-lib/
-
https://gist.github.com/lil5/f2163f18ba67ae51a7f67a329294ca4b
I finally managed to get #NodeJS working with #Typescript without using #CommonJS
This was the only resource that actually worked: https://www.youtube.com/watch?v=H91aqUHn8sE&pp=ygUabm9kZW5leHQgbW9kdWxlIHJlc29sdXRpb24%3D
-
As supporting both #CommonJS and #ESModules can be wrongly done in a thousand ways, I published why and how we achieved that on fast-check. #JavaScript #opensource
This article is a follow-up of issues reported via #publint from @bluwy and fixed thank to @AndaristRake. As making the package right was not an easy game at first glance, I thought that a how-we-do article could help other #maintainers.
Link to the article: https://fast-check.dev/blog/2023/09/04/dual-packages-or-supporting-both-cjs-and-esm/
-
As supporting both #CommonJS and #ESModules can be wrongly done in a thousand ways, I published why and how we achieved that on fast-check. #JavaScript #opensource
This article is a follow-up of issues reported via #publint from @bluwy and fixed thank to @AndaristRake. As making the package right was not an easy game at first glance, I thought that a how-we-do article could help other #maintainers.
Link to the article: https://fast-check.dev/blog/2023/09/04/dual-packages-or-supporting-both-cjs-and-esm/
-
As supporting both #CommonJS and #ESModules can be wrongly done in a thousand ways, I published why and how we achieved that on fast-check. #JavaScript #opensource
This article is a follow-up of issues reported via #publint from @bluwy and fixed thank to @AndaristRake. As making the package right was not an easy game at first glance, I thought that a how-we-do article could help other #maintainers.
Link to the article: https://fast-check.dev/blog/2023/09/04/dual-packages-or-supporting-both-cjs-and-esm/
-
As supporting both #CommonJS and #ESModules can be wrongly done in a thousand ways, I published why and how we achieved that on fast-check. #JavaScript #opensource
This article is a follow-up of issues reported via #publint from @bluwy and fixed thank to @AndaristRake. As making the package right was not an easy game at first glance, I thought that a how-we-do article could help other #maintainers.
Link to the article: https://fast-check.dev/blog/2023/09/04/dual-packages-or-supporting-both-cjs-and-esm/
-
As supporting both #CommonJS and #ESModules can be wrongly done in a thousand ways, I published why and how we achieved that on fast-check. #JavaScript #opensource
This article is a follow-up of issues reported via #publint from @bluwy and fixed thank to @AndaristRake. As making the package right was not an easy game at first glance, I thought that a how-we-do article could help other #maintainers.
Link to the article: https://fast-check.dev/blog/2023/09/04/dual-packages-or-supporting-both-cjs-and-esm/
-
@GabeMoralesVR I am a complete newbie of Javascript. Modules have created a lot of difficulties as I do not yet understand how they work and the documentation is confusing as some Emscripten exemples refer to #CommonJS whereas browsers prefer #ES6.
-
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.
-
Should I transpile this code? I really want to use Typescript and new JS features?
Do I want to support #ESModules and #CommonJS? Should I bundle this code? What about #Node vs. #Deno Browser vs. compatibility?
-
npm packages: Share of ESM vs. CommonJS?
https://github.com/wooorm/npm-esm-vs-cjs
#ES_Next_News #ECMAScript #JavaScript #ESM #CommonJS #npm -
npm packages: Share of ESM vs. CommonJS?
https://github.com/wooorm/npm-esm-vs-cjs
#ES_Next_News #ECMAScript #JavaScript #ESM #CommonJS #npm -
npm packages: Share of ESM vs. CommonJS?
https://github.com/wooorm/npm-esm-vs-cjs
#ES_Next_News #ECMAScript #JavaScript #ESM #CommonJS #npm -
npm packages: Share of ESM vs. CommonJS?
https://github.com/wooorm/npm-esm-vs-cjs
#ES_Next_News #ECMAScript #JavaScript #ESM #CommonJS #npm -
npm packages: Share of ESM vs. CommonJS?
https://github.com/wooorm/npm-esm-vs-cjs
#ES_Next_News #ECMAScript #JavaScript #ESM #CommonJS #npm -
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?
-
Bellamy
Experimental Drupal 9 themeDemo: https://bellamy.midala.net/
Project page: https://drupal.org/project/bellamy
Source code: https://git.drupalcode.org/project/bellamy