Skip to content

Releases: esm-dev/esm.sh

v105

28 Jan 14:09
@ije ije
Compare
Choose a tag to compare
  • Check types which are 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

22 Jan 11:51
@ije ije
Compare
Choose a tag to compare
  • Rewrite FileSystem interface of the storage
  • Fix submodule build with exports in package.json (close #497)
  • Fix es5-ext weird /#/ path (close #502)

v103

17 Jan 09:30
@ije ije
Compare
Choose a tag to compare
  • Add inject argument for worker factory, this is useful if you want to importScripts in the worker, but the module worker doesn't allow you to do it.
    import workerFactory from "https://esm.sh/[email protected]?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

Credits

Huge thanks to @goloveychuk @ahuigo @hjaurum @kidonng

v102

27 Dec 21:23
@ije ije
Compare
Choose a tag to compare
  • 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

27 Dec 11:23
@ije ije
Compare
Choose a tag to compare
  • Fix ?bundle mode with illegal paths (close #476).
  • Fix ?worker mode doesn't support CORS.

v100

26 Dec 00:18
@ije ije
Compare
Choose a tag to compare

🎉🎉🎉 We just updated the esm.sh website with brand-new design for the v100 release, please take a look!
https://esm.sh

image
image

And we also added a playground app that allows you to play ESM in browser without build tools.
https://playground.esm.sh

Screenshot 2022-12-26 at 08 06 08

Other Changes:

  • 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.

Credits

Huge thanks to @hjaurum @chrisirhc @ThaUnknown @rxliuli

v99

19 Nov 07:59
@ije ije
Compare
Choose a tag to compare
v99
  • Improve CDN cache performance, now you can get faster response time of .d.ts, .wasm and other static files.
  • Remove ?deps purge (close #422).
  • Remove ?exports query of sub build task.
  • Upgrade deno/std to 0.165.0.

v98

11 Nov 07:07
@ije ije
Compare
Choose a tag to compare
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
  • Fix exports resolver (close #422)
  • Restart ns process when got "unreachable" error (close #448)
  • cjs-lexer: Update swc to latest

v97

07 Nov 13:27
@ije ije
Compare
Choose a tag to compare
v97
  • Add https://esm.sh/build-target endpoint to return the compatible target of current browser/runtime by checking User-Agent header, lowest is es2015.
  • Add --npm-token option for the server to support private packages (#435).
  • Update polyfills/node_process: replace timeout with queueMicrotask (#444).
  • Upgrade deno/std to 0.162.0.

Credits

Huge thanks to @Justinidlerz @ThaUnknown

v96

29 Sep 14:17
@ije ije
Compare
Choose a tag to compare
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