Tell users of the change and show how the composer.json file should be updated.
965027
private function showHow()
    {
        if (!$this->scripts) {
            $scripts = $this->event->getComposer()->getPackage()->getScripts();
            $scripts = $this->modifyScripts($scripts);
        } else {
            $scripts = $this->scripts;
        }
        $scripts = substr(JsonFile::encode(['scripts' => $scripts]), 1, -1);
        $cls = str_replace('\\', '\\\\', ScriptHandler::class);
        $name = "\"$cls::updateProject\",";
        $scripts = str_replace($name, "<info>$name</info>", $scripts);

        $this->io->writeError([
            '',
            '<info>Bolt has a new separate composer script handler to help with updates!</info>',
            '<warning>Unfortunately, we could not update your composer.json file automatically.',
            'Please update the "scripts" section of your composer.json file to this:</warning>',
            $scripts,
            '',
        ]);
    }
644395
def update(self):
        
        if self._track_changes:
            data = self.to_api_data(restrict_keys=self._track_changes)
            if data:
                response = self.session.patch(self.build_url(''), data=data)
                if not response:
                    return False
                self._track_changes.clear()
        if self._font._track_changes:
            data = self._font.to_api_data(restrict_keys=self._font._track_changes)
            if data:
                response = self.session.patch(self.build_url(self._endpoints.get('font')), data=data)
                if not response:
                    return False
                self._font._track_changes.clear()
        if self._track_background_color:
            if self._background_color is None:
                url = self.build_url(self._endpoints.get('clear_fill'))
                response = self.session.post(url)
            else:
                data = {'color': self._background_color}
                url = self.build_url(self._endpoints.get('fill'))
                response = self.session.patch(url, data=data)
            if not response:
                return False
            self._track_background_color = False

        return True
799688
public function update()
	{
		$package = $this->arguments->getOpt('package');
		if (empty($package))
		{
			$this->output->error('A package name is required');
		}

		Composer::updatePackage($package);
		$this->output->addLine("Done. $package updated to latest version");
	}
620336
def update_release(id, **kwargs):
    
    data = update_release_raw(id, **kwargs)
    if data:
        return utils.format_json(data)
678755
protected function modifyComposer($callable)
    {
        // Begin modification of composer.json
        $composerFile = new JsonFile(Factory::getComposerFile(), null, $this->getIO());
        $composerData = $composerFile->read();

        // Note: Respect call by ref $composerData
        $result = $callable($composerData);
        if ($result === false) {
            return;
        }
        if ($result) {
            $composerData = $result;
        }

        // Update composer.json and refresh local composer instance
        $composerFile->write($composerData);
        $this->resetComposer();
    }
401562
def update_frontend(self, info):
        
        headers = {'Content-Type': 'text/event-stream'}
        if info.get('when'):
            info['when'] = info['when'].isoformat()
        requests.post(self.base_url + '/publish', data=json.dumps(info), headers=headers)
41655
protected function updateDiff()
    {
        $changed = $this->getDirty();
        $this->before = json_encode(array_intersect_key($this->fresh()->toArray(),
            $changed));
        $this->after = json_encode($changed);
    }
1142736
private function checkComposer()
    {
        $composerJsonDetected = false;
        $composerLockDetected = false;
        foreach (GitUtils::extractCommitedFiles() as $file) {
            if ($file === 'composer.json') {
                $composerJsonDetected = true;
            }
            if ($file === 'composer.lock') {
                $composerLockDetected = true;
            }
        }
        if ($composerJsonDetected && !$composerLockDetected) {
            $this->output->writeln(
                '<bg=yellow;fg=black>
                 composer.lock must be commited if composer.json is modified!
                 </bg=yellow;fg=black>'
            );
        }
    }
1119304
function update() {
		var f = self.fm.getSelected(0);
		reset();

		self._hash = f.hash;
		self.title.text(f.name);
		self.win.addClass(self.fm.view.mime2class(f.mime));
		self.name.text(f.name);
		self.kind.text(self.fm.view.mime2kind(f.link ? 'symlink' : f.mime)); 
		self.size.text(self.fm.view.formatSize(f.size));
		self.date.text(self.fm.i18n('Modified')+': '+self.fm.view.formatDate(f.date));
		f.dim && self.add.append('<span>'+f.dim+' px</span>').show();
		f.tmb && self.ico.css('background', 'url("'+f.tmb+'") 0 0 no-repeat');
		if (f.url) {
			self.url.text(f.url).attr('href', f.url).show();
			for (var i in self.plugins) {
				if (self.plugins[i].test && self.plugins[i].test(f.mime, self.mimes, f.name)) {
					self.plugins[i].show(self, f);
					return;
				}
			}
		} else {
			self.url.hide();
		}
		
		self.win.css({
			width  : '420px',
			height : 'auto'
		});
	}
1102836
public function notify()
    {
        $response = new Response;
        try {
            $input = [
                'namespace' => strtolower( Request::input( 'namespace' ) ),
                'type'      => Request::input( 'type' ),
            ];
            if ( $input['namespace'] && $input['type'] ) {
                $main_class = $input['type'] === 'theme' ? 'theme' : $input['namespace'];
                global $$main_class;
                if ( $$main_class ) {
                    update_option(
                        $$main_class->config->get( 'updater.option' ),
                        true,
                        true //autoload
                    );
                    do_action( 'wpmvc_'.$main_class.'_updated' );
                    $response->success = true;
                }
            }
        } catch (Exception $e) {
            Log::error( $e );
        }
        $response->json();
    }
1029635
public function reload()
    {
        // update application components to the latest version
        if (file_exists($this->lock_file)) {
            unlink($this->lock_file);
        }

        $this->composer = $this->factory->createComposer($this->getIO());
    }
649304
def client_updates_config(artwork=True, now_playing=True,
                          volume=True, keyboard=True):
    """"""
    message = create(protobuf.CLIENT_UPDATES_CONFIG_MESSAGE)
    config = message.inner()
    config.artworkUpdates = artwork
    config.nowPlayingUpdates = now_playing
    config.volumeUpdates = volume
    config.keyboardUpdates = keyboard
    return message
74564
protected function updateComposerJson($path)
    {
        $helpers = 'shared/Support/helpers.php';

        //
        $composerJson = getenv('COMPOSER') ?: 'composer.json';

        $path = base_path($composerJson);

        // Get the composer.json contents in a decoded form.
        $config = json_decode(file_get_contents($path), true);

        if (! is_array($config)) {
            return;
        }

        // Update the composer.json
        else if (! in_array($helpers, $files = Arr::get($config, "autoload.files", array()))) {
            array_push($files, $helpers);

            Arr::set($config, "autoload.files", $files);

            $output = json_encode($config, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . "\n";

            file_put_contents($path, $output);
        }
    }
434467
def update(preset, clean):
    

    if self.isactive():
        lib.echo("ERROR: Exit current project first")
        sys.exit(lib.USER_ERROR)

    presets = _extern.github_presets()

    if preset not in presets:
        sys.stdout.write("\"%s\" not found" % preset)
        sys.exit(lib.USER_ERROR)

    lib.echo("Are you sure you want to update \"%s\", "
             "any changes will be lost?: [y/N]: ", newline=False)
    if raw_input().lower() in ("y", "yes"):
        presets_dir = _extern.presets_dir()
        preset_dir = os.path.join(presets_dir, preset)

        repository = presets[preset]

        if clean:
            try:
                _extern.remove_preset(preset)
            except:
                lib.echo("ERROR: Could not clean existing preset")
                sys.exit(lib.USER_ERROR)

        lib.echo("Updating %s.. " % repository)

        try:
            _extern.pull_preset(repository, preset_dir)
        except IOError as e:
            lib.echo(e)
            sys.exit(lib.USER_ERROR)

    else:
        lib.echo("Cancelled")
943755
public function handleComposerUpdate(): void
	{
		$this->checkHandlerPermission();

		$this->app->composerUpdate(true);
		$this->flashNotifier->success('dockbar.management.source.composerUpdated');
	}
105039
public function update_10000001() {
    $composer_json = $this->updater->getComposerJson();
    $template_composer_json = $this->updater->getTemplateComposerJson();
    foreach ($template_composer_json['require'] as $package_name => $package_version) {
      if (empty($composer_json['require'][$package_name])) {
        $composer_json['require'][$package_name] = $package_version;
      }
    }
    $this->updater->writeComposerJson($composer_json);
  }
891788
function changes() {
  const version   = require('./package.json').version;
  const changelog = File.readFileSync('CHANGELOG.md', 'utf-8');
  const match     = changelog.match(/^## Version (.*) .*\n([\S\s]+?)\n##/m);

  assert(match, 'CHANGELOG.md missing entry: ## Version ' + version);
  assert.equal(match[1], version, 'CHANGELOG.md missing entry for version ' + version);

  const changes   = match[2].trim();
  assert(changes, 'CHANGELOG.md empty entry for version ' + version);
  File.writeFileSync('.changes', changes);
}