Skip to content

Commit

Permalink
v104
Browse files Browse the repository at this point in the history
  • Loading branch information
ije committed Jan 22, 2023
1 parent 74874e3 commit fed5844
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## v104

- Rewrite `FileSystem` interface of storage.
- Fix submodule build with `exports` in package.json (close [#497](https://github.com/ije/esm.sh/issues/497))
- Fix es5-ext weird `/#/` path (close [#502](https://github.com/ije/esm.sh/issues/502))

## v103

- Add `inject` argument for worker factory
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ import unescape from "https://esm.sh/lodash/unescape?no-dts"
Since we update esm.sh server frequently, sometime we may break packages that work fine previously by mistake, the server will rebuild all modules when the patch pushed. To avoid this, you can **pin** the build version by the `?pin=BUILD_VERSON` query. This will give you an **immutable** cached module.

```javascript
import React from "https://esm.sh/[email protected]?pin=v103"
import React from "https://esm.sh/[email protected]?pin=v104"
```

## Global CDN
Expand Down
3 changes: 1 addition & 2 deletions server/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ func (task *BuildTask) build(tracing *stringSet) (esm *ESM, err error) {

// splits modules based on the `exports` defines in package.json,
// see https://nodejs.org/api/packages.html
if (strings.HasPrefix(specifier, "./") || strings.HasPrefix(specifier, "../") || specifier == "..") && !strings.HasSuffix(specifier, ".js") {
if (strings.HasPrefix(specifier, "./") || strings.HasPrefix(specifier, "../") || specifier == "..") && !strings.HasSuffix(specifier, ".js") && !strings.HasSuffix(specifier, ".mjs") && !strings.HasSuffix(specifier, ".json") {
fullpath := path.Join(path.Dir(args.Importer), specifier)
// in macOS, the dir `/private/var/` is equal to `/var/`
if strings.HasPrefix(fullpath, "/private/var/") {
Expand Down Expand Up @@ -621,7 +621,6 @@ esbuild:
importPath = name
}
// sub module
fmt.Println(task.Pkg, name)
if importPath == "" && strings.HasPrefix(name, task.Pkg.Name+"/") {
submodule := strings.TrimPrefix(name, task.Pkg.Name+"/")
subPkg := Pkg{
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 = 103
VERSION = 104
nodejsMinVersion = 16
denoStdVersion = "0.173.0"
nodejsLatestLTS = "16.18.1"
Expand Down

0 comments on commit fed5844

Please sign in to comment.