-
Add two builtin registries:
- jsr - The open-source package registry for modern JavaScript and TypeScript, created by the Deno team. (32cd2bd)
// example import { encodeBase64 } from "https://esm.sh/jsr/@std/[email protected]/base64"; import { Hono } from "https://esm.sh/jsr/@hono/hono@4";
- pkg.pr.new - Continuous (Preview) Releases for your libraries, created by StackBlitz Labs (#904, #913)
// Examples import { Bench } from "https://esm.sh/pr/tinylibs/tinybench/tinybench@a832a55"; import { Bench } from "https://esm.sh/pr/tinybench@a832a55"; // --compact
- jsr - The open-source package registry for modern JavaScript and TypeScript, created by the Deno team. (32cd2bd)
-
BREAK CHANGE: Respect semantic versioning for dependency resolving (#875)
Previously, dependency resolution used fixed versions, which could cause duplication issues when packages were updated. Starting from v136, we now follow semantic versioning for dependencies.
// before "[email protected]" import "/[email protected]/es2022/react.mjs"; // after "[email protected]" import "/react@^19.0.0?target=es2022";
-
BREAK CHANGE: Remove build version prefix from the module path
The build version prefix of esm.sh was introduced to avoid potential breaking changes caused by updates to the esm.sh server. However, it can lead to duplication issues when updating the server. In v136, we have removed the build version prefix from the module path, and the
?pin
query will be ignored. Paths with the build version prefix will continue to work as before, but the new default will be paths without the build version prefix.// before "[email protected]" -> "https://esm.sh/v135/[email protected]/es2022/react.mjs"; // after "[email protected]" -> "https://esm.sh/[email protected]/es2022/react.mjs";
-
Add built-in npm package manager (#948)
Implement a built-in npm package manager in Go to replace pnpm. This change reduces the CI test time from 12:15 to 4:30 (~2.7x faster) and eliminates the need for
nodejs
andpnpm
dependencies. -
Split modules by analyzing the dependency tree during the build process (#959)
To improve build performance and reduce network requests, esm.sh bundles sub-modules of a package by default. However, this can lead to duplicate code in the build. In v136, the server will split the modules by analyzing the dependency tree during the build process if the package's
exports
field is defined. -
Use @pi0's unenv as the node runtime compatibility layer (#914)
unenv provides a collection of Node.js and Web polyfills and mocking utilities with configurable presets for converting JavaScript code and libraries to be platform and runtime agnostic, working in any environment including Browsers, Workers, Node.js, Cloudflare Workers, Deno. unenv is also used by CloudFlare Workers: blog.
You can also access these
unenv
node runtime modules directly via/node/[node-builtin-module-name].mjs
path, for example:import * from "https://esm.sh/node/fs.mjs";
-
Add npm-replacements that follows e18e's module-replacements. (#914)
The
npm-replacements
package replaces certain polyfill packages on NPM with native modern APIs during the build process. For example, theobject-assign
package is replaced withObject.assign
:import assign from "object-assign"; // replaced with "const assign = Object.assign"
-
Deprecate the
build
APIimport { build } from "https://esm.sh/build"; build() // throws Error: The build API has been deprecated.
-
Deprecate the Deno CLI script
Deno now includes its own built-in package manager, which can be used to manage
jsr:
nadnpm:
imports in your deno applications. So we decided to deprecate the Deno CLI script.# use deno add npm:preact jsr:@std/encoding Add npm:[email protected] Add jsr:@std/[email protected] # do not use deno run -A -r https://esm.sh init error: The deno CLI has been deprecated.
-
Add
npmScopedRegistries
configThe
npmScopedRegistries
configuration enables you to define the registry, token, user, and password for scoped npm packages. This allows you to import scoped packages using URLs likehttps://your-esm-server.com/@scope_name/pkg@version
.{ "npmScopedRegistries": { "@scope_name": { "registry": "https://your-registry.com/", "token": "xxxxxx", "user": "", "password": "" } } }
-
Experimental Features:
- Build
.vue
and.svelte
files on the fly (#906)import "https://esm.sh/gh/phosphor-icons/[email protected]/src/icons/[email protected]"
- https://esm.sh/x - ts/jsx/vue/svelte just works™️ in browser. (#886)
- Build
-
Other Changes:
- Upgrade esbuild to 0.24.2
- Use native [email protected]
- Use target
es2022
for browsers by default (#903) - Replace
window
withglobalThis
to make Deno 2 happy (#964) - Use
.mjs
extenstion for sub-module build (#917) - dts-transformer: support
.d
andd.cts
extension (#987) - Support
major.minor.patch+build
versioning (#985) - Support import attributes (#976)
- config: Support S3-compatible storage (#886)
- config: Add
corsAllowOrigins
config - config: Add
customLandingPage
config (#928) - config: Add
npmQueryCacheTTL
config (#921)