MM-56996 Fix nan dependency (#2966)

* Fix nan dependency

* Bump electron-mocha

* Upgrade Playwright, manage nan fix with patch-package

* Automate package patching in postinstall step
This commit is contained in:
Mario Vitale 2024-02-29 08:48:42 +01:00 committed by GitHub
parent 4609a6c89d
commit b1ced06feb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13408 additions and 42073 deletions

55444
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -76,7 +76,7 @@
"prune": "ts-prune",
"mmjstool": "mmjstool",
"i18n-extract": "npm run mmjstool -- i18n extract-desktop",
"postinstall": "node scripts/postinstall.js && electron-builder install-app-deps"
"postinstall": "node scripts/postinstall.js && patch-package && electron-builder install-app-deps"
},
"jest": {
"clearMocks": true,
@ -143,6 +143,7 @@
"@babel/preset-react": "7.16.7",
"@babel/register": "7.17.7",
"@electron/fuses": "1.6.0",
"@electron/rebuild": "3.6.0",
"@electron/universal": "1.3.1",
"@mattermost/compass-icons": "0.1.32",
"@mattermost/desktop-api": "*",
@ -178,9 +179,8 @@
"electron-extension-installer": "1.2.0",
"electron-is-dev": "2.0.0",
"electron-log": "4.4.8",
"electron-mocha": "11.0.2",
"electron-mocha": "12.2.0",
"electron-notarize": "1.2.2",
"electron-rebuild": "3.2.9",
"electron-updater": "5.2.1",
"eslint": "7.29.0",
"eslint-import-resolver-webpack": "0.13.2",
@ -200,13 +200,14 @@
"mmjstool": "github:mattermost/mattermost-utilities#3b4506b0f6b14fbb402f9f8ef932370e459e3773",
"mocha-circleci-reporter": "0.0.3",
"mochawesome": "7.1.3",
"nan": "2.17.0",
"node-abi": "3.55.0",
"nan": "2.18.0",
"node-abi": "3.56.0",
"node-gyp": "10.0.1",
"node-jq": "2.3.4",
"node-loader": "2.0.0",
"npm-run-all": "4.1.5",
"playwright": "1.40.0",
"patch-package": "^8.0.0",
"playwright": "1.42.0",
"pretty-bytes": "6.0.0",
"ps-node": "^0.1.6",
"react": "16.14.0",

24
patches/nan+2.18.0.patch Normal file
View file

@ -0,0 +1,24 @@
diff --git a/node_modules/nan/nan.h b/node_modules/nan/nan.h
index 2a68349..9c75907 100644
--- a/node_modules/nan/nan.h
+++ b/node_modules/nan/nan.h
@@ -2550,7 +2550,9 @@ NAN_DEPRECATED inline void SetAccessor(
, getter_
, setter_
, obj
+#if !defined(V8_MAJOR_VERSION) || V8_MAJOR_VERSION < 12
, settings
+#endif
, attribute
#if (NODE_MODULE_VERSION < NODE_16_0_MODULE_VERSION)
, signature
@@ -2596,7 +2598,9 @@ inline void SetAccessor(
, getter_
, setter_
, obj
+#if !defined(V8_MAJOR_VERSION) || V8_MAJOR_VERSION < 12
, settings
+#endif
, attribute
);
}