Ghost/core/server
Simon Backx 42ac8c41e4
🐛 Fixed uppercase file extensions ignored in content import (#14268)
refs https://github.com/TryGhost/Team/issues/1363

- When uploading a zip of images in Settings > Labs > [Import], it will skip images that have an uppercase extension, citing an 'unsupported file type' error.
- Cause: Glob ignored those files when matching extensions in ImportManager
- Fix: Added nocase option where needed
- Extended tests to also test the processZip method of ImportManager with getFilesFromZip
- Added isValidZip for zip with uppercase image
- Cleaned up JSDoc in ImportManager, and replaced some older JS syntax

Fixed zipContainsMultipleDataFormats error never thrown:

When a zip combines two data formats, no error was thrown.

- The promise error was only returned in an _.each loop, but never thrown
- Previously when combining multiple data types in a zip file, no error got thrown
- Added a test for this error
- Also added a test for noContentToImport error

Other errors and fixes:

- Added missing length in getBaseDirectory check
- getContentTypes fixed (returned duplicate values). Type error came up after adding all JSDocs
- updated tests to match real types from JSDoc and pass type validations
- Rewrote some methods in the async await syntax
- Added tests for ImportManager clean up
2022-03-11 09:17:58 +01:00
..
adapters Switch to @tryghost/errors from ignition errors package (#13807) 2021-12-01 10:22:01 +00:00
api 💡 Updated fixtures to make it easier to get started (#14299) 2022-03-10 17:41:46 +00:00
data 🐛 Fixed uppercase file extensions ignored in content import (#14268) 2022-03-11 09:17:58 +01:00
lib Updated probe-image-size options to reflect underlying change 2022-03-09 20:27:38 +00:00
models Fixed error when editing user with empty roles data 2022-03-10 17:29:30 +00:00
services 💡 Updated fixtures to make it easier to get started (#14299) 2022-03-10 17:41:46 +00:00
views Updated unsubscribe page 2022-03-10 10:39:20 +00:00
web Centralized base API path value across server codebase 2022-03-09 17:15:51 +08:00
analytics-events.js Added comments to all usages of lib/common/events 2021-07-07 16:02:44 +01:00
ghost-server.js Switch to @tryghost/errors from ignition errors package (#13807) 2021-12-01 10:22:01 +00:00
notify.js Removed unused import 2021-12-06 08:17:07 +00:00
overrides.js Set global Luxon timezone override to UTC 2021-10-20 09:19:29 +02:00
run-update-check.js Revert "Revert "Extract logging from DI patterns, only use @tryghost/logging package"" (#13884) 2021-12-14 11:22:39 +00:00
update-check.js Added library for extracting database information 2022-01-18 09:31:08 +00:00