Skip to content

Commit

Permalink
v122
Browse files Browse the repository at this point in the history
  • Loading branch information
ije committed May 17, 2023
1 parent 6fa4948 commit d6709f3
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 10 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ Import maps supports [**trailing slash**](https://github.com/WICG/import-maps#pa
```json
{
"imports": {
"react-dom": "https://esm.sh/[email protected]?pin=v121&dev",
"react-dom/": "https://esm.sh/[email protected]&pin=v121&dev/",
"react-dom": "https://esm.sh/[email protected]?pin=v122&dev",
"react-dom/": "https://esm.sh/[email protected]&pin=v122&dev/",
}
}
```
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions packages/esm-worker/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/esm-worker/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-worker/src/consts.ts
Original file line number Diff line number Diff line change
@@ -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"]);
Expand Down
2 changes: 1 addition & 1 deletion server/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d6709f3

Please sign in to comment.