diff --git a/HISTORY.md b/HISTORY.md index 39ad8b5..f4ae5be 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,10 @@ # History +## v3.2.0 2023 November 15 + +- Use the new `@bevry/fs-*` dependencies +- Updated dependencies, [base files](https://github.com/bevry/base), and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation) + ## v3.1.0 2023 November 15 - Updated dependencies, [base files](https://github.com/bevry/base), and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation) diff --git a/package-lock.json b/package-lock.json index 24fc9d7..183c25d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,19 @@ { "name": "projectz", - "version": "3.1.0", + "version": "3.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "projectz", - "version": "3.1.0", + "version": "3.2.0", "license": "Artistic-2.0", "dependencies": { - "@bevry/file": "^2.2.0", - "@bevry/json": "^1.8.0", - "badges": "^4.34.0", + "@bevry/fs-list": "^2.0.0", + "@bevry/fs-read": "^1.0.0", + "@bevry/fs-write": "^1.0.0", + "@bevry/json": "^1.9.0", + "badges": "^4.35.0", "caterpillar": "^6.11.0", "fellow": "^6.25.0", "get-cli-arg": "^8.1.0", @@ -24,11 +26,11 @@ }, "devDependencies": { "@bevry/update-contributors": "^1.23.0", - "@types/node": "^20.9.0", + "@types/node": "^20.9.1", "@typescript-eslint/eslint-plugin": "^6.11.0", "@typescript-eslint/parser": "^6.11.0", "assert-helpers": "^11.4.0", - "eslint": "^8.53.0", + "eslint": "^8.54.0", "eslint-config-bevry": "^4.0.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-prettier": "^5.0.1", @@ -39,7 +41,7 @@ "surge": "^0.23.1", "typedoc": "^0.25.3", "typescript": "5.2.2", - "valid-directory": "^4.2.0" + "valid-directory": "^4.4.0" }, "engines": { "node": ">=20" @@ -58,9 +60,9 @@ } }, "node_modules/@bevry/ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@bevry/ansi/-/ansi-6.2.0.tgz", - "integrity": "sha512-9LJj1wKAJiIUZuOopV/jZGyYchsSFwkIzT0J8Sl+zK1X+e/bN+XJOEnwFmB8LS9v+lMYfsGP4zsG3BXRNDETxA==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@bevry/ansi/-/ansi-6.3.0.tgz", + "integrity": "sha512-4l7MexuIZuOj9FoBIbRD+nkMvZZASe1ukzanjrmfROlCzzd6ZiM0qmG3aa6sZdt45w4E3rUreGHaN6WhKc9Z9g==", "dependencies": { "editions": "^6.13.0" }, @@ -71,12 +73,28 @@ "url": "https://bevry.me/fund" } }, - "node_modules/@bevry/file": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@bevry/file/-/file-2.2.0.tgz", - "integrity": "sha512-rImSWFJL0Gv5iM04AU9oHSx7HX1vlwGbk3jUXd2lBRNTeaFXgCs8jkCtJ+4kv7eIZNPEUSenEOtHlOFoAaK9QQ==", + "node_modules/@bevry/fs-accessible": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@bevry/fs-accessible/-/fs-accessible-2.0.0.tgz", + "integrity": "sha512-UG5j7WdxhYdmcFdMfhK+12HeBYUtHJ980ATrxDLwlGFNwPekxTya25nh8FAl8s+Ot4iB69SXkkUQBuTb28eCiQ==", + "dependencies": { + "editions": "^6.13.0" + }, + "engines": { + "node": ">=4" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, + "node_modules/@bevry/fs-list": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@bevry/fs-list/-/fs-list-2.0.0.tgz", + "integrity": "sha512-95W6ha0IX1nUw9+nngjWW3oAquTTpWMQZiiNM3Ks5+u2ZuYqq4I23KbPWCZvwIOW4BJSbc9QJgw1d2KiHxV9Aw==", "dependencies": { + "@bevry/fs-accessible": "^2.0.0", "editions": "^6.13.0", + "errlop": "^7.2.0", "version-compare": "^3.2.0" }, "engines": { @@ -86,6 +104,72 @@ "url": "https://bevry.me/fund" } }, + "node_modules/@bevry/fs-mkdirp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@bevry/fs-mkdirp/-/fs-mkdirp-1.0.0.tgz", + "integrity": "sha512-R5mEQBFYl/Kf6DWeITih9JRJn7otLJRb/vSjCFbeWOyscgZ0VOuuv8mElR5v4x4furv8I6f3233R61KcU5xoww==", + "dependencies": { + "@bevry/fs-accessible": "^2.0.0", + "editions": "^6.13.0", + "errlop": "^7.2.0", + "version-compare": "^3.2.0" + }, + "engines": { + "node": ">=4" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, + "node_modules/@bevry/fs-read": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@bevry/fs-read/-/fs-read-1.0.0.tgz", + "integrity": "sha512-BYndXVIC//KPbsoJkcZvX3x+hTXAWST5bwaxN3wXmZqZlM0t0OP4k/psUbDr8c6WxVFPHVT4IIKguk+IoyHdsQ==", + "dependencies": { + "@bevry/fs-accessible": "^2.0.0", + "editions": "^6.13.0", + "errlop": "^7.2.0" + }, + "engines": { + "node": ">=4" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, + "node_modules/@bevry/fs-unlink": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@bevry/fs-unlink/-/fs-unlink-1.0.0.tgz", + "integrity": "sha512-sN3aOeYlqvLLorQesWrtiV3pcH7ygp5eztLrh9V7Ylnm20+GNpsHuXh94lyJcCz89e7rB/ZPnUji9l4pRJgGQA==", + "dependencies": { + "@bevry/fs-accessible": "^2.0.0", + "editions": "^6.13.0", + "errlop": "^7.2.0" + }, + "engines": { + "node": ">=4" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, + "node_modules/@bevry/fs-write": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@bevry/fs-write/-/fs-write-1.0.0.tgz", + "integrity": "sha512-tX92v6YEj4E4H16kG5DYjGFvl8M9yggLyukl24VFB0mrbnawvJ8dlMIvmmj2DyafaoqFzIg8WrCRv4meEquhEA==", + "dependencies": { + "@bevry/fs-accessible": "^2.0.0", + "@bevry/fs-mkdirp": "^1.0.0", + "editions": "^6.13.0", + "errlop": "^7.2.0" + }, + "engines": { + "node": ">=4" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, "node_modules/@bevry/github-api": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/@bevry/github-api/-/github-api-10.1.0.tgz", @@ -169,11 +253,13 @@ } }, "node_modules/@bevry/json": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@bevry/json/-/json-1.8.0.tgz", - "integrity": "sha512-TCljRl7mihYvlK2B6NISz7II0FQu0OuEG7R3Hw2lVxh/PDv7vCGlqdNrIiM5qnwuxxTj1xVD+epjm9IT5GBgzA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@bevry/json/-/json-1.9.0.tgz", + "integrity": "sha512-22RLqQDrKapGvTJoNnunr3TQr9E2/Qr882n9X/DyoNspYgHZ5ijsF3VRAWdgr7HJhrA0ApuFfTaOVVQoSCj99g==", "dependencies": { - "@bevry/file": "^2.2.0", + "@bevry/fs-read": "^1.0.0", + "@bevry/fs-unlink": "^1.0.0", + "@bevry/fs-write": "^1.0.0", "errlop": "^7.2.0" }, "engines": { @@ -289,9 +375,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", - "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", + "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -398,9 +484,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz", - "integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==", + "version": "20.9.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.1.tgz", + "integrity": "sha512-HhmzZh5LSJNS5O8jQKpJ/3ZcrrlG6L70hpGqMIAoM9YVD0YBRNWYsfwcXq8VnSjlNpCpgLzMXdiPo+dxcvSmiA==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -820,9 +906,9 @@ "dev": true }, "node_modules/badges": { - "version": "4.34.0", - "resolved": "https://registry.npmjs.org/badges/-/badges-4.34.0.tgz", - "integrity": "sha512-X4dmnTht9p5PEv5Us/W3nLNtDxIzUWJ24U5Jt93gUixGWV0N2dN9t10odTMj5X/wvsxSvoNo3yn6tmVkUDwXoA==", + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/badges/-/badges-4.35.0.tgz", + "integrity": "sha512-lyO25Wm/VdC+I+TxBAKkq444OMdWbszsH1WFcUthIYVVpTLHXKa1C0Vr4JCuLvsKjbBnQm6rEQMAsS34VL1ufA==", "engines": { "node": ">=10" }, @@ -1246,15 +1332,15 @@ } }, "node_modules/eslint": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", - "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", + "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.53.0", + "@eslint/js": "8.54.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -1990,9 +2076,9 @@ } }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", "dev": true, "engines": { "node": ">= 4" @@ -3823,12 +3909,12 @@ } }, "node_modules/valid-directory": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/valid-directory/-/valid-directory-4.2.0.tgz", - "integrity": "sha512-H48H7Jbw2zLZl4DA8QLkT9HsfgGHg+MJi1mOfj+eybe2VhElHsD/0WBaKMBDJAVFq+Pi8w1leiYITYAKZtg/FA==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/valid-directory/-/valid-directory-4.4.0.tgz", + "integrity": "sha512-RdV/rBBN6MZrksSUc2Eg6lorVJRaS0aN1JM7iXQj8jVRdWQizrb10l4okxDtBdzudB2EFaDUic75W09SLrFl6w==", "dev": true, "dependencies": { - "@bevry/valid-filename": "^2.0.0", + "@bevry/valid-filename": "^2.1.0", "fdir": "^6.1.1" }, "bin": { diff --git a/package.json b/package.json index 69e8f30..9a22c6a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "title": "Projectz", "name": "projectz", - "version": "3.1.0", + "version": "3.2.0", "description": "Stop wasting time syncing and updating your project's README and Package Files!", "homepage": "https://github.com/bevry/projectz", "license": "Artistic-2.0", @@ -149,9 +149,11 @@ } }, "dependencies": { - "@bevry/file": "^2.2.0", - "@bevry/json": "^1.8.0", - "badges": "^4.34.0", + "@bevry/fs-list": "^2.0.0", + "@bevry/fs-read": "^1.0.0", + "@bevry/fs-write": "^1.0.0", + "@bevry/json": "^1.9.0", + "badges": "^4.35.0", "caterpillar": "^6.11.0", "fellow": "^6.25.0", "get-cli-arg": "^8.1.0", @@ -161,11 +163,11 @@ }, "devDependencies": { "@bevry/update-contributors": "^1.23.0", - "@types/node": "^20.9.0", + "@types/node": "^20.9.1", "@typescript-eslint/eslint-plugin": "^6.11.0", "@typescript-eslint/parser": "^6.11.0", "assert-helpers": "^11.4.0", - "eslint": "^8.53.0", + "eslint": "^8.54.0", "eslint-config-bevry": "^4.0.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-prettier": "^5.0.1", @@ -176,7 +178,7 @@ "surge": "^0.23.1", "typedoc": "^0.25.3", "typescript": "5.2.2", - "valid-directory": "^4.2.0" + "valid-directory": "^4.4.0" }, "scripts": { "our:bin": "node ./bin.cjs", @@ -218,5 +220,8 @@ }, "boundation": { "desiredNodeOnly": true + }, + "testen": { + "serial": true } } \ No newline at end of file diff --git a/source/index.ts b/source/index.ts index efd68a6..3a01418 100644 --- a/source/index.ts +++ b/source/index.ts @@ -4,7 +4,9 @@ // First we need to import the libraries we require. // Load in the file system libraries -import { readFile, readDirectory, writeFile } from '@bevry/file' +import list from '@bevry/fs-list' +import read from '@bevry/fs-read' +import write from '@bevry/fs-write' import { resolve, join, dirname } from 'path' // Handle configuration files @@ -125,7 +127,7 @@ export class Projectz { const ReadmeFiles = Object.keys(this.filenamesForReadmeFiles) // Load - const files = await readDirectory(this.cwd) + const files = await list(this.cwd) for (const file of files) { const filePath = join(this.cwd, file) @@ -142,7 +144,7 @@ export class Projectz { for (const key of ReadmeFiles) { if (file.toLowerCase().startsWith(key)) { this.log('info', `Reading meta file: ${filePath}`) - const data = await readFile(filePath) + const data = await read(filePath) this.filenamesForReadmeFiles[key] = file this.dataForReadmeFiles[key] = data.toString() } @@ -615,7 +617,7 @@ export class Projectz { const filepath = join(this.cwd, filename) this.log('info', `Saving readme file: ${filepath}`) const content = enhancedReadmesData[key] - return writeFile(filepath, content) + return write(filepath, content) }, ), ]) diff --git a/test-fixtures/out-expected/README.md b/test-fixtures/out-expected/README.md index 054ac13..f65b445 100644 --- a/test-fixtures/out-expected/README.md +++ b/test-fixtures/out-expected/README.md @@ -13,7 +13,7 @@ Dependency Status Dev Dependency Status
-Slack community badge +Slack community badge Patreon donate button Gratipay donate button Flattr donate button diff --git a/test-fixtures/src/README.md b/test-fixtures/src/README.md index 054ac13..f65b445 100644 --- a/test-fixtures/src/README.md +++ b/test-fixtures/src/README.md @@ -13,7 +13,7 @@ Dependency Status Dev Dependency Status
-Slack community badge +Slack community badge Patreon donate button Gratipay donate button Flattr donate button