Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deno: esm.sh Version prefix pinning breaks job run #29

Closed
nekowinston opened this issue Dec 25, 2023 · 0 comments · Fixed by #30 or #33
Closed

Deno: esm.sh Version prefix pinning breaks job run #29

nekowinston opened this issue Dec 25, 2023 · 0 comments · Fixed by #30 or #33

Comments

@nekowinston
Copy link
Contributor

nekowinston commented Dec 25, 2023

Hey there, thanks for this config! Just ran into a minor error with the regex.

When pinning build versions with e.g.

import {} from "https://esm.sh/v135/[email protected]"

the job run aborts with:

WARN: Host error
{
  "hostType": "npm"
  "packageName": "v135/ajv"
  "err": {
    "name": "HTTPError",
    "code": "ERR_NON_2XX_3XX_RESPONSE",
    "timings": {
      "start": 1703537835257,
      "socket": 1703537835257,
      "lookup": 1703537835352,
      "connect": 1703537835367,
      "secureConnect": 1703537835383,
      "upload": 1703537835386,
      "response": 1703537835485,
      "end": 1703537835485,
      "phases": {
        "wait": 0,
        "dns": 95,
        "tcp": 15,
        "tls": 16,
        "request": 3,
        "firstByte": 99,
        "download": 0,
        "total": 228
      }
    },
    "message": "Response code 405 (Method Not Allowed)",
    "stack": "HTTPError: Response code 405 (Method Not Allowed)\n    at Request.<anonymous> (/opt/containerbase/tools/renovate/37.103.1/node_modules/got/dist/source/as-promise/index.js:118:42)\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)",
    "options": {
      "headers": {
        "user-agent": "RenovateBot/37.103.1 (https://github.com/renovatebot/renovate)",
        "accept": "application/json",
        "accept-encoding": "gzip, deflate, br"
      },
      "url": "https://registry.npmjs.org/v135%2Fajv",
      "hostType": "npm",
      "username": "",
      "password": "",
      "method": "GET",
      "http2": false
    },
    "response": {
      "statusCode": 405,
      "statusMessage": "Method Not Allowed",
      "body": {
        "code": "MethodNotAllowedError",
        "message": "GET is not allowed"
      },
      "headers": {
        "date": "Mon, 25 Dec 2023 20:57:15 GMT",
        "content-type": "application/json",
        "content-length": "63",
        "connection": "close",
        "cf-ray": "83b3fecf2aba3aee-IAD",
        "cf-cache-status": "DYNAMIC",
        "allow": "PUT, POST",
        "vary": "Accept-Encoding",
        "server": "cloudflare"
      },
      "httpVersion": "1.1",
      "retryCount": 0
    }
  }
}

Changing to the other way of pinning packages via

import {} from "https://esm.sh/[email protected]?pin=v135"

fixes this issue.

I ran into this here catppuccin/toolbox#115

It would be neat if this were either supported as well, or mentioned in the README.


As a side note

- See [test case](./test/deno.test.ts) for supported syntax
in the README points to a file that has since been split into multiple files 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant