esm-dev / esm.sh

A fast, smart, & global CDN for modern(es2015+) web development.
https://esm.sh
MIT License
3.14k stars 151 forks source link

?pin option is not working #206

Closed lucacasonato closed 3 years ago

lucacasonato commented 3 years ago

I am using ?pin=v57, but v55 is being used.

/m/s/P/g/l/deno-gfm ❯❯❯ curl -i "https://esm.sh/sanitize-html@2.5.2?pin=v57"
HTTP/2 200 
date: Thu, 04 Nov 2021 20:41:42 GMT
content-type: application/javascript; charset=utf-8
content-length: 213
access-control-expose-headers: X-TypeScript-Types
cache-control: public, max-age=300
vary: Origin
x-typescript-types: https://cdn.esm.sh/v55/@types/sanitize-html@2.5.0/index.d.ts
cf-cache-status: DYNAMIC
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=Z%2BgZgvPvUIB4Lbt9WLtA7FvHM90cTg6xIOkAWhpt5WDAbc2Z2cov0MOrsE%2FnVJG%2BYAhCgEZq5KDQjbBItnTrEeVfjDvqSn3g3T6MWSppg6PmUGsPO%2FgLdjP29AzphJlrx%2FcNq48%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 6a90aa26bb2d3258-FRA
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-28=":443"; ma=86400, h3-27=":443"; ma=86400

/* esm.sh - sanitize-html@2.5.2 */
export * from "https://cdn.esm.sh/v55/sanitize-html@2.5.2/es2015/sanitize-html.js";
export { default } from "https://cdn.esm.sh/v55/sanitize-html@2.5.2/es2015/sanitize-html.js";
ije commented 3 years ago

fixed in https://github.com/alephjs/esm.sh/commit/0e47247f91c4335ccd5e6cbba7fa1d1340b8662e, and i am creating a front layer on cloudflare edge to get faster response instead of requesting the origin server to check npm version.