Skip to content

Commit 4b246cc

Browse files
committed
Remove mz in favor of native fs.promises
Signed-off-by: Christina Ying Wang <[email protected]>
1 parent 3cda11f commit 4b246cc

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

lib/build/builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import * as duplexify from 'duplexify';
2020
import * as es from 'event-stream';
2121
import * as JSONStream from 'JSONStream';
2222
import * as _ from 'lodash';
23-
import * as fs from 'mz/fs';
23+
import { promises as fs } from 'fs';
2424
import * as path from 'path';
2525
import * as stream from 'node:stream';
2626
import * as tar from 'tar-stream';

lib/multibuild/build-secrets/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import * as crypto from 'crypto';
1818
import type * as Dockerode from 'dockerode';
1919
import * as t from 'io-ts';
2020
import * as _ from 'lodash';
21-
import { fs } from 'mz';
21+
import { promises as fs } from 'fs';
2222
import * as path from 'path';
2323
import * as tar from 'tar-stream';
2424

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"@types/lodash": "^4.17.20",
4545
"@types/memoizee": "^0.4.12",
4646
"@types/mocha": "^10.0.10",
47-
"@types/mz": "^2.7.9",
4847
"@types/node": "^20.19.17",
4948
"@types/proxyquire": "^1.3.31",
5049
"@types/semver": "^7.7.1",
@@ -79,7 +78,6 @@
7978
"klaw": "^4.1.0",
8079
"lodash": "^4.17.21",
8180
"memoizee": "^0.4.17",
82-
"mz": "^2.7.0",
8381
"p-map": "^4.0.0",
8482
"semver": "^7.7.2",
8583
"tar-stream": "^3.1.7",

test/multibuild/contracts.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717
import { expect } from 'chai';
18-
import { fs } from 'mz';
18+
import * as fs from 'fs';
1919
import * as Compose from '@balena/compose-parser';
2020
import * as os from 'os';
2121
import * as path from 'path';
@@ -35,11 +35,11 @@ describe('Container contracts', () => {
3535

3636
before(async () => {
3737
defaultCompositionPath = path.join(os.tmpdir(), 'default-composition.yml');
38-
await fs.writeFile(defaultCompositionPath, defaultComposition());
38+
await fs.promises.writeFile(defaultCompositionPath, defaultComposition());
3939
});
4040

4141
after(async () => {
42-
await fs.unlink(defaultCompositionPath);
42+
await fs.promises.unlink(defaultCompositionPath);
4343
});
4444

4545
it('should correctly extract container contracts', async () => {

0 commit comments

Comments
 (0)