Skip to content

Commit c231947

Browse files
committed
fixup! format
1 parent a8e1af5 commit c231947

2 files changed

Lines changed: 7 additions & 10 deletions

File tree

‎src/generators/legacy-json-all/index.mjs‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,7 @@ export default {
8585
}
8686

8787
if (output) {
88-
await writeFile(
89-
join(output, 'all.json'),
90-
legacyToJSON(generatedValue)
91-
);
88+
await writeFile(join(output, 'all.json'), legacyToJSON(generatedValue));
9289
}
9390

9491
return generatedValue;

‎src/utils/generators.mjs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { DOC_API_BASE_URL_VERSION } from '../constants.mjs';
1010
*
1111
* @param {Array<ApiDocMetadataEntry>} nodes The API metadata Nodes to be grouped
1212
*/
13-
export const groupNodesByModule = (nodes) => {
13+
export const groupNodesByModule = nodes => {
1414
/** @type {Map<string, Array<ApiDocMetadataEntry>>} */
1515
const groupedNodes = new Map();
1616

@@ -30,7 +30,7 @@ export const groupNodesByModule = (nodes) => {
3030
*
3131
* @param {import('semver').SemVer} version The version to be parsed
3232
*/
33-
export const getVersionFromSemVer = (version) =>
33+
export const getVersionFromSemVer = version =>
3434
version.minor === 0
3535
? `${version.major}.x`
3636
: `${version.major}.${version.minor}.x`;
@@ -54,7 +54,7 @@ export const getVersionURL = (version, api) =>
5454
* @param {string|import('semver').SemVer} version SemVer compatible version (maybe)
5555
* @returns {import('semver').SemVer} SemVer compatible version
5656
*/
57-
export const coerceSemVer = (version) => {
57+
export const coerceSemVer = version => {
5858
const coercedVersion = coerce(version);
5959

6060
if (coercedVersion === null) {
@@ -77,7 +77,7 @@ export const getCompatibleVersions = (introduced, releases) => {
7777
const coercedMajor = major(coerceSemVer(introduced));
7878
// All Node.js versions that support the current API; If there's no "introduced_at" field,
7979
// we simply show all versions, as we cannot pinpoint the exact version
80-
return releases.filter((release) => release.version.major >= coercedMajor);
80+
return releases.filter(release => release.version.major >= coercedMajor);
8181
};
8282

8383
/**
@@ -108,14 +108,14 @@ export const sortChanges = (changes, key = 'version') => {
108108
* @param {Object} source - The source object
109109
*/
110110
export const leftHandAssign = (target, source) =>
111-
Object.keys(source).forEach((k) => k in target || (target[k] = source[k]));
111+
Object.keys(source).forEach(k => k in target || (target[k] = source[k]));
112112

113113
/**
114114
* Transforms an object to JSON output consistent with the JSON version.
115115
* @param {Object} section - The source object
116116
* @returns {string} - The JSON output
117117
*/
118-
export const legacyToJSON = (section) =>
118+
export const legacyToJSON = section =>
119119
JSON.stringify(
120120
section,
121121
[

0 commit comments

Comments
 (0)