From 6af11308f36fca9f9555efa517f89878cc483033 Mon Sep 17 00:00:00 2001 From: "Evgenij (Eugene) Beloded" Date: Wed, 12 May 2021 11:52:46 +0700 Subject: [PATCH 1/7] Add pnpm example --- examples.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/examples.md b/examples.md index f3d6788..0f46161 100644 --- a/examples.md +++ b/examples.md @@ -240,6 +240,17 @@ The yarn cache directory will depend on your operating system and version of `ya ``` +## Node - Pnpm + +```yaml + - name: Cache .pnpm-store + uses: actions/cache@v2 + with: + path: ~/.pnpm-store + key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}``` +``` + + ## Node - Yarn 2 The yarn 2 cache directory will depend on your config. See https://yarnpkg.com/configuration/yarnrc#cacheFolder for more info. From 380cc927a2f397b625abd4bb9b6714f2cd875a03 Mon Sep 17 00:00:00 2001 From: "Evgenij (Eugene) Beloded" Date: Wed, 2 Jun 2021 10:47:41 +0700 Subject: [PATCH 2/7] Set correct path on windows Co-authored-by: Amin Yahyaabadi --- examples.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples.md b/examples.md index 0f46161..394ca0e 100644 --- a/examples.md +++ b/examples.md @@ -246,7 +246,9 @@ The yarn cache directory will depend on your operating system and version of `ya - name: Cache .pnpm-store uses: actions/cache@v2 with: - path: ~/.pnpm-store + path: | + ~/.pnpm-store + D:\.pnpm-store key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}``` ``` From c49fc7ae78ef9360eb4d842d9d5e3dc01fe4b021 Mon Sep 17 00:00:00 2001 From: "Evgenij (Eugene) Beloded" Date: Mon, 7 Jun 2021 08:04:55 +0700 Subject: [PATCH 3/7] Add restore-keys Co-authored-by: Amin Yahyaabadi --- examples.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples.md b/examples.md index 638a49d..042417a 100644 --- a/examples.md +++ b/examples.md @@ -287,7 +287,9 @@ The yarn cache directory will depend on your operating system and version of `ya path: | ~/.pnpm-store D:\.pnpm-store - key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}``` + key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }} ``` From 107a4cb2c9c91415587da73f87aa7a0d59834ea8 Mon Sep 17 00:00:00 2001 From: "Evgenij (Eugene) Beloded" Date: Mon, 9 Aug 2021 08:02:27 +0700 Subject: [PATCH 4/7] Add link to Node - pnpm section in TOC --- examples.md | 1 + 1 file changed, 1 insertion(+) diff --git a/examples.md b/examples.md index 36d85d2..801eda8 100644 --- a/examples.md +++ b/examples.md @@ -17,6 +17,7 @@ - [Windows](#windows-2) - [Using multiple systems and `npm config`](#using-multiple-systems-and-npm-config) - [Node - Lerna](#node---lerna) +- [Node - Yarn](#node---pnpm) - [Node - Yarn](#node---yarn) - [Node - Yarn 2](#node---yarn-2) - [OCaml/Reason - esy](#ocamlreason---esy) From e496d23e27af10302270e2313703352739f9591c Mon Sep 17 00:00:00 2001 From: "Evgenij (Eugene) Beloded" Date: Mon, 9 Aug 2021 08:09:12 +0700 Subject: [PATCH 5/7] Add node_modules to the list of cached resources (pnpm) Caching `node_modules` allows to make the `pnpm install` step instantaneous --- examples.md | 1 + 1 file changed, 1 insertion(+) diff --git a/examples.md b/examples.md index 801eda8..4edf04e 100644 --- a/examples.md +++ b/examples.md @@ -288,6 +288,7 @@ The yarn cache directory will depend on your operating system and version of `ya path: | ~/.pnpm-store D:\.pnpm-store + **/node_modules key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }} From 49a70f556efcf140300c256c17d69bc868c2c028 Mon Sep 17 00:00:00 2001 From: "Evgenij (Eugene) Beloded" Date: Mon, 9 Aug 2021 08:59:16 +0700 Subject: [PATCH 6/7] pnpm example: add -pnpm- in cache key --- examples.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples.md b/examples.md index 4edf04e..4b559c9 100644 --- a/examples.md +++ b/examples.md @@ -289,7 +289,7 @@ The yarn cache directory will depend on your operating system and version of `ya ~/.pnpm-store D:\.pnpm-store **/node_modules - key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }} ``` From 83569a7fa2f7bcb3e6dd487654d7f00519923286 Mon Sep 17 00:00:00 2001 From: "Evgenij (Eugene) Beloded" Date: Tue, 17 Aug 2021 14:38:43 +0700 Subject: [PATCH 7/7] Fix typo Co-authored-by: Orta Therox --- examples.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples.md b/examples.md index 4b559c9..6c413f4 100644 --- a/examples.md +++ b/examples.md @@ -17,7 +17,7 @@ - [Windows](#windows-2) - [Using multiple systems and `npm config`](#using-multiple-systems-and-npm-config) - [Node - Lerna](#node---lerna) -- [Node - Yarn](#node---pnpm) +- [Node - pnpm](#node---pnpm) - [Node - Yarn](#node---yarn) - [Node - Yarn 2](#node---yarn-2) - [OCaml/Reason - esy](#ocamlreason---esy)