From 17f41ee235bd8826b9ff635f494a851350d748da Mon Sep 17 00:00:00 2001 From: Kevin Hakanson Date: Sat, 20 Apr 2024 16:33:08 -0500 Subject: [PATCH 1/2] chore: update dependencies Signed-off-by: Kevin Hakanson --- package-lock.json | 263 ++++++++++++++++++++++++---------------------- package.json | 4 +- 2 files changed, 139 insertions(+), 128 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9016f34..d05d25a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,8 +11,8 @@ "devDependencies": { "highlight.js": "^11.9.0", "prettier": "^3.2.5", - "vite": "^5.2.8", - "vitest": "^1.4.0" + "vite": "^5.2.10", + "vitest": "^1.5.0" } }, "node_modules/@esbuild/aix-ppc64": { @@ -402,9 +402,9 @@ "dev": true }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.0.tgz", - "integrity": "sha512-jwXtxYbRt1V+CdQSy6Z+uZti7JF5irRKF8hlKfEnF/xJpcNGuuiZMBvuoYM+x9sr9iWGnzrlM0+9hvQ1kgkf1w==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.15.0.tgz", + "integrity": "sha512-O63bJ7p909pRRQfOJ0k/Jp8gNFMud+ZzLLG5EBWquylHxmRT2k18M2ifg8WyjCgFVdpA7+rI0YZ8EkAtg6dSUw==", "cpu": [ "arm" ], @@ -415,9 +415,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.0.tgz", - "integrity": "sha512-fI9nduZhCccjzlsA/OuAwtFGWocxA4gqXGTLvOyiF8d+8o0fZUeSztixkYjcGq1fGZY3Tkq4yRvHPFxU+jdZ9Q==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.15.0.tgz", + "integrity": "sha512-5UywPdmC9jiVOShjQx4uuIcnTQOf85iA4jgg8bkFoH5NYWFfAfrJpv5eeokmTdSmYwUTT5IrcrBCJNkowhrZDA==", "cpu": [ "arm64" ], @@ -428,9 +428,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.0.tgz", - "integrity": "sha512-BcnSPRM76/cD2gQC+rQNGBN6GStBs2pl/FpweW8JYuz5J/IEa0Fr4AtrPv766DB/6b2MZ/AfSIOSGw3nEIP8SA==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.15.0.tgz", + "integrity": "sha512-hNkt75uFfWpRxHItCBmbS0ba70WnibJh6yz60WShSWITLlVRbkvAu1E/c7RlliPY4ajhqJd0UPZz//gNalTd4g==", "cpu": [ "arm64" ], @@ -441,9 +441,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.0.tgz", - "integrity": "sha512-LDyFB9GRolGN7XI6955aFeI3wCdCUszFWumWU0deHA8VpR3nWRrjG6GtGjBrQxQKFevnUTHKCfPR4IvrW3kCgQ==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.15.0.tgz", + "integrity": "sha512-HnC5bTP7qdfO9nUw/mBhNcjOEZfbS8NwV+nFegiMhYOn1ATAGZF4kfAxR9BuZevBrebWCxMmxm8NCU1CUoz+wQ==", "cpu": [ "x64" ], @@ -454,9 +454,22 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.0.tgz", - "integrity": "sha512-ygrGVhQP47mRh0AAD0zl6QqCbNsf0eTo+vgwkY6LunBcg0f2Jv365GXlDUECIyoXp1kKwL5WW6rsO429DBY/bA==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.15.0.tgz", + "integrity": "sha512-QGOIQIJZeIIqMsc4BUGe8TnV4dkXhSW2EhaQ1G4LqMUNpkyeLztvlDlOoNHn7SR7a4dBANdcEbPkkEzz3rzjzA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.15.0.tgz", + "integrity": "sha512-PS/Cp8CinYgoysQ8i4UXYH/TZl06fXszvY/RDkyBYgUB1+tKyOMS925/4FZhfrhkl3XQEKjMc3BKtsxpB9Tz9Q==", "cpu": [ "arm" ], @@ -467,9 +480,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.0.tgz", - "integrity": "sha512-x+uJ6MAYRlHGe9wi4HQjxpaKHPM3d3JjqqCkeC5gpnnI6OWovLdXTpfa8trjxPLnWKyBsSi5kne+146GAxFt4A==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.15.0.tgz", + "integrity": "sha512-XzOsnD6lGDP+k+vGgTYAryVGu8N89qpjMN5BVFUj75dGVFP3FzIVAufJAraxirpDwEQZA7Gjs0Vo5p4UmnnjsA==", "cpu": [ "arm64" ], @@ -480,9 +493,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.0.tgz", - "integrity": "sha512-nrRw8ZTQKg6+Lttwqo6a2VxR9tOroa2m91XbdQ2sUUzHoedXlsyvY1fN4xWdqz8PKmf4orDwejxXHjh7YBGUCA==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.15.0.tgz", + "integrity": "sha512-+ScJA4Epbx/ZQGjDnbvTAcb8ZD06b+TlIka2UkujbKf1I/A+yrvEcJwG3/27zMmvcWMQyeCJhbL9TlSjzL0B7Q==", "cpu": [ "arm64" ], @@ -493,11 +506,11 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.0.tgz", - "integrity": "sha512-xV0d5jDb4aFu84XKr+lcUJ9y3qpIWhttO3Qev97z8DKLXR62LC3cXT/bMZXrjLF9X+P5oSmJTzAhqwUbY96PnA==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.15.0.tgz", + "integrity": "sha512-1cUSvYgnyTakM4FDyf/GxUCDcqmj/hUh1NOizEOJU7+D5xEfFGCxgcNOs3hYBeRMUCcGmGkt01EhD3ILgKpGHQ==", "cpu": [ - "ppc64le" + "ppc64" ], "dev": true, "optional": true, @@ -506,9 +519,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.0.tgz", - "integrity": "sha512-SDDhBQwZX6LPRoPYjAZWyL27LbcBo7WdBFWJi5PI9RPCzU8ijzkQn7tt8NXiXRiFMJCVpkuMkBf4OxSxVMizAw==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.15.0.tgz", + "integrity": "sha512-3A1FbHDbBUvpJXFAZwVsiROIcstVHP9AX/cwnyIhAp+xyQ1cBCxywKtuzmw0Av1MDNNg/y/9dDHtNypfRa8bdw==", "cpu": [ "riscv64" ], @@ -519,9 +532,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.0.tgz", - "integrity": "sha512-RxB/qez8zIDshNJDufYlTT0ZTVut5eCpAZ3bdXDU9yTxBzui3KhbGjROK2OYTTor7alM7XBhssgoO3CZ0XD3qA==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.15.0.tgz", + "integrity": "sha512-hYPbhg9ow6/mXIkojc8LOeiip2sCTuw1taWyoOXTOWk9vawIXz8x7B4KkgWUAtvAElssxhSyEXr2EZycH/FGzQ==", "cpu": [ "s390x" ], @@ -532,9 +545,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.0.tgz", - "integrity": "sha512-C6y6z2eCNCfhZxT9u+jAM2Fup89ZjiG5pIzZIDycs1IwESviLxwkQcFRGLjnDrP+PT+v5i4YFvlcfAs+LnreXg==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.15.0.tgz", + "integrity": "sha512-511qln5mPSUKwv7HI28S1jCD1FK+2WbX5THM9A9annr3c1kzmfnf8Oe3ZakubEjob3IV6OPnNNcesfy+adIrmw==", "cpu": [ "x64" ], @@ -545,9 +558,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.0.tgz", - "integrity": "sha512-i0QwbHYfnOMYsBEyjxcwGu5SMIi9sImDVjDg087hpzXqhBSosxkE7gyIYFHgfFl4mr7RrXksIBZ4DoLoP4FhJg==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.15.0.tgz", + "integrity": "sha512-4qKKGTDIv2bQZ+afhPWqPL+94+dLtk4lw1iwbcylKlLNqQ/Yyjof2CFYBxf6npiDzPV+zf4EWRiHb26/4Vsm9w==", "cpu": [ "x64" ], @@ -558,9 +571,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.0.tgz", - "integrity": "sha512-Fq52EYb0riNHLBTAcL0cun+rRwyZ10S9vKzhGKKgeD+XbwunszSY0rVMco5KbOsTlwovP2rTOkiII/fQ4ih/zQ==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.15.0.tgz", + "integrity": "sha512-nEtaFBHp1OnbOf+tz66DtID579sNRHGgMC23to8HUyVuOCpCMD0CvRNqiDGLErLNnwApWIUtUl1VvuovCWUxwg==", "cpu": [ "arm64" ], @@ -571,9 +584,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.0.tgz", - "integrity": "sha512-e/PBHxPdJ00O9p5Ui43+vixSgVf4NlLsmV6QneGERJ3lnjIua/kim6PRFe3iDueT1rQcgSkYP8ZBBXa/h4iPvw==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.15.0.tgz", + "integrity": "sha512-5O49NykwSgX6iT2HgZ6cAoGHt6T/FqNMB5OqFOGxU/y1GyFSHquox1sK2OqApQc0ANxiHFQEMNDLNVCL7AUDnQ==", "cpu": [ "ia32" ], @@ -584,9 +597,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.0.tgz", - "integrity": "sha512-aGg7iToJjdklmxlUlJh/PaPNa4PmqHfyRMLunbL3eaMO0gp656+q1zOKkpJ/CVe9CryJv6tAN1HDoR8cNGzkag==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.15.0.tgz", + "integrity": "sha512-YA0hTwCunmKNeTOFWdJuKhdXse9jBqgo34FDo+9aS0spfCkp+wj0o1bCcOOTu+0P48O95GTfkLTAaVonwNuIdQ==", "cpu": [ "x64" ], @@ -609,13 +622,13 @@ "dev": true }, "node_modules/@vitest/expect": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.4.0.tgz", - "integrity": "sha512-Jths0sWCJZ8BxjKe+p+eKsoqev1/T8lYcrjavEaz8auEJ4jAVY0GwW3JKmdVU4mmNPLPHixh4GNXP7GFtAiDHA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.5.0.tgz", + "integrity": "sha512-0pzuCI6KYi2SIC3LQezmxujU9RK/vwC1U9R0rLuGlNGcOuDWxqWKu6nUdFsX9tH1WU0SXtAxToOsEjeUn1s3hA==", "dev": true, "dependencies": { - "@vitest/spy": "1.4.0", - "@vitest/utils": "1.4.0", + "@vitest/spy": "1.5.0", + "@vitest/utils": "1.5.0", "chai": "^4.3.10" }, "funding": { @@ -623,12 +636,12 @@ } }, "node_modules/@vitest/runner": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.4.0.tgz", - "integrity": "sha512-EDYVSmesqlQ4RD2VvWo3hQgTJ7ZrFQ2VSJdfiJiArkCerDAGeyF1i6dHkmySqk573jLp6d/cfqCN+7wUB5tLgg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.5.0.tgz", + "integrity": "sha512-7HWwdxXP5yDoe7DTpbif9l6ZmDwCzcSIK38kTSIt6CFEpMjX4EpCgT6wUmS0xTXqMI6E/ONmfgRKmaujpabjZQ==", "dev": true, "dependencies": { - "@vitest/utils": "1.4.0", + "@vitest/utils": "1.5.0", "p-limit": "^5.0.0", "pathe": "^1.1.1" }, @@ -637,9 +650,9 @@ } }, "node_modules/@vitest/snapshot": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.4.0.tgz", - "integrity": "sha512-saAFnt5pPIA5qDGxOHxJ/XxhMFKkUSBJmVt5VgDsAqPTX6JP326r5C/c9UuCMPoXNzuudTPsYDZCoJ5ilpqG2A==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.5.0.tgz", + "integrity": "sha512-qpv3fSEuNrhAO3FpH6YYRdaECnnRjg9VxbhdtPwPRnzSfHVXnNzzrpX4cJxqiwgRMo7uRMWDFBlsBq4Cr+rO3A==", "dev": true, "dependencies": { "magic-string": "^0.30.5", @@ -651,9 +664,9 @@ } }, "node_modules/@vitest/spy": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.4.0.tgz", - "integrity": "sha512-Ywau/Qs1DzM/8Uc+yA77CwSegizMlcgTJuYGAi0jujOteJOUf1ujunHThYo243KG9nAyWT3L9ifPYZ5+As/+6Q==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.5.0.tgz", + "integrity": "sha512-vu6vi6ew5N5MMHJjD5PoakMRKYdmIrNJmyfkhRpQt5d9Ewhw9nZ5Aqynbi3N61bvk9UvZ5UysMT6ayIrZ8GA9w==", "dev": true, "dependencies": { "tinyspy": "^2.2.0" @@ -663,9 +676,9 @@ } }, "node_modules/@vitest/utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.4.0.tgz", - "integrity": "sha512-mx3Yd1/6e2Vt/PUC98DcqTirtfxUyAZ32uK82r8rZzbtBeBo+nqgnjx/LvqQdWsrvNtm14VmurNgcf4nqY5gJg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.5.0.tgz", + "integrity": "sha512-BDU0GNL8MWkRkSRdNFvCUCAVOeHaUlVJ9Tx0TYBZyXaaOTmGtUFObzchCivIBrIwKzvZA7A9sCejVhXM2aY98A==", "dev": true, "dependencies": { "diff-sequences": "^29.6.3", @@ -758,6 +771,12 @@ "node": "*" } }, + "node_modules/confbox": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.7.tgz", + "integrity": "sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==", + "dev": true + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -957,12 +976,6 @@ "integrity": "sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==", "dev": true }, - "node_modules/jsonc-parser": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", - "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", - "dev": true - }, "node_modules/local-pkg": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", @@ -989,15 +1002,12 @@ } }, "node_modules/magic-string": { - "version": "0.30.8", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.8.tgz", - "integrity": "sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==", + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", "dev": true, "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" - }, - "engines": { - "node": ">=12" } }, "node_modules/merge-stream": { @@ -1142,14 +1152,14 @@ "dev": true }, "node_modules/pkg-types": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", - "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.1.0.tgz", + "integrity": "sha512-/RpmvKdxKf8uILTtoOhAgf30wYbP2Qw+L9p3Rvshx1JZVX+XQNZQFjlbmGHEGIm4CkVPlSn+NXmIM8+9oWQaSA==", "dev": true, "dependencies": { - "jsonc-parser": "^3.2.0", - "mlly": "^1.2.0", - "pathe": "^1.1.0" + "confbox": "^0.1.7", + "mlly": "^1.6.1", + "pathe": "^1.1.2" } }, "node_modules/postcss": { @@ -1216,9 +1226,9 @@ "dev": true }, "node_modules/rollup": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.14.0.tgz", - "integrity": "sha512-Qe7w62TyawbDzB4yt32R0+AbIo6m1/sqO7UPzFS8Z/ksL5mrfhA0v4CavfdmFav3D+ub4QeAgsGEe84DoWe/nQ==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.15.0.tgz", + "integrity": "sha512-i0ir57IMF5o7YvNYyUNeIGG+IZaaucnGZAOsSctO2tPLXlCEaZzyBa+QhpHNSgtpyLMoDev2DyN6a7J1dQA8Tw==", "dev": true, "dependencies": { "@types/estree": "1.0.5" @@ -1231,21 +1241,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.14.0", - "@rollup/rollup-android-arm64": "4.14.0", - "@rollup/rollup-darwin-arm64": "4.14.0", - "@rollup/rollup-darwin-x64": "4.14.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.14.0", - "@rollup/rollup-linux-arm64-gnu": "4.14.0", - "@rollup/rollup-linux-arm64-musl": "4.14.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.14.0", - "@rollup/rollup-linux-riscv64-gnu": "4.14.0", - "@rollup/rollup-linux-s390x-gnu": "4.14.0", - "@rollup/rollup-linux-x64-gnu": "4.14.0", - "@rollup/rollup-linux-x64-musl": "4.14.0", - "@rollup/rollup-win32-arm64-msvc": "4.14.0", - "@rollup/rollup-win32-ia32-msvc": "4.14.0", - "@rollup/rollup-win32-x64-msvc": "4.14.0", + "@rollup/rollup-android-arm-eabi": "4.15.0", + "@rollup/rollup-android-arm64": "4.15.0", + "@rollup/rollup-darwin-arm64": "4.15.0", + "@rollup/rollup-darwin-x64": "4.15.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.15.0", + "@rollup/rollup-linux-arm-musleabihf": "4.15.0", + "@rollup/rollup-linux-arm64-gnu": "4.15.0", + "@rollup/rollup-linux-arm64-musl": "4.15.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.15.0", + "@rollup/rollup-linux-riscv64-gnu": "4.15.0", + "@rollup/rollup-linux-s390x-gnu": "4.15.0", + "@rollup/rollup-linux-x64-gnu": "4.15.0", + "@rollup/rollup-linux-x64-musl": "4.15.0", + "@rollup/rollup-win32-arm64-msvc": "4.15.0", + "@rollup/rollup-win32-ia32-msvc": "4.15.0", + "@rollup/rollup-win32-x64-msvc": "4.15.0", "fsevents": "~2.3.2" } }, @@ -1334,15 +1345,15 @@ } }, "node_modules/tinybench": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.6.0.tgz", - "integrity": "sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.7.0.tgz", + "integrity": "sha512-Qgayeb106x2o4hNzNjsZEfFziw8IbKqtbXBjVh7VIZfBxfD5M4gWtpyx5+YTae2gJ6Y6Dz/KLepiv16RFeQWNA==", "dev": true }, "node_modules/tinypool": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.3.tgz", - "integrity": "sha512-Ud7uepAklqRH1bvwy22ynrliC7Dljz7Tm8M/0RBUW+YRa4YHhZ6e4PpgE+fu1zr/WqB1kbeuVrdfeuyIBpy4tw==", + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.4.tgz", + "integrity": "sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==", "dev": true, "engines": { "node": ">=14.0.0" @@ -1373,9 +1384,9 @@ "dev": true }, "node_modules/vite": { - "version": "5.2.8", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.8.tgz", - "integrity": "sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==", + "version": "5.2.10", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.10.tgz", + "integrity": "sha512-PAzgUZbP7msvQvqdSD+ErD5qGnSFiGOoWmV5yAKUEI0kdhjbH6nMWVyZQC/hSc4aXwc0oJ9aEdIiF9Oje0JFCw==", "dev": true, "dependencies": { "esbuild": "^0.20.1", @@ -1428,9 +1439,9 @@ } }, "node_modules/vite-node": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.4.0.tgz", - "integrity": "sha512-VZDAseqjrHgNd4Kh8icYHWzTKSCZMhia7GyHfhtzLW33fZlG9SwsB6CEhgyVOWkJfJ2pFLrp/Gj1FSfAiqH9Lw==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.5.0.tgz", + "integrity": "sha512-tV8h6gMj6vPzVCa7l+VGq9lwoJjW8Y79vst8QZZGiuRAfijU+EEWuc0kFpmndQrWhMMhet1jdSF+40KSZUqIIw==", "dev": true, "dependencies": { "cac": "^6.7.14", @@ -1450,16 +1461,16 @@ } }, "node_modules/vitest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.4.0.tgz", - "integrity": "sha512-gujzn0g7fmwf83/WzrDTnncZt2UiXP41mHuFYFrdwaLRVQ6JYQEiME2IfEjU3vcFL3VKa75XhI3lFgn+hfVsQw==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.5.0.tgz", + "integrity": "sha512-d8UKgR0m2kjdxDWX6911uwxout6GHS0XaGH1cksSIVVG8kRlE7G7aBw7myKQCvDI5dT4j7ZMa+l706BIORMDLw==", "dev": true, "dependencies": { - "@vitest/expect": "1.4.0", - "@vitest/runner": "1.4.0", - "@vitest/snapshot": "1.4.0", - "@vitest/spy": "1.4.0", - "@vitest/utils": "1.4.0", + "@vitest/expect": "1.5.0", + "@vitest/runner": "1.5.0", + "@vitest/snapshot": "1.5.0", + "@vitest/spy": "1.5.0", + "@vitest/utils": "1.5.0", "acorn-walk": "^8.3.2", "chai": "^4.3.10", "debug": "^4.3.4", @@ -1471,9 +1482,9 @@ "std-env": "^3.5.0", "strip-literal": "^2.0.0", "tinybench": "^2.5.1", - "tinypool": "^0.8.2", + "tinypool": "^0.8.3", "vite": "^5.0.0", - "vite-node": "1.4.0", + "vite-node": "1.5.0", "why-is-node-running": "^2.2.2" }, "bin": { @@ -1488,8 +1499,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "1.4.0", - "@vitest/ui": "1.4.0", + "@vitest/browser": "1.5.0", + "@vitest/ui": "1.5.0", "happy-dom": "*", "jsdom": "*" }, diff --git a/package.json b/package.json index eaa1eb0..2272037 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "devDependencies": { "highlight.js": "^11.9.0", "prettier": "^3.2.5", - "vite": "^5.2.8", - "vitest": "^1.4.0" + "vite": "^5.2.10", + "vitest": "^1.5.0" } } From 79b657044ff6214a78356921402a3670fb5f9e40 Mon Sep 17 00:00:00 2001 From: Kevin Hakanson Date: Sun, 21 Apr 2024 20:28:09 -0500 Subject: [PATCH 2/2] feat: Cedar human-readable schema Signed-off-by: Kevin Hakanson --- .github/workflows/test.yml | 27 +++++ CHANGELOG.md | 5 + README.md | 46 +++++++-- dist/github.min.css | 8 ++ dist/hljs-cedar.cjs | 43 +++++++- dist/hljs-cedar.js | 41 +++++++- dist/hljs-cedar.min.js | 2 +- dist/hljs-cedar.mjs | 43 +++++++- package-lock.json | 4 +- package.json | 12 ++- src/cedar.js | 48 ++++++++- src/github.css | 172 +++++++++++++++++++++++++++++++ src/webbundle.js | 3 +- test/cedar-commonjs.test.js | 23 +++-- test/cedar-esm.test.js | 23 +++-- test/data/keywords.cedarschema | 11 ++ test/data/keywords.html | 11 ++ test/data/namespaces.cedarschema | 37 +++++++ test/data/namespaces.html | 37 +++++++ test/static/github.min.css | 10 -- test/static/index.html | 85 +++++++++++++-- test/update-html-files.js | 38 +++++-- test/vite/index.html | 82 +++++++++++++-- test/vite/main.js | 5 +- 24 files changed, 737 insertions(+), 79 deletions(-) create mode 100644 .github/workflows/test.yml create mode 100644 dist/github.min.css create mode 100644 src/github.css create mode 100644 test/data/keywords.cedarschema create mode 100644 test/data/keywords.html create mode 100644 test/data/namespaces.cedarschema create mode 100644 test/data/namespaces.html delete mode 100644 test/static/github.min.css diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..0ece4a7 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,27 @@ +name: Test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + build_and_test: + runs-on: ubuntu-latest + + steps: + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Install Node 20 + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Test + run: | + npm ci + npm run test diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c9e4b0..991ce9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## v0.4.0 2024-04-20 + +- Add Cedar human-readable schema support +- Update copyright to Cedar Contributors + ## v0.3.0 2024-01-20 - Update pattern matching diff --git a/README.md b/README.md index b137bb7..73611dc 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,62 @@ -# highlight.js support for Cedar policy language +# highlight.js support for Cedar policy language and Cedar human-readable schema -[highlight.js](https://highlightjs.org/) (syntax highlighting for the Web) support for Cedar based on [Grammar specification for Cedar policy syntax](https://docs.cedarpolicy.com/syntax-grammar.html) based on structure from [language contributor checklist](https://highlightjs.readthedocs.io/en/latest/language-contribution.html) and mapped to the [Stylable Scopes](https://highlightjs.readthedocs.io/en/latest/css-classes-reference.html). +[highlight.js](https://highlightjs.org/) (syntax highlighting for the Web) support for Cedar based on [Grammar specification for Cedar policy syntax](https://docs.cedarpolicy.com/syntax-grammar.html) and for Cedar human-readable schema based on [Grammar specification for human-readable schemas](https://docs.cedarpolicy.com/schema/human-readable-schema-grammar.html). Project structure derived from [language contributor checklist](https://highlightjs.readthedocs.io/en/latest/language-contribution.html) and mapped to the [Stylable Scopes](https://highlightjs.readthedocs.io/en/latest/css-classes-reference.html). See it in action on -## Install +## Use + +Web browser ` + + +``` + +ECMAScript module `import` usage example from `test/vite/index.html` (adjust the import `from` paths as required): + +```javascript +import hljs from 'highlight.js'; +import { hljsCedar, hljsCedarschema } from 'hljs-cedar.mjs'; +hljs.registerLanguage('cedar', hljsCedar); +hljs.registerLanguage('cedarschema', hljsCedarschema); +hljs.highlightAll(); +``` + +## Development + +### Install Install the project dependencies using `npm install`. `src/cedar.js` is the main source file in ECMAScript module format. -## Build +### Build The `npm run build` script uses [esbuild](https://esbuild.github.io/api/)to create multiple files in the `dist` folder: -- `hljs-cedar.js` - Web browser ` - +

static script src test page for highlightjs-cedar

@@ -20,7 +21,9 @@

static script src test page for highlightjs-cedar

-

contains.cedar

+

Cedar

+ +

contains.cedar


 // contains, containsAll, containsAny
 // see https://docs.cedarpolicy.com/policies/syntax-operators.html
@@ -33,7 +36,7 @@ 

contains.cedar

};
-

decimal.cedar

+

decimal.cedar


 // decimal(), lessThan, lessThanOrEqual, greaterThan, greaterThanOrEqual
 // see https://docs.cedarpolicy.com/policies/syntax-operators.html#decimal-parse-string-and-convert-to-decimal
@@ -47,7 +50,7 @@ 

decimal.cedar

};
-

forbid.cedar

+

forbid.cedar


 // see https://docs.cedarpolicy.com/policies/syntax-policy.html
 @id("F1")
@@ -68,7 +71,7 @@ 

forbid.cedar

};
-

identifier.cedar

+

identifier.cedar


 // poorly formed: This identifier is reserved and cannot be used: XX
 permit (principal, action, resource)
@@ -79,7 +82,7 @@ 

identifier.cedar

when { resource.permit.forbid.when.unless };
-

if-then-else.cedar

+

if-then-else.cedar


 permit (
   principal,
@@ -98,7 +101,7 @@ 

if-then-else.cedar

};
-

ip.cedar

+

ip.cedar


 // ip(), isIpv4, isIpv6, isLoopback, isMulticast, isInRange
 // see https://docs.cedarpolicy.com/policies/syntax-operators.html#ip-address-functions
@@ -113,7 +116,7 @@ 

ip.cedar

};
-

is.cedar

+

is.cedar


 // https://docs.cedarpolicy.com/policies/syntax-operators.html#operator-is
 permit (
@@ -128,7 +131,7 @@ 

is.cedar

};
-

quotes.cedar

+

quotes.cedar


 // you "must" be 54" tall to ride (wink)
 @id("54\" rule") // 54" is 4' 6" 
@@ -136,7 +139,7 @@ 

quotes.cedar

when { resource.restriction == "54\"" && principal.height < 54 };
-

template.cedar

+

template.cedar


 // see https://docs.cedarpolicy.com/policies/templates.html
 permit (
@@ -148,6 +151,68 @@ 

template.cedar

context.readOnly == true };
+ +
+ +

Cedar schema

+ +

keywords.cedarschema

+

+// https://docs.cedarpolicy.com/schema/human-readable-schema-grammar.html
+namespace NS {
+  type T = {"type": __cedar::String, namespace: String};
+  entity E in E = {action: String};
+  entity R in [R] = {entity: E};
+  action "a" appliesTo {
+    principal: [NS::E],
+    resource: [NS::R],
+    context: {}
+  };
+}
+
+ +

namespaces.cedarschema

+

+// nicely formatted with spaces
+namespace N1 {
+  type C = {
+    a: String
+  };
+  entity E;
+  action a1 appliesTo {
+    principal: [E],
+    resource: [E],
+    context: {}
+  };
+  action a2 appliesTo {
+    principal: [N2::E],
+    resource: [N2::E],
+    context: {}
+  };
+}
+
+// no spaces still valid and should highlight
+namespace N2 {
+  type C={"a":String};
+  entity E;
+  action "a1" appliesTo {
+    principal:[N1::E],
+    resource:[N1::E],
+    context:{}
+  };
+  action "astar" in[N1::Action::"a1", N1::Action::"a2",a1,a2]appliesTo{context:{}};
+  action "a2" appliesTo {
+    principal:[E],
+    resource:[E],
+    context:{}
+  };
+}
+
+// no namespace
+entity Y;
+
+
+ diff --git a/test/update-html-files.js b/test/update-html-files.js index 2d647d0..d4d8433 100644 --- a/test/update-html-files.js +++ b/test/update-html-files.js @@ -1,28 +1,48 @@ // Copyright Cedar Contributors // SPDX-License-Identifier: Apache-2.0 /* - * updates each index.html file with *.cedar files + * updates each index.html file with *.cedar and *.cedarschema files */ -const path = require('path'); -const fs = require('fs'); +const path = require('node:path'); +const fs = require('node:fs'); function buildExamples() { - let html = ''; + let html = '', + cedarHTML = '', + cedarschemaHTML = ''; - const files = fs - .readdirSync(path.join(__dirname, 'data')) - .filter((f) => f.endsWith('.cedar')); + const files = fs.readdirSync(path.join(__dirname, 'data')).filter((f) => { + return f.endsWith('.cedar') || f.endsWith('.cedarschema'); + }); files.forEach((file) => { const code = fs.readFileSync(path.join(__dirname, 'data', file), 'utf8'); - html += ` -

${file}

+ if (file.endsWith('.cedarschema')) { + cedarschemaHTML += ` +

${file}

+

+${code.replaceAll('<', '<')}
+
+`; + } else { + cedarHTML += ` +

${file}


 ${code.replaceAll('<', '<')}
 
`; + } }); + html = ` +

Cedar

+${cedarHTML} +
+ +

Cedar schema

+${cedarschemaHTML} +`; + return html; } diff --git a/test/vite/index.html b/test/vite/index.html index bed9f91..6807bde 100644 --- a/test/vite/index.html +++ b/test/vite/index.html @@ -11,7 +11,9 @@

Vite ESM test page for highlightjs-cedar

-

contains.cedar

+

Cedar

+ +

contains.cedar


 // contains, containsAll, containsAny
 // see https://docs.cedarpolicy.com/policies/syntax-operators.html
@@ -24,7 +26,7 @@ 

contains.cedar

};
-

decimal.cedar

+

decimal.cedar


 // decimal(), lessThan, lessThanOrEqual, greaterThan, greaterThanOrEqual
 // see https://docs.cedarpolicy.com/policies/syntax-operators.html#decimal-parse-string-and-convert-to-decimal
@@ -38,7 +40,7 @@ 

decimal.cedar

};
-

forbid.cedar

+

forbid.cedar


 // see https://docs.cedarpolicy.com/policies/syntax-policy.html
 @id("F1")
@@ -59,7 +61,7 @@ 

forbid.cedar

};
-

identifier.cedar

+

identifier.cedar


 // poorly formed: This identifier is reserved and cannot be used: XX
 permit (principal, action, resource)
@@ -70,7 +72,7 @@ 

identifier.cedar

when { resource.permit.forbid.when.unless };
-

if-then-else.cedar

+

if-then-else.cedar


 permit (
   principal,
@@ -89,7 +91,7 @@ 

if-then-else.cedar

};
-

ip.cedar

+

ip.cedar


 // ip(), isIpv4, isIpv6, isLoopback, isMulticast, isInRange
 // see https://docs.cedarpolicy.com/policies/syntax-operators.html#ip-address-functions
@@ -104,7 +106,7 @@ 

ip.cedar

};
-

is.cedar

+

is.cedar


 // https://docs.cedarpolicy.com/policies/syntax-operators.html#operator-is
 permit (
@@ -119,7 +121,7 @@ 

is.cedar

};
-

quotes.cedar

+

quotes.cedar


 // you "must" be 54" tall to ride (wink)
 @id("54\" rule") // 54" is 4' 6" 
@@ -127,7 +129,7 @@ 

quotes.cedar

when { resource.restriction == "54\"" && principal.height < 54 };
-

template.cedar

+

template.cedar


 // see https://docs.cedarpolicy.com/policies/templates.html
 permit (
@@ -139,6 +141,68 @@ 

template.cedar

context.readOnly == true };
+ +
+ +

Cedar schema

+ +

keywords.cedarschema

+

+// https://docs.cedarpolicy.com/schema/human-readable-schema-grammar.html
+namespace NS {
+  type T = {"type": __cedar::String, namespace: String};
+  entity E in E = {action: String};
+  entity R in [R] = {entity: E};
+  action "a" appliesTo {
+    principal: [NS::E],
+    resource: [NS::R],
+    context: {}
+  };
+}
+
+ +

namespaces.cedarschema

+

+// nicely formatted with spaces
+namespace N1 {
+  type C = {
+    a: String
+  };
+  entity E;
+  action a1 appliesTo {
+    principal: [E],
+    resource: [E],
+    context: {}
+  };
+  action a2 appliesTo {
+    principal: [N2::E],
+    resource: [N2::E],
+    context: {}
+  };
+}
+
+// no spaces still valid and should highlight
+namespace N2 {
+  type C={"a":String};
+  entity E;
+  action "a1" appliesTo {
+    principal:[N1::E],
+    resource:[N1::E],
+    context:{}
+  };
+  action "astar" in[N1::Action::"a1", N1::Action::"a2",a1,a2]appliesTo{context:{}};
+  action "a2" appliesTo {
+    principal:[E],
+    resource:[E],
+    context:{}
+  };
+}
+
+// no namespace
+entity Y;
+
+
+ diff --git a/test/vite/main.js b/test/vite/main.js index 12f23f2..ab3c4ec 100644 --- a/test/vite/main.js +++ b/test/vite/main.js @@ -1,7 +1,8 @@ // Copyright Cedar Contributors // SPDX-License-Identifier: Apache-2.0 -import '../../node_modules/highlight.js/styles/github.css'; +import '../../dist/github.min.css'; import hljs from 'highlight.js'; -import hljsCedar from '../../dist/hljs-cedar.mjs'; +import { hljsCedar, hljsCedarschema } from '../../dist/hljs-cedar.mjs'; hljs.registerLanguage('cedar', hljsCedar); +hljs.registerLanguage('cedarschema', hljsCedarschema); hljs.highlightAll();