File tree 2 files changed +40
-0
lines changed
packages/plugin-init/sources/commands
2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ releases :
2
+ " @yarnpkg/cli " : minor
3
+ " @yarnpkg/plugin-init " : minor
4
+
5
+ declined :
6
+ - " @yarnpkg/plugin-compat"
7
+ - " @yarnpkg/plugin-constraints"
8
+ - " @yarnpkg/plugin-dlx"
9
+ - " @yarnpkg/plugin-essentials"
10
+ - " @yarnpkg/plugin-interactive-tools"
11
+ - " @yarnpkg/plugin-nm"
12
+ - " @yarnpkg/plugin-npm-cli"
13
+ - " @yarnpkg/plugin-pack"
14
+ - " @yarnpkg/plugin-patch"
15
+ - " @yarnpkg/plugin-pnp"
16
+ - " @yarnpkg/plugin-pnpm"
17
+ - " @yarnpkg/plugin-stage"
18
+ - " @yarnpkg/plugin-typescript"
19
+ - " @yarnpkg/plugin-version"
20
+ - " @yarnpkg/plugin-workspace-tools"
21
+ - " @yarnpkg/builder"
22
+ - " @yarnpkg/core"
23
+ - " @yarnpkg/doctor"
Original file line number Diff line number Diff line change @@ -198,6 +198,23 @@ export default class InitCommand extends BaseCommand {
198
198
changedPaths . push ( gitignorePath ) ;
199
199
}
200
200
201
+ const gitattributesLines = [
202
+ `/.yarn/** linguist-vendored` ,
203
+ `/.yarn/releases/* binary` ,
204
+ `/.yarn/plugins/**/* binary` ,
205
+ `/.pnp.* binary linguist-generated` ,
206
+ ] ;
207
+
208
+ const gitattributesBody = gitattributesLines . map ( line => {
209
+ return `${ line } \n` ;
210
+ } ) . join ( `` ) ;
211
+
212
+ const gitattributesPath = ppath . join ( this . context . cwd , `.gitattributes` as Filename ) ;
213
+ if ( ! xfs . existsSync ( gitattributesPath ) ) {
214
+ await xfs . writeFilePromise ( gitattributesPath , gitattributesBody ) ;
215
+ changedPaths . push ( gitattributesPath ) ;
216
+ }
217
+
201
218
const editorConfigProperties = {
202
219
[ `*` ] : {
203
220
endOfLine : `lf` ,
You can’t perform that action at this time.
0 commit comments