#fix library version of a dependency

7 messages · Page 1 of 1 (latest)

ocean pelican
#

Putting this to deno.json

{
  "imports": {
    "gcp-metadata": "npm:[email protected]"
  }
}

but having this in deno.lock:

    "[email protected]": {
      "integrity": "sha512-Jb6Z0+nvECVz+2lzSMt9u98UsoakXxA2HGHMCxh+so3n90XgYWkq5dur19JAJV7ONiJY22yBTyJB1TSkvPq9Ng==",
      "dependencies": [
        "base64-js",
        "ecdsa-sig-formatter",
        "gaxios",
        "gcp-metadata",
        "gtoken",
        "jws"
      ]
    },"[email protected]": {
      "integrity": "sha512-a4tiq7E0/5fTjxPAaH4jpjkSv/uCaU2p5KC6HVGrvl0cDjA8iBZv4vv1gyzlmK0ZUKqwpOyQMKzZQe3lTit77A==",
      "dependencies": [
        "gaxios",
        "google-logging-utils",
        "json-bigint"
      ]
    },

Generated after deleting deno.lock, and doing deno cache --allow-import -r main.ts

Please help finding a good tag, I found just Deno CLI for that.

oblique whale
#

I'm not able to reproduce that. For me only [email protected] is installed. What I tried:

  1. Run deno init
  2. Add [email protected] to the imports section in deno.json
  3. Run deno install -> check lockfile
cunning skiff
ocean pelican
cunning skiff
#

Seems like they use a Package.json file to define the version used.
I have no idea how to override that... (Still new to deno myself too)
Maybe try to use vendor and change that file for your own version? 🤔

AFAIK, the vendor option is like making the package a devVersion that creates local package dependancies in your workspace.

cunning skiff