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

feat: new js apis #5136

Closed
wants to merge 38 commits into from
Closed

feat: new js apis #5136

wants to merge 38 commits into from

Conversation

amrbashir
Copy link
Member

@amrbashir amrbashir commented Sep 5, 2022

closes #2233
closes #4490
closes #4350

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary

Other information

Although some of the APIs intended in this PR could be add in a minor version of v1, The majority will be breaking changes so it is better to just include all in one PR for v2. I will also try to split the PR into a reviewable chunks.

TODOS:

  1. os module

    • Remove type()
    • Adjust platform() to match Rust's implementation.
    • hostname()
    • Rename tempdir() to tempDir()
  2. path module

    • tempDir()
  3. fs module

    • create()
    • open()
    • close()
    • FsFile class
      • close()
      • read()
      • write()
      • seek()
      • truncate()
      • stat()
    • write()
    • writeFile()
    • writeTextFile()
    • Remove writeBinaryFile()
    • read()
    • readFile()
    • readTextFile()
    • readTextFileLines()
    • Remove readBinaryFile()
    • Adjust copyFile()
    • Adjust readDir()
    • mkdir()
    • remove()
    • rename()
    • seek()
    • truncate()
    • ftruncate()
    • stat()
    • lstat()
    • fstat()
  4. http module

    • Make fetch compatible with the web api
      • stream file:// on reqwest-client feature
      • cancel fetch using AbortController
    • Remove Client and getClient
  5. window module

    • Remove appWindow
    • Combine WindowManager, WebviewHandle and WebViewWindow into one Window class.
  • Merge all change files into one big change file

@amrbashir amrbashir force-pushed the new-js-apis branch 3 times, most recently from 7f9e024 to 70c69af Compare September 6, 2022 19:29
@amrbashir amrbashir linked an issue Oct 18, 2022 that may be closed by this pull request
@amrbashir amrbashir force-pushed the new-js-apis branch 3 times, most recently from acdea0f to c33d47b Compare December 28, 2022 20:49
@jlarmstrongiv
Copy link

Are fs streaming APIs planned? See #2233 (comment) and #4133

@lucasfernog
Copy link
Member

@amrbashir we'll need to find some time to move these to the plugins-workspace repo. I would wait a little longer on the FS APIs, since we'll see if cap-std can help us there (see #6107).

@lucasfernog lucasfernog deleted the new-js-apis branch May 26, 2023 04:14
@amrbashir
Copy link
Member Author

amrbashir commented Jun 5, 2023

sure, I will start on porting them to plugins-workspace this week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
6 participants