From 703ac3f8cca96889686642cce87bcbd9d51d5393 Mon Sep 17 00:00:00 2001
From: X <i@jex.me>
Date: Thu, 6 Jul 2023 00:31:55 +0800
Subject: [PATCH] v128

---
 .github/docker/Dockerfile                | 2 +-
 .github/workflows/docker-push-stable.yml | 2 +-
 CHANGELOG.md                             | 9 +++++++++
 HOSTING.md                               | 8 ++++----
 README.md                                | 8 ++++----
 packages/esm-worker/README.md            | 2 +-
 packages/esm-worker/package.json         | 2 +-
 packages/esm-worker/src/consts.ts        | 8 ++++----
 packages/esm.sh/package.json             | 2 +-
 packages/esm.sh/pnpm-lock.yaml           | 8 ++++----
 server.ts                                | 4 ++--
 server/consts.go                         | 6 +++---
 12 files changed, 35 insertions(+), 26 deletions(-)

diff --git a/.github/docker/Dockerfile b/.github/docker/Dockerfile
index 82a0212be..98af7dc2a 100644
--- a/.github/docker/Dockerfile
+++ b/.github/docker/Dockerfile
@@ -5,7 +5,7 @@
 #######################################
 FROM golang:1.20-alpine AS build-stage
 
-ENV ESM_SH_VERSION v127
+ENV ESM_SH_VERSION v128
 ENV ESM_SH_GIT_URL https://github.com/esm-dev/esm.sh
 
 RUN apk add --no-cache git
diff --git a/.github/workflows/docker-push-stable.yml b/.github/workflows/docker-push-stable.yml
index c31fbca42..4182dcfde 100644
--- a/.github/workflows/docker-push-stable.yml
+++ b/.github/workflows/docker-push-stable.yml
@@ -37,4 +37,4 @@ jobs:
           context: ./.github/docker
           platforms: linux/amd64,linux/arm64
           push: true
-          tags: ghcr.io/esm-dev/esm.sh:latest,ghcr.io/esm-dev/esm.sh:v127
+          tags: ghcr.io/esm-dev/esm.sh:latest,ghcr.io/esm-dev/esm.sh:v128
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3cf4cab8c..f18268caf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
 # Changelog
 
+## 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
diff --git a/HOSTING.md b/HOSTING.md
index cac97b202..167c32eae 100644
--- a/HOSTING.md
+++ b/HOSTING.md
@@ -66,9 +66,9 @@ your host machine.
 esm.sh provides an official docker image for deployment. You can pull the container image from https://ghcr.io/esm-dev/esm.sh:
 
 ```bash
-docker pull ghcr.io/esm-dev/esm.sh:v127   # specific version
-docker pull ghcr.io/esm-dev/esm.sh:latest # latest stable version
-docker pull ghcr.io/esm-dev/esm.sh:dev    # latest dev version
+docker pull ghcr.io/esm-dev/esm.sh      # latest version
+docker pull ghcr.io/esm-dev/esm.sh:v128 # specific version
+docker pull ghcr.io/esm-dev/esm.sh:dev  # latest development version
 ```
 
 Then run the container:
@@ -112,5 +112,5 @@ More details check [esm-worker](./packages/esm-worker/README.md).
 We also provide a server for [Deno](https://deno.land) which is powered by the [esm-worker](./packages/esm-worker/README.md).
 
 ```bash
-deno run -A https://esm.sh/v127/server --port=8080
+deno run -A https://esm.sh/v128/server --port=8080
 ```
diff --git a/README.md b/README.md
index 7829f71bc..e3a93ba3f 100644
--- a/README.md
+++ b/README.md
@@ -260,8 +260,8 @@ package version.
 ```json
 {
   "imports": {
-    "react-dom": "https://esm.sh/react-dom@18.2.0?pin=v127&dev",
-    "react-dom/": "https://esm.sh/react-dom@18.2.0&pin=v127&dev/"
+    "react-dom": "https://esm.sh/react-dom@18.2.0?pin=v128&dev",
+    "react-dom/": "https://esm.sh/react-dom@18.2.0&pin=v128&dev/"
   }
 }
 ```
@@ -409,9 +409,9 @@ 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=v127";
+import React from "https://esm.sh/react-dom?pin=v128";
 // or use version prefix
-import React from "https://esm.sh/v127/react-dom";
+import React from "https://esm.sh/v128/react-dom";
 ```
 
 By using the `?pin` query in the import statement, you can rest assured that the
diff --git a/packages/esm-worker/README.md b/packages/esm-worker/README.md
index 499ad1142..fb7606edc 100644
--- a/packages/esm-worker/README.md
+++ b/packages/esm-worker/README.md
@@ -13,7 +13,7 @@ all requests of esm.sh at the edge(earth).
 ## Installation
 
 ```bash
-npm install esm-worker@^0.127.0
+npm install esm-worker@^0.128.0
 ```
 
 ## Configuration
diff --git a/packages/esm-worker/package.json b/packages/esm-worker/package.json
index 177dee445..1bd7b14f1 100644
--- a/packages/esm-worker/package.json
+++ b/packages/esm-worker/package.json
@@ -1,7 +1,7 @@
 {
   "name": "esm-worker",
   "description": "A Cloudflare worker handles all requests of esm.sh at the edge(earth).",
-  "version": "0.127.1",
+  "version": "0.128.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 36128aaa7..fb263da15 100644
--- a/packages/esm-worker/src/consts.ts
+++ b/packages/esm-worker/src/consts.ts
@@ -1,8 +1,8 @@
 // consts defined in `server/consts.go` generated by `build.mjs`
 // do not edit manually.
-export const VERSION = 127;
-export const STABLE_VERSION = 118;
-export const stableBuild = new Set(["preact","react","solid-js","svelte","vue"]);
+export const VERSION = 128;
+export const STABLE_VERSION = 128;
+export const stableBuild = new Set(["preact","react","solid-js","svelte","vue","@vue/reactivity","@vue/runtime-core","@vue/runtime-dom","@vue/shared"]);
 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"]);
 export const cssPackages = {"@unocss/reset":"tailwind.css","inter-ui":"inter.css","normalize.css":"normalize.css","modern-normalize":"modern-normalize.css","reset-css":"reset.css"};
-export const fixedPkgVersions = {"@types/react@17":"17.0.59","@types/react@18":"18.2.6","isomorphic-ws@4":"5.0.0","resolve@1.22":"1.22.2"};
+export const fixedPkgVersions = {"@types/react@17":"17.0.52","@types/react@18":"18.2.14","isomorphic-ws@4":"5.0.0","resolve@1.22":"1.22.2"};
diff --git a/packages/esm.sh/package.json b/packages/esm.sh/package.json
index 1338d7162..4e74da465 100644
--- a/packages/esm.sh/package.json
+++ b/packages/esm.sh/package.json
@@ -25,7 +25,7 @@
     }
   },
   "dependencies": {
-    "esm-worker": "^0.127.0"
+    "esm-worker": "^0.128.0"
   },
   "devDependencies": {
     "esbuild": "^0.18.10"
diff --git a/packages/esm.sh/pnpm-lock.yaml b/packages/esm.sh/pnpm-lock.yaml
index 30e105b64..ae8d75e96 100644
--- a/packages/esm.sh/pnpm-lock.yaml
+++ b/packages/esm.sh/pnpm-lock.yaml
@@ -6,8 +6,8 @@ settings:
 
 dependencies:
   esm-worker:
-    specifier: ^0.127.0
-    version: 0.127.0
+    specifier: ^0.128.0
+    version: 0.128.0
 
 devDependencies:
   esbuild:
@@ -244,6 +244,6 @@ packages:
       '@esbuild/win32-x64': 0.18.10
     dev: true
 
-  /esm-worker@0.127.0:
-    resolution: {integrity: sha512-iBskc6WLC9CILuvDcKx6XIDoLY2g3kJBPzooEUZRVSHpIgdMYX38xANMzl6ucWn79I+ZIHyqZ3kl+Ru6AeOBTg==}
+  /esm-worker@0.128.0:
+    resolution: {integrity: sha512-fETB/RMiZNPPuGqcR1efLGUSn/mkon8oI0EYVTswgoJ27XrwOWTv5N1c3pqhmUAN6vgO7y3WxdH+J2INZNQeWA==}
     dev: false
diff --git a/server.ts b/server.ts
index 4453eb3d6..a80ff7a08 100644
--- a/server.ts
+++ b/server.ts
@@ -11,8 +11,8 @@ import type {
   Context,
   HttpMetadata,
   WorkerStorage,
-} from "https://esm.sh/esm-worker@0.127.0";
-import { withESMWorker } from "https://esm.sh/esm-worker@0.127.0";
+} from "https://esm.sh/esm-worker@0.128.0";
+import { withESMWorker } from "https://esm.sh/esm-worker@0.128.0";
 
 type Handler = (
   request: Request,
diff --git a/server/consts.go b/server/consts.go
index ad9a532c5..0959d250f 100644
--- a/server/consts.go
+++ b/server/consts.go
@@ -2,10 +2,10 @@ package server
 
 const (
 	// esm.sh build version
-	VERSION = 127
+	VERSION = 128
 	// 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
+	STABLE_VERSION = 128
 )
 
 const (
@@ -17,7 +17,7 @@ const (
 
 // fix some npm package versions
 var fixedPkgVersions = map[string]string{
-	"@types/react@17": "17.0.52",
+	"@types/react@17": "17.0.62",
 	"@types/react@18": "18.2.14",
 	"isomorphic-ws@4": "5.0.0",
 	"resolve@1.22":    "1.22.2", // 1.22.3+ will read package.json from disk