[{"data":1,"prerenderedAt":1453},["Reactive",2],{"navigation":3,"aAII9Cz3yR":204,"tags-pnpm":397},[4,192,200],{"title":5,"_path":6,"children":7,"icon":191},"Blog","/posts",[8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59,62,65,68,71,74,77,80,83,86,89,92,95,98,101,104,107,110,113,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,176,179,182,185,188],{"title":9,"_path":10},"Testing your API with REST Client","/posts/testing-your-api-with-rest-client",{"title":12,"_path":13},"HTML templating in Xamarin","/posts/html-templating-in-xamarin",{"title":15,"_path":16},"Goodbye Azure Portal, Welcome Azure CLI","/posts/welcome-azure-cli",{"title":18,"_path":19},"Coming across Gitpod","/posts/gitpod",{"title":21,"_path":22},"Handle token retrieval while querying an API","/posts/delegating-handler",{"title":24,"_path":25},"Clean up your local git branches.","/posts/cleaning-git-branches",{"title":27,"_path":28},"Automate configuration of Teams Tab SSO with PowerShell.","/posts/teams-sso-powershell",{"title":30,"_path":31},"How to do a technology watch? - Part 1","/posts/technology-watch-part1",{"title":33,"_path":34},"How to do a technology watch? - Part 2","/posts/technology-watch-part2",{"title":36,"_path":37},"You almost no longer need Key Vault references for Azure Functions.","/posts/azure-functions-custom-configuration",{"title":39,"_path":40},"How to do a technology watch? - Part 3","/posts/technology-watch-part3",{"title":42,"_path":43},"Forget DevOps, the future is already here!","/posts/devops-future",{"title":45,"_path":46},"Week 9, 2021 - Tips I learned this week","/posts/w09-2021-tips-learned-this-week",{"title":48,"_path":49},"Week 12, 2021 - Tips I learned this week","/posts/w12-2021-tips-learned-this-week",{"title":51,"_path":52},"Week 14, 2021 - Tips I learned this week","/posts/w14-2021-tips-learned-this-week",{"title":54,"_path":55},"Once upon a time in .NET","/posts/once-upon-a-time-in-dotnet",{"title":57,"_path":58},"Install your applications with winget","/posts/winget-import",{"title":60,"_path":61},"Customize your applications when installing them with winget","/posts/winget-override",{"title":63,"_path":64},"Week 22, 2021 - Tips I learned this week","/posts/w22-2021-tips-learned-this-week",{"title":66,"_path":67},"How to connect to an Azure SQL Database from C# using Azure AD","/posts/sqlclient-active-directory-authent",{"title":69,"_path":70},"Producing packages for Windows Package Manager","/posts/wingetcreate",{"title":72,"_path":73},"4 tips about GitHub Actions environment variables and contexts","/posts/github-actions-var-and-context",{"title":75,"_path":76},"AzureWebJobsStorage, the secret you don't need in your Function App.","/posts/azure-functions-without-azurewebjobsstorage",{"title":78,"_path":79},"ASP.NET Core - Lost in configuration","/posts/lost-in-configuration",{"title":81,"_path":82},"Week 39, 2021 - Tips I learned this week","/posts/w39-2021-tips-learned-this-week",{"title":84,"_path":85},"Week 41, 2021 - Tips I learned this week","/posts/w41-2021-tips-learned-this-week",{"title":87,"_path":88},"Migrating and open-sourcing my blog","/posts/migrating-blog",{"title":90,"_path":91},"Week 45, 2021 - Tips I learned this week","/posts/w45-2021-tips-learned-this-week",{"title":93,"_path":94},"Organize your GitHub stars with Astral","/posts/astral",{"title":96,"_path":97},"Pulumi with an Azure Blob Storage backend","/posts/pulumi-azure-backend",{"title":99,"_path":100},"IaC Hot Reload with Pulumi Watch","/posts/pulumi-watch",{"title":102,"_path":103},"Week 2, 2022 - Tips I learned this week","/posts/w02-2022-tips-learned-this-week",{"title":105,"_path":106},"Week 3, 2022 - Tips I learned this week","/posts/w03-2022-tips-learned-this-week",{"title":108,"_path":109},"Week 5, 2022 - Tips I learned this week","/posts/w05-2022-tips-learned-this-week",{"title":111,"_path":112},"How to provision an Azure SQL Database with Active Directory authentication","/posts/sqldatabase-active-directory-authent",{"title":114,"_path":115},"Why will I choose Pulumi over Terraform for my next project?","/posts/pulumi-vs-terraform",{"title":117,"_path":118},"Week 19, 2022 - Tips I learned this week","/posts/w19-2022-tips-learned-this-week",{"title":120,"_path":121},"Week 20, 2022 - Tips I learned this week","/posts/w20-2022-tips-learned-this-week",{"title":123,"_path":124},"Keeping secrets secure when using API Clients","/posts/http-clients-secrets",{"title":126,"_path":127},"What made me want to be a developer?","/posts/be-a-developer",{"title":129,"_path":130},"What can we do when stuck with a programming problem?","/posts/get-unstuck",{"title":132,"_path":133},"How did I automate the setup of my developer Windows laptop?","/posts/automate-developer-machine",{"title":135,"_path":136},"Discussion about API clients","/posts/http-clients",{"title":138,"_path":139},"Week 46, 2022 - Tips I learned this week","/posts/w46-2022-tips-learned-this-week",{"title":141,"_path":142},"When Pulumi met Nuke: a .NET love story","/posts/when-pulumi-met-nuke",{"title":144,"_path":145},"A year of learning and sharing - Dev Retro 2022","/posts/2022-retro",{"title":147,"_path":148},"Perform Dynamic Execution of an npm Package","/posts/pnpm-dlx",{"title":150,"_path":151},"Manage multiple Node.js versions","/posts/pnpm-env",{"title":153,"_path":154},"Introducing the Vue.js CI/CD series","/posts/vuecicd-introduction",{"title":156,"_path":157},"Execute commands using your project dependencies","/posts/pnpm-exec",{"title":159,"_path":160},"Vue.js CI/CD: Continuous Integration","/posts/vuecicd-ci",{"title":162,"_path":163},"Who is using pnpm?","/posts/pnpm-who-is-using",{"title":165,"_path":166},"Create an Azure-Ready GitHub Repository using Pulumi","/posts/azure-ready-github-repository",{"title":168,"_path":169},"Deploying to Azure from Azure DevOps without secrets","/posts/ado-workload-identity-federation",{"title":171,"_path":172},"Effortlessly Configure GitHub Repositories for Azure Deployment via OIDC","/posts/scripting-azure-ready-github-repository",{"title":174,"_path":175},"Playing with the .NET 8 Web API template","/posts/playing-with-dotnet8",{"title":177,"_path":178},"Another year of sharing and learning - Dev Retro 2023","/posts/2023-retro",{"title":180,"_path":181},"Week 4, 2024 - Tips I learned this week","/posts/w04-2024-tips-learned-this-week",{"title":183,"_path":184},"Using dependency injection with Azure .NET SDK","/posts/azure-sdk-di",{"title":186,"_path":187},"Having Fun With IT Event Calendars","/posts/it-event-calendars",{"title":189,"_path":190},"Call your Azure AD B2C protected API with authenticated HTTP requests from your JetBrains IDE","/posts/http-clients-oauth2","i-heroicons-newspaper",{"title":193,"_path":194,"children":195,"icon":199},"Goodies","/goodies",[196],{"title":197,"_path":198},"My Git Cheat Sheet","/goodies/gitcheatsheet","i-heroicons-gift-solid",{"title":201,"_path":202,"icon":203},"About","/about","i-heroicons-user-circle-solid",[205,207,209,211,214,217,220,223,226,229,231,234,237,240,242,244,247,250,253,255,258,261,264,267,270,273,276,279,282,285,287,289,292,294,297,300,303,305,308,310,313,316,319,322,325,327,329,332,335,338,341,344,347,350,353,356,359,361,363,366,369,372,375,377,380,383,385,388,391,394],[206,206],"tooling",[208,208],"vscode",[210,210],"rest",[212,213],"http","HTTP",[215,216],"razor","Razor",[218,219],"xamarin","Xamarin",[221,222],"templating","Templating",[224,225],"azure-cli","Azure CLI",[227,228],"azure","Azure",[230,230],"shell",[232,233],"github","GitHub",[235,236],"asp-net-core","ASP.NET Core",[238,239],"net",".NET",[241,241],"git",[243,243],"nushell",[245,246],"microsoft-teams","Microsoft Teams",[248,249],"powershell","PowerShell",[251,252],"azure-active-directory","Azure Active Directory",[254,254],"learning",[256,257],"azure-functions","Azure Functions",[259,260],"azure-key-vault","Azure Key Vault",[262,263],"configuration","Configuration",[265,266],"devops","DevOps",[268,269],"it","IT",[271,272],"tips-learned-this-week","tips learned this week",[274,275],"windows-terminal","Windows Terminal",[277,278],"azure-pipelines","Azure Pipelines",[280,281],"application-insights","Application Insights",[283,284],"azure-iot","Azure IoT",[286,286],"records",[288,288],"refit",[290,291],"development-box-setup","development box setup",[293,293],"winget",[295,296],"package-manager","package manager",[298,299],"azure-sql-database","Azure SQL Database",[301,302],"azure-sdk","Azure SDK",[304,304],"wingetcreate",[306,307],"github-actions","GitHub Actions",[309,309],"jq",[311,312],"pulumi","Pulumi",[314,315],"iac","IaC",[317,318],"azure-storage","Azure Storage",[320,321],"azure-signalr","Azure SignalR",[323,324],"visio","Visio",[326,326],"csharp",[328,328],"jest",[330,331],"statiq","Statiq",[333,334],"open-source","open source",[336,337],"visual-studio","Visual Studio",[339,340],"vue-js","Vue.js",[342,343],"azure-devops","Azure DevOps",[345,346],"vite","Vite",[348,349],"code-analysis","Code analysis",[351,352],"diagram","Diagram",[354,355],"terraform","Terraform",[357,358],"typescript","TypeScript",[360,360],"thoughts",[362,362],"pnpm",[364,365],"nuke","Nuke",[367,368],"pipelines","Pipelines",[370,371],"cicd","CI/CD",[373,374],"openid-connect","OpenID Connect",[376,376],"security",[378,379],"github-cli","GitHub CLI",[381,382],"microsoft-entra-id","Microsoft Entra ID",[384,384],"advent",[386,387],"finops","FinOps",[389,390],"anglesharp","AngleSharp",[392,393],"oauth2","OAuth2",[395,396],"azure-ad-b2c","Azure AD B2C",[398,633,823,1001,1196],{"_path":163,"_dir":399,"_draft":400,"_partial":400,"_locale":401,"title":162,"description":402,"lead":403,"date":404,"badge":405,"image":407,"tags":409,"canonical":410,"body":411,"_type":628,"_id":629,"_source":630,"_file":631,"_extension":632},"posts",false,"","You may have come across pnpm through discussions with fellow developers, reading blog posts, watching videos, or attending developer conferences. You have probably heard its praises: it's fast, disk-space efficient, and great for monorepos.","Discussion about pnpm usage and popularity.","2023-07-06T00:00:00.000Z",{"label":406},"Tooling",{"src":408},"/images/pnpm.png",[362,296,206],"https://bordeauxcoders.com/who-is-using-pnpm",{"type":412,"children":413,"toc":621},"root",[414,421,426,433,438,450,455,467,472,478,483,492,497,506,512,517,522,532,537,577,582,590,596,601,606,611,616],{"type":415,"tag":416,"props":417,"children":418},"element","p",{},[419],{"type":420,"value":402},"text",{"type":415,"tag":416,"props":422,"children":423},{},[424],{"type":420,"value":425},"However, you might wonder: who is actually using pnpm?",{"type":415,"tag":427,"props":428,"children":430},"h2",{"id":429},"a-growing-popularity",[431],{"type":420,"value":432},"A growing popularity",{"type":415,"tag":416,"props":434,"children":435},{},[436],{"type":420,"value":437},"At the time of writing, pnpm has over 24k stars on GitHub, and this number is rapidly increasing. The pnpm Twitter account maintains a thread that tracks the number of stars. Each time the GitHub repository gains 1k stars, a new tweet is posted. For quite some time now, it has been growing by 1K every two months.",{"type":415,"tag":439,"props":440,"children":444},"div",{"className":441},[442,443],"flex","justify-center",[445],{"type":415,"tag":446,"props":447,"children":449},"tweet",{"id":448},"1666004997840986116",[],{"type":415,"tag":416,"props":451,"children":452},{},[453],{"type":420,"value":454},"Another indicator of its growing popularity is its number of downloads. If you go to npm stats you can see how this number evolved compared to npm and yarn.",{"type":415,"tag":416,"props":456,"children":457},{},[458],{"type":415,"tag":459,"props":460,"children":466},"img",{"alt":461,"className":462,"src":465},"npm vs yarn vs pnpm downloads per day",[463,464],"rounded-lg","mx-auto","/posts/images/pnpm101_whouses_stats.webp",[],{"type":415,"tag":416,"props":468,"children":469},{},[470],{"type":420,"value":471},"I believe this diagram speaks for itself 🚀.",{"type":415,"tag":427,"props":473,"children":475},{"id":474},"which-companies-are-using-pnpm",[476],{"type":420,"value":477},"Which companies are using pnpm?",{"type":415,"tag":416,"props":479,"children":480},{},[481],{"type":420,"value":482},"There is a page on pnpm's documentation about well-known companies using pnpm.",{"type":415,"tag":416,"props":484,"children":485},{},[486],{"type":415,"tag":459,"props":487,"children":491},{"alt":488,"className":489,"src":490},"Screeshot of the documentation showing companies using pnpm",[463,464],"/posts/images/pnpm101_whouses_companies.webp",[],{"type":415,"tag":416,"props":493,"children":494},{},[495],{"type":420,"value":496},"You can also see some other companies on the StackShare website (but it seems not many companies took the time to fill in the fact that they were using pnpm in their stack).",{"type":415,"tag":416,"props":498,"children":499},{},[500],{"type":415,"tag":459,"props":501,"children":505},{"alt":502,"className":503,"src":504},"Screeshot of the StackShare page showing companies using pnpm",[463,464],"/posts/images/pnpm101_whouses_companies_2.webp",[],{"type":415,"tag":427,"props":507,"children":509},{"id":508},"which-popular-open-source-projects-are-using-pnpm",[510],{"type":420,"value":511},"Which popular open-source projects are using pnpm?",{"type":415,"tag":416,"props":513,"children":514},{},[515],{"type":420,"value":516},"If you see a pnpm-lock.yaml or a pnpm-workspace.yaml file in a GitHub repository, then that project is definitively using pnpm to manage its dependencies. You can use this technique to find GitHub projects using pnpm by querying them with GitHub code search.",{"type":415,"tag":416,"props":518,"children":519},{},[520],{"type":420,"value":521},"I thought it would be interesting to explore which package managers are utilized in the development of popular JavaScript framework projects. And guess what? Many JavaScript frameworks are developed using pnpm 💖.",{"type":415,"tag":523,"props":524,"children":526},"callout",{"icon":525},"i-heroicons-light-bulb",[527],{"type":415,"tag":416,"props":528,"children":529},{},[530],{"type":420,"value":531},"To check that these projects were using pnpm, I not only verify the presence of pnpm specific files but also checked their continuous integration pipelines (contained in the .github folder) to see what they were using to manage their dependencies.",{"type":415,"tag":416,"props":533,"children":534},{},[535],{"type":420,"value":536},"Here is a non-exhaustive list of popular JavaScript web frameworks that use pnpm as their package manager:",{"type":415,"tag":538,"props":539,"children":540},"ul",{},[541,547,552,557,562,567,572],{"type":415,"tag":542,"props":543,"children":544},"li",{},[545],{"type":420,"value":546},"Vue",{"type":415,"tag":542,"props":548,"children":549},{},[550],{"type":420,"value":551},"Nuxt",{"type":415,"tag":542,"props":553,"children":554},{},[555],{"type":420,"value":556},"Next.js",{"type":415,"tag":542,"props":558,"children":559},{},[560],{"type":420,"value":561},"SvelteKit",{"type":415,"tag":542,"props":563,"children":564},{},[565],{"type":420,"value":566},"SolidStart",{"type":415,"tag":542,"props":568,"children":569},{},[570],{"type":420,"value":571},"Astro",{"type":415,"tag":542,"props":573,"children":574},{},[575],{"type":420,"value":576},"Qwik",{"type":415,"tag":416,"props":578,"children":579},{},[580],{"type":420,"value":581},"That's quite an impressive list: most modern JavaScript web frameworks seem to have chosen pnpm. That's also the case for popular frontend tooling projects like Vite or Turbo.",{"type":415,"tag":523,"props":583,"children":584},{"icon":525},[585],{"type":415,"tag":416,"props":586,"children":587},{},[588],{"type":420,"value":589},"The fact that pnpm is utilized by maintainers for internal development of these frameworks does not imply that these frameworks can only be used with pnpm. Typically, JavaScript frameworks are \"package manager\" agnostic, allowing you to use your preferred package manager when developing a project with one of these frameworks.",{"type":415,"tag":427,"props":591,"children":593},{"id":592},"should-you-use-pnpm-because-others-do",[594],{"type":420,"value":595},"Should you use pnpm because others do?",{"type":415,"tag":416,"props":597,"children":598},{},[599],{"type":420,"value":600},"Short answer: no.",{"type":415,"tag":416,"props":602,"children":603},{},[604],{"type":420,"value":605},"Choosing a technology solely based on its popularity is not advisable. While popularity is a factor to consider, it should not be the only determining aspect. Thus, you should not use pnpm because well-known companies or popular open-source projects use it.",{"type":415,"tag":416,"props":607,"children":608},{},[609],{"type":420,"value":610},"However (and here's the long answer 😉), you should consider exploring pnpm, as there must be a reason why all these intelligent individuals have chosen it over npm or yarn. Investigate the issues pnpm resolves for them; perhaps you face similar challenges in your projects. See what problems pnpm solves for them, maybe you have the same problems in your projects. You might not even be aware of certain problems (such as lengthy CI due to time-consuming package installations, excessive space occupied by node modules, or issues with hoisted node modules), but pnpm could potentially make some things easier. Nevertheless, if you are satisfied with your current package manager, there is no need to switch just to imitate the popular frameworks projects.",{"type":415,"tag":416,"props":612,"children":613},{},[614],{"type":420,"value":615},"I believe people are familiar with npm since it is the default package manager for Node.js projects. They might also know about yarn because it was initially developed by Facebook (who created React) and addressed some issues with npm. However, people recognize and utilize pnpm due to its performance and ability to resolve the problems they might encounter with npm package management. That's also why I use pnpm; it does the job, and it does it quickly.",{"type":415,"tag":416,"props":617,"children":618},{},[619],{"type":420,"value":620},"Now you know that you're not alone in using pnpm; from renowned companies to popular open-source projects, many people are utilizing it.",{"title":401,"searchDepth":622,"depth":622,"links":623},2,[624,625,626,627],{"id":429,"depth":622,"text":432},{"id":474,"depth":622,"text":477},{"id":508,"depth":622,"text":511},{"id":592,"depth":622,"text":595},"markdown","content:1.posts:52.pnpm-who-is-using.md","content","1.posts/52.pnpm-who-is-using.md","md",{"_path":157,"_dir":399,"_draft":400,"_partial":400,"_locale":401,"title":156,"description":634,"lead":635,"date":636,"image":637,"badge":638,"tags":639,"canonical":640,"body":641,"_type":628,"_id":821,"_source":630,"_file":822,"_extension":632},"You have a dependency in your project and want to execute a command using it? The pnpm exec command can help you with that.","pnpm exec","2023-06-15T00:00:00.000Z",{"src":408},{"label":406},[362,296,206],"https://bordeauxcoders.com/execute-commands-using-your-project-dependencies",{"type":412,"children":642,"toc":816},[643,658,664,713,725,731,757,763,768,798,810],{"type":415,"tag":416,"props":644,"children":645},{},[646,648,656],{"type":420,"value":647},"You have a dependency in your project and want to execute a command using it? The ",{"type":415,"tag":649,"props":650,"children":654},"a",{"href":651,"rel":652},"https://pnpm.io/cli/exec",[653],"nofollow",[655],{"type":420,"value":635},{"type":420,"value":657}," command can help you with that.",{"type":415,"tag":427,"props":659,"children":661},{"id":660},"an-example",[662],{"type":420,"value":663},"An example",{"type":415,"tag":665,"props":666,"children":670},"pre",{"className":667,"code":668,"language":669,"meta":401,"style":401},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight"," pnpm exec eslint . --ext .ts\n","bash",[671],{"type":415,"tag":672,"props":673,"children":674},"code",{"__ignoreMap":401},[675],{"type":415,"tag":676,"props":677,"children":680},"span",{"class":678,"line":679},"line",1,[681,687,693,698,703,708],{"type":415,"tag":676,"props":682,"children":684},{"style":683},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[685],{"type":420,"value":686}," pnpm",{"type":415,"tag":676,"props":688,"children":690},{"style":689},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[691],{"type":420,"value":692}," exec",{"type":415,"tag":676,"props":694,"children":695},{"style":689},[696],{"type":420,"value":697}," eslint",{"type":415,"tag":676,"props":699,"children":700},{"style":689},[701],{"type":420,"value":702}," .",{"type":415,"tag":676,"props":704,"children":705},{"style":689},[706],{"type":420,"value":707}," --ext",{"type":415,"tag":676,"props":709,"children":710},{"style":689},[711],{"type":420,"value":712}," .ts\n",{"type":415,"tag":416,"props":714,"children":715},{},[716,718,723],{"type":420,"value":717},"Given that ESLint is a project dependency, this example shows how to use the ",{"type":415,"tag":672,"props":719,"children":721},{"className":720},[],[722],{"type":420,"value":635},{"type":420,"value":724}," command to run the ESLint tool on all TypeScript files within the project.",{"type":415,"tag":427,"props":726,"children":728},{"id":727},"some-use-cases",[729],{"type":420,"value":730},"Some use cases",{"type":415,"tag":538,"props":732,"children":733},{},[734,739,744],{"type":415,"tag":542,"props":735,"children":736},{},[737],{"type":420,"value":738},"You need to do a specific command that is not part of your npm scripts",{"type":415,"tag":542,"props":740,"children":741},{},[742],{"type":420,"value":743},"You want to execute a tool that is a dependency of your project without having to install it globally",{"type":415,"tag":542,"props":745,"children":746},{},[747,749,755],{"type":420,"value":748},"You need to execute a CLI package command in a CI pipeline, and this package is already included in the ",{"type":415,"tag":672,"props":750,"children":752},{"className":751},[],[753],{"type":420,"value":754},"devDependencies",{"type":420,"value":756}," of your project.",{"type":415,"tag":427,"props":758,"children":760},{"id":759},"good-to-know",[761],{"type":420,"value":762},"Good to know",{"type":415,"tag":416,"props":764,"children":765},{},[766],{"type":420,"value":767},"If the command you are using does not conflict with a built-in pnpm command, there is no need to specify 'exec'. Referring to the previous example, you can simply run:",{"type":415,"tag":665,"props":769,"children":771},{"className":667,"code":770,"language":669,"meta":401,"style":401}," pnpm eslint . --ext .ts\n",[772],{"type":415,"tag":672,"props":773,"children":774},{"__ignoreMap":401},[775],{"type":415,"tag":676,"props":776,"children":777},{"class":678,"line":679},[778,782,786,790,794],{"type":415,"tag":676,"props":779,"children":780},{"style":683},[781],{"type":420,"value":686},{"type":415,"tag":676,"props":783,"children":784},{"style":689},[785],{"type":420,"value":697},{"type":415,"tag":676,"props":787,"children":788},{"style":689},[789],{"type":420,"value":702},{"type":415,"tag":676,"props":791,"children":792},{"style":689},[793],{"type":420,"value":707},{"type":415,"tag":676,"props":795,"children":796},{"style":689},[797],{"type":420,"value":712},{"type":415,"tag":416,"props":799,"children":800},{},[801,803,808],{"type":420,"value":802},"It's one of the small details that make using ",{"type":415,"tag":672,"props":804,"children":806},{"className":805},[],[807],{"type":420,"value":362},{"type":420,"value":809}," so pleasant.",{"type":415,"tag":811,"props":812,"children":813},"style",{},[814],{"type":420,"value":815},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":401,"searchDepth":622,"depth":622,"links":817},[818,819,820],{"id":660,"depth":622,"text":663},{"id":727,"depth":622,"text":730},{"id":759,"depth":622,"text":762},"content:1.posts:50.pnpm-exec.md","1.posts/50.pnpm-exec.md",{"_path":151,"_dir":399,"_draft":400,"_partial":400,"_locale":401,"title":150,"description":824,"lead":825,"date":826,"image":827,"badge":828,"tags":829,"canonical":830,"body":831,"_type":628,"_id":999,"_source":630,"_file":1000,"_extension":632},"If you are working on various projects, you have likely encountered situations where you need to have multiple versions of Node.js installed on your computer.","pnpm env","2023-05-25T00:00:00.000Z",{"src":408},{"label":406},[362,296,206],"https://bordeauxcoders.com/manage-multiple-nodejs-versions",{"type":412,"children":832,"toc":994},[833,837,854,858,892,897,902,908,913,927,931,964,990],{"type":415,"tag":416,"props":834,"children":835},{},[836],{"type":420,"value":824},{"type":415,"tag":416,"props":838,"children":839},{},[840,842,852],{"type":420,"value":841},"You might not know it, but managing multiple Node.js versions is something you can do with pnpm, using the ",{"type":415,"tag":649,"props":843,"children":846},{"href":844,"rel":845},"https://pnpm.io/fr/cli/env",[653],[847],{"type":415,"tag":672,"props":848,"children":850},{"className":849},[],[851],{"type":420,"value":825},{"type":420,"value":853}," command.",{"type":415,"tag":427,"props":855,"children":856},{"id":660},[857],{"type":420,"value":663},{"type":415,"tag":665,"props":859,"children":861},{"className":667,"code":860,"language":669,"meta":401,"style":401},"pnpm env use -g lts \n",[862],{"type":415,"tag":672,"props":863,"children":864},{"__ignoreMap":401},[865],{"type":415,"tag":676,"props":866,"children":867},{"class":678,"line":679},[868,872,877,882,887],{"type":415,"tag":676,"props":869,"children":870},{"style":683},[871],{"type":420,"value":362},{"type":415,"tag":676,"props":873,"children":874},{"style":689},[875],{"type":420,"value":876}," env",{"type":415,"tag":676,"props":878,"children":879},{"style":689},[880],{"type":420,"value":881}," use",{"type":415,"tag":676,"props":883,"children":884},{"style":689},[885],{"type":420,"value":886}," -g",{"type":415,"tag":676,"props":888,"children":889},{"style":689},[890],{"type":420,"value":891}," lts\n",{"type":415,"tag":416,"props":893,"children":894},{},[895],{"type":420,"value":896},"This example demonstrates how to install the LTS version of Node.js.",{"type":415,"tag":416,"props":898,"children":899},{},[900],{"type":420,"value":901},"Additionally, you can install specific versions of Node.js, view the versions already present on your computer, or remove one.",{"type":415,"tag":427,"props":903,"children":905},{"id":904},"why-use-pnpm-as-your-node-version-manager",[906],{"type":420,"value":907},"Why use pnpm as your Node version manager?",{"type":415,"tag":416,"props":909,"children":910},{},[911],{"type":420,"value":912},"Because managing your Node.js version is built into pnpm: if you already use pnpm as your npm package manager, you don't need to install another tool.",{"type":415,"tag":416,"props":914,"children":915},{},[916,918,925],{"type":420,"value":917},"But there is absolutely nothing wrong with using another Node version manager if you prefer. I was using ",{"type":415,"tag":649,"props":919,"children":922},{"href":920,"rel":921},"https://github.com/coreybutler/nvm-windows",[653],[923],{"type":420,"value":924},"nvm-windows",{"type":420,"value":926}," before and I was happy with it. I just don't see the point of installing it anymore as similar functionality is already available in pnpm.",{"type":415,"tag":427,"props":928,"children":929},{"id":759},[930],{"type":420,"value":762},{"type":415,"tag":416,"props":932,"children":933},{},[934,936,947,949,955,962],{"type":420,"value":935},"To specify a Node.js version to use in a project/folder, you can add an ",{"type":415,"tag":649,"props":937,"children":940},{"href":938,"rel":939},"https://pnpm.io/fr/npmrc",[653],[941],{"type":415,"tag":672,"props":942,"children":944},{"className":943},[],[945],{"type":420,"value":946},".npmrc",{"type":420,"value":948}," file ",{"type":415,"tag":672,"props":950,"children":952},{"className":951},[],[953],{"type":420,"value":954},"use-node-version",{"type":415,"tag":649,"props":956,"children":959},{"href":957,"rel":958},"https://pnpm.io/fr/npmrc#use-node-version",[653],[960],{"type":420,"value":961},"​",{"type":420,"value":963}," setting, like that:",{"type":415,"tag":665,"props":965,"children":967},{"className":667,"code":966,"language":669,"meta":401,"style":401},"use-node-version=16.16.0\n",[968],{"type":415,"tag":672,"props":969,"children":970},{"__ignoreMap":401},[971],{"type":415,"tag":676,"props":972,"children":973},{"class":678,"line":679},[974,979,985],{"type":415,"tag":676,"props":975,"children":977},{"style":976},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[978],{"type":420,"value":954},{"type":415,"tag":676,"props":980,"children":982},{"style":981},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[983],{"type":420,"value":984},"=",{"type":415,"tag":676,"props":986,"children":987},{"style":689},[988],{"type":420,"value":989},"16.16.0\n",{"type":415,"tag":811,"props":991,"children":992},{},[993],{"type":420,"value":815},{"title":401,"searchDepth":622,"depth":622,"links":995},[996,997,998],{"id":660,"depth":622,"text":663},{"id":904,"depth":622,"text":907},{"id":759,"depth":622,"text":762},"content:1.posts:48.pnpm-env.md","1.posts/48.pnpm-env.md",{"_path":148,"_dir":399,"_draft":400,"_partial":400,"_locale":401,"title":147,"description":1002,"lead":1003,"date":1004,"image":1005,"badge":1006,"tags":1007,"canonical":1008,"body":1009,"_type":628,"_id":1194,"_source":630,"_file":1195,"_extension":632},"Sometimes, all you want to do is grab an npm package and execute a command with it, without having to install it (whether globally or as a dependency).","pnpm dlx","2023-05-18T00:00:00.000Z",{"src":408},{"label":406},[362,296,206],"https://bordeauxcoders.com/perform-dynamic-execution-of-an-npm-package",{"type":412,"children":1010,"toc":1189},[1011,1015,1032,1036,1065,1085,1098,1102,1141,1145,1185],{"type":415,"tag":416,"props":1012,"children":1013},{},[1014],{"type":420,"value":1002},{"type":415,"tag":416,"props":1016,"children":1017},{},[1018,1020,1030],{"type":420,"value":1019},"That's what you can do with ",{"type":415,"tag":649,"props":1021,"children":1024},{"href":1022,"rel":1023},"https://pnpm.io/cli/dlx",[653],[1025],{"type":415,"tag":672,"props":1026,"children":1028},{"className":1027},[],[1029],{"type":420,"value":1003},{"type":420,"value":1031},".",{"type":415,"tag":427,"props":1033,"children":1034},{"id":660},[1035],{"type":420,"value":663},{"type":415,"tag":665,"props":1037,"children":1039},{"className":667,"code":1038,"language":669,"meta":401,"style":401},"pnpm dlx vercel deploy\n",[1040],{"type":415,"tag":672,"props":1041,"children":1042},{"__ignoreMap":401},[1043],{"type":415,"tag":676,"props":1044,"children":1045},{"class":678,"line":679},[1046,1050,1055,1060],{"type":415,"tag":676,"props":1047,"children":1048},{"style":683},[1049],{"type":420,"value":362},{"type":415,"tag":676,"props":1051,"children":1052},{"style":689},[1053],{"type":420,"value":1054}," dlx",{"type":415,"tag":676,"props":1056,"children":1057},{"style":689},[1058],{"type":420,"value":1059}," vercel",{"type":415,"tag":676,"props":1061,"children":1062},{"style":689},[1063],{"type":420,"value":1064}," deploy\n",{"type":415,"tag":416,"props":1066,"children":1067},{},[1068,1070,1077,1079,1084],{"type":420,"value":1069},"This example shows how to use the ",{"type":415,"tag":649,"props":1071,"children":1074},{"href":1072,"rel":1073},"https://vercel.com/docs/cli",[653],[1075],{"type":420,"value":1076},"vercel CLI package",{"type":420,"value":1078}," without having to install it thanks to ",{"type":415,"tag":672,"props":1080,"children":1082},{"className":1081},[],[1083],{"type":420,"value":1003},{"type":420,"value":1031},{"type":415,"tag":416,"props":1086,"children":1087},{},[1088,1090,1096],{"type":420,"value":1089},"In this example, pnpm downloads the vercel package, and executes it with the command ",{"type":415,"tag":672,"props":1091,"children":1093},{"className":1092},[],[1094],{"type":420,"value":1095},"deploy",{"type":420,"value":1097}," (that deploys a project to the Vercel platform).",{"type":415,"tag":427,"props":1099,"children":1100},{"id":727},[1101],{"type":420,"value":730},{"type":415,"tag":538,"props":1103,"children":1104},{},[1105,1110,1115,1120],{"type":415,"tag":542,"props":1106,"children":1107},{},[1108],{"type":420,"value":1109},"You don't want to install globally a package because you only need to execute its binary script once",{"type":415,"tag":542,"props":1111,"children":1112},{},[1113],{"type":420,"value":1114},"You don't want a package to be a dev dependency of your project, or you are not using it in the context of a Node project",{"type":415,"tag":542,"props":1116,"children":1117},{},[1118],{"type":420,"value":1119},"You need to execute a CLI package command from a CI pipeline",{"type":415,"tag":542,"props":1121,"children":1122},{},[1123,1125,1131,1133,1139],{"type":420,"value":1124},"You want to ensure you use the latest version of a package (useful for starter kits like ",{"type":415,"tag":672,"props":1126,"children":1128},{"className":1127},[],[1129],{"type":420,"value":1130},"create-vite",{"type":420,"value":1132},", or ",{"type":415,"tag":672,"props":1134,"children":1136},{"className":1135},[],[1137],{"type":420,"value":1138},"create-vue",{"type":420,"value":1140},")",{"type":415,"tag":427,"props":1142,"children":1143},{"id":759},[1144],{"type":420,"value":762},{"type":415,"tag":416,"props":1146,"children":1147},{},[1148,1150,1161,1163,1168,1170,1176,1178,1184],{"type":420,"value":1149},"For starter kits, you can use ",{"type":415,"tag":649,"props":1151,"children":1154},{"href":1152,"rel":1153},"https://pnpm.io/cli/create",[653],[1155],{"type":415,"tag":672,"props":1156,"children":1158},{"className":1157},[],[1159],{"type":420,"value":1160},"pnpm create",{"type":420,"value":1162}," instead of ",{"type":415,"tag":672,"props":1164,"children":1166},{"className":1165},[],[1167],{"type":420,"value":1003},{"type":420,"value":1169},". For instance, executing ",{"type":415,"tag":672,"props":1171,"children":1173},{"className":1172},[],[1174],{"type":420,"value":1175},"pnpm create vue",{"type":420,"value":1177}," is equivalent to executing ",{"type":415,"tag":672,"props":1179,"children":1181},{"className":1180},[],[1182],{"type":420,"value":1183},"pnpm dlx create-vue",{"type":420,"value":1031},{"type":415,"tag":811,"props":1186,"children":1187},{},[1188],{"type":420,"value":815},{"title":401,"searchDepth":622,"depth":622,"links":1190},[1191,1192,1193],{"id":660,"depth":622,"text":663},{"id":727,"depth":622,"text":730},{"id":759,"depth":622,"text":762},"content:1.posts:47.pnpm-dlx.md","1.posts/47.pnpm-dlx.md",{"_path":139,"_dir":399,"_draft":400,"_partial":400,"_locale":401,"title":138,"description":1197,"lead":1197,"date":1198,"image":1199,"badge":1201,"tags":1203,"body":1204,"_type":628,"_id":1451,"_source":630,"_file":1452,"_extension":632},"Some tips about .NET, pnpm, and Azure DevOps.","2022-11-20T00:00:00.000Z",{"src":1200},"/images/surface_1.jpg",{"label":1202},"Tips",[272,239,293,362,296,208,343,206],{"type":412,"children":1205,"toc":1446},[1206,1212,1226,1248,1271,1277,1308,1313,1322,1334,1343,1351,1356,1366,1375,1389,1395,1400,1410,1428,1437,1442],{"type":415,"tag":427,"props":1207,"children":1209},{"id":1208},"net-tip-of-the-week-install-net-7-using-winget",[1210],{"type":420,"value":1211},".NET tip of the week: install .NET 7 using winget",{"type":415,"tag":416,"props":1213,"children":1214},{},[1215,1217,1224],{"type":420,"value":1216},"This week, I installed .NET 7 on my laptop and I used ",{"type":415,"tag":649,"props":1218,"children":1221},{"href":1219,"rel":1220},"https://learn.microsoft.com/en-us/windows/package-manager/",[653],[1222],{"type":420,"value":1223},"Windows Package Manager",{"type":420,"value":1225}," for that:",{"type":415,"tag":665,"props":1227,"children":1230},{"className":1228,"code":1229,"language":248,"meta":401,"style":401},"language-powershell shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","winget install Microsoft.DotNet.SDK.7\n",[1231],{"type":415,"tag":672,"props":1232,"children":1233},{"__ignoreMap":401},[1234],{"type":415,"tag":676,"props":1235,"children":1236},{"class":678,"line":679},[1237,1242],{"type":415,"tag":676,"props":1238,"children":1239},{"style":976},[1240],{"type":420,"value":1241},"winget install Microsoft.DotNet.SDK.",{"type":415,"tag":676,"props":1243,"children":1245},{"style":1244},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1246],{"type":420,"value":1247},"7\n",{"type":415,"tag":416,"props":1249,"children":1250},{},[1251,1253,1260,1262,1269],{"type":420,"value":1252},"I like winget, I have already written a few articles about it (you can find them ",{"type":415,"tag":649,"props":1254,"children":1257},{"href":1255,"rel":1256},"https://www.techwatching.dev/tags/winget/",[653],[1258],{"type":420,"value":1259},"here",{"type":420,"value":1261},") so I am really glad to see that we can now use winget to install .NET (whether it be the SDKs or the runtimes). You can check ",{"type":415,"tag":649,"props":1263,"children":1266},{"href":1264,"rel":1265},"https://devblogs.microsoft.com/dotnet/dotnet-now-on-windows-package-manager/",[653],[1267],{"type":420,"value":1268},"Microsoft's article",{"type":420,"value":1270}," announcing it for more information.",{"type":415,"tag":427,"props":1272,"children":1274},{"id":1273},"tool-of-the-week-pnpm",[1275],{"type":420,"value":1276},"Tool of the week: pnpm",{"type":415,"tag":416,"props":1278,"children":1279},{},[1280,1282,1288,1290,1297,1299,1306],{"type":420,"value":1281},"I don't know which JavaScript package manager you are using but since I tried ",{"type":415,"tag":649,"props":1283,"children":1286},{"href":1284,"rel":1285},"https://pnpm.io/",[653],[1287],{"type":420,"value":362},{"type":420,"value":1289}," I don't want to use anything else because it's so fast! If you are interested to know why it's so fast and better than npm for instance, you can watch the talk ",{"type":415,"tag":649,"props":1291,"children":1294},{"href":1292,"rel":1293},"https://viteconf.org/2022/replay/pnpm",[653],[1295],{"type":420,"value":1296},"\"What makes pnpm performant\"",{"type":420,"value":1298}," that Zoltan Kochan gave at Vite Conf. Many ",{"type":415,"tag":649,"props":1300,"children":1303},{"href":1301,"rel":1302},"https://pnpm.io/workspaces#usage-examples",[653],[1304],{"type":420,"value":1305},"popular open-source projects",{"type":420,"value":1307}," like Vite and Vue are using pnpm.",{"type":415,"tag":416,"props":1309,"children":1310},{},[1311],{"type":420,"value":1312},"Here are some tips about pnpm:",{"type":415,"tag":1314,"props":1315,"children":1316},"ol",{},[1317],{"type":415,"tag":542,"props":1318,"children":1319},{},[1320],{"type":420,"value":1321},"You can use pnpm to manage Node.js versions on your machine",{"type":415,"tag":416,"props":1323,"children":1324},{},[1325,1327,1332],{"type":420,"value":1326},"Previously, I was using ",{"type":415,"tag":649,"props":1328,"children":1330},{"href":920,"rel":1329},[653],[1331],{"type":420,"value":924},{"type":420,"value":1333}," to manage multiple installation of Node.js on my laptop and it worked fine. Yet I can now do that directly using pnpm env command:",{"type":415,"tag":416,"props":1335,"children":1336},{},[1337],{"type":415,"tag":459,"props":1338,"children":1342},{"alt":1339,"className":1340,"src":1341},"Output of the pnpm env command in a terminal.",[463,464],"/posts/images/w462022tips_pnpm_env.png",[],{"type":415,"tag":1314,"props":1344,"children":1345},{"start":622},[1346],{"type":415,"tag":542,"props":1347,"children":1348},{},[1349],{"type":420,"value":1350},"You can configure vscode to run npm scripts using pnpm",{"type":415,"tag":416,"props":1352,"children":1353},{},[1354],{"type":420,"value":1355},"A lot of the people I know don't use the scripts explorer of vscode to run the scripts contained in the package.json file of the project opened in vscode. It's a pity because it is an handy feature. And you can configure it in your settings to run scripts using a specific package manager, pnpm in my case.",{"type":415,"tag":416,"props":1357,"children":1358},{},[1359],{"type":415,"tag":459,"props":1360,"children":1365},{"alt":1361,"className":1362,"src":1363,"width":1364},"Npm scripts view in vscode editor.",[463,464],"/posts/images/w462022tips_pnpm_scripts.png",600,[],{"type":415,"tag":1314,"props":1367,"children":1369},{"start":1368},3,[1370],{"type":415,"tag":542,"props":1371,"children":1372},{},[1373],{"type":420,"value":1374},"With pnpm, you can use aliases for packages you install",{"type":415,"tag":416,"props":1376,"children":1377},{},[1378,1380,1387],{"type":420,"value":1379},"Check the ",{"type":415,"tag":649,"props":1381,"children":1384},{"href":1382,"rel":1383},"https://pnpm.io/aliases",[653],[1385],{"type":420,"value":1386},"documentation",{"type":420,"value":1388}," to see why and how to use this feature.",{"type":415,"tag":427,"props":1390,"children":1392},{"id":1391},"the-gitlensazure-devops-tip-you-did-not-know-about-autolinks",[1393],{"type":420,"value":1394},"The GitLens/Azure DevOps tip you did not know about: autolinks",{"type":415,"tag":416,"props":1396,"children":1397},{},[1398],{"type":420,"value":1399},"GitLens, the awesome extension for vscode has a nice feature called \"autolinks\" that can make external references in your commit messages clickable links.",{"type":415,"tag":416,"props":1401,"children":1402},{},[1403],{"type":415,"tag":459,"props":1404,"children":1409},{"alt":1405,"className":1406,"src":1407,"width":1408},"Autolinks GitLens settings view in vscode.",[463,464],"/posts/images/w462022tips_gitlens_autolink_1.png",1000,[],{"type":415,"tag":416,"props":1411,"children":1412},{},[1413,1415,1422],{"type":420,"value":1414},"If you are using Azure DevOps, this feature can become very handy for you commit messages that contain references to work items (usually an hasjtag followed by the work item number). You just have to configure # as the prefix and ",{"type":415,"tag":649,"props":1416,"children":1419},{"href":1417,"rel":1418},"https://dev.azure.com/%7BorganizationName%7D/%7BprojectName%7D/_workitems/edit/",[653],[1420],{"type":420,"value":1421},"https://dev.azure.com/{organizationName}/{projectName}/_workitems/edit/",{"type":415,"tag":1423,"props":1424,"children":1425},"num",{},[1426],{"type":420,"value":1427}," as the URL) to make it work.",{"type":415,"tag":416,"props":1429,"children":1430},{},[1431],{"type":415,"tag":459,"props":1432,"children":1436},{"alt":1433,"className":1434,"src":1435,"width":1408},"A commit GitLens popin in vscode with an Azure DevOps link.",[463,464],"/posts/images/w462022tips_gitlens_autolink_2.png",[],{"type":415,"tag":416,"props":1438,"children":1439},{},[1440],{"type":420,"value":1441},"And that's it for this week, happy learning!",{"type":415,"tag":811,"props":1443,"children":1444},{},[1445],{"type":420,"value":815},{"title":401,"searchDepth":622,"depth":622,"links":1447},[1448,1449,1450],{"id":1208,"depth":622,"text":1211},{"id":1273,"depth":622,"text":1276},{"id":1391,"depth":622,"text":1394},"content:1.posts:44.w46-2022-tips-learned-this-week.md","1.posts/44.w46-2022-tips-learned-this-week.md",1716749600652]