Skip to content

Commit

Permalink
reduce changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed Jan 9, 2025
1 parent 688dc01 commit 45a7377
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions bin/build-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var rollupPlugins = require('./rollupPlugins');

var path = require('path');
var denodeify = require('denodeify');
const { mkdirSync } = require('fs');
const { mkdir } = require('node:fs/promises');
var rimraf = denodeify(require('rimraf'));
var builtInModules = require('builtin-modules');
var fs = require('fs');
Expand Down Expand Up @@ -67,7 +67,8 @@ function buildModule(filepath) {
return Promise.resolve().then(function () {
return rimraf(path.resolve(filepath, 'lib'));
}).then(function () {
mkdirSync(path.resolve(filepath, 'lib'), { recursive:true });
return mkdir(path.resolve(filepath, 'lib'), { recursive:true });
}).then(function () {
return all(versions.map(function (isBrowser) {
return rollup({
input: path.resolve(filepath, './src/index.js'),
Expand Down
10 changes: 6 additions & 4 deletions bin/build-pouchdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var denodeify = require('denodeify');
var rollup = require('rollup');
var rollupPlugins = require('./rollupPlugins');
var rimraf = denodeify(require('rimraf'));
const { mkdirSync } = require('fs');
const { mkdir } = require('node:fs/promises');
var all = Promise.all.bind(Promise);
var buildUtils = require('./build-utils');
var addPath = buildUtils.addPath;
Expand Down Expand Up @@ -150,7 +150,9 @@ var rimrafMkdirp = function (...args) {
return all(args.map(function (otherPath) {
return rimraf(addPath('pouchdb', otherPath));
})).then(function () {
args.map(otherPath => mkdirSync(addPath('pouchdb', otherPath), { recursive:true }));
return all(args.map(function (otherPath) {
return mkdir(addPath('pouchdb', otherPath), { recursive:true });
}));
});
};

Expand All @@ -163,8 +165,8 @@ var doAll = function (...args) {
};

function doBuildNode() {
mkdirSync(addPath('pouchdb', 'lib/plugins'), { recursive:true });
return buildForNode();
return mkdir(addPath('pouchdb', 'lib/plugins'), { recursive:true })
.then(buildForNode);
}

function doBuildAll() {
Expand Down

0 comments on commit 45a7377

Please sign in to comment.