firebase-tools: enable building on node 22 (#370752)
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json
|
||||
index da429c128..9c69ec8cb 100644
|
||||
--- a/npm-shrinkwrap.json
|
||||
+++ b/npm-shrinkwrap.json
|
||||
@@ -14637,9 +14637,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/nan": {
|
||||
- "version": "2.17.0",
|
||||
- "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",
|
||||
- "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==",
|
||||
+ "version": "2.22.0",
|
||||
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.0.tgz",
|
||||
+ "integrity": "sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==",
|
||||
+ "license": "MIT",
|
||||
"optional": true
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
@@ -31852,9 +31853,9 @@
|
||||
}
|
||||
},
|
||||
"nan": {
|
||||
- "version": "2.17.0",
|
||||
- "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",
|
||||
- "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==",
|
||||
+ "version": "2.22.0",
|
||||
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.0.tgz",
|
||||
+ "integrity": "sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==",
|
||||
"optional": true
|
||||
},
|
||||
"nanoid": {
|
||||
@@ -33672,7 +33673,7 @@
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"install-artifact-from-github": "^1.3.1",
|
||||
- "nan": "^2.17.0",
|
||||
+ "nan": "^2.22.0",
|
||||
"node-gyp": "^9.3.0"
|
||||
}
|
||||
},
|
||||
diff --git a/package.json b/package.json
|
||||
index a4284d841..90a0524f2 100644
|
||||
--- a/package.json
|
||||
+++ b/package.json
|
||||
@@ -98,6 +98,9 @@
|
||||
"src/test/**/*"
|
||||
]
|
||||
},
|
||||
+ "overrides" : {
|
||||
+ "nan": "^2.22.0"
|
||||
+ },
|
||||
"dependencies": {
|
||||
"@electric-sql/pglite": "^0.2.0",
|
||||
"@google-cloud/cloud-sql-connector": "^1.3.3",
|
||||
@@ -5,8 +5,8 @@
|
||||
fetchFromGitHub,
|
||||
python3,
|
||||
xcbuild,
|
||||
fetchpatch,
|
||||
}:
|
||||
|
||||
let
|
||||
version = "13.29.1";
|
||||
src = fetchFromGitHub {
|
||||
@@ -20,7 +20,18 @@ buildNpmPackage {
|
||||
pname = "firebase-tools";
|
||||
inherit version src;
|
||||
|
||||
npmDepsHash = "sha256-3+XeXK3VGIs4Foi9iW9Kho/Y0JsTQZ7p+582MPgdH1A=";
|
||||
npmDepsHash = "sha256-lQmoemIxzy2biu80UTR2eA+KJBeXWPh0xZRs/1of0eo=";
|
||||
|
||||
patches = [
|
||||
# Use modern version of `ajv` instead of the four year old default in 13.29.1
|
||||
(fetchpatch {
|
||||
name = "bump-ajv.patch";
|
||||
url = "https://github.com/firebase/firebase-tools/commit/b684155d827e7d1e8390e22511c0e1b5c46812ef.patch";
|
||||
hash = "sha256-yv2AknT85Eyurc1ZFbbF5S9Sj/VEaVnHXBcXI10OWpw=";
|
||||
})
|
||||
# Fix embedded nan version to support node 22
|
||||
./001-override-nan.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
ln -s npm-shrinkwrap.json package-lock.json
|
||||
|
||||
Reference in New Issue
Block a user