Skip to content

Commit a0523fc

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

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
@@ -18,7 +18,7 @@
1818
import * as Dockerode from 'dockerode';
1919
import * as JSONStream from 'JSONStream';
2020
import * as _ from 'lodash';
21-
import * as fs from 'mz/fs';
21+
import { promises as fs } from 'fs';
2222
import * as path from 'path';
2323
import * as stream from 'node:stream';
2424
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
@@ -42,7 +42,6 @@
4242
"@types/lodash": "^4.17.20",
4343
"@types/memoizee": "^0.4.12",
4444
"@types/mocha": "^10.0.10",
45-
"@types/mz": "^2.7.9",
4645
"@types/node": "^20.19.17",
4746
"@types/proxyquire": "^1.3.31",
4847
"@types/semver": "^7.7.1",
@@ -75,7 +74,6 @@
7574
"klaw": "^4.1.0",
7675
"lodash": "^4.17.21",
7776
"memoizee": "^0.4.17",
78-
"mz": "^2.7.0",
7977
"p-map": "^4.0.0",
8078
"semver": "^7.7.2",
8179
"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)