diff --git a/CHANGELOG.md b/CHANGELOG.md index d6da1f03d..c3feee870 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 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 diff --git a/Dockerfile b/Dockerfile index 0e97a68c1..e182136be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ RUN apt-get update -y && apt-get install -y xz-utils RUN useradd -u 1000 -m esm RUN mkdir /esm && chown esm:esm /esm RUN git clone https://github.com/esm-dev/esm.sh /esm/esm.sh -RUN git checkout v121 +RUN git checkout v122 USER esm WORKDIR /esm diff --git a/README.md b/README.md index db76f6b39..77683fd1f 100644 --- a/README.md +++ b/README.md @@ -88,8 +88,8 @@ Import maps supports [**trailing slash**](https://github.com/WICG/import-maps#pa ```json { "imports": { - "react-dom": "https://esm.sh/react-dom@18.2.0?pin=v121&dev", - "react-dom/": "https://esm.sh/react-dom@18.2.0&pin=v121&dev/", + "react-dom": "https://esm.sh/react-dom@18.2.0?pin=v122&dev", + "react-dom/": "https://esm.sh/react-dom@18.2.0&pin=v122&dev/", } } ``` @@ -324,9 +324,9 @@ To ensure stable and consistent behavior, you may want to pin the build version The `?pin` query allows you to specify a specific build version of a module, which is an **immutable** cached version stored on the esm.sh CDN. ```javascript -import React from "https://esm.sh/react-dom?pin=v121" +import React from "https://esm.sh/react-dom?pin=v122" // or use version prefix -import React from "https://esm.sh/v121/react-dom" +import React from "https://esm.sh/v122/react-dom" ``` By using the `?pin` query in the import statement, you can rest assured that the version of the module you're using will not change, even if updates are pushed to the esm.sh server. This helps ensure the stability and reliability of your application. diff --git a/packages/esm-worker/package-lock.json b/packages/esm-worker/package-lock.json index cdaa961f6..3aa620fb4 100644 --- a/packages/esm-worker/package-lock.json +++ b/packages/esm-worker/package-lock.json @@ -1,12 +1,12 @@ { "name": "esm-worker", - "version": "0.121.4", + "version": "0.122.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "esm-worker", - "version": "0.121.4", + "version": "0.122.0", "license": "MIT", "dependencies": { "@cloudflare/workers-types": "^4.20230511.0" diff --git a/packages/esm-worker/package.json b/packages/esm-worker/package.json index 7952408c5..dcc57f773 100644 --- a/packages/esm-worker/package.json +++ b/packages/esm-worker/package.json @@ -1,7 +1,7 @@ { "name": "esm-worker", "description": "A Cloudflare workers that handles all requests to the esm.sh origin server at the edge.", - "version": "0.121.4", + "version": "0.122.0", "type": "module", "module": "dist/index.js", "types": "types/index.d.ts", diff --git a/packages/esm-worker/src/consts.ts b/packages/esm-worker/src/consts.ts index 7a236811d..ea1b13562 100644 --- a/packages/esm-worker/src/consts.ts +++ b/packages/esm-worker/src/consts.ts @@ -1,6 +1,6 @@ // consts defined in `server/consts.go` generated by `build.mjs` // do not edit manually. -export const VERSION = 121; +export const VERSION = 122; export const STABLE_VERSION = 118; export const stableBuild = new Set(["preact","react","solid-js","svelte","vue"]); export const assetsExts = new Set(["wasm","css","less","sass","scss","stylus","styl","json","jsonc","csv","xml","plist","tmLanguage","tmTheme","yml","yaml","pdf","txt","glsl","frag","vert","md","mdx","markdown","html","htm","vue","svelte","svg","png","jpg","jpeg","webp","gif","ico","eot","ttf","otf","woff","woff2","m4a","mp3","m3a","ogg","oga","wav","weba","mp4","m4v","ogv","webm","zip","gz","tar","tgz"]); diff --git a/server/consts.go b/server/consts.go index f6a42d248..83137e24f 100644 --- a/server/consts.go +++ b/server/consts.go @@ -2,7 +2,7 @@ package server const ( // esm.sh build version - VERSION = 121 + VERSION = 122 // esm.sh stable build version, used for UI libraries like react, to make sure the runtime is single copy // change this carefully! STABLE_VERSION = 118