{"id":825,"date":"2023-02-21T14:05:23","date_gmt":"2023-02-21T14:05:23","guid":{"rendered":"https:\/\/www.naveedulhaq.com\/?p=825"},"modified":"2023-03-11T13:02:35","modified_gmt":"2023-03-11T13:02:35","slug":"configure-package-json-file","status":"publish","type":"post","link":"https:\/\/www.naveedulhaq.com\/index.php\/js\/configure-package-json-file\/","title":{"rendered":"Configure package.json file"},"content":{"rendered":"\n<p>In NPM projects you have seen the package.json file. This file is an NPM Configuration file. This file function is similar to package.config where you have a list of all NuGet packages to restore. Similarly, this file contains the list of NPM packages that need restore while running this project.<\/p>\n\n\n\n<p>Although in most of JS projects, NPM is a command line tool while working with a .NET project on visual studio it&#8217;s easier to use a packages.json file to add, and restore npm packages and keep its changes in source control.<\/p>\n\n\n\n<p>Like package.config file restore packages in the packages folder. Similarly, package.json files restore Js packages in the \/node_modules\/ folder inside your project directory. By default, this folder is hidden in Visual studio however you can explore restored packages in the\/Dependencies\/npm\/ virtual folder. <\/p>\n\n\n\n<p>When we modify\/update the package.json file Visual studio automatically updates \/node_modules\/ folder with appropriate packages. <\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-medium\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"215\" data-id=\"827\" src=\"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/02\/packages.json-file-300x215.png\" loading=\"lazy\" alt=\"An example of package.json file\" class=\"wp-image-827\" srcset=\"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/02\/packages.json-file-300x215.png 300w, https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/02\/packages.json-file.png 467w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/figure>\n<\/figure>\n\n\n\n<p>As you can see in the above example the packages are listed in JSON format and made of key-value pairs where the package name is the key and the value is the version number.<\/p>\n\n\n\n<p>You can specify either the exact version number or you can use standard npmJs syntax to specify auto update rules such as <\/p>\n\n\n\n<p><strong>Tilde (~):<\/strong> Al value of &#8220;~1.1.5&#8221; will match all versions under 1.1.x excluding 1.2.0, 1.0.x and so on. <\/p>\n\n\n\n<p><strong>Caret (^):<\/strong> A value of &#8220;^1.1.5&#8221; will match everything above 1.1.5, excluding<br>2.0.0 and above<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In NPM projects you have seen the package.json file. This file is an NPM Configuration file. This file function is similar to package.config where you&#8230;<\/p>\n","protected":false},"author":1,"featured_media":805,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,86,94],"tags":[92,88,87,32,23,66,56],"class_list":["post-825","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dot-net-core","category-js","category-npm-git","tag-angular","tag-angular5","tag-angularjs","tag-developer","tag-development","tag-reactjs","tag-visual-studio"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Configure package.json file - Naveed Ul-Haq&#039;s blog<\/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.naveedulhaq.com\/index.php\/js\/configure-package-json-file\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Configure package.json file - Naveed Ul-Haq&#039;s blog\" \/>\n<meta property=\"og:description\" content=\"In NPM projects you have seen the package.json file. This file is an NPM Configuration file. This file function is similar to package.config where you...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.naveedulhaq.com\/index.php\/js\/configure-package-json-file\/\" \/>\n<meta property=\"og:site_name\" content=\"Naveed Ul-Haq&#039;s blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-21T14:05:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-11T13:02:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/01\/npm.png\" \/>\n\t<meta property=\"og:image:width\" content=\"298\" \/>\n\t<meta property=\"og:image:height\" content=\"305\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Naveed Ul-Haq\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Naveed Ul-Haq\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/js\\\/configure-package-json-file\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/js\\\/configure-package-json-file\\\/\"},\"author\":{\"name\":\"Naveed Ul-Haq\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\"},\"headline\":\"Configure package.json file\",\"datePublished\":\"2023-02-21T14:05:23+00:00\",\"dateModified\":\"2023-03-11T13:02:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/js\\\/configure-package-json-file\\\/\"},\"wordCount\":246,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/js\\\/configure-package-json-file\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/npm.png\",\"keywords\":[\"Angular\",\"angular5\",\"angularJs\",\"developer\",\"development\",\"reactjs\",\"visual-studio\"],\"articleSection\":[\".NET\",\"JS\",\"npm &amp; git\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/js\\\/configure-package-json-file\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/js\\\/configure-package-json-file\\\/\",\"url\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/js\\\/configure-package-json-file\\\/\",\"name\":\"Configure package.json file - Naveed Ul-Haq&#039;s blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/js\\\/configure-package-json-file\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/js\\\/configure-package-json-file\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/npm.png\",\"datePublished\":\"2023-02-21T14:05:23+00:00\",\"dateModified\":\"2023-03-11T13:02:35+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/js\\\/configure-package-json-file\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/js\\\/configure-package-json-file\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/js\\\/configure-package-json-file\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/npm.png\",\"contentUrl\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/npm.png\",\"width\":298,\"height\":305,\"caption\":\"npm cheat sheet\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/js\\\/configure-package-json-file\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.naveedulhaq.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Configure package.json file\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#website\",\"url\":\"https:\\\/\\\/www.naveedulhaq.com\\\/\",\"name\":\"Naveed Ul-Haq's blog\",\"description\":\"AI, Optimizely, Azure &amp; more\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.naveedulhaq.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\",\"name\":\"Naveed Ul-Haq\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\",\"caption\":\"Naveed Ul-Haq\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\"},\"description\":\"I lead engineering delivery teams for digital commerce and digital experience platforms, combining hands-on architecture experience with strong delivery governance. Over 20+ years, I\u2019ve built and led cross\u2011functional teams (engineering, BA, QA) delivering modern cloud solutions on Azure, microservices, APIs and eCommerce\\\/CMS platforms. My recent focus includes AI-enabled commerce automation: product ingestion and enrichment workflows, content optimisation for SEO and shopping feeds, and agentic tooling to improve marketing and accessibility workflows. I\u2019m passionate about building high-performing teams, establishing quality\\\/release standards, and delivering measurable outcomes across performance, reliability, and speed of change.\",\"sameAs\":[\"https:\\\/\\\/www.naveedulhaq.com\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/naveedulhaq\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Configure package.json file - Naveed Ul-Haq&#039;s blog","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.naveedulhaq.com\/index.php\/js\/configure-package-json-file\/","og_locale":"en_GB","og_type":"article","og_title":"Configure package.json file - Naveed Ul-Haq&#039;s blog","og_description":"In NPM projects you have seen the package.json file. This file is an NPM Configuration file. This file function is similar to package.config where you...","og_url":"https:\/\/www.naveedulhaq.com\/index.php\/js\/configure-package-json-file\/","og_site_name":"Naveed Ul-Haq&#039;s blog","article_published_time":"2023-02-21T14:05:23+00:00","article_modified_time":"2023-03-11T13:02:35+00:00","og_image":[{"width":298,"height":305,"url":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/01\/npm.png","type":"image\/png"}],"author":"Naveed Ul-Haq","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Naveed Ul-Haq","Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.naveedulhaq.com\/index.php\/js\/configure-package-json-file\/#article","isPartOf":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/js\/configure-package-json-file\/"},"author":{"name":"Naveed Ul-Haq","@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9"},"headline":"Configure package.json file","datePublished":"2023-02-21T14:05:23+00:00","dateModified":"2023-03-11T13:02:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/js\/configure-package-json-file\/"},"wordCount":246,"commentCount":0,"publisher":{"@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9"},"image":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/js\/configure-package-json-file\/#primaryimage"},"thumbnailUrl":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/01\/npm.png","keywords":["Angular","angular5","angularJs","developer","development","reactjs","visual-studio"],"articleSection":[".NET","JS","npm &amp; git"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.naveedulhaq.com\/index.php\/js\/configure-package-json-file\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.naveedulhaq.com\/index.php\/js\/configure-package-json-file\/","url":"https:\/\/www.naveedulhaq.com\/index.php\/js\/configure-package-json-file\/","name":"Configure package.json file - Naveed Ul-Haq&#039;s blog","isPartOf":{"@id":"https:\/\/www.naveedulhaq.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/js\/configure-package-json-file\/#primaryimage"},"image":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/js\/configure-package-json-file\/#primaryimage"},"thumbnailUrl":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/01\/npm.png","datePublished":"2023-02-21T14:05:23+00:00","dateModified":"2023-03-11T13:02:35+00:00","breadcrumb":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/js\/configure-package-json-file\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.naveedulhaq.com\/index.php\/js\/configure-package-json-file\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.naveedulhaq.com\/index.php\/js\/configure-package-json-file\/#primaryimage","url":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/01\/npm.png","contentUrl":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/01\/npm.png","width":298,"height":305,"caption":"npm cheat sheet"},{"@type":"BreadcrumbList","@id":"https:\/\/www.naveedulhaq.com\/index.php\/js\/configure-package-json-file\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.naveedulhaq.com\/"},{"@type":"ListItem","position":2,"name":"Configure package.json file"}]},{"@type":"WebSite","@id":"https:\/\/www.naveedulhaq.com\/#website","url":"https:\/\/www.naveedulhaq.com\/","name":"Naveed Ul-Haq's blog","description":"AI, Optimizely, Azure &amp; more","publisher":{"@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.naveedulhaq.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9","name":"Naveed Ul-Haq","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g","caption":"Naveed Ul-Haq"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g"},"description":"I lead engineering delivery teams for digital commerce and digital experience platforms, combining hands-on architecture experience with strong delivery governance. Over 20+ years, I\u2019ve built and led cross\u2011functional teams (engineering, BA, QA) delivering modern cloud solutions on Azure, microservices, APIs and eCommerce\/CMS platforms. My recent focus includes AI-enabled commerce automation: product ingestion and enrichment workflows, content optimisation for SEO and shopping feeds, and agentic tooling to improve marketing and accessibility workflows. I\u2019m passionate about building high-performing teams, establishing quality\/release standards, and delivering measurable outcomes across performance, reliability, and speed of change.","sameAs":["https:\/\/www.naveedulhaq.com","https:\/\/www.linkedin.com\/in\/naveedulhaq\/"]}]}},"_links":{"self":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/posts\/825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/comments?post=825"}],"version-history":[{"count":0,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/posts\/825\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/media\/805"}],"wp:attachment":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/media?parent=825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/categories?post=825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/tags?post=825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}