Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Reformat change logs, add comments about numeric values.

Co-authored-by: Ian Clanton-Thuon <[email protected]>
  • Loading branch information
dmichon-msft and iclanton authored Aug 27, 2024
1 parent 1ad17e0 commit 68afae2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"changes": [
{
"packageName": "@microsoft/rush",
"comment": "Support \"bundledDependencies\" in rush-resolver-cache-plugin.",
"comment": "Support `bundledDependencies` in rush-resolver-cache-plugin.",
"type": "none"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"changes": [
{
"packageName": "@rushstack/webpack-workspace-resolve-plugin",
"comment": "Support hierarchical node_modules.",
"comment": "Support hierarchical `node_modules` folders.",
"type": "minor"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export async function afterInstallAsync(

const filteredFiles: string[] = Object.keys(files).filter((file) => file.endsWith('/package.json'));
if (filteredFiles.length > 0) {
const nestedPackageDirs: string[] = filteredFiles.map((x) => x.slice(0, -13));
const nestedPackageDirs: string[] = filteredFiles.map((x) => x.slice(0, /* -'/package.json'.length */ -13));

if (nestedPackageDirs.length > 0) {
// eslint-disable-next-line require-atomic-updates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function extractBundledDependencies(
continue;
}

const isScoped: boolean = nestedDir.charAt(13) === '@';
const isScoped: boolean = nestedDir.charAt(/* 'node_modules/'.length */ 13) === '@';
let index: number = nestedDir.indexOf('/', 13);
if (isScoped) {
index = nestedDir.indexOf('/', index + 1);
Expand Down

0 comments on commit 68afae2

Please sign in to comment.