fix(fs): Fix issues with fs file copy functions.
This commit is contained in:
		| @@ -1,5 +1,11 @@ | |||||||
| # Changelog | # Changelog | ||||||
|  |  | ||||||
|  | ## 2025-01-29 - 11.1.6 - fix(fs) | ||||||
|  | Fix issues with fs file copy functions. | ||||||
|  |  | ||||||
|  | - Updated dependencies in package.json. | ||||||
|  | - Corrected comments for asynchronous and synchronous file copy functions in fs.ts. | ||||||
|  |  | ||||||
| ## 2025-01-07 - 11.1.5 - fix(fs) | ## 2025-01-07 - 11.1.5 - fix(fs) | ||||||
| Improve waitForFileToBeReady function to handle directories and file stabilization | Improve waitForFileToBeReady function to handle directories and file stabilization | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										14
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								package.json
									
									
									
									
									
								
							| @@ -49,22 +49,22 @@ | |||||||
|     "@push.rocks/smartjson": "^5.0.20", |     "@push.rocks/smartjson": "^5.0.20", | ||||||
|     "@push.rocks/smartmime": "^2.0.4", |     "@push.rocks/smartmime": "^2.0.4", | ||||||
|     "@push.rocks/smartpath": "^5.0.18", |     "@push.rocks/smartpath": "^5.0.18", | ||||||
|     "@push.rocks/smartpromise": "^4.1.0", |     "@push.rocks/smartpromise": "^4.2.2", | ||||||
|     "@push.rocks/smartrequest": "^2.0.23", |     "@push.rocks/smartrequest": "^2.0.23", | ||||||
|     "@push.rocks/smartstream": "^3.2.5", |     "@push.rocks/smartstream": "^3.2.5", | ||||||
|     "@types/fs-extra": "^11.0.4", |     "@types/fs-extra": "^11.0.4", | ||||||
|     "@types/glob": "^8.1.0", |     "@types/glob": "^8.1.0", | ||||||
|     "@types/js-yaml": "^4.0.9", |     "@types/js-yaml": "^4.0.9", | ||||||
|     "fs-extra": "^11.2.0", |     "fs-extra": "^11.3.0", | ||||||
|     "glob": "^11.0.0", |     "glob": "^11.0.1", | ||||||
|     "js-yaml": "^4.1.0" |     "js-yaml": "^4.1.0" | ||||||
|   }, |   }, | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|     "@git.zone/tsbuild": "^2.2.0", |     "@git.zone/tsbuild": "^2.2.1", | ||||||
|     "@git.zone/tsrun": "^1.3.3", |     "@git.zone/tsrun": "^1.3.3", | ||||||
|     "@git.zone/tstest": "^1.0.90", |     "@git.zone/tstest": "^1.0.96", | ||||||
|     "@push.rocks/tapbundle": "^5.5.4", |     "@push.rocks/tapbundle": "^5.5.6", | ||||||
|     "@types/node": "^22.10.5" |     "@types/node": "^22.12.0" | ||||||
|   }, |   }, | ||||||
|   "files": [ |   "files": [ | ||||||
|     "ts/**/*", |     "ts/**/*", | ||||||
|   | |||||||
							
								
								
									
										4748
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4748
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -3,6 +3,6 @@ | |||||||
|  */ |  */ | ||||||
| export const commitinfo = { | export const commitinfo = { | ||||||
|   name: '@push.rocks/smartfile', |   name: '@push.rocks/smartfile', | ||||||
|   version: '11.1.5', |   version: '11.1.6', | ||||||
|   description: 'Provides comprehensive tools for efficient file management in Node.js using TypeScript, including handling streams, virtual directories, and various file operations.' |   description: 'Provides comprehensive tools for efficient file management in Node.js using TypeScript, including handling streams, virtual directories, and various file operations.' | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								ts/fs.ts
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								ts/fs.ts
									
									
									
									
									
								
							| @@ -72,7 +72,7 @@ export const isFile = (pathArg): boolean => { | |||||||
| ===============================================================*/ | ===============================================================*/ | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * copies a file from A to B on the local disk |  * copies a file or directory from A to B on the local disk | ||||||
|  */ |  */ | ||||||
| export const copy = async (fromArg: string, toArg: string): Promise<boolean> => { | export const copy = async (fromArg: string, toArg: string): Promise<boolean> => { | ||||||
|   const done = plugins.smartpromise.defer<boolean>(); |   const done = plugins.smartpromise.defer<boolean>(); | ||||||
| @@ -86,7 +86,7 @@ export const copy = async (fromArg: string, toArg: string): Promise<boolean> => | |||||||
| }; | }; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * copies a file SYNCHRONOUSLY from A to B on the local disk |  * copies a file or directory SYNCHRONOUSLY from A to B on the local disk | ||||||
|  */ |  */ | ||||||
| export const copySync = (fromArg: string, toArg: string): boolean => { | export const copySync = (fromArg: string, toArg: string): boolean => { | ||||||
|   plugins.fsExtra.copySync(fromArg, toArg); |   plugins.fsExtra.copySync(fromArg, toArg); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user