Skip to content

Commit

Permalink
fix(install): re run reify if lockfile is old
Browse files Browse the repository at this point in the history
  • Loading branch information
siemhesda committed Jan 3, 2024
1 parent 0dc6332 commit 2999cc4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/commands/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const pacote = require('pacote')
const checks = require('npm-install-checks')

const ArboristWorkspaceCmd = require('../arborist-cmd.js')
const { defaultLockfileVersion } = require('@npmcli/arborist/lib/shrinkwrap.js')
class Install extends ArboristWorkspaceCmd {
static description = 'Install a package'
static name = 'install'
Expand Down Expand Up @@ -150,6 +151,10 @@ class Install extends ArboristWorkspaceCmd {
const arb = new Arborist(opts)
await arb.reify(opts)

if (arb.options.lockfileVersion && arb.options.lockfileVersion < defaultLockfileVersion) {
await arb.reify(opts)

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.17.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.17.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.17.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.17.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.17.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.17.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.5.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.5.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.5.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.5.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.5.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.5.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.17.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.17.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.17.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.17.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.17.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.17.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.x

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.5.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.5.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.5.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.5.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.5.0

Cannot read properties of undefined (reading 'lockfileVersion')

Check failure on line 155 in lib/commands/install.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.5.0

Cannot read properties of undefined (reading 'lockfileVersion')
}

if (!args.length && !isGlobalInstall && !ignoreScripts) {
const scripts = [
'preinstall',
Expand Down

0 comments on commit 2999cc4

Please sign in to comment.