Skip to content

Commit

Permalink
Kill bad warning
Browse files Browse the repository at this point in the history
  • Loading branch information
myovchev committed Nov 8, 2024
1 parent 3125f64 commit 0beea6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Widget players are now properly invoked when they arrive later in the page load process.
* Fix permission grid tooltip display.
* Fixes a bug that crashes external frontend applications.
* Fixes a false positive warning for module not in use when using a project submodule (e.g. `widges/module.js`).

### Adds

Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,10 @@ async function apostrophe(options, telemetry, rootSpan) {
// seemingly unused modules with "theme" in the name
if (!validSteps.includes(name)) {
try {
// It's a project level modules definition, skip it.
if (fs.existsSync(path.resolve(self.localModules, name, 'modules.js'))) {
return;
}
const submodule = await self.root.import(path.resolve(self.localModules, name, 'index.js'));
if (submodule && submodule.options && submodule.options.ignoreUnusedFolderWarning) {
return;
Expand Down

0 comments on commit 0beea6a

Please sign in to comment.