@rushstack/node-core-library
Advanced tools
Comparing version 3.22.1 to 3.23.0
@@ -5,2 +5,22 @@ { | ||
{ | ||
"version": "3.23.0", | ||
"tag": "@rushstack/node-core-library_v3.23.0", | ||
"date": "Wed, 27 May 2020 05:15:10 GMT", | ||
"comments": { | ||
"minor": [ | ||
{ | ||
"comment": "Add an \"FileSystemStats\" alias to avoid the need to import \"fs\" when using the FileSystem API" | ||
}, | ||
{ | ||
"comment": "Add FileSystem.readLink() and readLinkAsync()" | ||
} | ||
], | ||
"dependency": [ | ||
{ | ||
"comment": "Updating dependency \"@rushstack/eslint-config\" from `0.5.7` to `0.5.8`" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"version": "3.22.1", | ||
@@ -7,0 +27,0 @@ "tag": "@rushstack/node-core-library_v3.22.1", |
# Change Log - @rushstack/node-core-library | ||
This log was last generated on Tue, 26 May 2020 23:00:25 GMT and should not be manually modified. | ||
This log was last generated on Wed, 27 May 2020 05:15:10 GMT and should not be manually modified. | ||
## 3.23.0 | ||
Wed, 27 May 2020 05:15:10 GMT | ||
### Minor changes | ||
- Add an "FileSystemStats" alias to avoid the need to import "fs" when using the FileSystem API | ||
- Add FileSystem.readLink() and readLinkAsync() | ||
## 3.22.1 | ||
@@ -6,0 +14,0 @@ Tue, 26 May 2020 23:00:25 GMT |
@@ -6,2 +6,10 @@ /// <reference types="node" /> | ||
/** | ||
* An alias for the Node.js `fs.Stats` object. | ||
* | ||
* @remarks | ||
* This avoids the need to import the `fs` package when using the {@link FileSystem} API. | ||
* @public | ||
*/ | ||
export declare type FileSystemStats = fs.Stats; | ||
/** | ||
* The options for FileSystem.readFolder() | ||
@@ -173,7 +181,7 @@ * @public | ||
*/ | ||
static getStatistics(path: string): fs.Stats; | ||
static getStatistics(path: string): FileSystemStats; | ||
/** | ||
* An async version of {@link FileSystem.getStatistics}. | ||
*/ | ||
static getStatisticsAsync(path: string): Promise<fs.Stats>; | ||
static getStatisticsAsync(path: string): Promise<FileSystemStats>; | ||
/** | ||
@@ -357,8 +365,24 @@ * Updates the accessed and modified timestamps of the filesystem object referenced by path. | ||
*/ | ||
static getLinkStatistics(path: string): fs.Stats; | ||
static getLinkStatistics(path: string): FileSystemStats; | ||
/** | ||
* An async version of {@link FileSystem.getLinkStatistics}. | ||
*/ | ||
static getLinkStatisticsAsync(path: string): Promise<fs.Stats>; | ||
static getLinkStatisticsAsync(path: string): Promise<FileSystemStats>; | ||
/** | ||
* If `path` refers to a symbolic link, this returns the path of the link target, which may be | ||
* an absolute or relative path. | ||
* | ||
* @remarks | ||
* If `path` refers to a filesystem object that is not a symbolic link, then an `ErrnoException` is thrown | ||
* with code 'UNKNOWN'. If `path` does not exist, then an `ErrnoException` is thrown with code `ENOENT`. | ||
* | ||
* @param path - The absolute or relative path to the symbolic link. | ||
* @returns the path of the link target | ||
*/ | ||
static readLink(path: string): string; | ||
/** | ||
* An async version of {@link FileSystem.readLink}. | ||
*/ | ||
static readLinkAsync(path: string): Promise<string>; | ||
/** | ||
* Creates a Windows "directory junction". Behaves like `createSymbolicLinkToFile()` on other platforms. | ||
@@ -365,0 +389,0 @@ * Behind the scenes it uses `fs.symlinkSync()`. |
@@ -569,2 +569,26 @@ "use strict"; | ||
/** | ||
* If `path` refers to a symbolic link, this returns the path of the link target, which may be | ||
* an absolute or relative path. | ||
* | ||
* @remarks | ||
* If `path` refers to a filesystem object that is not a symbolic link, then an `ErrnoException` is thrown | ||
* with code 'UNKNOWN'. If `path` does not exist, then an `ErrnoException` is thrown with code `ENOENT`. | ||
* | ||
* @param path - The absolute or relative path to the symbolic link. | ||
* @returns the path of the link target | ||
*/ | ||
static readLink(path) { | ||
return FileSystem._wrapException(() => { | ||
return fsx.readlinkSync(path); | ||
}); | ||
} | ||
/** | ||
* An async version of {@link FileSystem.readLink}. | ||
*/ | ||
static readLinkAsync(path) { | ||
return FileSystem._wrapExceptionAsync(() => { | ||
return fsx.readlink(path); | ||
}); | ||
} | ||
/** | ||
* Creates a Windows "directory junction". Behaves like `createSymbolicLinkToFile()` on other platforms. | ||
@@ -571,0 +595,0 @@ * Behind the scenes it uses `fs.symlinkSync()`. |
@@ -21,3 +21,3 @@ /** | ||
export { Sort } from './Sort'; | ||
export { FileSystem, IFileSystemReadFolderOptions, IFileSystemWriteFileOptions, IFileSystemReadFileOptions, IFileSystemMoveOptions, IFileSystemCopyFileOptions, IFileSystemDeleteFileOptions, IFileSystemUpdateTimeParameters, IFileSystemCreateLinkOptions } from './FileSystem'; | ||
export { FileSystem, FileSystemStats, IFileSystemReadFolderOptions, IFileSystemWriteFileOptions, IFileSystemReadFileOptions, IFileSystemMoveOptions, IFileSystemCopyFileOptions, IFileSystemDeleteFileOptions, IFileSystemUpdateTimeParameters, IFileSystemCreateLinkOptions } from './FileSystem'; | ||
export { FileWriter, IFileWriterFlags } from './FileWriter'; | ||
@@ -24,0 +24,0 @@ export { LegacyAdapters, LegacyCallback } from './LegacyAdapters'; |
{ | ||
"name": "@rushstack/node-core-library", | ||
"version": "3.22.1", | ||
"version": "3.23.0", | ||
"description": "Core libraries that every NodeJS toolchain project should use", | ||
@@ -26,3 +26,3 @@ "main": "lib/index.js", | ||
"@microsoft/rush-stack-compiler-3.5": "0.4.4", | ||
"@rushstack/eslint-config": "0.5.7", | ||
"@rushstack/eslint-config": "0.5.8", | ||
"@types/fs-extra": "7.0.0", | ||
@@ -29,0 +29,0 @@ "@types/jest": "25.2.1", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
696787
9519