Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubilmax committed Dec 27, 2022
1 parent 4eafab6 commit 4138fdc
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/foundry-storage-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
version: nightly

- name: Check storage layout
uses: Rubilmax/foundry-storage-check@v3
uses: Rubilmax/foundry-storage-check@v3.0.1
with:
contract: contracts/Example.sol:Example
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
version: nightly

- name: Check storage layout
uses: Rubilmax/foundry-storage-check@v3
uses: Rubilmax/foundry-storage-check@v3.0.1
with:
contract: src/Contract.sol:Contract
# settings below are optional, but allows to check whether the added storage slots are empty on the deployed contract
Expand Down Expand Up @@ -79,6 +79,7 @@ Once generated, the action will fetch the comparative storage layout stored as a
- Variable removed (optional): `error`

The action automatically checks for:

- All canonic storage bytes
- Array value (32 bytes) at index `#0`
- Mapping value (32 bytes) at key `0x00`
Expand Down
52 changes: 28 additions & 24 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58635,8 +58635,9 @@ module.exports = function (/**String*/ input, /** object */ options) {
* @param zipPath optional path inside zip
* @param filter optional RegExp or Function if files match will
* be included.
* @param {number | object} attr - number as unix file permissions, object as filesystem Stats object
*/
addLocalFolder: function (/**String*/ localPath, /**String=*/ zipPath, /**=RegExp|Function*/ filter) {
addLocalFolder: function (/**String*/ localPath, /**String=*/ zipPath, /**=RegExp|Function*/ filter, /**=number|object*/ attr) {
// Prepare filter
if (filter instanceof RegExp) {
// if filter is RegExp wrap it
Expand Down Expand Up @@ -58668,9 +58669,9 @@ module.exports = function (/**String*/ input, /** object */ options) {
if (filter(p)) {
var stats = filetools.fs.statSync(filepath);
if (stats.isFile()) {
self.addFile(zipPath + p, filetools.fs.readFileSync(filepath), "", stats);
self.addFile(zipPath + p, filetools.fs.readFileSync(filepath), "", attr ? attr : stats);
} else {
self.addFile(zipPath + p + "/", Buffer.alloc(0), "", stats);
self.addFile(zipPath + p + "/", Buffer.alloc(0), "", attr ? attr : stats);
}
}
});
Expand Down Expand Up @@ -58744,7 +58745,9 @@ module.exports = function (/**String*/ input, /** object */ options) {
}
});
} else {
next();
process.nextTick(() => {
next();
});
}
} else {
callback(true, undefined);
Expand Down Expand Up @@ -58810,24 +58813,22 @@ module.exports = function (/**String*/ input, /** object */ options) {
var fileattr = entry.isDirectory ? 0x10 : 0; // (MS-DOS directory flag)

// extended attributes field for Unix
if (!Utils.isWin) {
// set file type either S_IFDIR / S_IFREG
let unix = entry.isDirectory ? 0x4000 : 0x8000;

if (isStat) {
// File attributes from file stats
unix |= 0xfff & attr.mode;
} else if ("number" === typeof attr) {
// attr from given attr values
unix |= 0xfff & attr;
} else {
// Default values:
unix |= entry.isDirectory ? 0o755 : 0o644; // permissions (drwxr-xr-x) or (-r-wr--r--)
}
// set file type either S_IFDIR / S_IFREG
let unix = entry.isDirectory ? 0x4000 : 0x8000;

fileattr = (fileattr | (unix << 16)) >>> 0; // add attributes
if (isStat) {
// File attributes from file stats
unix |= 0xfff & attr.mode;
} else if ("number" === typeof attr) {
// attr from given attr values
unix |= 0xfff & attr;
} else {
// Default values:
unix |= entry.isDirectory ? 0o755 : 0o644; // permissions (drwxr-xr-x) or (-r-wr--r--)
}

fileattr = (fileattr | (unix << 16)) >>> 0; // add attributes

entry.attr = fileattr;

entry.setData(content);
Expand Down Expand Up @@ -59002,12 +59003,14 @@ module.exports = function (/**String*/ input, /** object */ options) {
* @param callback The callback will be executed when all entries are extracted successfully or any error is thrown.
*/
extractAllToAsync: function (/**String*/ targetPath, /**Boolean*/ overwrite, /**Boolean*/ keepOriginalPermission, /**Function*/ callback) {
if (!callback) {
callback = function () {};
}
overwrite = get_Bool(overwrite, false);
if (typeof keepOriginalPermission === "function" && !callback) callback = keepOriginalPermission;
keepOriginalPermission = get_Bool(keepOriginalPermission, false);
if (!callback) {
callback = function (err) {
throw new Error(err);
};
}
if (!_zip) {
callback(new Error(Utils.Errors.NO_ZIP));
return;
Expand Down Expand Up @@ -59589,7 +59592,7 @@ module.exports = function () {
// total number of entries
_totalEntries = Utils.readBigUInt64LE(data, Constants.ZIP64TOT);
// central directory size in bytes
_size = Utils.readBigUInt64LE(data, Constants.ZIP64SIZ);
_size = Utils.readBigUInt64LE(data, Constants.ZIP64SIZE);
// offset of first CEN header
_offset = Utils.readBigUInt64LE(data, Constants.ZIP64OFF);

Expand Down Expand Up @@ -59640,7 +59643,7 @@ module.exports = function () {
}
};
};

// Misspelled

/***/ }),

Expand Down Expand Up @@ -60222,6 +60225,7 @@ module.exports.FileAttr = __nccwpck_require__(8321);
const fsystem = (__nccwpck_require__(2895).require)();
const pth = __nccwpck_require__(1017);
const Constants = __nccwpck_require__(4522);
const Errors = __nccwpck_require__(1255);
const isWin = typeof process === "object" && "win32" === process.platform;

const is_Obj = (obj) => obj && typeof obj === "object";
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "foundry-storage-check",
"version": "3.0.0",
"version": "3.0.1",
"description": "Github Action checking the storage layout diff from Foundry storage layout reports",
"author": {
"name": "Romain (Rubilmax) Milon",
Expand Down Expand Up @@ -57,11 +57,11 @@
"@types/adm-zip": "^0.5.0",
"@types/jest": "^28.1.6",
"@types/lodash": "^4.14.191",
"@types/node": "^18.11.17",
"@types/node": "^18.11.18",
"@typescript-eslint/eslint-plugin": "^5.47.1",
"@typescript-eslint/parser": "^5.47.0",
"@typescript-eslint/parser": "^5.47.1",
"@vercel/ncc": "^0.36.0",
"adm-zip": "^0.5.9",
"adm-zip": "^0.5.10",
"colors": "^1.4.0",
"eslint": "^8.30.0",
"eslint-config-prettier": "^8.5.0",
Expand Down
27 changes: 21 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1305,11 +1305,16 @@
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.191.tgz#09511e7f7cba275acd8b419ddac8da9a6a79e2fa"
integrity sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ==

"@types/node@*", "@types/node@^18.11.17":
"@types/node@*":
version "18.11.17"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.17.tgz#5c009e1d9c38f4a2a9d45c0b0c493fe6cdb4bcb5"
integrity sha512-HJSUJmni4BeDHhfzn6nF0sVmd1SMezP7/4F0Lq+aXzmp2xm9O7WXrUtHW/CHlYVtZUbByEvWidHqRtcJXGF2Ng==

"@types/node@^18.11.18":
version "18.11.18"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.18.tgz#8dfb97f0da23c2293e554c5a50d61ef134d7697f"
integrity sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==

"@types/prettier@^2.1.5":
version "2.6.3"
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.3.tgz#68ada76827b0010d0db071f739314fa429943d0a"
Expand Down Expand Up @@ -1352,7 +1357,7 @@
semver "^7.3.7"
tsutils "^3.21.0"

"@typescript-eslint/parser@^5.1.0", "@typescript-eslint/parser@^5.47.0":
"@typescript-eslint/parser@^5.1.0":
version "5.47.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.47.0.tgz#62e83de93499bf4b500528f74bf2e0554e3a6c8d"
integrity sha512-udPU4ckK+R1JWCGdQC4Qa27NtBg7w020ffHqGyAK8pAgOVuNw7YaKXGChk+udh+iiGIJf6/E/0xhVXyPAbsczw==
Expand All @@ -1362,6 +1367,16 @@
"@typescript-eslint/typescript-estree" "5.47.0"
debug "^4.3.4"

"@typescript-eslint/parser@^5.47.1":
version "5.47.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.47.1.tgz#c4bf16f8c3c7608ce4bf8ff804b677fc899f173f"
integrity sha512-9Vb+KIv29r6GPu4EboWOnQM7T+UjpjXvjCPhNORlgm40a9Ia9bvaPJswvtae1gip2QEeVeGh6YquqAzEgoRAlw==
dependencies:
"@typescript-eslint/scope-manager" "5.47.1"
"@typescript-eslint/types" "5.47.1"
"@typescript-eslint/typescript-estree" "5.47.1"
debug "^4.3.4"

"@typescript-eslint/[email protected]":
version "5.47.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.47.0.tgz#f58144a6b0ff58b996f92172c488813aee9b09df"
Expand Down Expand Up @@ -1527,10 +1542,10 @@ acorn@^8.8.0:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8"
integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==

adm-zip@^0.5.9:
version "0.5.9"
resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.5.9.tgz#b33691028333821c0cf95c31374c5462f2905a83"
integrity sha512-s+3fXLkeeLjZ2kLjCBwQufpI5fuN+kIGBxu6530nVQZGVol0d7Y/M88/xw9HGGUcJjKf8LutN3VPRUBq6N7Ajg==
adm-zip@^0.5.10:
version "0.5.10"
resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.5.10.tgz#4a51d5ab544b1f5ce51e1b9043139b639afff45b"
integrity sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==

ajv@^6.10.0, ajv@^6.12.4:
version "6.12.6"
Expand Down

0 comments on commit 4138fdc

Please sign in to comment.