Skip to content

Commit 5be9e2b

Browse files
committed
merge develop
2 parents 353e081 + 2fb5143 commit 5be9e2b

File tree

9 files changed

+101
-2171
lines changed

9 files changed

+101
-2171
lines changed

.github/workflows/dep-review.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,3 @@ jobs:
1616
uses: actions/checkout@v4
1717
- name: "Dependency Review"
1818
uses: actions/dependency-review-action@v4
19-
with:
20-
allow-ghsas: GHSA-8hc4-vh64-cxmj

.husky/pre-commit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
22

3-
if command -v npm &> /dev/null; then
4-
npm run lint:staged
3+
if command -v npx &> /dev/null; then
4+
npx lint-staged
55
fi

CHANGELOG.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,16 @@ _This release is scheduled to be released on 2025-01-01._
2323
- [linter] Re-activate `eslint-plugin-package-json` to lint `package.json` (#3643)
2424
- [linter] Add linting for markdown files (#3646)
2525
- [calendar] Add ability to display end date for full date events, where end is not same day (showEnd=true) (#3650)
26-
- [core] Add text to the config.js.sample file about the locale variable (#3654)
26+
- [core] Add text to the config.js.sample file about the locale variable (#3654, #3655)
2727
- [core] Add fetch timeout for all node_helpers (thru undici, forces node 20.18.1 minimum) to help on slower systems.
2828

2929
### Changed
3030

3131
- [core] Run code style checks in workflow only once (#3648)
3232
- [core] Fix animations export #3644 only on server side (#3649)
33-
- [core] Use project URL in fallback config.
33+
- [core] Use project URL in fallback config (#3656)
34+
- [core] Fix Access Denied crash writing js/positions.js (on synology nas) #3651. new message, MM starts, but no modules showing (#3652)
35+
- [linter] Switch to 'npx' for lint-staged in pre-commit hook (#3658)
3436

3537
### Removed
3638

@@ -40,9 +42,10 @@ _This release is scheduled to be released on 2025-01-01._
4042
### Updated
4143

4244
- [repo] Reactivate `stale.yaml` as GitHub action to mark issues as stale after 60 days and close them 7 days later (if no activity) (#3577, #3580, #3581)
43-
- [core] Update electron dependency to v32 (test electron rebuild) and other dependencies too
45+
- [core] Update electron dependency to v32 (test electron rebuild) and other dependencies (#3657)
4446
- [tests] All test configs have been updated to allow full external access, allowing for easier debugging (especially when running as a container)
4547
- [core] Run and test with node 23 (#3588)
48+
- [workflow] delete exception `allow-ghsas: GHSA-8hc4-vh64-cxmj` in `dep-review.yaml` (#3659)
4649

4750
### Fixed
4851

@@ -54,6 +57,7 @@ _This release is scheduled to be released on 2025-01-01._
5457
- [core] Fix missing `basePath` where `location.host` is used (#3613)
5558
- [compliments] croner library changed filenames used in latest version (#3624)
5659
- [linter] Fix ESLint ignore pattern which caused that default modules not to be linted (#3632)
60+
- [core] Fix module path in case of sub/sub folder is used and use path.resolve for resolve `moduleFolder` and `defaultModuleFolder` in app.js (#3653)
5761
- [calendar] Update to resolve issues #3098 #3144 #3351 #3422 #3443 #3467 #3537 related to timezone changes
5862
- [calendar] Fix #3267 (styles array), also fixes event with both exdate AND recurrence(and testcase)
5963
- [calendar] Fix showEndsOnlyWithDuration not working, #3598, applies ONLY to full day events

js/app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ function App () {
169169
const elements = module.split("/");
170170
const moduleName = elements[elements.length - 1];
171171
const env = getEnvVarsAsObj();
172-
let moduleFolder = `${__dirname}/../${env.modulesDir}/${module}`;
172+
let moduleFolder = path.resolve(`${__dirname}/../${env.modulesDir}`, module);
173173

174174
if (defaultModules.includes(moduleName)) {
175-
const defaultModuleFolder = `${__dirname}/../modules/default/${module}`;
175+
const defaultModuleFolder = path.resolve(`${__dirname}/../modules/default/`, module);
176176
if (process.env.JEST_WORKER_ID === undefined) {
177177
moduleFolder = defaultModuleFolder;
178178
} else {
@@ -183,7 +183,7 @@ function App () {
183183
}
184184
}
185185

186-
const moduleFile = `${moduleFolder}/${module}.js`;
186+
const moduleFile = `${moduleFolder}/${moduleName}.js`;
187187

188188
try {
189189
fs.accessSync(moduleFile, fs.R_OK);

js/utils.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@ module.exports = {
6565
modulePositions.push(positionName);
6666
}
6767
});
68-
fs.writeFileSync(discoveredPositionsJSFilename, `const modulePositions=${JSON.stringify(modulePositions)}`);
68+
try {
69+
fs.writeFileSync(discoveredPositionsJSFilename, `const modulePositions=${JSON.stringify(modulePositions)}`);
70+
}
71+
catch (error) {
72+
console.error("unable to write js/positions.js with the discovered module positions\nmake the MagicMirror/js folder writeable by the user starting MagicMirror");
73+
}
6974
}
7075
// return the list to the caller
7176
return modulePositions;

0 commit comments

Comments
 (0)