@zip.js/zip.js 2.7.41 → 2.7.42
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/deno.json +1 -1
- package/dist/zip-fs-full.js +7 -5
- package/dist/zip-fs-full.min.js +1 -1
- package/dist/zip-fs.js +7 -5
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-full.js +7 -5
- package/dist/zip-full.min.js +1 -1
- package/dist/zip-no-worker-deflate.min.js +1 -1
- package/dist/zip-no-worker-inflate.min.js +1 -1
- package/dist/zip-no-worker.min.js +1 -1
- package/dist/zip.js +7 -5
- package/dist/zip.min.js +1 -1
- package/index.cjs +7 -5
- package/index.d.ts +34 -19
- package/index.min.js +1 -1
- package/lib/core/zip-reader.js +3 -2
- package/lib/core/zip-writer.js +4 -3
- package/package.json +1 -1
package/deno.json
CHANGED
package/dist/zip-fs-full.js
CHANGED
|
@@ -9412,9 +9412,10 @@
|
|
|
9412
9412
|
commentUTF8,
|
|
9413
9413
|
rawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)
|
|
9414
9414
|
});
|
|
9415
|
+
const decode = getOptionValue$1(zipReader, options, "decodeText") || decodeText;
|
|
9415
9416
|
const [filename, comment] = await Promise.all([
|
|
9416
|
-
|
|
9417
|
-
|
|
9417
|
+
decode(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),
|
|
9418
|
+
decode(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)
|
|
9418
9419
|
]);
|
|
9419
9420
|
Object.assign(fileEntry, {
|
|
9420
9421
|
rawComment,
|
|
@@ -10018,12 +10019,13 @@
|
|
|
10018
10019
|
} else {
|
|
10019
10020
|
options.directory = name.endsWith(DIRECTORY_SIGNATURE);
|
|
10020
10021
|
}
|
|
10021
|
-
const
|
|
10022
|
+
const encode = getOptionValue(zipWriter, options, "encodeText", encodeText);
|
|
10023
|
+
const rawFilename = encode(name);
|
|
10022
10024
|
if (getLength(rawFilename) > MAX_16_BITS) {
|
|
10023
10025
|
throw new Error(ERR_INVALID_ENTRY_NAME);
|
|
10024
10026
|
}
|
|
10025
10027
|
const comment = options.comment || "";
|
|
10026
|
-
const rawComment =
|
|
10028
|
+
const rawComment = encode(comment);
|
|
10027
10029
|
if (getLength(rawComment) > MAX_16_BITS) {
|
|
10028
10030
|
throw new Error(ERR_INVALID_ENTRY_COMMENT);
|
|
10029
10031
|
}
|
|
@@ -10126,7 +10128,7 @@
|
|
|
10126
10128
|
zip64DiskNumberStart,
|
|
10127
10129
|
password,
|
|
10128
10130
|
rawPassword,
|
|
10129
|
-
level,
|
|
10131
|
+
level: !useCompressionStream && zipWriter.config.CompressionStream === UNDEFINED_VALUE ? 0 : level,
|
|
10130
10132
|
useWebWorkers,
|
|
10131
10133
|
encryptionStrength,
|
|
10132
10134
|
extendedTimestamp,
|