Socket
Socket
Sign inDemoInstall

@schematics/update

Package Overview
Dependencies
8
Maintainers
3
Versions
348
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@schematics/update


Version published
Weekly downloads
297K
decreased by-5.36%
Maintainers
3
Install size
15.9 MB
Created
Weekly downloads
 

Package description

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

Last updated on 16 Dec 2021

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc