original_string: public function update(Composer $composer)
      {
          $this->io->write(
              '<info>Updating NPM dependencies for root project</info>'
          );
  
          $package = $composer->getPackage();
  
          if ($this->isDependantPackage($package, true)) {
              $timeout = $this->packageTimeout($package->getExtra());
  
              $this->client->update(null, $timeout);
              $this->client->install(null, true, $timeout);
          } else {
              $this->io->write('Nothing to update');
          }
  
          $this->installForVendors($composer);
      }
code: public function update(Composer $composer)
      {
          $this->io->write(
              '<info>Updating NPM dependencies for root project</info>'
          );
  
          $package = $composer->getPackage();
  
          if ($this->isDependantPackage($package, true)) {
              $timeout = $this->packageTimeout($package->getExtra());
  
              $this->client->update(null, $timeout);
              $this->client->install(null, true, $timeout);
          } else {
              $this->io->write('Nothing to update');
          }
  
          $this->installForVendors($composer);
      }
code_tokens: public function update ( Composer $ composer ) { $ this -> io -> write ( '<info>Updating NPM dependencies for root project</info>' ) ; $ package = $ composer -> getPackage ( ) ; if ( $ this -> isDependantPackage ( $ package , true ) ) { $ timeout = $ this -> packageTimeout ( $ package -> getExtra ( ) ) ; $ this -> client -> update ( null , $ timeout ) ; $ this -> client -> install ( null , true , $ timeout ) ; } else { $ this -> io -> write ( 'Nothing to update' ) ; } $ this -> installForVendors ( $ composer ) ; }
docstring: Update NPM dependencies for a Composer project and its dependencies.
  
  @param Composer $composer The main Composer object.
  
  @throws NpmNotFoundException      If the npm executable cannot be located.
  @throws NpmCommandFailedException If the operation fails.
docstring_tokens: Update NPM dependencies for a Composer project and its dependencies .