{"id":2374,"date":"2018-04-03T15:05:50","date_gmt":"2018-04-03T13:05:50","guid":{"rendered":"https:\/\/www.angulararchitects.io\/?p=2374"},"modified":"2018-04-03T15:05:50","modified_gmt":"2018-04-03T13:05:50","slug":"seamlessly-updating-your-angular-libraries","status":"publish","type":"post","link":"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/","title":{"rendered":"Seamlessly updating your Angular Libraries"},"content":{"rendered":"<div class=\"article\">\n<hr>\n<p><b>Table of Contents<\/b><\/p>\n<p>This blog post is part of an article series.<\/p>\n<ul>\n<li><a href=\"https:\/\/www.angulararchitects.io\/post\/2017\/10\/29\/generating-custom-code-with-the-angular-cli-and-schematics.aspx\">Part I: Generating Custom Code With The Angular CLI And Schematics<\/a><\/li>\n<li><a href=\"https:\/\/www.angulararchitects.io\/post\/2017\/12\/01\/generating-angular-code-with-schematics-part-ii-modifying-ngmodules.aspx\" rel=\"nofollow\">Part II: Automatically Updating Angular Modules With Schematics And The CLI<\/a><\/li>\n<li><a href=\"https:\/\/www.angulararchitects.io\/post\/2018\/01\/02\/angular-cli-and-schematics-part-iii-typescripts-compiler-api.aspx\" rel=\"nofollow\">Part III: Extending Existing Code With The TypeScript Compiler API<\/a><\/li>\n<li><a href=\"https:\/\/www.angulararchitects.io\/post\/2018\/03\/20\/custom-schematics-part-iv-frictionless-library-setup-with-the-angular-cli-and-schematics.aspx\" target=\"_blank\" rel=\"noopener\">Part IV:&nbsp;Frictionless Library Setup with the Angular CLI and Schematics<\/a><\/li>\n<li><a href=\"https:\/\/www.angulararchitects.io\/post\/2018\/04\/17\/seamlessly-updating-your-angular-libraries-with-ng-update.aspx\">Part V: Seamlessly Updating your Angular Libraries with ng update<\/a><\/li>\n<\/ul>\n<hr>\n<blockquote><p>\nThanks a lot to <a href=\"https:\/\/twitter.com\/hanslatwork\">Hans Larsen<\/a> from the Angular CLI team for reviewing this article.\n<\/p><\/blockquote>\n<p>Updating libraries within your npm\/yarn-based project can be a nightmare. Once you've dealt with all the peer dependencies, you have to make sure your source code doesn't run into breaking changes.<\/p>\n<p>The new command <code>ng update<\/code> provides a remedy: It goes trough all updated dependencies -- including the transitive ones -- and calls schematics to update the current project for them. Together with <a href=\"https:\/\/www.angulararchitects.io\/post\/2018\/03\/20\/custom-schematics-part-iv-frictionless-library-setup-with-the-angular-cli-and-schematics.aspx\">ng add described in my blog article here<\/a>, it is the foundation for an eco system allowing a more frictionless package management.<\/p>\n<p>In this post, I'm showing how to make use of <code>ng update<\/code> within an existing library by extending the <a href=\"https:\/\/www.angulararchitects.io\/post\/2018\/03\/20\/custom-schematics-part-iv-frictionless-library-setup-with-the-angular-cli-and-schematics.aspx\">simple logger used in my article about ng add<\/a>.<\/p>\n<p>If you want to look at the <a href=\"https:\/\/github.com\/manfredsteyer\/schematics-ng-add.git\">completed example<\/a>, you find it in my <a href=\"https:\/\/github.com\/manfredsteyer\/schematics-ng-add.git\">GitHub repo<\/a>.<\/p>\n<blockquote><p>\nSchematics is currently an Angular Labs project. Its public API is experimental and can change in future.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/y8LIiVg.png\" alt=\"Angular Labs\">\n<\/p><\/blockquote>\n<h2 id=\"introducing-a-breaking-change\">Introducing a Breaking Change<\/h2>\n<p>To showcase <code>ng update<\/code>, I'm going to modify my logger library here. For this, I'm renaming the <code>LoggerModule<\/code>'s <code>forRoot<\/code> method into <code>configure<\/code>:<\/p>\n<pre class=\"hljs\"><code><div><span class=\"hljs-comment\">\/\/ logger.module.ts<\/span>\n\n[...]\n\n@NgModule({\n  [...]\n})\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">class<\/span> LoggerModule { \n  <span class=\"hljs-comment\">\/\/ Old:<\/span>\n  <span class=\"hljs-comment\">\/\/ static forRoot(config: LoggerConfig): ModuleWithProviders {<\/span>\n\n  <span class=\"hljs-comment\">\/\/ New:<\/span>\n  <span class=\"hljs-keyword\">static<\/span> configure(config: LoggerConfig): ModuleWithProviders {\n    [...]\n  }\n}\n<\/div><\/code><\/pre>\n<p>As this is just an example, please see this change just as a proxy for all the other breaking changes one might introduce with a new version.<\/p>\n<h2 id=\"creating-the-migration-schematic\">Creating the Migration Schematic<\/h2>\n<p>To adopt existing projects to my breaking change, I'm going to create a schematic for it. It will be placed into an new <code>update<\/code> folder within the library's <code>schematics<\/code> folder:<br \/>\n<img decoding=\"async\" src=\"https:\/\/i.imgur.com\/di7M6Mb.png\" width=\"250\" alt=\"Folder update for new schematic\"><br \/>\nThis new folder gets an <code>index.ts<\/code> with a rule factory:<\/p>\n<pre class=\"hljs\"><code><div><span class=\"hljs-keyword\">import<\/span> { Rule, SchematicContext, Tree } from <span class=\"hljs-string\">'@angular-devkit\/schematics'<\/span>;\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">update<\/span>(<span class=\"hljs-params\">options: <span class=\"hljs-built_in\">any<\/span><\/span>): <span class=\"hljs-title\">Rule<\/span> <\/span>{\n  <span class=\"hljs-keyword\">return<\/span> (tree: Tree, _context: SchematicContext) =&gt; {\n\n    _context.logger.info(<span class=\"hljs-string\">'Running update schematic ...'<\/span>);\n\n    <span class=\"hljs-comment\">\/\/ Hardcoded path for the sake of simplicity<\/span>\n    <span class=\"hljs-keyword\">const<\/span> appModule = <span class=\"hljs-string\">'.\/src\/app\/app.module.ts'<\/span>;\n\n    <span class=\"hljs-keyword\">const<\/span> buffer = tree.read(appModule);\n    <span class=\"hljs-keyword\">if<\/span> (!buffer) <span class=\"hljs-keyword\">return<\/span> tree;\n    <span class=\"hljs-keyword\">const<\/span> content = buffer.toString(<span class=\"hljs-string\">'utf-8'<\/span>);\n\n    <span class=\"hljs-comment\">\/\/ One more time, this is for the sake of simplicity<\/span>\n    <span class=\"hljs-keyword\">const<\/span> newContent = content.replace(<span class=\"hljs-string\">'LoggerModule.forRoot('<\/span>, <span class=\"hljs-string\">'LoggerModule.configure('<\/span>);\n    tree.overwrite(appModule, newContent);\n\n    <span class=\"hljs-keyword\">return<\/span> tree;\n  };\n}\n<\/div><\/code><\/pre>\n<p>For the sake of simplicity, I'm taking two short cuts here. First, the rule assumes that the <code>AppModule<\/code> is located in the file <code>.\/src\/app\/app.module.ts<\/code>. While this might be the case in a traditional Angular CLI project, one could also use a completely different folder structure. One example is a monorepo workspace containing several applications and libraries. I will present a solution for this in an other post but for now, let's stick with this simple solution.<\/p>\n<p>To simplify things further, I'm directly modifying this file using a string replacement. A more safe way to change existing code is going with the TypeScript Compiler API. If you're interested into this, you'll find an example for this in my <a href=\"https:\/\/www.angulararchitects.io\/post\/2018\/01\/02\/angular-cli-and-schematics-part-iii-typescripts-compiler-api.aspx\">blog post here<\/a>.<\/p>\n<h2 id=\"configuring-the-migration-schematic\">Configuring the Migration Schematic<\/h2>\n<p>To configure migration schematics, let's follow the advice from the underlying design document and create an own collection. This collection is described by an <code>migration-collection.json<\/code> file:<br \/>\n<img decoding=\"async\" src=\"https:\/\/i.imgur.com\/6S1Tcj4.png\" width=\"250\" alt=\"Collection for migration schematics\"><br \/>\nFor each migration, it gets a schematic. The name of this schematic doesn't matter but what matters is the <code>version<\/code> property:<\/p>\n<pre class=\"hljs\"><code><div>{\n  <span class=\"hljs-attr\">\"schematics\"<\/span>: {\n    <span class=\"hljs-attr\">\"migration-01\"<\/span>: {\n      <span class=\"hljs-attr\">\"version\"<\/span>: <span class=\"hljs-string\">\"4\"<\/span>,\n      <span class=\"hljs-attr\">\"factory\"<\/span>: <span class=\"hljs-string\">\".\/update\/index#update\"<\/span>,\n      <span class=\"hljs-attr\">\"description\"<\/span>: <span class=\"hljs-string\">\"updates to v4\"<\/span>\n    }\n  }\n}\n<\/div><\/code><\/pre>\n<p>This collection tells the CLI to execute the current schematic when migrating to version 4. Let's assume we had such an schematic for version 5 too. If we migrated directly from version 3 to 5, the CLI would execute both.<\/p>\n<p>Instead of just pointing to a major version, we could also point to a minor or a patch version using version numbers like <code>4.1<\/code> or <code>4.1.1<\/code>.<\/p>\n<p>We also need to tell the CLI that this very file describes the migration schematics. For this, let's add an entry point <code>ng-update<\/code> to our <code>package.json<\/code>. As in our example the <code>package.json<\/code> located in the project root is used by the library built, we have to modify this one. In other project setups the library could have an <code>package.json<\/code> of its own:<\/p>\n<pre class=\"hljs\"><code><div>[...]\n<span class=\"hljs-string\">\"version\"<\/span>: <span class=\"hljs-string\">\"4.0.0\"<\/span>,\n<span class=\"hljs-string\">\"schematics\"<\/span>: <span class=\"hljs-string\">\".\/schematics\/collection.json\"<\/span>,\n<span class=\"hljs-string\">\"ng-update\"<\/span>: {\n  <span class=\"hljs-attr\">\"migrations\"<\/span>: <span class=\"hljs-string\">\".\/schematics\/migration-collection.json\"<\/span>\n},\n[...]\n<\/div><\/code><\/pre>\n<p>While the known <code>schematics<\/code> field is pointing to the traditional collection, <code>ng-update<\/code> shows which collection to use for migration.<\/p>\n<p>We also need to increase the version within the <code>package.json<\/code>. As my schematic is indented for version 4, I've set the <code>version<\/code> field to this very version above.<\/p>\n<h2 id=\"test--publish--and-update\">Test, Publish, and Update<\/h2>\n<p>To test the migration schematic, we need a demo Angular application using the old version of the logger-lib. Some information about this can be found in my <a href=\"https:\/\/www.angulararchitects.io\/post\/2018\/03\/20\/custom-schematics-part-iv-frictionless-library-setup-with-the-angular-cli-and-schematics.aspx\">last blog post<\/a>. This post also describes, how to setup a simple npm registry that provides the logger-lib and how to use it in your demo project.<\/p>\n<p>Make sure to use the latest versions of <code>@angular\/cli<\/code> and its dependency <code>@angular-devkit\/schematics<\/code>. When I wrote this up, I've used version <code>6.0.0-rc.4<\/code> of the CLI and version <code>0.5.6<\/code> of the schematics package. However, this came with some issues especially on Windows. Nether the less, I expect those issues to vanish, once we have version 6.<\/p>\n<p>To ensure having the latest versions, I've installed the latest CLI and created a new application with it.<\/p>\n<p>Sometimes during testing, it might be useful to install a former\/ a specific version of the library. You can just use <code>npm install<\/code> for this:<\/p>\n<pre><code>npm install @my\/logger-lib@^0 --save\n<\/code><\/pre>\n<p>When everything is in place, we can build and publish the new version of our <code>logger-lib<\/code>. For this, let's use the following commands in the library's root directory:<\/p>\n<pre><code>npm run build:lib\ncd dist\ncd lib\nnpm publish --registry http:\/\/localhost:4873\n<\/code><\/pre>\n<p>As in the <a href=\"https:\/\/www.angulararchitects.io\/post\/2018\/03\/20\/custom-schematics-part-iv-frictionless-library-setup-with-the-angular-cli-and-schematics.aspx\">previous article<\/a>, I'm using the npm registry verdaccio which is available at port 4863 by default.<\/p>\n<h2 id=\"updating-the-library\">Updating the Library<\/h2>\n<p>To update the logger-lib within our demo application, we can use the following command in it's root directory:<\/p>\n<pre><code>```\nng update @my\/logger-lib --registry http:\/\/localhost:4873 --force\n```\n<\/code><\/pre>\n<p>The switch <code>force<\/code> makes <code>ng update<\/code> proceed even if there are unresolved peer dependencies.<\/p>\n<p>This command npm installs the newest version of the logger-lib and executes the registered migration script. After this, you should see the modifications within your <code>app.module.ts<\/code> file.<\/p>\n<p>As an alternative, you could also npm install it by hand:<\/p>\n<pre><code>npm i @my\/logger-lib@^4 --save\n<\/code><\/pre>\n<p>After this, you could run all the necessary migration schematics using <code>ng update<\/code> with the <code>migrate-only<\/code> switch:<\/p>\n<pre><code>ng update @my\/logger-lib --registry http:\/\/localhost:4873 \n--migrate-only --from=0.0.0 --force\n<\/code><\/pre>\n<p>This will execute all migration schematics to get from version 0.0.0 to the currently installed one. To just execute the migration schematics for a specific (former) version, you could make use of the <code>--to<\/code> switch:<\/p>\n<pre><code>ng update @my\/logger-lib --registry http:\/\/localhost:4873 \n--migrate-only --from=0.0.0 --to=4.0.0 --force\n<\/code><\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>with the CLI, Schematics and Ng update<\/p>\n","protected":false},"author":9,"featured_media":2997,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2374","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-unkategorisiert"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Seamlessly updating your Angular Libraries - ANGULARarchitects<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Seamlessly updating your Angular Libraries - ANGULARarchitects\" \/>\n<meta property=\"og:description\" content=\"with the CLI, Schematics and Ng update\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/\" \/>\n<meta property=\"og:site_name\" content=\"ANGULARarchitects\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-03T13:05:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2019\/04\/blog-2355684-1280.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"853\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Manfred Steyer, GDE\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@daniel\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Manfred Steyer, GDE\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/\"},\"author\":{\"name\":\"Manfred Steyer, GDE\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#\/schema\/person\/15628efa7af4475ffaaeeb26c5112951\"},\"headline\":\"Seamlessly updating your Angular Libraries\",\"datePublished\":\"2018-04-03T13:05:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/\"},\"wordCount\":979,\"publisher\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2019\/04\/blog-2355684-1280.jpg\",\"articleSection\":[\"Unkategorisiert\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/\",\"url\":\"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/\",\"name\":\"Seamlessly updating your Angular Libraries - ANGULARarchitects\",\"isPartOf\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2019\/04\/blog-2355684-1280.jpg\",\"datePublished\":\"2018-04-03T13:05:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/#primaryimage\",\"url\":\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2019\/04\/blog-2355684-1280.jpg\",\"contentUrl\":\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2019\/04\/blog-2355684-1280.jpg\",\"width\":1280,\"height\":853},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.angulararchitects.io\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Seamlessly updating your Angular Libraries\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#website\",\"url\":\"https:\/\/www.angulararchitects.io\/en\/\",\"name\":\"ANGULARarchitects\",\"description\":\"AngularArchitects.io\",\"publisher\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.angulararchitects.io\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#organization\",\"name\":\"ANGULARarchitects\",\"alternateName\":\"SOFTWAREarchitects\",\"url\":\"https:\/\/www.angulararchitects.io\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/07\/AA-Logo-RGB-horizontal-inside-knowledge-black.svg\",\"contentUrl\":\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/07\/AA-Logo-RGB-horizontal-inside-knowledge-black.svg\",\"width\":644,\"height\":216,\"caption\":\"ANGULARarchitects\"},\"image\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/github.com\/angular-architects\",\"https:\/\/www.linkedin.com\/company\/angular-architects\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#\/schema\/person\/15628efa7af4475ffaaeeb26c5112951\",\"name\":\"Manfred Steyer, GDE\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a0b59539674d8b71ea1c1f4764b11244b5f499203f1d11b40f37d8f3f90be033?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a0b59539674d8b71ea1c1f4764b11244b5f499203f1d11b40f37d8f3f90be033?s=96&d=mm&r=g\",\"caption\":\"Manfred Steyer, GDE\"},\"sameAs\":[\"https:\/\/x.com\/daniel\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Seamlessly updating your Angular Libraries - ANGULARarchitects","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/","og_locale":"en_US","og_type":"article","og_title":"Seamlessly updating your Angular Libraries - ANGULARarchitects","og_description":"with the CLI, Schematics and Ng update","og_url":"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/","og_site_name":"ANGULARarchitects","article_published_time":"2018-04-03T13:05:50+00:00","og_image":[{"width":1280,"height":853,"url":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2019\/04\/blog-2355684-1280.jpg","type":"image\/jpeg"}],"author":"Manfred Steyer, GDE","twitter_card":"summary_large_image","twitter_creator":"@daniel","twitter_misc":{"Written by":"Manfred Steyer, GDE","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/#article","isPartOf":{"@id":"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/"},"author":{"name":"Manfred Steyer, GDE","@id":"https:\/\/www.angulararchitects.io\/en\/#\/schema\/person\/15628efa7af4475ffaaeeb26c5112951"},"headline":"Seamlessly updating your Angular Libraries","datePublished":"2018-04-03T13:05:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/"},"wordCount":979,"publisher":{"@id":"https:\/\/www.angulararchitects.io\/en\/#organization"},"image":{"@id":"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/#primaryimage"},"thumbnailUrl":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2019\/04\/blog-2355684-1280.jpg","articleSection":["Unkategorisiert"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/","url":"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/","name":"Seamlessly updating your Angular Libraries - ANGULARarchitects","isPartOf":{"@id":"https:\/\/www.angulararchitects.io\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/#primaryimage"},"image":{"@id":"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/#primaryimage"},"thumbnailUrl":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2019\/04\/blog-2355684-1280.jpg","datePublished":"2018-04-03T13:05:50+00:00","breadcrumb":{"@id":"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/#primaryimage","url":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2019\/04\/blog-2355684-1280.jpg","contentUrl":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2019\/04\/blog-2355684-1280.jpg","width":1280,"height":853},{"@type":"BreadcrumbList","@id":"https:\/\/www.angulararchitects.io\/en\/blog\/seamlessly-updating-your-angular-libraries\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.angulararchitects.io\/en\/"},{"@type":"ListItem","position":2,"name":"Seamlessly updating your Angular Libraries"}]},{"@type":"WebSite","@id":"https:\/\/www.angulararchitects.io\/en\/#website","url":"https:\/\/www.angulararchitects.io\/en\/","name":"ANGULARarchitects","description":"AngularArchitects.io","publisher":{"@id":"https:\/\/www.angulararchitects.io\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.angulararchitects.io\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.angulararchitects.io\/en\/#organization","name":"ANGULARarchitects","alternateName":"SOFTWAREarchitects","url":"https:\/\/www.angulararchitects.io\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.angulararchitects.io\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/07\/AA-Logo-RGB-horizontal-inside-knowledge-black.svg","contentUrl":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/07\/AA-Logo-RGB-horizontal-inside-knowledge-black.svg","width":644,"height":216,"caption":"ANGULARarchitects"},"image":{"@id":"https:\/\/www.angulararchitects.io\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/github.com\/angular-architects","https:\/\/www.linkedin.com\/company\/angular-architects\/"]},{"@type":"Person","@id":"https:\/\/www.angulararchitects.io\/en\/#\/schema\/person\/15628efa7af4475ffaaeeb26c5112951","name":"Manfred Steyer, GDE","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.angulararchitects.io\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a0b59539674d8b71ea1c1f4764b11244b5f499203f1d11b40f37d8f3f90be033?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a0b59539674d8b71ea1c1f4764b11244b5f499203f1d11b40f37d8f3f90be033?s=96&d=mm&r=g","caption":"Manfred Steyer, GDE"},"sameAs":["https:\/\/x.com\/daniel"]}]}},"_links":{"self":[{"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/posts\/2374","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/comments?post=2374"}],"version-history":[{"count":0,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/posts\/2374\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/media\/2997"}],"wp:attachment":[{"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/media?parent=2374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/categories?post=2374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/tags?post=2374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}