Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package maintenance #43

Closed
wants to merge 6 commits into from
Closed

Package maintenance #43

wants to merge 6 commits into from

Conversation

timursevimli
Copy link
Member

Now sandbox-fs module can work and wrap fs.promises and we can use it with the await keyword.

For example:

const sandboxedFs = require('.');
const fs = sandboxedFs.bind('./test');

const someAsyncFunction = async () => {
try {
 const data = await fs.promises.readFile('../../file.ext', 'utf8');
  console.log(data.toString());
} catch (e) {
  throw e;
}

someAsyncFunction();

Copy link
Member

@tshemsedinov tshemsedinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't drop fs.exists support, even deprecated it is still supported for node.js 20.x

Copy link
Member

@tshemsedinov tshemsedinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

tshemsedinov pushed a commit that referenced this pull request Jul 18, 2023
tshemsedinov pushed a commit that referenced this pull request Jul 18, 2023
PR-URL: #43
tshemsedinov pushed a commit that referenced this pull request Jul 18, 2023
tshemsedinov pushed a commit that referenced this pull request Jul 18, 2023
tshemsedinov pushed a commit that referenced this pull request Jul 18, 2023
@tshemsedinov tshemsedinov changed the title Dev dependencies update, adding node 20 for CI and compatibility with fs.promises Package maintenance Jul 18, 2023
@tshemsedinov
Copy link
Member

Landed in 3ac8ded, 768870b, e2ce30a, d18fd89, and 6004d67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants