From 0432b1df1deee0289b83a58b7762b9e855e2a59b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 21:54:14 +0000 Subject: [PATCH 01/45] Bump prettier from 3.3.0 to 3.3.1 Bumps [prettier](https://github.com/prettier/prettier) from 3.3.0 to 3.3.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.3.0...3.3.1) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index c163c347a65..621ce6ea42e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "hydefront": "^3.3.0", "laravel-mix": "^6.0.49", "postcss": "^8.4.38", - "prettier": "3.3.0", + "prettier": "3.3.1", "tailwindcss": "^3.4.3" } }, @@ -7529,9 +7529,9 @@ "dev": true }, "node_modules/prettier": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.0.tgz", - "integrity": "sha512-J9odKxERhCQ10OC2yb93583f6UnYutOeiV5i0zEDS7UGTdUt0u+y8erxl3lBKvwo/JHyyoEdXjwp4dke9oyZ/g==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.1.tgz", + "integrity": "sha512-7CAwy5dRsxs8PHXT3twixW9/OEll8MLE0VRPCJyl7CkS6VHGPSlsVaWTiASPTyGyYRyApxlaWTzwUxVNrhcwDg==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -15447,9 +15447,9 @@ "dev": true }, "prettier": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.0.tgz", - "integrity": "sha512-J9odKxERhCQ10OC2yb93583f6UnYutOeiV5i0zEDS7UGTdUt0u+y8erxl3lBKvwo/JHyyoEdXjwp4dke9oyZ/g==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.1.tgz", + "integrity": "sha512-7CAwy5dRsxs8PHXT3twixW9/OEll8MLE0VRPCJyl7CkS6VHGPSlsVaWTiASPTyGyYRyApxlaWTzwUxVNrhcwDg==", "dev": true }, "pretty-time": { diff --git a/package.json b/package.json index 2e397a2a96e..5a19e0a89ac 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "hydefront": "^3.3.0", "laravel-mix": "^6.0.49", "postcss": "^8.4.38", - "prettier": "3.3.0", + "prettier": "3.3.1", "tailwindcss": "^3.4.3" } } From 5b01fe46ebdd047eadb0d6df65ca7b544cfeb283 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 8 Jun 2024 09:21:46 +0000 Subject: [PATCH 02/45] Use late static bindings to support overriding file finding --- packages/framework/src/Support/DataCollections.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/framework/src/Support/DataCollections.php b/packages/framework/src/Support/DataCollections.php index a6ea6e41466..b5ab786edef 100644 --- a/packages/framework/src/Support/DataCollections.php +++ b/packages/framework/src/Support/DataCollections.php @@ -51,7 +51,7 @@ public static function markdown(string $name): static { static::needsDirectory(static::$sourceDirectory); - return new static(DataCollections::findFiles($name, 'md')->mapWithKeys(function (string $file): array { + return new static(static::findFiles($name, 'md')->mapWithKeys(function (string $file): array { return [static::makeIdentifier($file) => MarkdownFileParser::parse($file)]; })); } @@ -67,7 +67,7 @@ public static function yaml(string $name): static { static::needsDirectory(static::$sourceDirectory); - return new static(DataCollections::findFiles($name, ['yaml', 'yml'])->mapWithKeys(function (string $file): array { + return new static(static::findFiles($name, ['yaml', 'yml'])->mapWithKeys(function (string $file): array { return [static::makeIdentifier($file) => MarkdownFileParser::parse($file)->matter()]; })); } @@ -83,7 +83,7 @@ public static function json(string $name, bool $asArray = false): static { static::needsDirectory(static::$sourceDirectory); - return new static(DataCollections::findFiles($name, 'json')->mapWithKeys(function (string $file) use ($asArray): array { + return new static(static::findFiles($name, 'json')->mapWithKeys(function (string $file) use ($asArray): array { return [static::makeIdentifier($file) => json_decode(Filesystem::get($file), $asArray)]; })); } From 38f938c487d6a4bfa21398c4efb7efdb0ddee038 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 8 Jun 2024 09:26:37 +0000 Subject: [PATCH 03/45] Update RELEASE_NOTES.md --- RELEASE_NOTES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 156e905b363..c9bfe0aafa2 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -16,6 +16,8 @@ This serves two purposes: ### Changed - When a navigation group is set in front matter, it will now be used regardless of the subdirectory configuration in https://github.com/hydephp/develop/pull/1703 (fixes https://github.com/hydephp/develop/issues/1515) +- Use late static bindings to support overriding data collections file finding in https://github.com/hydephp/develop/pull/1717 (fixes https://github.com/hydephp/develop/issues/1716) + ### Deprecated - for soon-to-be removed features. @@ -25,6 +27,7 @@ This serves two purposes: ### Fixed - Fixed explicitly set front matter navigation group behavior being dependent on subdirectory configuration, fixing https://github.com/hydephp/develop/issues/1515 in https://github.com/hydephp/develop/pull/1703 +- Fixed DataCollections file finding method not being able to be overriden https://github.com/hydephp/develop/issues/1716 in https://github.com/hydephp/develop/pull/1717 ### Security - in case of vulnerabilities. From e868f0bb3b1a04de1a09717e74094b80a5134714 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 8 Jun 2024 10:46:05 +0000 Subject: [PATCH 04/45] Bump tailwindcss from 3.4.3 to 3.4.4 Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.4.3 to 3.4.4. - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.4/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.4.3...v3.4.4) --- updated-dependencies: - dependency-name: tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 621ce6ea42e..1025f6927bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "laravel-mix": "^6.0.49", "postcss": "^8.4.38", "prettier": "3.3.1", - "tailwindcss": "^3.4.3" + "tailwindcss": "^3.4.4" } }, "node_modules/@alloc/quick-lru": { @@ -8732,9 +8732,9 @@ } }, "node_modules/tailwindcss": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.3.tgz", - "integrity": "sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==", + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.4.tgz", + "integrity": "sha512-ZoyXOdJjISB7/BcLTR6SEsLgKtDStYyYZVLsUtWChO4Ps20CBad7lfJKVDiejocV4ME1hLmyY0WJE3hSDcmQ2A==", "dev": true, "dependencies": { "@alloc/quick-lru": "^5.2.0", @@ -16385,9 +16385,9 @@ } }, "tailwindcss": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.3.tgz", - "integrity": "sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==", + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.4.tgz", + "integrity": "sha512-ZoyXOdJjISB7/BcLTR6SEsLgKtDStYyYZVLsUtWChO4Ps20CBad7lfJKVDiejocV4ME1hLmyY0WJE3hSDcmQ2A==", "dev": true, "requires": { "@alloc/quick-lru": "^5.2.0", diff --git a/package.json b/package.json index 5a19e0a89ac..3f2f81d6d35 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,6 @@ "laravel-mix": "^6.0.49", "postcss": "^8.4.38", "prettier": "3.3.1", - "tailwindcss": "^3.4.3" + "tailwindcss": "^3.4.4" } } From f844fee887f2e5e4ff6b296598ee09c8ea2c0e1f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Jun 2024 21:04:40 +0000 Subject: [PATCH 05/45] Bump prettier from 3.3.1 to 3.3.2 Bumps [prettier](https://github.com/prettier/prettier) from 3.3.1 to 3.3.2. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.3.1...3.3.2) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1025f6927bd..0f66a47815d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "hydefront": "^3.3.0", "laravel-mix": "^6.0.49", "postcss": "^8.4.38", - "prettier": "3.3.1", + "prettier": "3.3.2", "tailwindcss": "^3.4.4" } }, @@ -7529,9 +7529,9 @@ "dev": true }, "node_modules/prettier": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.1.tgz", - "integrity": "sha512-7CAwy5dRsxs8PHXT3twixW9/OEll8MLE0VRPCJyl7CkS6VHGPSlsVaWTiASPTyGyYRyApxlaWTzwUxVNrhcwDg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", + "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -15447,9 +15447,9 @@ "dev": true }, "prettier": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.1.tgz", - "integrity": "sha512-7CAwy5dRsxs8PHXT3twixW9/OEll8MLE0VRPCJyl7CkS6VHGPSlsVaWTiASPTyGyYRyApxlaWTzwUxVNrhcwDg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", + "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", "dev": true }, "pretty-time": { diff --git a/package.json b/package.json index 3f2f81d6d35..dbde79ff5c2 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "hydefront": "^3.3.0", "laravel-mix": "^6.0.49", "postcss": "^8.4.38", - "prettier": "3.3.1", + "prettier": "3.3.2", "tailwindcss": "^3.4.4" } } From 9fb468b8474271a071fec96e88dc0e1ca39b43b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 09:28:30 +0000 Subject: [PATCH 06/45] Bump braces from 3.0.2 to 3.0.3 in /packages/hydefront Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] --- packages/hydefront/package-lock.json | 760 +++++++++++++-------------- 1 file changed, 380 insertions(+), 380 deletions(-) diff --git a/packages/hydefront/package-lock.json b/packages/hydefront/package-lock.json index 25a2d68b1aa..5903bca444a 100644 --- a/packages/hydefront/package-lock.json +++ b/packages/hydefront/package-lock.json @@ -1,385 +1,385 @@ { - "name": "hydefront", - "version": "3.3.4", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "hydefront", - "version": "3.3.4", - "license": "MIT", - "devDependencies": { - "sass": "1.50.0" - } - }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/immutable": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz", - "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==", - "dev": true - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/sass": { - "version": "1.50.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.50.0.tgz", - "integrity": "sha512-cLsD6MEZ5URXHStxApajEh7gW189kkjn4Rc8DQweMyF+o5HF5nfEz8QYLMlPsTOD88DknatTmBWkOcw5/LnJLQ==", - "dev": true, - "dependencies": { - "chokidar": ">=3.0.0 <4.0.0", - "immutable": "^4.0.0", - "source-map-js": ">=0.6.2 <2.0.0" - }, - "bin": { - "sass": "sass.js" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - } + "name": "hydefront", + "version": "3.3.4", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "hydefront", + "version": "3.3.4", + "license": "MIT", + "devDependencies": { + "sass": "1.50.0" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } }, - "dependencies": { - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "immutable": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz", - "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==", - "dev": true - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "sass": { - "version": "1.50.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.50.0.tgz", - "integrity": "sha512-cLsD6MEZ5URXHStxApajEh7gW189kkjn4Rc8DQweMyF+o5HF5nfEz8QYLMlPsTOD88DknatTmBWkOcw5/LnJLQ==", - "dev": true, - "requires": { - "chokidar": ">=3.0.0 <4.0.0", - "immutable": "^4.0.0", - "source-map-js": ">=0.6.2 <2.0.0" - } - }, - "source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "dev": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/immutable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz", + "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/sass": { + "version": "1.50.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.50.0.tgz", + "integrity": "sha512-cLsD6MEZ5URXHStxApajEh7gW189kkjn4Rc8DQweMyF+o5HF5nfEz8QYLMlPsTOD88DknatTmBWkOcw5/LnJLQ==", + "dev": true, + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + } + }, + "dependencies": { + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, + "braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "requires": { + "fill-range": "^7.1.1" + } + }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "immutable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz", + "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "sass": { + "version": "1.50.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.50.0.tgz", + "integrity": "sha512-cLsD6MEZ5URXHStxApajEh7gW189kkjn4Rc8DQweMyF+o5HF5nfEz8QYLMlPsTOD88DknatTmBWkOcw5/LnJLQ==", + "dev": true, + "requires": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + } + }, + "source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } } + } } From 1e9c65fba8978587950adb15fe1ae3700706c391 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 09:28:46 +0000 Subject: [PATCH 07/45] Bump braces from 3.0.2 to 3.0.3 Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0f66a47815d..c6f4f1abba0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2968,12 +2968,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -4662,9 +4662,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -12099,12 +12099,12 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "brorand": { @@ -13411,9 +13411,9 @@ "dev": true }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "requires": { "to-regex-range": "^5.0.1" From ef288cbbc15cb34e85859718e919abe337f26e88 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 15:00:29 +0200 Subject: [PATCH 08/45] Add route list format option --- packages/framework/src/Console/Commands/RouteListCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/framework/src/Console/Commands/RouteListCommand.php b/packages/framework/src/Console/Commands/RouteListCommand.php index 0eb86431379..ba46388b769 100644 --- a/packages/framework/src/Console/Commands/RouteListCommand.php +++ b/packages/framework/src/Console/Commands/RouteListCommand.php @@ -18,7 +18,7 @@ class RouteListCommand extends Command { /** @var string */ - protected $signature = 'route:list'; + protected $signature = 'route:list {--format=txt : The output format (txt)}'; /** @var string */ protected $description = 'Display all the registered routes'; From 384fbae07d39fb351f3aadaf5cc92f9ee8432ffd Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 15:05:47 +0200 Subject: [PATCH 09/45] Test console route list with text format option --- .../Feature/Commands/RouteListCommandTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/framework/tests/Feature/Commands/RouteListCommandTest.php b/packages/framework/tests/Feature/Commands/RouteListCommandTest.php index 95edc551478..6e00d082207 100644 --- a/packages/framework/tests/Feature/Commands/RouteListCommandTest.php +++ b/packages/framework/tests/Feature/Commands/RouteListCommandTest.php @@ -98,6 +98,22 @@ public function testConsoleRouteListWithTypeLabel() ]])->assertExitCode(0); } + public function testConsoleRouteListWithTextFormatOption() + { + $this->artisan('route:list --format=txt') + ->expectsTable($this->headers(), [[ + 'BladePage', + '_pages/404.blade.php', + '_site/404.html', + '404', + ], [ + 'BladePage', + '_pages/index.blade.php', + '_site/index.html', + 'index', + ]])->assertExitCode(0); + } + protected function headers(): array { return ['Page Type', 'Source File', 'Output File', 'Route Key']; From 78b6af2e3d1c8d0c0fb0104d11cf2b4da9d7b6ab Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 15:06:19 +0200 Subject: [PATCH 10/45] Check if the format is for txt format --- packages/framework/src/Console/Commands/RouteListCommand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/framework/src/Console/Commands/RouteListCommand.php b/packages/framework/src/Console/Commands/RouteListCommand.php index ba46388b769..a772fb2ea78 100644 --- a/packages/framework/src/Console/Commands/RouteListCommand.php +++ b/packages/framework/src/Console/Commands/RouteListCommand.php @@ -27,7 +27,9 @@ public function handle(): int { $routes = $this->generate(); - $this->table($this->makeHeader($routes), $routes); + if ($this->option('format') === 'txt') { + $this->table($this->makeHeader($routes), $routes); + } return Command::SUCCESS; } From a7293f689a2ebcfc6c79861417e7714e6fdfc574 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 15:08:13 +0200 Subject: [PATCH 11/45] Fail if the command is supplied with invalid format option --- .../framework/src/Console/Commands/RouteListCommand.php | 4 ++++ .../tests/Feature/Commands/RouteListCommandTest.php | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/packages/framework/src/Console/Commands/RouteListCommand.php b/packages/framework/src/Console/Commands/RouteListCommand.php index a772fb2ea78..491198c65f6 100644 --- a/packages/framework/src/Console/Commands/RouteListCommand.php +++ b/packages/framework/src/Console/Commands/RouteListCommand.php @@ -29,6 +29,10 @@ public function handle(): int if ($this->option('format') === 'txt') { $this->table($this->makeHeader($routes), $routes); + } else { + $this->error("Invalid format provided. Only 'txt' is supported."); + + return Command::FAILURE; } return Command::SUCCESS; diff --git a/packages/framework/tests/Feature/Commands/RouteListCommandTest.php b/packages/framework/tests/Feature/Commands/RouteListCommandTest.php index 6e00d082207..cedf35b7a50 100644 --- a/packages/framework/tests/Feature/Commands/RouteListCommandTest.php +++ b/packages/framework/tests/Feature/Commands/RouteListCommandTest.php @@ -114,6 +114,13 @@ public function testConsoleRouteListWithTextFormatOption() ]])->assertExitCode(0); } + public function testConsoleRouteListWithInvalidFormatOption() + { + $this->artisan('route:list --format=foo') + ->expectsOutput("Invalid format provided. Only 'txt' is supported.") + ->assertExitCode(1); + } + protected function headers(): array { return ['Page Type', 'Source File', 'Output File', 'Route Key']; From 99eca8ea304f3e1d4cd5ef4236d9fecd9d0bb96e Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 16:17:29 +0200 Subject: [PATCH 12/45] Support JSON route list formatting Fixes https://github.com/hydephp/develop/issues/1715 --- .../src/Console/Commands/RouteListCommand.php | 7 ++++-- .../Feature/Commands/RouteListCommandTest.php | 22 ++++++++++++++++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/packages/framework/src/Console/Commands/RouteListCommand.php b/packages/framework/src/Console/Commands/RouteListCommand.php index 491198c65f6..5befef2c6f0 100644 --- a/packages/framework/src/Console/Commands/RouteListCommand.php +++ b/packages/framework/src/Console/Commands/RouteListCommand.php @@ -10,6 +10,7 @@ use function array_map; use function array_keys; +use function json_encode; use function array_values; /** @@ -18,7 +19,7 @@ class RouteListCommand extends Command { /** @var string */ - protected $signature = 'route:list {--format=txt : The output format (txt)}'; + protected $signature = 'route:list {--format=txt : The output format (txt or json)}'; /** @var string */ protected $description = 'Display all the registered routes'; @@ -29,8 +30,10 @@ public function handle(): int if ($this->option('format') === 'txt') { $this->table($this->makeHeader($routes), $routes); + } elseif ($this->option('format') === 'json') { + $this->line(json_encode($routes, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); } else { - $this->error("Invalid format provided. Only 'txt' is supported."); + $this->error("Invalid format provided. Only 'txt' and 'json' are supported."); return Command::FAILURE; } diff --git a/packages/framework/tests/Feature/Commands/RouteListCommandTest.php b/packages/framework/tests/Feature/Commands/RouteListCommandTest.php index cedf35b7a50..b715501c251 100644 --- a/packages/framework/tests/Feature/Commands/RouteListCommandTest.php +++ b/packages/framework/tests/Feature/Commands/RouteListCommandTest.php @@ -114,10 +114,30 @@ public function testConsoleRouteListWithTextFormatOption() ]])->assertExitCode(0); } + public function testConsoleRouteListWithJsonFormatOption() + { + $this->artisan('route:list --format=json') + ->expectsOutput(json_encode([ + [ + 'page_type' => 'BladePage', + 'source_file' => '_pages/404.blade.php', + 'output_file' => '_site/404.html', + 'route_key' => '404', + ], + [ + 'page_type' => 'BladePage', + 'source_file' => '_pages/index.blade.php', + 'output_file' => '_site/index.html', + 'route_key' => 'index', + ], + ], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)) + ->assertExitCode(0); + } + public function testConsoleRouteListWithInvalidFormatOption() { $this->artisan('route:list --format=foo') - ->expectsOutput("Invalid format provided. Only 'txt' is supported.") + ->expectsOutput("Invalid format provided. Only 'txt' and 'json' are supported.") ->assertExitCode(1); } From 7a9e3435c3c7826f05208006a51175df40c6201f Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 16:25:07 +0200 Subject: [PATCH 13/45] Disable ANSI formatting for JSON output --- packages/framework/src/Console/Commands/RouteListCommand.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/framework/src/Console/Commands/RouteListCommand.php b/packages/framework/src/Console/Commands/RouteListCommand.php index 5befef2c6f0..dee91fe36ba 100644 --- a/packages/framework/src/Console/Commands/RouteListCommand.php +++ b/packages/framework/src/Console/Commands/RouteListCommand.php @@ -31,6 +31,8 @@ public function handle(): int if ($this->option('format') === 'txt') { $this->table($this->makeHeader($routes), $routes); } elseif ($this->option('format') === 'json') { + // Disable ANSI formatting + $this->output->setDecorated(false); $this->line(json_encode($routes, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); } else { $this->error("Invalid format provided. Only 'txt' and 'json' are supported."); From 5e44a7e73c51fa61853e400b64b39035092097c4 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 16:25:21 +0200 Subject: [PATCH 14/45] Normalize formatting --- packages/framework/src/Console/Commands/RouteListCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/framework/src/Console/Commands/RouteListCommand.php b/packages/framework/src/Console/Commands/RouteListCommand.php index dee91fe36ba..654733cc4ac 100644 --- a/packages/framework/src/Console/Commands/RouteListCommand.php +++ b/packages/framework/src/Console/Commands/RouteListCommand.php @@ -33,7 +33,7 @@ public function handle(): int } elseif ($this->option('format') === 'json') { // Disable ANSI formatting $this->output->setDecorated(false); - $this->line(json_encode($routes, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); + $this->output->writeln(json_encode($routes, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); } else { $this->error("Invalid format provided. Only 'txt' and 'json' are supported."); From 808b3b161288878f8a1b25f65cfa854e7915cb47 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 16:26:24 +0200 Subject: [PATCH 15/45] Extract helper method --- .../src/Console/Commands/RouteListCommand.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/framework/src/Console/Commands/RouteListCommand.php b/packages/framework/src/Console/Commands/RouteListCommand.php index 654733cc4ac..80a1260c4dd 100644 --- a/packages/framework/src/Console/Commands/RouteListCommand.php +++ b/packages/framework/src/Console/Commands/RouteListCommand.php @@ -31,9 +31,7 @@ public function handle(): int if ($this->option('format') === 'txt') { $this->table($this->makeHeader($routes), $routes); } elseif ($this->option('format') === 'json') { - // Disable ANSI formatting - $this->output->setDecorated(false); - $this->output->writeln(json_encode($routes, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); + $this->writeRaw(json_encode($routes, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); } else { $this->error("Invalid format provided. Only 'txt' and 'json' are supported."); @@ -54,4 +52,11 @@ protected function makeHeader(array $routes): array { return array_map(Hyde::makeTitle(...), array_keys($routes[0])); } + + /** Write a message without ANSI formatting */ + protected function writeRaw(string $message): void + { + $this->output->setDecorated(false); + $this->output->writeln($message); + } } From 26fa83681a8fd23eaad33ca2bba3a5f11a0f4065 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 16:29:55 +0200 Subject: [PATCH 16/45] Update RELEASE_NOTES.md --- RELEASE_NOTES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index c9bfe0aafa2..c74520cbab1 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -13,6 +13,7 @@ This serves two purposes: - Added support for using HTML comments to create Markdown code block filepath labels in https://github.com/hydephp/develop/pull/1693 - Added a config option to disable the theme toggle buttons to automatically use browser settings in https://github.com/hydephp/develop/pull/1697 - You can now specify which path to open when using the `--open` option in the serve command in https://github.com/hydephp/develop/pull/1694 +- Added a `--format=json` option to the `route:list` command in https://github.com/hydephp/develop/pull/1724 ### Changed - When a navigation group is set in front matter, it will now be used regardless of the subdirectory configuration in https://github.com/hydephp/develop/pull/1703 (fixes https://github.com/hydephp/develop/issues/1515) From c53b618968fcb6f72abc49f33bd154b732a1227d Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 16:31:24 +0200 Subject: [PATCH 17/45] Extract helper method --- .../src/Console/Commands/RouteListCommand.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/framework/src/Console/Commands/RouteListCommand.php b/packages/framework/src/Console/Commands/RouteListCommand.php index 80a1260c4dd..e71d852a626 100644 --- a/packages/framework/src/Console/Commands/RouteListCommand.php +++ b/packages/framework/src/Console/Commands/RouteListCommand.php @@ -33,9 +33,7 @@ public function handle(): int } elseif ($this->option('format') === 'json') { $this->writeRaw(json_encode($routes, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); } else { - $this->error("Invalid format provided. Only 'txt' and 'json' are supported."); - - return Command::FAILURE; + return $this->fail("Invalid format provided. Only 'txt' and 'json' are supported."); } return Command::SUCCESS; @@ -59,4 +57,11 @@ protected function writeRaw(string $message): void $this->output->setDecorated(false); $this->output->writeln($message); } + + protected function fail(string $message): int + { + $this->error($message); + + return Command::FAILURE; + } } From 4df9117142c397496842304eba7e9c24bb2939ea Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 16:34:56 +0200 Subject: [PATCH 18/45] Refactor if/else chain to single match expression --- .../src/Console/Commands/RouteListCommand.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/packages/framework/src/Console/Commands/RouteListCommand.php b/packages/framework/src/Console/Commands/RouteListCommand.php index e71d852a626..3feb7875cfa 100644 --- a/packages/framework/src/Console/Commands/RouteListCommand.php +++ b/packages/framework/src/Console/Commands/RouteListCommand.php @@ -28,15 +28,11 @@ public function handle(): int { $routes = $this->generate(); - if ($this->option('format') === 'txt') { - $this->table($this->makeHeader($routes), $routes); - } elseif ($this->option('format') === 'json') { - $this->writeRaw(json_encode($routes, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); - } else { - return $this->fail("Invalid format provided. Only 'txt' and 'json' are supported."); - } - - return Command::SUCCESS; + return match ($this->option('format')) { + 'txt' => $this->table($this->makeHeader($routes), $routes) ?? Command::SUCCESS, + 'json' => $this->writeRaw(json_encode($routes, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)) ?? Command::SUCCESS, + default => $this->fail("Invalid format provided. Only 'txt' and 'json' are supported."), + }; } /** @return array> */ From 5e4caf0e13c31cce385ba0c3f6ec47035c10f9c3 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 16:35:43 +0200 Subject: [PATCH 19/45] Inline helper method --- .../framework/src/Console/Commands/RouteListCommand.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/framework/src/Console/Commands/RouteListCommand.php b/packages/framework/src/Console/Commands/RouteListCommand.php index 3feb7875cfa..b0e923ec968 100644 --- a/packages/framework/src/Console/Commands/RouteListCommand.php +++ b/packages/framework/src/Console/Commands/RouteListCommand.php @@ -31,7 +31,7 @@ public function handle(): int return match ($this->option('format')) { 'txt' => $this->table($this->makeHeader($routes), $routes) ?? Command::SUCCESS, 'json' => $this->writeRaw(json_encode($routes, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)) ?? Command::SUCCESS, - default => $this->fail("Invalid format provided. Only 'txt' and 'json' are supported."), + default => $this->error("Invalid format provided. Only 'txt' and 'json' are supported.") ?? Command::FAILURE, }; } @@ -53,11 +53,4 @@ protected function writeRaw(string $message): void $this->output->setDecorated(false); $this->output->writeln($message); } - - protected function fail(string $message): int - { - $this->error($message); - - return Command::FAILURE; - } } From d5a55f2debbecd4299e1ea39d318087149637c97 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 16:37:07 +0200 Subject: [PATCH 20/45] Use Laravel Arr helper to map in more logical order I think this makes more sense as it has the array first in the call --- packages/framework/src/Console/Commands/RouteListCommand.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/framework/src/Console/Commands/RouteListCommand.php b/packages/framework/src/Console/Commands/RouteListCommand.php index b0e923ec968..b873c862001 100644 --- a/packages/framework/src/Console/Commands/RouteListCommand.php +++ b/packages/framework/src/Console/Commands/RouteListCommand.php @@ -5,6 +5,7 @@ namespace Hyde\Console\Commands; use Hyde\Hyde; +use Illuminate\Support\Arr; use Hyde\Console\Concerns\Command; use Hyde\Support\Internal\RouteListItem; @@ -38,13 +39,13 @@ public function handle(): int /** @return array> */ protected function generate(): array { - return array_map(RouteListItem::format(...), array_values(Hyde::routes()->all())); + return Arr::map(array_values(Hyde::routes()->all()), RouteListItem::format(...)); } /** @param array> $routes */ protected function makeHeader(array $routes): array { - return array_map(Hyde::makeTitle(...), array_keys($routes[0])); + return Arr::map(array_keys($routes[0]), Hyde::makeTitle(...)); } /** Write a message without ANSI formatting */ From 5f8ec2247702a27ef86f43fbc199162a9b3b6a92 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 16:39:45 +0200 Subject: [PATCH 21/45] Remove unused function import --- packages/framework/src/Console/Commands/RouteListCommand.php | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/framework/src/Console/Commands/RouteListCommand.php b/packages/framework/src/Console/Commands/RouteListCommand.php index b873c862001..1c1937b432c 100644 --- a/packages/framework/src/Console/Commands/RouteListCommand.php +++ b/packages/framework/src/Console/Commands/RouteListCommand.php @@ -9,7 +9,6 @@ use Hyde\Console\Concerns\Command; use Hyde\Support\Internal\RouteListItem; -use function array_map; use function array_keys; use function json_encode; use function array_values; From a898d4302f439497d8f70b4bbf32602c5eb054cf Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 16:49:18 +0200 Subject: [PATCH 22/45] Fix release notes spelling --- RELEASE_NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index c74520cbab1..f00dd063b92 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -28,7 +28,7 @@ This serves two purposes: ### Fixed - Fixed explicitly set front matter navigation group behavior being dependent on subdirectory configuration, fixing https://github.com/hydephp/develop/issues/1515 in https://github.com/hydephp/develop/pull/1703 -- Fixed DataCollections file finding method not being able to be overriden https://github.com/hydephp/develop/issues/1716 in https://github.com/hydephp/develop/pull/1717 +- Fixed DataCollections file finding method not being able to be overridden https://github.com/hydephp/develop/issues/1716 in https://github.com/hydephp/develop/pull/1717 ### Security - in case of vulnerabilities. From 2eaa1e8ffcbb0a1aad1bb30a9a4ef844e140c31a Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 18:31:15 +0200 Subject: [PATCH 23/45] Use assert same instead of assert equals for scalar value --- .../tests/Feature/Foundation/HyperlinksTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/framework/tests/Feature/Foundation/HyperlinksTest.php b/packages/framework/tests/Feature/Foundation/HyperlinksTest.php index 584b8e33d98..10eb5db949d 100644 --- a/packages/framework/tests/Feature/Foundation/HyperlinksTest.php +++ b/packages/framework/tests/Feature/Foundation/HyperlinksTest.php @@ -35,7 +35,7 @@ public function testAssetHelperGetsRelativeWebLinkToImageStoredInSiteMediaFolder ]; foreach ($tests as $input => $expected) { - $this->assertEquals($this->class->asset($input), $expected); + $this->assertSame($this->class->asset($input), $expected); } } @@ -50,30 +50,30 @@ public function testAssetHelperResolvesPathsForNestedPages() foreach ($tests as $input => $expected) { $this->mockCurrentPage('foo/bar'); - $this->assertEquals($this->class->asset($input), $expected); + $this->assertSame($this->class->asset($input), $expected); } } public function testAssetHelperReturnsQualifiedAbsoluteUriWhenRequestedAndSiteHasBaseUrl() { - $this->assertEquals('http://localhost/media/test.jpg', $this->class->asset('test.jpg', true)); + $this->assertSame('http://localhost/media/test.jpg', $this->class->asset('test.jpg', true)); } public function testAssetHelperReturnsDefaultRelativePathWhenQualifiedAbsoluteUriIsRequestedButSiteHasNoBaseUrl() { config(['hyde.url' => null]); - $this->assertEquals('media/test.jpg', $this->class->asset('test.jpg', true)); + $this->assertSame('media/test.jpg', $this->class->asset('test.jpg', true)); } public function testAssetHelperReturnsInputWhenQualifiedAbsoluteUriIsRequestedButImageIsAlreadyQualified() { - $this->assertEquals('http://localhost/media/test.jpg', $this->class->asset('http://localhost/media/test.jpg', true)); + $this->assertSame('http://localhost/media/test.jpg', $this->class->asset('http://localhost/media/test.jpg', true)); } public function testAssetHelperUsesConfiguredMediaDirectory() { Hyde::setMediaDirectory('_assets'); - $this->assertEquals('assets/test.jpg', $this->class->asset('test.jpg')); + $this->assertSame('assets/test.jpg', $this->class->asset('test.jpg')); } public function testMediaLinkHelper() From d5f52b5d2510a3a9a1e6575399813b0c452e701f Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 18:31:32 +0200 Subject: [PATCH 24/45] Remove nullable modifier for already checked type --- packages/framework/src/Foundation/Kernel/Hyperlinks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/framework/src/Foundation/Kernel/Hyperlinks.php b/packages/framework/src/Foundation/Kernel/Hyperlinks.php index 9755841439d..b6c68c9b0e6 100644 --- a/packages/framework/src/Foundation/Kernel/Hyperlinks.php +++ b/packages/framework/src/Foundation/Kernel/Hyperlinks.php @@ -144,7 +144,7 @@ public function url(string $path = ''): string $path = $this->formatLink(trim($path, '/')); if ($this->hasSiteUrl()) { - return rtrim(rtrim((string) Config::getNullableString('hyde.url'), '/')."/$path", '/'); + return rtrim(rtrim((string) Config::getString('hyde.url'), '/')."/$path", '/'); } throw new BaseUrlNotSetException(); From ce16673ef6f9f66c040641bcc4bb8750658b93e5 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 18:31:41 +0200 Subject: [PATCH 25/45] Unwrap evaluated type cast --- packages/framework/src/Foundation/Kernel/Hyperlinks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/framework/src/Foundation/Kernel/Hyperlinks.php b/packages/framework/src/Foundation/Kernel/Hyperlinks.php index b6c68c9b0e6..f889d9509b7 100644 --- a/packages/framework/src/Foundation/Kernel/Hyperlinks.php +++ b/packages/framework/src/Foundation/Kernel/Hyperlinks.php @@ -144,7 +144,7 @@ public function url(string $path = ''): string $path = $this->formatLink(trim($path, '/')); if ($this->hasSiteUrl()) { - return rtrim(rtrim((string) Config::getString('hyde.url'), '/')."/$path", '/'); + return rtrim(rtrim(Config::getString('hyde.url'), '/')."/$path", '/'); } throw new BaseUrlNotSetException(); From 4e1b97ec9e53787fd739a11645b06a8e4e6d1904 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 18:32:19 +0200 Subject: [PATCH 26/45] Fix method documentation --- packages/framework/src/Foundation/Kernel/Hyperlinks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/framework/src/Foundation/Kernel/Hyperlinks.php b/packages/framework/src/Foundation/Kernel/Hyperlinks.php index f889d9509b7..98b2acdcac8 100644 --- a/packages/framework/src/Foundation/Kernel/Hyperlinks.php +++ b/packages/framework/src/Foundation/Kernel/Hyperlinks.php @@ -135,9 +135,9 @@ public function hasSiteUrl(): bool /** * Return a qualified URL to the supplied path if a base URL is set. * - * @param string $path optional relative path suffix. Omit to return base url. + * @param string $path An optional relative path suffix. Omit to return the base URL. * - * @throws BaseUrlNotSetException If no site URL is set and no default is provided + * @throws BaseUrlNotSetException If no site URL is set and no path is provided. */ public function url(string $path = ''): string { From b3e93bf4ad564e87b7d379ed483d02fadde275b5 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 17:58:13 +0200 Subject: [PATCH 27/45] Introduce local variable --- packages/framework/src/Foundation/Kernel/Hyperlinks.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/framework/src/Foundation/Kernel/Hyperlinks.php b/packages/framework/src/Foundation/Kernel/Hyperlinks.php index 98b2acdcac8..09362909c91 100644 --- a/packages/framework/src/Foundation/Kernel/Hyperlinks.php +++ b/packages/framework/src/Foundation/Kernel/Hyperlinks.php @@ -129,7 +129,9 @@ public function asset(string $name, bool $preferQualifiedUrl = false): string */ public function hasSiteUrl(): bool { - return ! blank(Config::getNullableString('hyde.url')); + $value = Config::getNullableString('hyde.url'); + + return ! blank($value); } /** From 3cfa8a525eae9d2bf339c6126606c42a9c286d84 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 18:41:52 +0200 Subject: [PATCH 28/45] Method `Hyde::url()` now resolves relative paths instead of throwing We now return the relative path even if the base URL is not set, as this is more likely to be the desired behavior the user's expecting. If the user is trying to get the base URL, but it's not set, we throw the exception. --- .../src/Foundation/Kernel/Hyperlinks.php | 7 +++++++ .../framework/tests/Feature/HelpersTest.php | 9 ++++++++- .../HyperlinksUrlPathHelpersTest.php | 20 +++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/packages/framework/src/Foundation/Kernel/Hyperlinks.php b/packages/framework/src/Foundation/Kernel/Hyperlinks.php index 09362909c91..bd167a07432 100644 --- a/packages/framework/src/Foundation/Kernel/Hyperlinks.php +++ b/packages/framework/src/Foundation/Kernel/Hyperlinks.php @@ -149,6 +149,13 @@ public function url(string $path = ''): string return rtrim(rtrim(Config::getString('hyde.url'), '/')."/$path", '/'); } + // Since v1.7.0, we return the relative path even if the base URL is not set, + // as this is more likely to be the desired behavior the user's expecting. + if (! blank($path)) { + return $path; + } + + // User is trying to get the base URL, but it's not set throw new BaseUrlNotSetException(); } diff --git a/packages/framework/tests/Feature/HelpersTest.php b/packages/framework/tests/Feature/HelpersTest.php index a28e49e9497..d6f34b35e16 100644 --- a/packages/framework/tests/Feature/HelpersTest.php +++ b/packages/framework/tests/Feature/HelpersTest.php @@ -152,10 +152,17 @@ public function testUrlFunctionWithBaseUrl() /** @covers ::url */ public function testUrlFunctionWithoutBaseUrl() + { + $this->app['config']->set(['hyde.url' => null]); + $this->assertSame('foo', url('foo')); + } + + /** @covers ::url */ + public function testUrlFunctionWithoutBaseUrlOrPath() { $this->app['config']->set(['hyde.url' => null]); $this->expectException(\Hyde\Framework\Exceptions\BaseUrlNotSetException::class); - $this->assertNull(url('foo')); + $this->assertNull(url()); } /** @covers ::url */ diff --git a/packages/framework/tests/Unit/Foundation/HyperlinksUrlPathHelpersTest.php b/packages/framework/tests/Unit/Foundation/HyperlinksUrlPathHelpersTest.php index be8fafa99c9..9342341526f 100644 --- a/packages/framework/tests/Unit/Foundation/HyperlinksUrlPathHelpersTest.php +++ b/packages/framework/tests/Unit/Foundation/HyperlinksUrlPathHelpersTest.php @@ -92,6 +92,26 @@ public function testQualifiedUrlThrowsExceptionWhenNoSiteUrlIsSet() $this->class->url(); } + public function testHelperFallsBackToRelativeLinksWhenNoSiteUrlIsSet() + { + config(['hyde.url' => '']); + + $this->assertSame('index.html', $this->class->url('index.html')); + $this->assertSame('foo.html', $this->class->url('foo.html')); + $this->assertSame('foo/bar.html', $this->class->url('foo/bar.html')); + $this->assertSame('docs/index.html', $this->class->url('docs/index.html')); + } + + public function testHelperFallsBackToPrettyRelativeLinksWhenNoSiteUrlIsSetAndPrettyUrlsAreEnabled() + { + config(['hyde.url' => '', 'hyde.pretty_urls' => true]); + + $this->assertSame('/', $this->class->url('index.html')); + $this->assertSame('foo', $this->class->url('foo.html')); + $this->assertSame('docs/', $this->class->url('docs/index.html')); + $this->assertSame('foo/bar', $this->class->url('foo/bar.html')); + } + public function testHelperReturnsExpectedStringWhenSiteUrlIsSet() { config(['hyde.url' => 'https://example.com']); From ef6598e6fc4ca220cc416e86cda6ca17264b484f Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 12 Jun 2024 19:01:45 +0200 Subject: [PATCH 29/45] Method `Hyde::hasSiteUrl()` now returns false when URL is for localhost This better matches the documented method description of "Check if a site base URL has been set in config (or .env).", as this value is `localhost` by default and thus not set by the user. Revert "Method `Hyde::hasSiteUrl()` now returns false when URL is for localhost" This reverts commit 8a13ad94aee29ffcf06579284916aa20e19e36ee. Reapply "Method `Hyde::hasSiteUrl()` now returns false when URL is for localhost" This reverts commit 0c4ab3475a77415ad99cdeae30f84121c6a93b24. Update HelpersTest.php --- .../src/Foundation/Kernel/Hyperlinks.php | 2 +- .../Feature/Foundation/HyperlinksTest.php | 14 ++- .../framework/tests/Feature/HelpersTest.php | 33 ++++++- .../tests/Feature/Views/MetadataViewTest.php | 97 ++++++++++++++++--- .../HyperlinksUrlPathHelpersTest.php | 20 ++++ 5 files changed, 147 insertions(+), 19 deletions(-) diff --git a/packages/framework/src/Foundation/Kernel/Hyperlinks.php b/packages/framework/src/Foundation/Kernel/Hyperlinks.php index bd167a07432..4768bc13e02 100644 --- a/packages/framework/src/Foundation/Kernel/Hyperlinks.php +++ b/packages/framework/src/Foundation/Kernel/Hyperlinks.php @@ -131,7 +131,7 @@ public function hasSiteUrl(): bool { $value = Config::getNullableString('hyde.url'); - return ! blank($value); + return ! blank($value) && $value !== 'http://localhost'; } /** diff --git a/packages/framework/tests/Feature/Foundation/HyperlinksTest.php b/packages/framework/tests/Feature/Foundation/HyperlinksTest.php index 10eb5db949d..bd811f612e1 100644 --- a/packages/framework/tests/Feature/Foundation/HyperlinksTest.php +++ b/packages/framework/tests/Feature/Foundation/HyperlinksTest.php @@ -56,7 +56,8 @@ public function testAssetHelperResolvesPathsForNestedPages() public function testAssetHelperReturnsQualifiedAbsoluteUriWhenRequestedAndSiteHasBaseUrl() { - $this->assertSame('http://localhost/media/test.jpg', $this->class->asset('test.jpg', true)); + config(['hyde.url' => 'https://example.org']); + $this->assertSame('https://example.org/media/test.jpg', $this->class->asset('test.jpg', true)); } public function testAssetHelperReturnsDefaultRelativePathWhenQualifiedAbsoluteUriIsRequestedButSiteHasNoBaseUrl() @@ -65,11 +66,22 @@ public function testAssetHelperReturnsDefaultRelativePathWhenQualifiedAbsoluteUr $this->assertSame('media/test.jpg', $this->class->asset('test.jpg', true)); } + public function testAssetHelperReturnsDefaultRelativePathWhenQualifiedAbsoluteUriIsRequestedButSiteBaseUrlIsLocalhost() + { + $this->assertSame('media/test.jpg', $this->class->asset('test.jpg', true)); + } + public function testAssetHelperReturnsInputWhenQualifiedAbsoluteUriIsRequestedButImageIsAlreadyQualified() { $this->assertSame('http://localhost/media/test.jpg', $this->class->asset('http://localhost/media/test.jpg', true)); } + public function testAssetHelperReturnsInputWhenQualifiedAbsoluteUriIsRequestedButImageIsAlreadyQualifiedRegardlessOfMatchingTheConfiguredUrl() + { + config(['hyde.url' => 'https://example.org']); + $this->assertSame('http://localhost/media/test.jpg', $this->class->asset('http://localhost/media/test.jpg', true)); + } + public function testAssetHelperUsesConfiguredMediaDirectory() { Hyde::setMediaDirectory('_assets'); diff --git a/packages/framework/tests/Feature/HelpersTest.php b/packages/framework/tests/Feature/HelpersTest.php index d6f34b35e16..733a832e7ec 100644 --- a/packages/framework/tests/Feature/HelpersTest.php +++ b/packages/framework/tests/Feature/HelpersTest.php @@ -77,7 +77,14 @@ public function testAssetFunction() public function testAssetFunctionWithQualifiedUrl() { $this->assertSame(Hyde::asset('foo', true), asset('foo', true)); - $this->assertSame('http://localhost/media/foo', asset('foo', true)); + $this->assertSame('media/foo', asset('foo', true)); + } + + /** @covers ::asset */ + public function testAssetFunctionWithQualifiedUrlAndSetBaseUrl() + { + $this->app['config']->set(['hyde.url' => 'https://example.com']); + $this->assertSame('https://example.com/media/foo', asset('foo', true)); } /** @covers ::asset */ @@ -94,6 +101,13 @@ public function testAssetFunctionWithQualifiedUrlAndNoBaseUrl() $this->assertSame('media/foo', asset('foo', true)); } + /** @covers ::asset */ + public function testAssetFunctionWithQualifiedUrlAndLocalhostBaseUrl() + { + $this->app['config']->set(['hyde.url' => 'http://localhost']); + $this->assertSame('media/foo', asset('foo', true)); + } + /** @covers ::asset */ public function testAssetFunctionFromNestedPage() { @@ -145,9 +159,16 @@ public function testUrlFunction() /** @covers ::url */ public function testUrlFunctionWithBaseUrl() + { + $this->app['config']->set(['hyde.url' => 'https://example.com']); + $this->assertSame('https://example.com/foo', url('foo')); + } + + /** @covers ::url */ + public function testUrlFunctionWithLocalhostBaseUrl() { $this->app['config']->set(['hyde.url' => 'http://localhost']); - $this->assertSame('http://localhost/foo', url('foo')); + $this->assertSame('foo', url('foo')); } /** @covers ::url */ @@ -165,6 +186,14 @@ public function testUrlFunctionWithoutBaseUrlOrPath() $this->assertNull(url()); } + /** @covers ::url */ + public function testUrlFunctionWithLocalhostBaseUrlButNoPath() + { + $this->app['config']->set(['hyde.url' => 'http://localhost']); + $this->expectException(\Hyde\Framework\Exceptions\BaseUrlNotSetException::class); + $this->assertNull(url()); + } + /** @covers ::url */ public function testUrlFunctionWithAlreadyQualifiedUrl() { diff --git a/packages/framework/tests/Feature/Views/MetadataViewTest.php b/packages/framework/tests/Feature/Views/MetadataViewTest.php index 199759644d4..54ba018d2d4 100644 --- a/packages/framework/tests/Feature/Views/MetadataViewTest.php +++ b/packages/framework/tests/Feature/Views/MetadataViewTest.php @@ -25,7 +25,7 @@ protected function setUp(): void { parent::setUp(); - config(['hyde.url' => 'http://localhost']); + config(['hyde.url' => 'https://example.com']); config(['hyde.enable_cache_busting' => false]); } @@ -79,7 +79,7 @@ protected function getDefaultTags(): array '', '', '', - '', + '', '', '', ]; @@ -93,7 +93,7 @@ public function testMetadataTagsInEmptyBladePage() $assertions = $this->assertSee('test', array_merge($this->getDefaultTags(), [ 'HydePHP - Test', '', - '', + '', '', '', ])); @@ -109,7 +109,7 @@ public function testMetadataTagsInEmptyMarkdownPage() $assertions = $this->assertSee('test', array_merge($this->getDefaultTags(), [ 'HydePHP - Test', '', - '', + '', '', '', ])); @@ -125,7 +125,7 @@ public function testMetadataTagsInEmptyDocumentationPage() $assertions = $this->assertSee('docs/test', array_merge($this->getDefaultTags(), [ 'HydePHP - Test', '', - '', + '', '', '', ])); @@ -140,16 +140,16 @@ public function testMetadataTagsInEmptyMarkdownPost() $assertions = $this->assertSee('posts/test', array_merge($this->getDefaultTags(), [ 'HydePHP - Test', - '', + '', '', - '', + '', '', - '', + '', '', - '', + '', '', '', - '', + '', ])); $this->assertAllTagsWereCovered('posts/test', $assertions); @@ -177,25 +177,92 @@ public function testMetadataTagsInMarkdownPostWithFlatFrontMatter() $assertions = $this->assertSee('posts/test', array_merge($this->getDefaultTags(), [ 'HydePHP - My title', - '', + '', '', - '', + '', '', '', '', '', - '', + '', '', - '', + '', '', '', '', '', - '', + '', '', '', ])); $this->assertAllTagsWereCovered('posts/test', $assertions); } + + public function testCanonicalUrlTagsAreNotAddedWhenCanonicalUrlIsNotSet() + { + config(['hyde.url' => 'http://localhost']); + + $this->file('_posts/test.md', <<<'MARKDOWN' + --- + title: "My title" + description: "My description" + category: "My category" + date: "2022-01-01" + author: "Mr. Hyde" + image: image.jpg + --- + + ## Hello World + + Lorem Ipsum Dolor Amet. + MARKDOWN + ); + $this->build('_posts/test.md'); + + $assertions = $this->assertSee('posts/test', [ + '', + '', + '', + '', + '', + 'HydePHP - My title', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + + // '', + // '', + // '', + // '', + // '', + // '', + ]); + + $this->assertAllTagsWereCovered('posts/test', $assertions); + + $dontSee = [ + 'assertInstanceOf(MarkdownDocument::class, $document); + $this->assertEquals('', $document->markdown); + $this->assertSame('', $document->markdown->body()); + + $this->assertEquals(FrontMatter::fromArray([ + 'foo' => 'bar', + ]), $document->matter); + } } From 7fd4aa2bf69d7e0df238a56ce2a39272bebea529 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 13 Jun 2024 13:33:46 +0200 Subject: [PATCH 33/45] Bump `spatie/yaml-front-matter` --- composer.lock | 14 +++++++------- packages/framework/composer.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.lock b/composer.lock index 62f95e14593..9a899f6d904 100644 --- a/composer.lock +++ b/composer.lock @@ -1129,7 +1129,7 @@ "illuminate/view": "^10.0", "league/commonmark": "^2.2", "php": "^8.1", - "spatie/yaml-front-matter": "^2.0.7", + "spatie/yaml-front-matter": "^2.0.9", "symfony/yaml": "^6.0", "torchlight/torchlight-commonmark": "^0.5.5" }, @@ -4429,16 +4429,16 @@ }, { "name": "spatie/yaml-front-matter", - "version": "2.0.8", + "version": "2.0.9", "source": { "type": "git", "url": "https://github.com/spatie/yaml-front-matter.git", - "reference": "f2f1f749a405fafc9d6337067c92c062d51a581c" + "reference": "cbe67e1cdd0a29a96d74ccab9400fe663e078392" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/yaml-front-matter/zipball/f2f1f749a405fafc9d6337067c92c062d51a581c", - "reference": "f2f1f749a405fafc9d6337067c92c062d51a581c", + "url": "https://api.github.com/repos/spatie/yaml-front-matter/zipball/cbe67e1cdd0a29a96d74ccab9400fe663e078392", + "reference": "cbe67e1cdd0a29a96d74ccab9400fe663e078392", "shasum": "" }, "require": { @@ -4475,7 +4475,7 @@ "yaml" ], "support": { - "source": "https://github.com/spatie/yaml-front-matter/tree/2.0.8" + "source": "https://github.com/spatie/yaml-front-matter/tree/2.0.9" }, "funding": [ { @@ -4487,7 +4487,7 @@ "type": "github" } ], - "time": "2023-12-04T10:02:52+00:00" + "time": "2024-06-13T10:20:51+00:00" }, { "name": "symfony/console", diff --git a/packages/framework/composer.json b/packages/framework/composer.json index bc45ee2fb61..f716759c2d4 100644 --- a/packages/framework/composer.json +++ b/packages/framework/composer.json @@ -27,7 +27,7 @@ "illuminate/view": "^10.0", "symfony/yaml": "^6.0", "league/commonmark": "^2.2", - "spatie/yaml-front-matter": "^2.0.7", + "spatie/yaml-front-matter": "^2.0.9", "torchlight/torchlight-commonmark": "^0.5.5" }, "suggest": { From 48ad9032c2aa2b4f61eb7095bddb6d65d7cf3ebf Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 13 Jun 2024 13:39:13 +0200 Subject: [PATCH 34/45] Update RELEASE_NOTES.md --- RELEASE_NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index f00dd063b92..0d33c16284d 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -19,7 +19,6 @@ This serves two purposes: - When a navigation group is set in front matter, it will now be used regardless of the subdirectory configuration in https://github.com/hydephp/develop/pull/1703 (fixes https://github.com/hydephp/develop/issues/1515) - Use late static bindings to support overriding data collections file finding in https://github.com/hydephp/develop/pull/1717 (fixes https://github.com/hydephp/develop/issues/1716) - ### Deprecated - for soon-to-be removed features. @@ -29,6 +28,7 @@ This serves two purposes: ### Fixed - Fixed explicitly set front matter navigation group behavior being dependent on subdirectory configuration, fixing https://github.com/hydephp/develop/issues/1515 in https://github.com/hydephp/develop/pull/1703 - Fixed DataCollections file finding method not being able to be overridden https://github.com/hydephp/develop/issues/1716 in https://github.com/hydephp/develop/pull/1717 +- Fixed PHP warning when trying to parse a Markdown file with just front matter without body https://github.com/hydephp/develop/issues/1705 in https://github.com/hydephp/develop/pull/1728 ### Security - in case of vulnerabilities. From aa0e007cd57f12b7c2eaa8acccd073b02e4cf783 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 13 Jun 2024 15:15:21 +0200 Subject: [PATCH 35/45] Create initial test --- ...WithoutBaseUrlAreHandledGracefullyTest.php | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php b/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php index 0868cfb00ac..358883cfb21 100644 --- a/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php +++ b/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php @@ -4,7 +4,9 @@ namespace Hyde\Framework\Testing\Feature; +use Hyde\Hyde; use Hyde\Testing\TestCase; +use Hyde\Pages\MarkdownPost; /** * High level test to ensure that sites without a base URL are handled gracefully. @@ -21,5 +23,21 @@ */ class SitesWithoutBaseUrlAreHandledGracefullyTest extends TestCase { - // + public function testLocalhostLinksAreNotAddedToCompiledHtmlWhenBaseUrlIsNotSet(): void + { + config(['hyde.url' => 'http://localhost']); + + $html = $this->getHtml(MarkdownPost::class); + + $this->assertStringNotContainsString('http://localhost', $html); + } + + protected function getHtml(string $class): string + { + $page = new $class('foo'); + + Hyde::shareViewData($page); + + return $page->compile(); + } } From 099e8cbe36e47b892b554ddd8cb91dabb7474d78 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 13 Jun 2024 15:17:00 +0200 Subject: [PATCH 36/45] Add more test cases --- ...sWithoutBaseUrlAreHandledGracefullyTest.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php b/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php index 358883cfb21..ea4583ad5b8 100644 --- a/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php +++ b/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php @@ -23,7 +23,25 @@ */ class SitesWithoutBaseUrlAreHandledGracefullyTest extends TestCase { + public function testLocalhostLinksAreNotAddedToCompiledHtmlWhenBaseUrlIsNull(): void + { + config(['hyde.url' => null]); + + $html = $this->getHtml(MarkdownPost::class); + + $this->assertStringNotContainsString('http://localhost', $html); + } + public function testLocalhostLinksAreNotAddedToCompiledHtmlWhenBaseUrlIsNotSet(): void + { + config(['hyde.url' => '']); + + $html = $this->getHtml(MarkdownPost::class); + + $this->assertStringNotContainsString('http://localhost', $html); + } + + public function testLocalhostLinksAreNotAddedToCompiledHtmlWhenBaseUrlIsSetToLocalhost(): void { config(['hyde.url' => 'http://localhost']); From 11d4030c4f2a160c4e7f8b4045f51f81e63ed131 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 13 Jun 2024 15:21:21 +0200 Subject: [PATCH 37/45] Refactor tests to use PHPUnit data provider for multiple page classes Only the Markdown pages can be made like this --- ...WithoutBaseUrlAreHandledGracefullyTest.php | 36 +++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php b/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php index ea4583ad5b8..5dae8ac1963 100644 --- a/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php +++ b/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php @@ -6,7 +6,11 @@ use Hyde\Hyde; use Hyde\Testing\TestCase; +use Hyde\Pages\HtmlPage; +use Hyde\Pages\BladePage; +use Hyde\Pages\MarkdownPage; use Hyde\Pages\MarkdownPost; +use Hyde\Pages\DocumentationPage; /** * High level test to ensure that sites without a base URL are handled gracefully. @@ -23,33 +27,53 @@ */ class SitesWithoutBaseUrlAreHandledGracefullyTest extends TestCase { - public function testLocalhostLinksAreNotAddedToCompiledHtmlWhenBaseUrlIsNull(): void + /** + * @dataProvider pageClassProvider + */ + public function testLocalhostLinksAreNotAddedToCompiledHtmlWhenBaseUrlIsNull(string $class): void { config(['hyde.url' => null]); - $html = $this->getHtml(MarkdownPost::class); + $html = $this->getHtml($class); $this->assertStringNotContainsString('http://localhost', $html); } - public function testLocalhostLinksAreNotAddedToCompiledHtmlWhenBaseUrlIsNotSet(): void + /** + * @dataProvider pageClassProvider + */ + public function testLocalhostLinksAreNotAddedToCompiledHtmlWhenBaseUrlIsNotSet(string $class): void { config(['hyde.url' => '']); - $html = $this->getHtml(MarkdownPost::class); + $html = $this->getHtml($class); $this->assertStringNotContainsString('http://localhost', $html); } - public function testLocalhostLinksAreNotAddedToCompiledHtmlWhenBaseUrlIsSetToLocalhost(): void + /** + * @dataProvider pageClassProvider + */ + public function testLocalhostLinksAreNotAddedToCompiledHtmlWhenBaseUrlIsSetToLocalhost(string $class): void { config(['hyde.url' => 'http://localhost']); - $html = $this->getHtml(MarkdownPost::class); + $html = $this->getHtml($class); $this->assertStringNotContainsString('http://localhost', $html); } + public static function pageClassProvider(): array + { + return [ + // [HtmlPage::class], + // [BladePage::class], + [MarkdownPage::class], + [MarkdownPost::class], + [DocumentationPage::class], + ]; + } + protected function getHtml(string $class): string { $page = new $class('foo'); From 6efd034c6a2110588822e1464da0f94428f480dd Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 13 Jun 2024 15:24:49 +0200 Subject: [PATCH 38/45] Update develop.iml --- .idea/develop.iml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.idea/develop.iml b/.idea/develop.iml index b5e53b44ef0..f357c61d82f 100644 --- a/.idea/develop.iml +++ b/.idea/develop.iml @@ -8,8 +8,6 @@ - - From 9f79f4eccbd9dc491051819193b0e5dd99410874 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 13 Jun 2024 15:26:14 +0200 Subject: [PATCH 39/45] Add green path state test --- .../SitesWithoutBaseUrlAreHandledGracefullyTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php b/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php index 5dae8ac1963..eefd2c2a46f 100644 --- a/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php +++ b/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php @@ -63,6 +63,18 @@ public function testLocalhostLinksAreNotAddedToCompiledHtmlWhenBaseUrlIsSetToLoc $this->assertStringNotContainsString('http://localhost', $html); } + /** + * @dataProvider pageClassProvider + */ + public function testSiteUrlLinksAreAddedToCompiledHtmlWhenBaseUrlIsSetToValidUrl(string $class): void + { + config(['hyde.url' => 'https://example.com']); + + $html = $this->getHtml($class); + + $this->assertStringNotContainsString('http://localhost', $html); + } + public static function pageClassProvider(): array { return [ From 31c202ffd4afa54e7edad0d1f7ac42ac12fec3af Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 13 Jun 2024 15:27:39 +0200 Subject: [PATCH 40/45] Cleanup test code --- ...WithoutBaseUrlAreHandledGracefullyTest.php | 62 +++++++------------ 1 file changed, 21 insertions(+), 41 deletions(-) diff --git a/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php b/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php index eefd2c2a46f..cd4e9373605 100644 --- a/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php +++ b/packages/framework/tests/Feature/SitesWithoutBaseUrlAreHandledGracefullyTest.php @@ -6,8 +6,6 @@ use Hyde\Hyde; use Hyde\Testing\TestCase; -use Hyde\Pages\HtmlPage; -use Hyde\Pages\BladePage; use Hyde\Pages\MarkdownPage; use Hyde\Pages\MarkdownPost; use Hyde\Pages\DocumentationPage; @@ -27,63 +25,45 @@ */ class SitesWithoutBaseUrlAreHandledGracefullyTest extends TestCase { - /** - * @dataProvider pageClassProvider - */ - public function testLocalhostLinksAreNotAddedToCompiledHtmlWhenBaseUrlIsNull(string $class): void + public static function pageClassProvider(): array { - config(['hyde.url' => null]); + return [ + [MarkdownPage::class], + [MarkdownPost::class], + [DocumentationPage::class], + ]; + } - $html = $this->getHtml($class); + /** @dataProvider pageClassProvider */ + public function testLocalhostLinksAreNotAddedToCompiledHtmlWhenBaseUrlIsNull(string $class) + { + config(['hyde.url' => null]); - $this->assertStringNotContainsString('http://localhost', $html); + $this->assertStringNotContainsString('http://localhost', $this->getHtml($class)); } - /** - * @dataProvider pageClassProvider - */ - public function testLocalhostLinksAreNotAddedToCompiledHtmlWhenBaseUrlIsNotSet(string $class): void + /** @dataProvider pageClassProvider */ + public function testLocalhostLinksAreNotAddedToCompiledHtmlWhenBaseUrlIsNotSet(string $class) { config(['hyde.url' => '']); - $html = $this->getHtml($class); - - $this->assertStringNotContainsString('http://localhost', $html); + $this->assertStringNotContainsString('http://localhost', $this->getHtml($class)); } - /** - * @dataProvider pageClassProvider - */ - public function testLocalhostLinksAreNotAddedToCompiledHtmlWhenBaseUrlIsSetToLocalhost(string $class): void + /** @dataProvider pageClassProvider */ + public function testLocalhostLinksAreNotAddedToCompiledHtmlWhenBaseUrlIsSetToLocalhost(string $class) { config(['hyde.url' => 'http://localhost']); - $html = $this->getHtml($class); - - $this->assertStringNotContainsString('http://localhost', $html); + $this->assertStringNotContainsString('http://localhost', $this->getHtml($class)); } - /** - * @dataProvider pageClassProvider - */ - public function testSiteUrlLinksAreAddedToCompiledHtmlWhenBaseUrlIsSetToValidUrl(string $class): void + /** @dataProvider pageClassProvider */ + public function testSiteUrlLinksAreAddedToCompiledHtmlWhenBaseUrlIsSetToValidUrl(string $class) { config(['hyde.url' => 'https://example.com']); - $html = $this->getHtml($class); - - $this->assertStringNotContainsString('http://localhost', $html); - } - - public static function pageClassProvider(): array - { - return [ - // [HtmlPage::class], - // [BladePage::class], - [MarkdownPage::class], - [MarkdownPost::class], - [DocumentationPage::class], - ]; + $this->assertStringNotContainsString('http://localhost', $this->getHtml($class)); } protected function getHtml(string $class): string From 8fbcd10f78a8b9aaa1d154480f5cb869945c2e30 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 13 Jun 2024 18:24:34 +0200 Subject: [PATCH 41/45] Update RELEASE_NOTES.md --- RELEASE_NOTES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 0d33c16284d..c9518df87b6 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -18,6 +18,8 @@ This serves two purposes: ### Changed - When a navigation group is set in front matter, it will now be used regardless of the subdirectory configuration in https://github.com/hydephp/develop/pull/1703 (fixes https://github.com/hydephp/develop/issues/1515) - Use late static bindings to support overriding data collections file finding in https://github.com/hydephp/develop/pull/1717 (fixes https://github.com/hydephp/develop/issues/1716) +- Method `Hyde::hasSiteUrl()` now returns false if the site URL is for localhost in https://github.com/hydephp/develop/pull/1726 +- Method `Hyde::url()` will now return a relative URL instead of throwing an exception when supplied a path even if the site URL is not set in https://github.com/hydephp/develop/pull/1726 ### Deprecated - for soon-to-be removed features. From a6a1ac049789f9e6b4e0142f575a88bb681edc08 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 13 Jun 2024 18:24:36 +0200 Subject: [PATCH 42/45] Update RELEASE_NOTES.md --- RELEASE_NOTES.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index c9518df87b6..50f03d967ae 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -34,3 +34,17 @@ This serves two purposes: ### Security - in case of vulnerabilities. + +### Extra information + +This release contains changes to how HydePHP behaves when a site URL is not set by the user. + +These changes are made to reduce the chance of the default `localhost` value showing up in production environments. + +Most notably, HydePHP now considers that default site URL `localhost` to mean that a site URL is not set, as the user has not set it. +This means that things like automatic canonical URLs will not be added, as Hyde won't know how to make them without a site URL. +The previous behaviour was that Hyde used `localhost` in canonical URLs, which is never useful in production environments. + +For this reason, we felt it worth it to make this change in a minor release, as it has a such large benefit for sites. + +You can read more about the details and design decisions of this change in the following pull request https://github.com/hydephp/develop/pull/1726. From b33407b13aa2665db56e498a5cef2fcae83873bc Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 13 Jun 2024 18:26:13 +0200 Subject: [PATCH 43/45] Update method documentation --- packages/framework/src/Foundation/Kernel/Hyperlinks.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/framework/src/Foundation/Kernel/Hyperlinks.php b/packages/framework/src/Foundation/Kernel/Hyperlinks.php index 4768bc13e02..9cec5ca989c 100644 --- a/packages/framework/src/Foundation/Kernel/Hyperlinks.php +++ b/packages/framework/src/Foundation/Kernel/Hyperlinks.php @@ -126,6 +126,8 @@ public function asset(string $name, bool $preferQualifiedUrl = false): string /** * Check if a site base URL has been set in config (or .env). + * + * The default value is `http://localhost`, which is not considered a valid site URL. */ public function hasSiteUrl(): bool { From 0bcb9f721d42a49855e498376431dcc6159241b3 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 13 Jun 2024 18:26:55 +0200 Subject: [PATCH 44/45] Simplify check to use evaluated conditions by called method The hasSiteUrl method now checks if the URL is for localhost --- .../src/Framework/Actions/PostBuildTasks/GenerateSitemap.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/framework/src/Framework/Actions/PostBuildTasks/GenerateSitemap.php b/packages/framework/src/Framework/Actions/PostBuildTasks/GenerateSitemap.php index e2e15c55809..4409ede2934 100644 --- a/packages/framework/src/Framework/Actions/PostBuildTasks/GenerateSitemap.php +++ b/packages/framework/src/Framework/Actions/PostBuildTasks/GenerateSitemap.php @@ -9,7 +9,6 @@ use Hyde\Framework\Concerns\InteractsWithDirectories; use Hyde\Framework\Features\XmlGenerators\SitemapGenerator; -use function blank; use function file_put_contents; class GenerateSitemap extends PostBuildTask @@ -22,7 +21,7 @@ class GenerateSitemap extends PostBuildTask public function handle(): void { - if (blank(Hyde::url()) || str_starts_with(Hyde::url(), 'http://localhost')) { + if (! Hyde::hasSiteUrl()) { $this->skip('Cannot generate sitemap without a valid base URL'); } From 2e395e1980c82fd0de6e9d3ae872af263f71239e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 16:28:16 +0000 Subject: [PATCH 45/45] Bump ws from 8.8.1 to 8.17.1 Bumps [ws](https://github.com/websockets/ws) from 8.8.1 to 8.17.1. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/8.8.1...8.17.1) --- updated-dependencies: - dependency-name: ws dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index c6f4f1abba0..e9232a7eb9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9760,16 +9760,16 @@ "dev": true }, "node_modules/ws": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", - "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "dev": true, "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -17107,9 +17107,9 @@ "dev": true }, "ws": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", - "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "dev": true, "requires": {} },