@tryghost/mg-fs-utils 0.13.1 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/FileCache.js +7 -2
- package/package.json +6 -6
package/lib/FileCache.js
CHANGED
|
@@ -143,10 +143,15 @@ export default class FileCache {
|
|
|
143
143
|
|
|
144
144
|
sanitizeFileName(src) {
|
|
145
145
|
let fileNameNoExt = parse(src).name;
|
|
146
|
+
let fileNameExt = extname(src);
|
|
146
147
|
|
|
147
|
-
let safeFileNameNoExt = transliterate.slugify(fileNameNoExt
|
|
148
|
+
let safeFileNameNoExt = transliterate.slugify(fileNameNoExt, {
|
|
149
|
+
separator: '_'
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
let result = src.replace(`${fileNameNoExt}${fileNameExt}`, `${safeFileNameNoExt}${fileNameExt}`);
|
|
148
153
|
|
|
149
|
-
return
|
|
154
|
+
return result;
|
|
150
155
|
}
|
|
151
156
|
|
|
152
157
|
ensureJsonExtension({filename, isJSON = true}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryghost/mg-fs-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"repository": "https://github.com/TryGhost/migrate/tree/main/packages/mg-fs-utils",
|
|
5
5
|
"author": "Ghost Foundation",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"jest-extended": "4.0.2"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@tryghost/errors": "1.3.
|
|
29
|
-
"@tryghost/image-transform": "1.
|
|
28
|
+
"@tryghost/errors": "1.3.1",
|
|
29
|
+
"@tryghost/image-transform": "1.3.0",
|
|
30
30
|
"@tryghost/string": "0.2.11",
|
|
31
|
-
"@tryghost/zip": "1.1.
|
|
32
|
-
"adm-zip": "0.5.
|
|
31
|
+
"@tryghost/zip": "1.1.42",
|
|
32
|
+
"adm-zip": "0.5.12",
|
|
33
33
|
"csv-parse": "5.5.5",
|
|
34
34
|
"fs-extra": "11.2.0",
|
|
35
35
|
"lodash": "4.17.21",
|
|
36
36
|
"sharp": "0.32.6",
|
|
37
37
|
"transliteration": "2.3.5"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "78b8167b57a73027502c925ee5e2e360b8392bc1"
|
|
40
40
|
}
|