Skip to content

Commit

Permalink
ci: fix code quality workflow (inception-health#64)
Browse files Browse the repository at this point in the history
* ci: fix code quality workflow

* updated dist
  • Loading branch information
nikordaris committed Mar 10, 2023
1 parent 5d65358 commit f694486
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code-quality-pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
type: "junit"
githubToken: ${{ secrets.GITHUB_TOKEN }}
otel-export-trace:
needs: [tests, lint-and-format]
needs: [tests, build]
if: always()
name: OpenTelemetry Export Trace
runs-on: ubuntu-latest
Expand Down
40 changes: 36 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45260,7 +45260,7 @@ JSZip.defaults = __nccwpck_require__(84697);

// TODO find a better way to handle this version,
// a require('package.json').version doesn't work with webpack, see #327
JSZip.version = "3.7.1";
JSZip.version = "3.8.0";

JSZip.loadAsync = function (content, options) {
return new JSZip().loadAsync(content, options);
Expand Down Expand Up @@ -45339,7 +45339,11 @@ module.exports = function (data, options) {
var files = zipEntries.files;
for (var i = 0; i < files.length; i++) {
var input = files[i];
zip.file(input.fileNameStr, input.decompressed, {

var unsafeName = input.fileNameStr;
var safeName = utils.resolve(input.fileNameStr);

zip.file(safeName, input.decompressed, {
binary: true,
optimizedBinaryString: true,
date: input.date,
Expand All @@ -45349,6 +45353,9 @@ module.exports = function (data, options) {
dosPermissions: input.dosPermissions,
createFolders: options.createFolders
});
if (!input.dir) {
zip.file(safeName).unsafeOriginalName = unsafeName;
}
}
if (zipEntries.zipComment.length) {
zip.comment = zipEntries.zipComment;
Expand Down Expand Up @@ -47668,6 +47675,31 @@ exports.transformTo = function(outputType, input) {
return result;
};

/**
* Resolve all relative path components, "." and "..", in a path. If these relative components
* traverse above the root then the resulting path will only contain the final path component.
*
* All empty components, e.g. "//", are removed.
* @param {string} path A path with / or \ separators
* @returns {string} The path with all relative path components resolved.
*/
exports.resolve = function(path) {
var parts = path.split("/");
var result = [];
for (var index = 0; index < parts.length; index++) {
var part = parts[index];
// Allow the first and last component to be empty for trailing slashes.
if (part === "." || (part === "" && index !== 0 && index !== parts.length - 1)) {
continue;
} else if (part === "..") {
result.pop();
} else {
result.push(part);
}
}
return result.join("/");
};

/**
* Return the type of the input.
* The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer.
Expand Down Expand Up @@ -47776,8 +47808,8 @@ exports.prepareContent = function(name, inputData, isBinary, isOptimizedBinarySt

// if inputData is already a promise, this flatten it.
var promise = external.Promise.resolve(inputData).then(function(data) {


var isBlob = support.blob && (data instanceof Blob || ['[object File]', '[object Blob]'].indexOf(Object.prototype.toString.call(data)) !== -1);

if (isBlob && typeof FileReader !== "undefined") {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/licenses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2952,7 +2952,7 @@ MIT

jszip
(MIT OR GPL-3.0-or-later)
JSZip is dual licensed. You may use it under the MIT license *or* the GPLv3
JSZip is dual licensed. At your choice you may use it under the MIT license *or* the GPLv3
license.

The MIT License
Expand Down

0 comments on commit f694486

Please sign in to comment.