Can we use package.json instead of package-lock.json for dependecy scanning?

Hello, I am trying to configure dependency scanning for a project that I am working on. It currently supports javascript and reads dependencies from package-lock.json.
Is there any way to use package.json instead of package-lock.json with dependency scanner? Our project has the package-lock.json added to gitignore so I wanted to ask if there is a workaround for that other than removing it from gitignore?