Git Product home page Git Product logo

lock-treatment-tool's People

Contributors

dependabot[bot] avatar ginxo avatar hertzg avatar leepowelldev avatar niklasheld avatar shubhbapna avatar yurloc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lock-treatment-tool's Issues

Issue with lockfileVersion == 3

Has anyone used this tool before with projects that have a package-lock.json that has a lockfile version = 3? I'm getting an error running the 'locktt' command below when my lockfile version is 3. lockfileVersion 1 and 2 seems to be ok.

lockfile version 3:

# locktt --registry=`npm config get registry`   
Treating fields...
/Users/user/.nvm/versions/node/v18.15.0/lib/node_modules/@kie/lock-treatment-tool/lib/treat-locks/npm.lock.js:29
  Object.keys(dependencies).forEach((prop) => {
         ^

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at treatFields (/Users/user/.nvm/versions/node/v18.15.0/lib/node_modules/@kie/lock-treatment-tool/lib/treat-locks/npm.lock.js:29:10)
    at treatLockFields (/Users/user/.nvm/versions/node/v18.15.0/lib/node_modules/@kie/lock-treatment-tool/lib/treat-locks/npm.lock.js:61:5)
    at run (/Users/user/.nvm/versions/node/v18.15.0/lib/node_modules/@kie/lock-treatment-tool/lib/treat-locks/npm.lock.js:74:21)
    at run (/Users/user/.nvm/versions/node/v18.15.0/lib/node_modules/@kie/lock-treatment-tool/script/treat-lock-files.js:101:3)
    at Object.<anonymous> (/Users/tanm2/.nvm/versions/node/v18.15.0/lib/node_modules/@kie/lock-treatment-tool/bin/locktt.js:21:1)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)

NPM version: 9.5.0
Node version: v18.15.0

add support for pnpm-lock.yaml

The resolution field should be treated and the registry is even part of some of the dependency references

  registry.npmjs.org/@babel/runtime/7.16.7:
    resolution:
      {
        integrity: sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==,
        registry: https://registry.yarnpkg.com/,
        tarball: https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.7.tgz,
      }
    name: "@babel/runtime"
    version: 7.16.7
    engines: { node: ">=6.9.0" }
    dependencies:
      regenerator-runtime: registry.npmjs.org/regenerator-runtime/0.13.9
    dev: true

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.