Skip to content

Commit 6e98b43

Browse files
author
Piotr Paulski
committed
Satisty prettier
1 parent 4331e8c commit 6e98b43

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

rollup.config.mjs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const allowedLicenses = [
4343

4444
const thirdPartyDir = './build/src/third_party';
4545

46-
const { devDependencies = {} } = JSON.parse(
46+
const {devDependencies = {}} = JSON.parse(
4747
fs.readFileSync(path.join(process.cwd(), 'package.json'), 'utf-8'),
4848
);
4949

@@ -56,7 +56,8 @@ const aggregatedStats = {
5656
bundledPackages: new Set(),
5757
};
5858

59-
const projectNodeModulesPath = path.join(process.cwd(), 'node_modules') + path.sep;
59+
const projectNodeModulesPath =
60+
path.join(process.cwd(), 'node_modules') + path.sep;
6061

6162
function getPackageName(modulePath) {
6263
// Handle rollup's virtual module paths (paths starting with 0x00)
@@ -65,7 +66,9 @@ function getPackageName(modulePath) {
6566
return null;
6667
}
6768

68-
const relativePath = modulePath.slice(projectNodeModulesPath.length + absolutePathStart);
69+
const relativePath = modulePath.slice(
70+
projectNodeModulesPath.length + absolutePathStart,
71+
);
6972
const segments = relativePath.split(path.sep);
7073

7174
// handle scoped packages
@@ -101,16 +104,16 @@ function listBundledDeps() {
101104
const outputPath = path.join(thirdPartyDir, 'bundled-packages.json');
102105

103106
const bundledDevDeps = Object.fromEntries(
104-
Object.entries(devDependencies)
105-
.filter(([name]) => aggregatedStats.bundledPackages.has(name) || name === 'chrome-devtools-frontend')
107+
Object.entries(devDependencies).filter(
108+
([name]) =>
109+
aggregatedStats.bundledPackages.has(name) ||
110+
name === 'chrome-devtools-frontend',
111+
),
106112
);
107113

108-
fs.writeFileSync(
109-
outputPath,
110-
JSON.stringify(bundledDevDeps, null, 2)
111-
);
114+
fs.writeFileSync(outputPath, JSON.stringify(bundledDevDeps, null, 2));
112115
}
113-
}
116+
},
114117
};
115118
}
116119

@@ -151,10 +154,7 @@ const bundleDependency = (
151154
failOnViolation: true,
152155
},
153156
output: {
154-
file: path.join(
155-
thirdPartyDir,
156-
'THIRD_PARTY_NOTICES',
157-
),
157+
file: path.join(thirdPartyDir, 'THIRD_PARTY_NOTICES'),
158158
template(dependencies) {
159159
for (const dependency of dependencies) {
160160
const key = `${dependency.name}:${dependency.version}`;

0 commit comments

Comments
 (0)