Skip to content

Commit

Permalink
dep!: drop fs-extra for internal node:fs & bump node requirement to >…
Browse files Browse the repository at this point in the history
…=16.20.2 (#266)
  • Loading branch information
erisu committed Apr 8, 2024
1 parent c7d3dc0 commit d97d8f9
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build-tools/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
13 changes: 11 additions & 2 deletions build-tools/test-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('.');

Expand Down Expand Up @@ -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 () {
Expand Down
19 changes: 14 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -19,7 +19,6 @@
"license": "Apache-2.0",
"dependencies": {
"execa": "^5.1.1",
"fs-extra": "^9.1.0",
"globby": "^11.0.4"
},
"devDependencies": {
Expand Down

0 comments on commit d97d8f9

Please sign in to comment.