-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
refactor(ls): Enhance compatibility and optimize path handling for Windows system #9
Commits on May 14, 2024
-
fix: Fix path extraction from URL in Windows
In this change, refactored the local `fileUrlToPath` and `ls` function on extracting the string path from given URL object. Utilizing the `url.fileURLToPath` to ensure it extracted correctly in Windows instead of extract directly from `pathname` property which add trailing slash ('/') before the drive letter. For instance: Output using `pathname` property: "/D:/a/b/c" Output using `url.fileURLToPath`: "D:\\a\\b\\c" Combined with path separator replacement: "D:/a/b/c"
Configuration menu - View commit details
-
Copy full SHA for f130d45 - Browse repository at this point
Copy the full SHA f130d45View commit details
Commits on May 18, 2024
-
feat: Add regex and function for path detection
Added two constant variables containing regular expression pattern to parse file URL and Windows path, and added a new function called `isWin32Path` to detects whether the given path is a Windows path.
Configuration menu - View commit details
-
Copy full SHA for a80db2d - Browse repository at this point
Copy the full SHA a80db2dView commit details
Commits on May 19, 2024
-
feat: Add new function to resolve file URL path
Added a new function to resolve file URL path to a file path. The given path should be a valid file URL following the WHATWG URL Standard. If the provided URL is 'file://' or 'file:///', it is replaced with the root directory path (in the current drive for Windows systems). Otherwise, the URL is parsed using the `fileURLToPath` function.
Configuration menu - View commit details
-
Copy full SHA for 5e8d8b4 - Browse repository at this point
Copy the full SHA 5e8d8b4View commit details -
fix(ls): Enhance Windows path resolution
Fixed and enhanced the Windows path resolution on `ls` function. Where in Windows systems the function cannot resolve the absolute path, because the drive letter path are treated as file URL path and causing an error.
Configuration menu - View commit details
-
Copy full SHA for 879d1f6 - Browse repository at this point
Copy the full SHA 879d1f6View commit details
Commits on May 20, 2024
-
refactor: Deprecate a function and re-sort imports
Deprecated the `fileUrlToPath` function and re-sorted the import statements.
Configuration menu - View commit details
-
Copy full SHA for cd61ed8 - Browse repository at this point
Copy the full SHA cd61ed8View commit details
Commits on May 21, 2024
-
fix: Fix error while stating read-protected entry
Fixed the error while attempting to stat an entry that are read-protected due to a permission error (EPERM) or access error (EACCES). If throws an error during stating, then it attempts to open the entry using `fs.opendir` , if throw an error with code ENOTDIR we can coclude that the entry is a regular file, otherwise, it is a directory. We also not forget to close the `Dir` instance to avoid unexpected behavior. In addition, we also sort the result entries exact before it being returned.
Configuration menu - View commit details
-
Copy full SHA for 55b45c6 - Browse repository at this point
Copy the full SHA 55b45c6View commit details -
test(lib): Refactor the
TestError
class- Added a parameter to `TestError` constructor, it accepts an object. - In the `it` function, changed the error message and passed the cause error to the `cause` field in `opts` parameter.
Configuration menu - View commit details
-
Copy full SHA for b0e025c - Browse repository at this point
Copy the full SHA b0e025cView commit details -
Configuration menu - View commit details
-
Copy full SHA for c4349f0 - Browse repository at this point
Copy the full SHA c4349f0View commit details -
chore(scripts): Add several new npm scripts
- `prepublishOnly`: Builds the project with '--overwrite' argument. - `prepack`: Tests the project before packing the project (`npm pack`).
Configuration menu - View commit details
-
Copy full SHA for 62bce18 - Browse repository at this point
Copy the full SHA 62bce18View commit details -
Configuration menu - View commit details
-
Copy full SHA for 10e4af3 - Browse repository at this point
Copy the full SHA 10e4af3View commit details -
ci: Add Windows to
runs-on
fieldNow it runs on Windows to check the compatibility both on Ubuntu (Linux) and Windows systems.
Configuration menu - View commit details
-
Copy full SHA for f418f50 - Browse repository at this point
Copy the full SHA f418f50View commit details