Skip to content

Commit

Permalink
Merge branch 'dev/7.0.x' into fix/155911-editor-occurs-unstable-behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki-takei committed Oct 18, 2024
2 parents 5eaad1d + 775a740 commit 0454493
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions apps/app/src/utils/next.config.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,17 @@ exports.listScopedPackages = (scopes, opts = defaultOpts) => {
fs.readdirSync(path.resolve(nodeModulesPath, scope))
.filter(name => !name.startsWith('.'))
.forEach((folderName) => {
const { name } = require(path.resolve(
const packageJsonPath = path.resolve(
nodeModulesPath,
scope,
folderName,
'package.json',
));
if (!opts.ignorePackageNames.includes(name)) {
scopedPackages.push(name);
);
if (fs.existsSync(packageJsonPath)) {
const { name } = require(packageJsonPath);
if (!opts.ignorePackageNames.includes(name)) {
scopedPackages.push(name);
}
}
});
});
Expand All @@ -51,13 +54,16 @@ exports.listPrefixedPackages = (prefixes, opts = defaultOpts) => {
.filter(name => prefixes.some(prefix => name.startsWith(prefix)))
.filter(name => !name.startsWith('.'))
.forEach((folderName) => {
const { name } = require(path.resolve(
const packageJsonPath = path.resolve(
nodeModulesPath,
folderName,
'package.json',
));
if (!opts.ignorePackageNames.includes(name)) {
prefixedPackages.push(name);
);
if (fs.existsSync(packageJsonPath)) {
const { name } = require(packageJsonPath);
if (!opts.ignorePackageNames.includes(name)) {
prefixedPackages.push(name);
}
}
});

Expand Down

0 comments on commit 0454493

Please sign in to comment.