Socket
Socket
Sign inDemoInstall

@schematics/update

Package Overview
Dependencies
Maintainers
3
Versions
348
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@schematics/update

Schematics specific to updating packages


Version published
Weekly downloads
255K
decreased by-6.92%
Maintainers
3
Weekly downloads
 
Created

What is @schematics/update?

@schematics/update is a package used for updating dependencies and managing migrations in Angular projects. It provides a set of tools to automate the process of updating dependencies and applying necessary code changes.

What are @schematics/update's main functionalities?

Update Dependencies

This feature allows you to update the version of a dependency in the package.json file and install the updated packages.

const { NodePackageInstallTask } = require('@angular-devkit/schematics/tasks');
const { updateJsonFile } = require('@schematics/update');

function updateDependencies() {
  return (tree, context) => {
    updateJsonFile(tree, 'package.json', json => {
      json.dependencies['some-package'] = '^2.0.0';
    });
    context.addTask(new NodePackageInstallTask());
    return tree;
  };
}

Apply Migrations

This feature allows you to apply code migrations to your project, ensuring that your codebase is compatible with the updated dependencies.

const { chain } = require('@angular-devkit/schematics');
const { runSchematic } = require('@schematics/update');

function applyMigrations() {
  return chain([
    runSchematic('migration-schematic', {}),
  ]);
}

Other packages similar to @schematics/update

Keywords

FAQs

Package last updated on 31 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc