This is an automated email from the ASF dual-hosted git repository. erisu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cordova-js.git
The following commit(s) were added to refs/heads/master by this push: new d97d8f92 dep!: drop fs-extra for internal node:fs & bump node requirement to >=16.20.2 (#266) d97d8f92 is described below commit d97d8f92ee2c4fe4d94a262bb6eab8541c1e556a Author: エリス <er...@users.noreply.github.com> AuthorDate: Tue Apr 9 01:29:07 2024 +0900 dep!: drop fs-extra for internal node:fs & bump node requirement to >=16.20.2 (#266) --- build-tools/common.js | 2 +- build-tools/test-build.js | 13 +++++++++++-- package-lock.json | 19 ++++++++++++++----- package.json | 3 +-- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/build-tools/common.js b/build-tools/common.js index 18af3996..30f1dfe9 100644 --- a/build-tools/common.js +++ b/build-tools/common.js @@ -17,7 +17,7 @@ * under the License. */ -const fs = require('fs-extra'); +const fs = require('node:fs/promises'); const path = require('path'); const globby = require('globby'); diff --git a/build-tools/test-build.js b/build-tools/test-build.js index 3819ad0e..9081d3b8 100755 --- a/build-tools/test-build.js +++ b/build-tools/test-build.js @@ -19,7 +19,8 @@ * under the License. */ -const fs = require('fs-extra'); +const fs = require('node:fs'); +const fsp = require('node:fs/promises'); const path = require('path'); const { build, collectModules } = require('.'); @@ -52,7 +53,15 @@ function buildCordovaJsTestBundle (bundlePath) { return Object.assign({}, f, { contents }); } }) - .then(testBundle => fs.outputFile(bundlePath, testBundle)); + .then(testBundle => { + const dir = path.dirname(bundlePath); + + if (!fs.existsSync(dir)) { + fs.mkdirSync(dir, { recursive: true }); + } + + return fsp.writeFile(bundlePath, testBundle, 'utf8'); + }); } function collectTestBuildModules () { diff --git a/package-lock.json b/package-lock.json index b91baa61..b984525b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,6 @@ "license": "Apache-2.0", "dependencies": { "execa": "^5.1.1", - "fs-extra": "^9.1.0", "globby": "^11.0.4" }, "bin": { @@ -912,6 +911,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, "engines": { "node": ">= 4.0.0" } @@ -2743,6 +2743,7 @@ "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", @@ -2998,7 +2999,8 @@ "node_modules/graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true }, "node_modules/grunt": { "version": "1.5.3", @@ -3934,6 +3936,7 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, "dependencies": { "universalify": "^2.0.0" }, @@ -5932,6 +5935,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, "engines": { "node": ">= 10.0.0" } @@ -6901,7 +6905,8 @@ "at-least-node": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==" + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true }, "balanced-match": { "version": "1.0.2", @@ -8299,6 +8304,7 @@ "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, "requires": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", @@ -8482,7 +8488,8 @@ "graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true }, "grunt": { "version": "1.5.3", @@ -9153,6 +9160,7 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, "requires": { "graceful-fs": "^4.1.6", "universalify": "^2.0.0" @@ -10640,7 +10648,8 @@ "universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true }, "unorm": { "version": "1.6.0", diff --git a/package.json b/package.json index 268cddfd..0dbab4c1 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "name": "cordova-js", "description": "Cordova JavaScript: a unified JavaScript layer for the Cordova suite of projects enabling cross-platform native mobile development of applications using HTML, CSS and JavaScript.", "engines": { - "node": ">=10.0.0" + "node": ">=16.20.2" }, "version": "7.0.0-dev", "repository": "github:apache/cordova-js", @@ -19,7 +19,6 @@ "license": "Apache-2.0", "dependencies": { "execa": "^5.1.1", - "fs-extra": "^9.1.0", "globby": "^11.0.4" }, "devDependencies": { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org