Skip to content

Commit 945cfe6

Browse files
authored
[BUG] Plugin helpers fix related to fs promises module (#2486)
In Node v10, there was no dedicated module for fs/promises. Causing the plugin helpers to fail while building out plugins. Solved by importing promises from fs then using the desired methods. Issue Resolved: #2485 Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
1 parent 04ff11c commit 945cfe6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
3535

3636
### 🐛 Bug Fixes
3737

38+
* Plugin helpers fix related to fs promises module ([#2486](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2486))
39+
3840
### 🚞 Infrastructure
3941

4042
### 📝 Documentation

packages/osd-plugin-helpers/src/tasks/update_versions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
*/
55

66
// @ts-ignore
7-
import { readFile, writeFile } from 'fs/promises';
7+
import { promises } from 'fs';
88
import path from 'path';
99
import { createFailError } from '@osd/dev-utils';
1010
import { FileUpdateContext, ObjectUpdateContext, VersionContext } from '../contexts';
1111

12+
const { readFile, writeFile } = promises;
13+
1214
export async function updateVersions({
1315
log,
1416
sourceDir,

0 commit comments

Comments
 (0)