From 314653d64170d0ac474bbe221a05b4edf94dbd97 Mon Sep 17 00:00:00 2001 From: X Date: Mon, 22 May 2023 16:53:08 +0800 Subject: [PATCH] v123 --- CHANGELOG.md | 8 ++++++++ Dockerfile | 2 +- HOSTING.md | 4 ++-- README.md | 8 ++++---- packages/esm-worker/README.md | 2 +- packages/esm-worker/package-lock.json | 4 ++-- packages/esm-worker/package.json | 2 +- packages/esm-worker/src/consts.ts | 2 +- packages/esm.sh/package-lock.json | 16 ++++------------ packages/esm.sh/package.json | 2 +- server.ts | 4 ++-- server/consts.go | 2 +- 12 files changed, 28 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3feee870..44303b9c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 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 diff --git a/Dockerfile b/Dockerfile index e182136be..da1dffc99 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 v122 +RUN git checkout v123 USER esm WORKDIR /esm diff --git a/HOSTING.md b/HOSTING.md index d8f0a6ec5..b074853ff 100644 --- a/HOSTING.md +++ b/HOSTING.md @@ -75,8 +75,8 @@ More details check [esm-worker](./packages/esm-worker/README.md). ## Deploy with Deno -We also provide a Deno server which is powered by [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/v122/server --port=8080 +deno run -A https://esm.sh/v123/server --port=8080 ``` diff --git a/README.md b/README.md index e5cdb406d..60d1aee20 100644 --- a/README.md +++ b/README.md @@ -246,8 +246,8 @@ package version. ```json { "imports": { - "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/" + "react-dom": "https://esm.sh/react-dom@18.2.0?pin=v123&dev", + "react-dom/": "https://esm.sh/react-dom@18.2.0&pin=v123&dev/" } } ``` @@ -391,9 +391,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=v122"; +import React from "https://esm.sh/react-dom?pin=v123"; // or use version prefix -import React from "https://esm.sh/v122/react-dom"; +import React from "https://esm.sh/v123/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 b9901ca9e..1b3e2a6af 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.122 +npm install esm-worker@0.123 ``` ## Configuration diff --git a/packages/esm-worker/package-lock.json b/packages/esm-worker/package-lock.json index a131af259..b781c7462 100644 --- a/packages/esm-worker/package-lock.json +++ b/packages/esm-worker/package-lock.json @@ -1,12 +1,12 @@ { "name": "esm-worker", - "version": "0.122.12", + "version": "0.123.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "esm-worker", - "version": "0.122.12", + "version": "0.123.0", "license": "MIT", "devDependencies": { "@cloudflare/workers-types": "4.20230511.0", diff --git a/packages/esm-worker/package.json b/packages/esm-worker/package.json index 70f821fb2..e481a055f 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.122.12", + "version": "0.123.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 ea1b13562..371bb87b9 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 = 122; +export const VERSION = 123; 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/packages/esm.sh/package-lock.json b/packages/esm.sh/package-lock.json index a1418d17d..e87baa5a1 100644 --- a/packages/esm.sh/package-lock.json +++ b/packages/esm.sh/package-lock.json @@ -9,17 +9,12 @@ "version": "0.0.1", "license": "MIT", "dependencies": { - "esm-worker": "^0.122.2" + "esm-worker": "^0.123.0" }, "devDependencies": { "esbuild": "^0.17.19" } }, - "node_modules/@cloudflare/workers-types": { - "version": "4.20230511.0", - "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-4.20230511.0.tgz", - "integrity": "sha512-Br4i/8+t60HDJIo8o7O9Rrmp03bhdejRW9klb0bK9EfG5Ii7qz5G3PJO12gUz+Vu9m1v9tZ9KOh3Gg8oshXtug==" - }, "node_modules/@esbuild/android-arm": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", @@ -410,12 +405,9 @@ } }, "node_modules/esm-worker": { - "version": "0.122.2", - "resolved": "https://registry.npmjs.org/esm-worker/-/esm-worker-0.122.2.tgz", - "integrity": "sha512-4C+NKdNQr+1IjX5SsRzpYJ+0cOi3RGOvMLiM4irWWf+5CEJJ9do/scgtAO4ICAI9e2/aJ4cZJww6eond0+jERA==", - "dependencies": { - "@cloudflare/workers-types": "^4.20230511.0" - } + "version": "0.123.0", + "resolved": "https://registry.npmjs.org/esm-worker/-/esm-worker-0.123.0.tgz", + "integrity": "sha512-PVdQwjYaGsja4UlHYP3GkjN49dF2tz8Sk+q1DxYFFa9S7XjJrht0Oo+SPM3kTq37z3NrSgnXt+YlZHijZXT8LQ==" } } } diff --git a/packages/esm.sh/package.json b/packages/esm.sh/package.json index f572c242f..b865031ea 100644 --- a/packages/esm.sh/package.json +++ b/packages/esm.sh/package.json @@ -25,7 +25,7 @@ } }, "dependencies": { - "esm-worker": "^0.122.5" + "esm-worker": "^0.123.0" }, "devDependencies": { "esbuild": "^0.17.19" diff --git a/server.ts b/server.ts index 102e3da5a..2f8e7716e 100644 --- a/server.ts +++ b/server.ts @@ -11,8 +11,8 @@ import type { Context, HttpMetadata, WorkerStorage, -} from "https://esm.sh/esm-worker@0.122.12"; -import { withESMWorker } from "https://esm.sh/esm-worker@0.122.12"; +} from "https://esm.sh/esm-worker@0.123.0"; +import { withESMWorker } from "https://esm.sh/esm-worker@0.123.0"; type Handler = ( request: Request, diff --git a/server/consts.go b/server/consts.go index 83137e24f..f1c46b53b 100644 --- a/server/consts.go +++ b/server/consts.go @@ -2,7 +2,7 @@ package server const ( // esm.sh build version - VERSION = 122 + VERSION = 123 // 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