Module

x/esm/CHANGELOG.md

A fast, smart, & global CDN for modern(es2015+) web development.
Go to Latest
File

Changelog

v135

  • Introduce https://esm.sh/run
  • worker: Use raw.esm.sh hostname for ?raw option
  • Add ?no-bundle option
  • Support esm.sh field in package.json
  • Fix sub-module resolving (close #754, #743)
  • Upgrade esbuild to 0.19.7

v134

  • Add transformOnly option for build api
  • Add allowList in config (#745 by @olekenneth)
  • Improved Deno CLI (#742 by @Kyiro)
  • Worker: fix dist version lookup
  • Fix exported names from a dependency (close #729, #750)
  • Fix: write .npmrc file if NpmRegistry is set (close #737) (#751 by @edeustace)
  • Upgrade esbuild to 0.19.5

v133

  • Add ?raw to support requests for raw package source files (#731 by @johnyanarella)
  • Add global setMaxListeners to node:events polyfill (#719)
  • cjs-lexer: resolving error now doesn’t break build (close #738)
  • Fix cwd method of node:process polyfill (close #718)
  • Fix applyConditions function use node condition for browser (close #732)
  • Fix *.css.js path (close #728)
  • Fix some invalid require imports (close #724)
  • Fix relative path resolving of browser in package.json
  • Upgrade esbuild to 0.19.4

v132

  • Resolve node internal modules when ?external=* set (close #714)
  • Fix builds with bigint and top-level-await for all targets (close #711)
  • Fix node:process ployfill module mssing the hrtime method
  • Fix docker image missing git command
  • esm-worker: add varyUA option for polyfill modules

v131

  • Add cache layer for the /build API
  • Fix dts transformer resolver ignoring *.mjs url
  • fix ?external option ignoring sub-modules
  • Use raw order of the exports in package.json (close #705)
  • Redirect old build path (.js) to new build path (.mjs) (close #703)
  • Upgrade esbuild to 0.19.2

v130

  • esm-cjs-lexer: support minified UMD exports (#689)
  • Support sub .mjs module (close #691)
  • Fix ?bundle mode ignores node_process.js (close #694)
  • Upgrade @types/react@18 to 18.2.15
  • Upgrade esbuild to 0.18.17

v129

  • BREAKING: Remove x-esm-deps header (close #683)
  • Sort exports of package.json when looping (close #683)
  • Don’t replace typeof window for deno target (close #681)
  • Don’t replace node global variable for ?target=node
  • Fix dts transformer (close #670)
  • Fix depreacted message with "
  • esm-worker: Fix cacheKey with x-real-origin header

v128

  • Add official Docker image: https://ghcr.io/esm-dev/esm.sh
  • Fix missed ?external of deps
  • Fix duplicate Access-Control-Expose-Headers headers
  • Fix dts transform for imports with both default and named imports (#675 by @hayes)
  • Don’t bundle dynamic imports
  • Upgrade stableBuild to v128

v127

  • Add preload imports
  • Add modern-normalize to the cssPackages
  • Fix subpath not be resovled with ?alias (close #671)
  • Fix dts transformer for “*.d” path imports (close #660)
  • Fix source map mappings (close #668)
  • CLI: Fix update failure caused by gh module (#661 by @lifegpc)
  • Upgrade esbuild to 0.18.10

v126

  • breaking: the esm tag function of build API now imorts module
    import { esm } from "https://esm.sh/build";
    const mod = await esm`
      export const foo:string = "bar"
    `;
    console.log(mod.foo); // "bar"
  • cjs-lexer: support annotated exports (close #659)
  • Add support for basic auth (#657 by @johnpangalos)

v125

  • Fix node-fetch import in cjs modules (close #649)
  • Add node:worker_threads polyfill(fake) (close #648)
  • Use denonext target for Deno >= 1.33.2 (close #646)
  • Fix .json.js path (close #645)
  • Fix cache missing content (close #641)
  • Upgrade deno/std to 0.177.1

v124

  • Fix the dts walker (close #642)

v123

  • Add /server endpoint for Deno to serve esm.sh locally
  • Add scope to config (#636 by @johnpangalos)
  • Fix .d.ts walker (close #640)
  • Fix packages with v prefix in version (close #639)
  • Fix findFiles function (close #638)

v122

  • Use stable imports order
  • Support more asset extnames
  • esm-worker: Use X-Real-Origin and X-Esm-Worker-Version headers
  • Fix worker CORS issue (close #631)
  • Fix sub-module resolving (close #633)
  • Fix undefined content-type header (close #635)

v121

  • Use browser field for package main if possible
    {
      "name": "pkg",
      "version": "1.0.0",
      "main": "./index.js",
      "browser": {
        "./index.js": "./browser.js"
      }
    }
  • Fix redirects for ?css and GET /build
  • Fix *.js.js module path (close #627)
  • Fix cjs imports (close #629, #626)
  • Add pako to the requireModeAllowList

v120

  • build-api: Support types option
  • Open-source the cloudflare worker
  • Support HEAD method
  • Fix bare path for css/custom build
  • Fixing type only packages missing the X-Typescript-Types header
  • Fix cjs-lexer exports resloving
  • Use empty object instead of null for browser exclude (close #613)
  • Add zlib-sync to nativeNodePackages (close #621)
  • Redirect invalid *.json url

v119

  • Fix named import of cjs (close #620)
  • Use STABKE_VERSION for dts build of stableBuild
  • Upgrade esbuild to 0.17.18

v118

  • feat: Publish system (#607)
  • esm-cjs-lexer: Support __export(require("...")) pattern (close #611)
  • Add Auth middleware
  • Upgrade stableBuild to v118
  • Remove lit from stableBuild
  • Fix submodule types (close #606)
  • Fix arch for darwin arm64 (#617 by @JLugagne)

v117

  • Fix Buffer polyfill for deno (close #574)
  • Fix dts transformer with submodule (close #599)
  • Fix importing .json as a module (close #601)
  • Fix .wasm module importing (close #602)
  • Fix path /v100/PKG/TARGET/index.js

v116

  • Support modules/assets from Github repo (close #588)
  • Update nativeNodePackages (close #591)
  • Fix dep import url of cjs module (close #592)
  • Add support of resolving typesVersions (close #593)
  • Fix exports glob condition resloving (close #594)
  • Remove shebang (close #596)
  • Fix missed build version of dts files (close #589)

v115

  • Return JavaScript modules for ?module query with wasm files
  • Fix types transformer (close #581)
  • Fix incorrect named import of cjs modules (close #583)
  • Fix sumodule path resolving (close #584)
  • Upgrade @types/node to 18

v114

  • Add ?conditions query as esbuild option
  • Use pnpm to install packages instead of yarn (save the server disk space & improve the build performance)
  • Serve static files on local (#564 @Justinidlerz)
  • Support .d.mts extension (close #580)
  • Fix cjs transpiling (close #577)
  • Fix types bulid (close #572, #576)
  • Fix invalid type URL if submodule is main entry (#579 @marvinhagemeister)
  • Upgrade esbuild to 0.17.14

v113

  • express is working in Deno
  • Fix lost non-mjs-extension module caused by v112 (close #559)
  • Fix exports of netmask and xml2js (#561 @jcc10)
  • Fix default import of deps for cjs (close #565, #566)

v112

  • Use .mjs extension for the package main module to resolve subpath conflicts
  • Ignore ?exports query when importing stable modules
  • Fix npm naming regexp (close #541)
  • Fix node buffer import for denonext target (closed #556)
  • Fix tree shaking (close #521)
  • Fix package nested conditions export (#546 by @Justinidlerz)
  • Fix esm imports in cjs (close #557)
  • Improve server performance (#543 by @Justinidlerz)
  • Update requireModeAllowList (close #540, #548)

For Deno:

  • Inject XHR polyfill for axios, cross-fetch, whatwg-fetch automatically
  • CLI: Use user-specified indent size (#551 by @npg418)

v111

  • Print package deprecated message
  • Remove source map url of worker
  • Fix package CSS redirects with target option
  • Fix build dead-loop for edge cases
  • Fix CLI update command (close #536)

v110

  • Fix Content-Type header for dts files

v109

  • Ignore ?external option for stable builds
  • Fix react/jsx-runtime bundles react module
  • Remove alias export resolving (close #530)

v108

  • Add denonext target to use deno 1.31 node compatibility layer
  • Redirect to css file for css packages
    https://esm.sh/normalize.css -> https://esm.sh/normalize.css/normalize.css
  • Fix wasm packages can’t get the wasm file.
    import init, { transform } from "https://esm.sh/lightningcss-wasm";
    // before: you need to specify the wasm file path
    await init("https://esm.sh/lightningcss-wasm/lightningcss_node.wasm")
    // after: you don't need to specify it
    await init()
  • Disable bundle mode for stable builds
  • Fix alias export (close #527)
  • Update references to reqOrigin to use cdnOrigin (#529 by @jaredcwhite)

v107

  • Add ?cjs-export query (close #512)
    If you get an error like ...not provide an export named..., that means esm.sh can not resolve CJS exports of the module correctly. You can add ?cjs-exports=foo,bar query to specify the export names:
    import { NinetyRing, NinetyRingWithBg } from "https://esm.sh/react-svg-spinners@0.3.1?cjs-exports=NinetyRing,NinetyRingWithBg"
  • Update requireModeAllowList (close #520)
  • Remove ?sourcemap query, always generate source map as inline url.
  • Default export all members from original module to prevent missing named exports members (#522)
  • Only apply patch if types are missing in preact (#523)
  • Upgrade esbuild to 0.17.10.
  • Upgrade deno/std to 0.177.0

v106

  • Just fix fake module export names resolving (close #510)

v105

  • Check types which is not defined in package.json
  • Fix empty module build (close #483)
  • Fix exports field resolving (close #503)
  • Fix deno cli script (close #505)
  • Fix incorrect redirects (close #508)
  • Fix invalid target with HeadlessChrome/ UA (close #509)
  • Upgrade deno/std to 0.175.0

v104

  • Rewrite FileSystem interface of the storage.
  • Fix submodule build with exports in package.json (close #497)
  • Fix es5-ext weird /#/ path (close #502)

v103

  • Add inject argument for worker factory
    import workerFactory from "https://esm.sh/xxhash-wasm@1.0.2?worker";
    
    const workerInject = `
    self.onmessage = (e) => {
      // variable 'E' is the xxhash-wasm module default export
      E().then(hasher => {
        self.postMessage(hasher.h64ToString(e.data));
      })
    }
    `;
    
    const worker = workerFactory(workerInject);
    worker.onmessage = (e) => {
      console.log(e.data); // 502b0c5fc4a5704c
    };
    worker.postMessage("Hello");
  • Respect ?external arg in bundle mode (close #498)
  • Add require() syntax support for dts transformer
  • Fix import maps scope is not correct by the CLI script (close #480)
  • Fix basePath doesn’t take effect on redirects (close #481)
  • Fix X-TypeScript-Types header not pined for stable builds
  • Fix some bugs related to package path parsing (#487)
  • Upgrade esbuild to 0.16.17
  • Upgrade deno/std to 0.173.0

v102

  • Support browser field of package.json to improve compatibility with npm packages in browser. For example, the webtorrent package will use memory-chunk-store instead of fs-chunk-store and exclude built-in modules like fs, net, os and so on.
    {
      "name": "webtorrent",
      "description": "Streaming torrent client",
      "version": "1.9.6",
      "browser": {
        "./lib/server.js": false,
        "./lib/conn-pool.js": false,
        "./lib/utp.js": false,
        "bittorrent-dht/client": false,
        "fs": false,
        "fs-chunk-store": "memory-chunk-store",
        "load-ip-set": false,
        "net": false,
        "os": false,
        "ut_pex": false
      },
    }
    (Close #450)

v101

  • Fix ?bundle mode with illegal paths (close #476).
  • Fix ?worker mode doesn’t support CORS.

v100

  • Improve self-hosting configuration. check HOSTING.md for more details.
  • Support browser field when it’s an es6 module (close #381).
  • Purge headers from unpkg.com to avoid repeated Access-Control-Allow-Origin header (close #453).
  • Fix content compression (close #460).
  • Fix alias export (close #471).
  • Fix cycle importing (close #464).
  • Fix scenarios where module/es2015 are shims (maps).
  • Fix worker cors issue.
  • Upgrade esbuild to 0.16.10.
  • Upgrade deno/std to 0.170.0.

v99

  • Improve CDN cache performance, now you can get faster response time of .d.ts, .wasm and other static files.
  • Remove ?deps purge (close #420)
  • Remove ?export query of sub build task
  • Upgrade deno/std to 0.165.0.

v98

  • Add tree-shaking support for es modules
    import { __await, __rest } from "https://esm.sh/tslib" // 7.3KB
    import { __await, __rest } from "https://esm.sh/tslib?exports=__await,__rest" // 489B
  • Add node-fetch polyfill for browsers and deno
  • Restart ns process when got “unreachable” error (close #448)
  • Fix exports resolver (close #422)
  • cjs-lexer: Update swc to latest

v97

  • Add https://esm.sh/build-target endpoint to return the build target of current browser/runtime by checking User-Agent header.
  • Support --npm-token option to support private packages (#435).
  • Update polyfills/node_process: replace timeout with queueMicrotask (#444).
  • Upgrade deno/std to 0.162.0.

v96

  • Update the fake node fs ployfill for browsers(add createReadStream and createWriteStream methods)
  • Check package name (close #424)
  • Fix some invalid types bulids
  • Upgrade esbuild to 0.15.9

v95

  • Fix web-streams-ponyfill build (close #417)
  • Fix invalid ?deps and ?alias resolving
  • Fix solid-js/web build for Deno
  • Add add react:preact/compat pattern for the deno CLI

v94

  • Downgrade deno/std to 0.153.0.

v93

  • Fix @types/react version (close #331)
  • Fix cjs __esModule resolving (close #410)
  • Fix postcss-selector-parser cjs exports (close #411)
  • Fix solid-js/web of deno target
  • Upgrade deno/std to 0.154.0

v92

  • Add stable channel for UI libraries like react, to avoid multiple copies of runtime by cache
    https://esm.sh/v92/react@18.2.0/deno/react.js -> https://esm.sh/stable/react@18.2.0/deno/react.js
  • Respect external all arg in types build
  • Upgrade deno/std to 0.152.0

v91

  • Improved Deno CLI Script:
    deno run -A https://esm.sh/v91 init
    After initializing, you can use the deno task npm:[add/update/remove] commands to manage the npm packages in the import maps.
    deno task npm:add react react-dom # add packages
    deno task npm:add react@17 react-dom@17 # add packages with specified version
    deno task npm:update react react-dom # upgrade packages
    deno task npm:update # update all packages
    deno task npm:remove react react-dom # remove packages
  • Respect imports of package.json (close #400)
  • Update npmNaming range (close #401)

v90

  • Experimentally add Deno CLI mode, it will update the import_map.json file in the working directory:
    deno install -A -n esm -f https://esm.sh
    esm add react react-dom # add packages
    esm add react@17 react-dom@17 # add packages with specified version
    esm upgrade react react-dom # upgrade packages
    esm upgrade # upgrade all packages
    esm remove react react-dom # remove packages

    Ensure to point the import_map.json in your deno run command or the deno.json file.

  • Support /v89/*some-package@version external all pattern, do NOT use directly, use the CLI mode instead.
  • Redirect urls with /@types/ to the .d.ts file instead of build
  • Improve node service stability
  • Fix cjs __exportStar not used (close #389)
  • Fix resolve package (close #392)
  • Add workaround for prisma build
  • Upgrade deno std to 0.151.0

v89

  • support ?deno-std=$VER to specify the deno std version for deno node polyfills
  • fix missed __esModule export

v88

  • Respect exports.development conditions in package.json (close #375)
  • Fix solid-js/web?target=deno strip ssr functions
  • Fix @types/node types transforming (close #363)
  • Fix ?external doesn’t support .dts files (close #374)
  • Fix invalid export names of keycode, vscode-oniguruma & lru_map (close #362, #369)
  • Fix esm resolving before build (close #377)

v87

  • Support ?external query, this will give you better user experience when you are using import maps.
    // import_map.json
    {
      "imports": {
        "preact": "https://esm.sh/preact@10.7.2",
        "preact-render-to-string": "https://esm.sh/preact-render-to-string@5.2.0?external=preact",
      }
    }
  • Support ?no-dts (equals to ?no-check) query
  • Add the ‘ignore-annotations’ option for esbuild (#349)
  • Prevent submodules bundling their local dependencies (#354)
  • Don’t panic in Opera

v86

  • Support ?keep-names query for esbuild (close #345)

v85

  • Fix fixAliasDeps function that imports multiple React when using ?deps=react@18,react-dom@18

v84

  • Fix types version resolving with ?deps query(close #338)
  • Fix URL redirect with outdated build version prefix

v83

  • Replace node-fetch dep to node-fetch-native (close #336)
  • Add --keep-names option for esbuild by default (close #335)
  • Fix incorrect types with ?alias query

v82

  • fix types with ?deps query (close #333)

v81

  • fix ?deps and ?alias depth query

v80

  • Fix build error in v79

v79

  • Use esm.sh instead of cdn.esm.sh
  • User semver versioning for the x-typescript-types header
  • Fix aliasing dependencies doesn’t affect typescript declaration (close #102)
  • Fix using arguments in arrow function #322
  • Fix Deno check precluding esm.sh to start #327

v78

  • Reduce database store structure
  • Fix missed renderToReadableStream export of react/server in deno
  • Fix fetchPackageInfo dead loop (close #301)
  • Upgrade esbuild to 0.14.36

v77

  • Use the latest version of deno/std/node from cdn.deno.land automatically
  • Add es2022 target
  • Upgrade esbuild to 0.14.34

v76

  • Fix ?deps mode

v75

  • Fix types build version ignore ?pin (close #292)
  • Infect ?deps and ?alias to dependencies (close #235)
  • Bundle ?worker by default
  • Upgrade semver to v3 (close #297)
  • Upgrade esbuild to 0.14.31
  • Upgrade deno std to 0.133.0 (close #298)

v74

  • Support ?no-require flag, with this option you can ignore the require(...) call in ESM packages. To support logic like below:
    // index.mjs
    
    let depMod;
    try {
      depMod = await import("/path")
    } finally {
      // `?no-require` will skip next line when resolving
      depMod = require("/path")
    }

v73

  • Fix types dependency path (close #287)

v72

  • Support jsx-runtime with query: https://esm.sh/react?pin=v72/jsx-runtime -> https://esm.sh/react/jsx-runtime?pin=v72
  • Support pure types package (close #284)

v71

  • Fix version resolving of dts transformer (close #274)

v70

  • Return bare code when target and pin provided to reduce requests
    // https://esm.sh/react@17.0.2
    export * from "https://cdn.esm.sh/v69/react@17.0.2/es2021/react.js";
    // https://esm.sh/react@17.0.2?target=es2020&pin=v70
    {content just from https://cdn.esm.sh/v69/react@17.0.2/es2021/react.js}
  • Rollback parseCJSModuleExports function to v68 (close #277, #279)
  • Fix exports resolving in package.json (close #278, #280)
  • Upgrade deno std/node to 0.130.0

v69

  • Force the dependency version of react equals to react-dom’s version
    before: react-dom@18-rc.2 -> react@18-rc.2-next.xxxx
    now: react-dom@18-rc.2 -> react@18-rc.2
  • Fix version check for prerelease (can’t resolve react in react-dom@rc)
  • Improve cjs module transform (can handle more edge cases, for example react-18-rc defines non-esm for browsers and deno)

v68

  • Fix bundle mode (close #271)
  • Support jsnext:main in package.json (close #272)
  • Improve cjs-esm-exports to support UMD format
    // exports: ['foo']
    const { exports } = parse('index.cjs', `
      (function (global, factory) {
        typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
        typeof define === 'function' && define.amd ? define(['exports'], factory) :
        (factory((global.MMDParser = global.MMDParser || {})));
      }(this, function (exports) {
        exports.foo = "bar";
      }))
    `);
  • Upgrade deno node polyfill to 0.128.0

v67

  • Force react/jsx-dev-runtime and react-refresh into dev mode
  • Replace typeof window !== undefined to typeof document !== undefined for deno target
  • Replace object-assign with Object.assign
  • Upgrade esbuild to 0.14.25

v66

  • Improve exports resloving of package.json (close #179)

v65

  • Feature: Support ?path query to specify the submodule, this is friendly for import maps with options (close #260)
    // import-map.json
    {
      imports: {
        "react-dom/": "https://esm.sh/react-dom?target=es2015&path=/"
      }
    }
    // equals to https://esm.sh/react-dom/server?target=es2015
    import { renderToString } from "react-dom/server"
  • Upgrade deno.land/std/node polyfill to 0.125.0
  • Upgrade esbuild to v0.14.18
  • bugfixs for #251, #256, #261,#262

v64

  • Fix Node.js process compatibility (close #253)
  • Upgrade deno.land/std/node polyfill to 0.122.0

v63

  • Add fs polyfill(fake) for browsers (close #250)
  • Upgrade deno.land/std/node polyfill to 0.121.0

v62

v61

  • Support React new JSX transforms in Deno(1.16+) (close #225)

v60

v59

  • improve cjs-esm-exports to support some edge cases:
      var foo = exports.foo || (exports.foo = {});
      ((bar) => { ... })(exports.bar || (exports.bar = {}));
  • Fix @types verisoning:
    • marked -> @types/marked@4.0.1
    • marked@2 -> @types/marked@2.0.5
    • marked?dep=@types/marked@4.0.0 -> @types/marked@4.0.0
  • Upgrade deno.land/std/node polyfill to 0.119.0
  • Upgrade esbuild to v0.14.8

v58

  • Recover the stable queue
  • Filter invalid pathnames like /wp-admin/login.php
  • Fix ?pin mode when build failed (close #206)

v57

  • Add ?pin mode
  • Improve build stability
  • Fix marked@4 import
  • Fix invalid types hangs forever (close #201)

v56

  • cjs-esm-exports supports tslib __exportStar (close #197)
  • Improve node perf_hooks polyfill
  • Fix redeclared process polyfill (close #195)
  • Fix ?worker mode on deno (#198)
  • Add he to cjs-esm-exports require mode allow list (close #200)
  • Fix package css redirect link
  • Upgrade esbuild to v0.13.12

v55

  • Add playground to write esm app online, try it on https://esm.sh?playground
  • Add a better cjs exports parser: cjs-esm-exports
  • Support web worker
    import editorWorker from '/monaco-editor/esm/vs/editor/editor.worker?worker'
    
      const worker = new editorWorker()
  • Add queue interface
  • Support dataurl, .wasm import
  • Import deno polyfills from https://deno.land/std@0.113.0/node
  • Fix package CSS

v54

  • Update deno polyfills from 0.106.0 to 0.110.0 (#190)
  • Add deno module polyfill (#164)
  • Fix (storage/fs_local) file path portability bug (#158)

v53

  • Add Cache-Tag header for CDN purge
  • Add s3 storage support (#153)
  • Fix require replacement (#154)

v52

  • Fix types build (#149)
  • Use stream and events from deno std/node (#136) @talentlessguy
  • Fix localLRU and allow for memoryLRU (#148) @jimisaacs

v51

  • Fix build breaking change in v50 (#131).
  • Add localLRU FS layer (#126)
  • Add a Cache Interface that is using to store temporary data like npm packages info.
  • Do not try to build /favicon.ico (#132)
  • Add lovely pixi.js, three.js and @material-ui/core testing by @jimisaacs (#134, #139).

v50

  • Improve build performance to burn the server CPU cores! Before this, to build a module to ESM which has heavy deps maybe very slow since the single build task only uses one CPU core.
  • Rewrite the dts transformer to get better deno types compatibility and faster transpile speed.
  • Add Deno testing CI on Github.

v49

  • Improve the build process to fix an edge case reported in #118
    const Parser = require('htmlparser').Parser;
    esm (v48) output:
    import htmlparser2 from '/v48/htmlparser2@5.0.0/es2021/htmlparser2.js'
    const Parser = htmlparser2.Parser; // parser is undefined
    the expected output was fixed in v49:
    import { Parser as htmlparser2Parser } from '/v48/htmlparser2@5.0.0/es2021/htmlparser2.js'
    const Parser = htmlparser2Parser; // parser is a class
  • Add more polyfills for Deno, huge thanks to @talentlessguy (#117)
    • path
    • querystring
    • url
    • timers
  • Better self-hosting options improved by @jimisaacs, super! (#116, #119, #120, #122)
  • Add Unlimted(max 1PB) Storage to store builds and cache via NFS on esm.sh back server behind Cloudflare

v48

  • Improve cjs-lexer service to handle the edge case is shown below:
    function debounce() {};
    debounce.debounce = debounce;
    module.exports = debounce;
    esm output:
    export { debounce } // this was missed
    export default debounce
  • Ignore ?target in Deno (fix #109)
  • Add Storage Interface to store data to anywhere (currently only support postdb + local FS)

v47

  • Improve dts transformer to use cdn domain (fix #104)
  • Update polyfills (fix #105)

v46

  • Split modules based on exports defines (ref #78)
  • Add cache-folder config for yarn add
  • Improve resolveVersion to support format 4.x (fix #93)
  • Import initESM to support bare exports in package.json (fix #97)
  • Bundle mode should respect the extra external (fix #98)
  • Support node:path importing (fix #100)
  • Pass ?alias and ?deps to deps (fix #101)
  • Improve cjs-lexer sever (fix #103)
  • Upgrade rex to 1.4.1
  • Upgrade esbuild to 0.12.24

V45

  • Improve build performance
  • Filter cjs-moudle-lexer server invalid exports output
  • Improve resolveVersion function to support format like 4.x (fix #93)
  • Improve dts transform (fix #95)

V44

  • Add Alias feature (#89)
    import useSWR from 'https://esm.sh/swr?alias=react:preact/compat'
    in combination with ?deps:
    import useSWR from 'https://esm.sh/swr?alias=react:preact/compat&deps=preact@10.5.14'
    The origin idea was came from @lucacasonato.
  • Add node build target (#84)
  • Check exports field to get entry point in package.json
  • Run cjs-lexer as a server
  • Upgrade esbuild to 0.11.18 with es2021 build target
  • Bugfixs for #90, #85, #83, #77, #65, #48, #41.

V43

  • Add /status.json api
  • Use previous build instead of waiting/404 (fix #74)
  • Fix deps query (#71)

V42

  • Add __esModule reserved word
  • Align require change for esbuild 0.12
  • Fix setImmediate polyfill args (#75)
  • Upgrade esbuild to 0.11.12

V41

  • Add timeout (30 seconds) for new build request, or use previous build version instead if it exists
  • Fix bundle mode
  • Fix build dead loop
  • Upgrade esbuild to 0.11.12

V40

  • Update polyfills for node builtin modules
  • Upgrade esbuild to 0.11.9

V39

  • Imporve parseCJSModuleExports to support json module
  • Pass NODE_ENV to parseCJSModuleExports
  • Update node buffer polyfill
  • Upgrade postdb to v0.6.2

V38

  • Fix build for packages with module type (#48)
  • Improve parseCJSModuleExports function (use cjs-module-lexer and nodejs eval both to parse cjs exports, and ignore JSON module)
  • Pass NODE_ENV to parseCJSModuleExports function
  • Upgrade esbuild to 0.11.6

V37

  • Add bundle mode
  • Fix module exports parsing

V36

  • Fix esm build for some edge cases
  • Add simple test (thanks @zhoukekestar)
  • Upgrade esbuild to 0.11.5

V35

  • Set build target by the user-agent of browser automaticlly

V34

  • Remove bundle mode · Breaking
  • Add build queue instead of mutex lock
  • Use AST(cjs-module-lexer) to parse cjs exports
  • Add a testing page at https://esm.sh?test
  • Fix __setImmediate$ is not defined
  • Support exports define in package.json
  • Support mjs extension
  • Improve NpmPackage resolve (fix #41)
  • Upgrade esbuild to 0.11.4
  • Upgrade rex to 1.3.0