From d1b044a7c923a044a08f547fc3dcefca4c054ad3 Mon Sep 17 00:00:00 2001 From: bartocc Date: Wed, 4 Oct 2023 09:55:20 +0200 Subject: [PATCH 1/4] Yarn: add .yarnrc.yml with nodeLinker setup --- files/.yarnrc.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 files/.yarnrc.yml diff --git a/files/.yarnrc.yml b/files/.yarnrc.yml new file mode 100644 index 00000000..8b757b29 --- /dev/null +++ b/files/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules \ No newline at end of file From 51c59f57148518f99a8c1f80bd25e244b2aee113 Mon Sep 17 00:00:00 2001 From: bartocc Date: Wed, 4 Oct 2023 09:55:41 +0200 Subject: [PATCH 2/4] Git: add yarn paths to gitignore --- files/gitignore | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/files/gitignore b/files/gitignore index dbe5764f..0e60e4c4 100644 --- a/files/gitignore +++ b/files/gitignore @@ -19,3 +19,13 @@ yarn-error.log /package-lock.json.ember-try /yarn.lock.ember-try /pnpm-lock.ember-try.yaml + +<% if (yarn) { %> +.yarn/* +!.yarn/cache +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions +<% } %> \ No newline at end of file From ef46cb7a81620ee17161f2d79096850d11fce533 Mon Sep 17 00:00:00 2001 From: bartocc Date: Fri, 6 Oct 2023 09:13:15 +0200 Subject: [PATCH 3/4] Ignore .yarnrc.yml unless using the --yarn option --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index 6234e7b5..470564c3 100644 --- a/index.js +++ b/index.js @@ -323,6 +323,12 @@ module.exports = { files = files.filter((filename) => !filename.endsWith('.npmrc')); } + if (!this.yarn) { + let ignoredFiles = ['.yarnrc.yml']; + + files = files.filter(filename => !ignoredFiles.includes(filename)); + } + return files; }, From aa4d842fc9ae4ca2e7f20833edf3b0afadf77cd0 Mon Sep 17 00:00:00 2001 From: Julien Palmas Date: Fri, 6 Oct 2023 11:37:14 +0200 Subject: [PATCH 4/4] Add comment about yarn files to ignore Co-authored-by: Simon Ihmig --- files/gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/files/gitignore b/files/gitignore index 0e60e4c4..70c9418f 100644 --- a/files/gitignore +++ b/files/gitignore @@ -21,6 +21,7 @@ yarn-error.log /pnpm-lock.ember-try.yaml <% if (yarn) { %> +# https://yarnpkg.com/getting-started/qa/#which-files-should-be-gitignored .yarn/* !.yarn/cache !.yarn/patches