Skip to content

Commit a36db5f

Browse files
authored
feat(plugin-init): stop creating unnecessary .gitattributes (#2660)
1 parent f5d2982 commit a36db5f

2 files changed

Lines changed: 22 additions & 12 deletions

File tree

.yarn/versions/2fd07169.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
releases:
2+
"@yarnpkg/cli": patch
3+
"@yarnpkg/plugin-init": patch
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-node-modules"
12+
- "@yarnpkg/plugin-npm-cli"
13+
- "@yarnpkg/plugin-pack"
14+
- "@yarnpkg/plugin-patch"
15+
- "@yarnpkg/plugin-pnp"
16+
- "@yarnpkg/plugin-stage"
17+
- "@yarnpkg/plugin-typescript"
18+
- "@yarnpkg/plugin-version"
19+
- "@yarnpkg/plugin-workspace-tools"
20+
- "@yarnpkg/builder"
21+
- "@yarnpkg/core"
22+
- "@yarnpkg/doctor"

packages/plugin-init/sources/commands/init.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,6 @@ export default class InitCommand extends BaseCommand {
169169
const lockfilePath = ppath.join(this.context.cwd, Filename.lockfile);
170170
await xfs.writeFilePromise(lockfilePath, ``);
171171

172-
const gitattributesLines = [
173-
`/.yarn/** linguist-vendored`,
174-
];
175-
176-
const gitattributesBody = gitattributesLines.map(line => {
177-
return `${line}\n`;
178-
}).join(``);
179-
180-
const gitattributesPath = ppath.join(this.context.cwd, `.gitattributes` as Filename);
181-
if (!xfs.existsSync(gitattributesPath))
182-
await xfs.writeFilePromise(gitattributesPath, gitattributesBody);
183-
184172
const gitignoreLines = [
185173
`/.yarn/*`,
186174
`!/.yarn/patches`,

0 commit comments

Comments
 (0)