Skip to content

Commit

Permalink
fix(pob): fix yarnrc dump options
Browse files Browse the repository at this point in the history
  • Loading branch information
christophehurpeau committed Nov 5, 2023
1 parent b77106b commit bf27b86
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
8 changes: 1 addition & 7 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
compressionLevel: mixed

defaultSemverRangePrefix: ^

enableGlobalCache: true

enableMessageNames: false

nodeLinker: node-modules

plugins:
- checksum: 351165af3f87af1ec24528ccf2affc93f57694cc7bfc51a1842d8c17e19d4c7275176de471df52f3b462b7fb16615a1961896c3823b68c330317035020e92e40
path: .yarn/plugins/@yarnpkg/plugin-conventional-version.cjs
spec: "https://raw.githubusercontent.com/christophehurpeau/yarn-plugin-conventional-version/main/bundles/@yarnpkg/plugin-conventional-version.cjs"

spec: https://raw.githubusercontent.com/christophehurpeau/yarn-plugin-conventional-version/main/bundles/@yarnpkg/plugin-conventional-version.cjs
supportedArchitectures:
cpu:
- x64
Expand Down
8 changes: 7 additions & 1 deletion packages/pob/lib/generators/core/yarn/CoreYarnGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,13 @@ export default class CoreYarnGenerator extends Generator {
delete config.yarnPath;
}

writeAndFormat(this.fs, '.yarnrc.yml', yml.dump(sortObject(config), {}));
writeAndFormat(
this.fs,
'.yarnrc.yml',
yml.dump(sortObject(config), {
lineWidth: 9999,
}),
);
} else {
this.fs.delete('.yarn');
this.fs.delete('.yarnrc.yml');
Expand Down
1 change: 1 addition & 0 deletions packages/pob/lib/utils/writeAndFormat.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export function writeAndFormat(fs, destinationPath, content, { parser } = {}) {
trailingComma: 'all',
singleQuote: !destinationPath.endsWith('.yml'),
arrowParens: 'always',
printWidth: destinationPath === '.yarnrc.yml' ? 9999 : undefined,
}),
);
}
Expand Down

0 comments on commit bf27b86

Please sign in to comment.