diff --git a/biome.json b/biome.json index 67e2a4620e..20653e9410 100644 --- a/biome.json +++ b/biome.json @@ -9,7 +9,7 @@ "**/vendor/**", "**/.vercel/**" ], - "include": ["test/**", "e2e/**", "packages/**"] + "include": ["test/**", "e2e/**", "packages/**", "/scripts/**"] }, "formatter": { "indentStyle": "tab", diff --git a/packages/astro/package.json b/packages/astro/package.json index 263d9389e9..479024de22 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -109,10 +109,9 @@ ], "scripts": { "prebuild": "astro-scripts prebuild --to-string \"src/runtime/server/astro-island.ts\" \"src/runtime/client/{idle,load,media,only,visible}.ts\"", - "build": "pnpm run prebuild && astro-scripts build \"src/**/*.{ts,js}\" && tsc && pnpm run postbuild", - "build:ci": "pnpm run prebuild && astro-scripts build \"src/**/*.{ts,js}\" && pnpm run postbuild", + "build": "pnpm run prebuild && astro-scripts build \"src/**/*.{ts,js}\" --copy-wasm && tsc", + "build:ci": "pnpm run prebuild && astro-scripts build \"src/**/*.{ts,js}\" --copy-wasm", "dev": "astro-scripts dev --copy-wasm --prebuild \"src/runtime/server/astro-island.ts\" --prebuild \"src/runtime/client/{idle,load,media,only,visible}.ts\" \"src/**/*.{ts,js}\"", - "postbuild": "astro-scripts copy \"src/**/*.astro\" && astro-scripts copy \"src/**/*.wasm\"", "test": "pnpm run test:node && pnpm run test:types", "test:match": "pnpm run test:node --match", "test:e2e": "pnpm test:e2e:chrome && pnpm test:e2e:firefox", diff --git a/packages/internal-helpers/package.json b/packages/internal-helpers/package.json index 8f931b31db..bbf4938b0c 100644 --- a/packages/internal-helpers/package.json +++ b/packages/internal-helpers/package.json @@ -32,7 +32,6 @@ "prepublish": "pnpm build", "build": "astro-scripts build \"src/**/*.ts\" && tsc -p tsconfig.json", "build:ci": "astro-scripts build \"src/**/*.ts\"", - "postbuild": "astro-scripts copy \"src/**/*.js\"", "dev": "astro-scripts dev \"src/**/*.ts\"" }, "devDependencies": { diff --git a/packages/markdown/remark/package.json b/packages/markdown/remark/package.json index 87cba7d1f1..2bb99500f6 100644 --- a/packages/markdown/remark/package.json +++ b/packages/markdown/remark/package.json @@ -29,7 +29,6 @@ "prepublish": "pnpm build", "build": "astro-scripts build \"src/**/*.ts\" && tsc -p tsconfig.json", "build:ci": "astro-scripts build \"src/**/*.ts\"", - "postbuild": "astro-scripts copy \"src/**/*.js\"", "dev": "astro-scripts dev \"src/**/*.ts\"", "test": "astro-scripts test \"test/**/*.test.js\"" }, diff --git a/packages/underscore-redirects/package.json b/packages/underscore-redirects/package.json index 65d6149b46..38de31d4bf 100644 --- a/packages/underscore-redirects/package.json +++ b/packages/underscore-redirects/package.json @@ -23,7 +23,6 @@ "prepublish": "pnpm build", "build": "astro-scripts build \"src/**/*.ts\" && tsc -p tsconfig.json", "build:ci": "astro-scripts build \"src/**/*.ts\"", - "postbuild": "astro-scripts copy \"src/**/*.js\"", "dev": "astro-scripts dev \"src/**/*.ts\"", "test": "astro-scripts test \"test/**/*.test.js\"" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b1ab64c937..633acc7af6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5982,43 +5982,24 @@ importers: scripts: dependencies: - arg: - specifier: ^5.0.2 - version: 5.0.2 esbuild: specifier: ^0.21.5 version: 0.21.5 - globby: - specifier: ^14.0.2 - version: 14.0.2 - kleur: - specifier: ^4.1.5 - version: 4.1.5 - p-limit: - specifier: ^6.1.0 - version: 6.1.0 - svelte: - specifier: ^4.2.18 - version: 4.2.18 - tar: - specifier: ^7.4.3 - version: 7.4.3 - tiny-glob: - specifier: ^0.2.9 - version: 0.2.9 - devDependencies: - '@octokit/action': - specifier: ^7.0.0 - version: 7.0.0 - del: - specifier: ^7.1.0 - version: 7.1.0 esbuild-plugin-copy: specifier: ^2.1.1 version: 2.1.1(esbuild@0.21.5) execa: specifier: ^8.0.1 version: 8.0.1 + fast-glob: + specifier: ^3.3.2 + version: 3.3.2 + kleur: + specifier: ^4.1.5 + version: 4.1.5 + p-limit: + specifier: ^6.1.0 + version: 6.1.0 tsconfck: specifier: ^3.1.1 version: 3.1.1(typescript@5.5.4) @@ -6986,10 +6967,6 @@ packages: resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} - '@isaacs/fs-minipass@4.0.1': - resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==} - engines: {node: '>=18.0.0'} - '@jridgewell/gen-mapping@0.3.5': resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} engines: {node: '>=6.0.0'} @@ -7175,56 +7152,6 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@octokit/action@7.0.0': - resolution: {integrity: sha512-YVstbUS7vbW0frVGAGtYpSqjbgCwQW1OO0WS+sc/fx0RnW0PP4kPgMCmkgkLAm51WyYTWOOQRA1HuaGTSFgyfQ==} - engines: {node: '>= 18'} - - '@octokit/auth-action@5.1.1': - resolution: {integrity: sha512-JE2gbAZcwwVuww88YY7oB97P6eVAPgKZk2US9Uyz+ZUw5ubeRkZqog7G/gUEAjayIFt8s0UX3qNntP1agVcB0g==} - engines: {node: '>= 18'} - - '@octokit/auth-token@5.1.1': - resolution: {integrity: sha512-rh3G3wDO8J9wSjfI436JUKzHIxq8NaiL0tVeB2aXmG6p/9859aUOAjA9pmSPNGGZxfwmaJ9ozOJImuNVJdpvbA==} - engines: {node: '>= 18'} - - '@octokit/core@6.1.2': - resolution: {integrity: sha512-hEb7Ma4cGJGEUNOAVmyfdB/3WirWMg5hDuNFVejGEDFqupeOysLc2sG6HJxY2etBp5YQu5Wtxwi020jS9xlUwg==} - engines: {node: '>= 18'} - - '@octokit/endpoint@10.1.1': - resolution: {integrity: sha512-JYjh5rMOwXMJyUpj028cu0Gbp7qe/ihxfJMLc8VZBMMqSwLgOxDI1911gV4Enl1QSavAQNJcwmwBF9M0VvLh6Q==} - engines: {node: '>= 18'} - - '@octokit/graphql@8.1.1': - resolution: {integrity: sha512-ukiRmuHTi6ebQx/HFRCXKbDlOh/7xEV6QUXaE7MJEKGNAncGI/STSbOkl12qVXZrfZdpXctx5O9X1AIaebiDBg==} - engines: {node: '>= 18'} - - '@octokit/openapi-types@22.2.0': - resolution: {integrity: sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg==} - - '@octokit/plugin-paginate-rest@11.3.0': - resolution: {integrity: sha512-n4znWfRinnUQF6TPyxs7EctSAA3yVSP4qlJP2YgI3g9d4Ae2n5F3XDOjbUluKRxPU3rfsgpOboI4O4VtPc6Ilg==} - engines: {node: '>= 18'} - peerDependencies: - '@octokit/core': '>=6' - - '@octokit/plugin-rest-endpoint-methods@13.2.1': - resolution: {integrity: sha512-YMWBw6Exh1ZBs5cCE0AnzYxSQDIJS00VlBqISTgNYmu5MBdeM07K/MAJjy/VkNaH5jpJmD/5HFUvIZ+LDB5jSQ==} - engines: {node: '>= 18'} - peerDependencies: - '@octokit/core': '>=6' - - '@octokit/request-error@6.1.1': - resolution: {integrity: sha512-1mw1gqT3fR/WFvnoVpY/zUM2o/XkMs/2AszUUG9I69xn0JFLv6PGkPhNk5lbfvROs79wiS0bqiJNxfCZcRJJdg==} - engines: {node: '>= 18'} - - '@octokit/request@9.1.1': - resolution: {integrity: sha512-pyAguc0p+f+GbQho0uNetNQMmLG1e80WjkIaqqgUkihqUp0boRU6nKItXO4VWnr+nbZiLGEyy4TeKRwqaLvYgw==} - engines: {node: '>= 18'} - - '@octokit/types@13.5.0': - resolution: {integrity: sha512-HdqWTf5Z3qwDVlzCrP8UJquMwunpDiMPt5er+QjGzL4hqr/vBVY/MauQgS1xWxCDT1oMx1EULyqxncdCY/NVSQ==} - '@oslojs/encoding@0.4.1': resolution: {integrity: sha512-hkjo6MuIK/kQR5CrGNdAPZhS01ZCXuWDRJ187zh6qqF2+yMHZpD9fAYpX8q2bOO6Ryhl3XpCT6kUX76N8hhm4Q==} @@ -7854,10 +7781,6 @@ packages: resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} engines: {node: '>= 14'} - aggregate-error@4.0.1: - resolution: {integrity: sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==} - engines: {node: '>=12'} - ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} @@ -8013,9 +7936,6 @@ packages: bcp-47-match@2.0.3: resolution: {integrity: sha512-JtTezzbAibu8G0R9op9zb3vcWZd9JF6M0xOYGPn0fNCd7wOpRB1mU2mH9T8gaBGbAAyIIVgB2G7xG0GP98zMAQ==} - before-after-hook@3.0.2: - resolution: {integrity: sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A==} - better-path-resolve@1.0.0: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} @@ -8159,10 +8079,6 @@ packages: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} - chownr@3.0.0: - resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==} - engines: {node: '>=18'} - ci-info@3.9.0: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} @@ -8178,10 +8094,6 @@ packages: resolution: {integrity: sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==} engines: {node: '>= 4.0'} - clean-stack@4.2.0: - resolution: {integrity: sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==} - engines: {node: '>=12'} - cli-boxes@3.0.0: resolution: {integrity: sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==} engines: {node: '>=10'} @@ -8442,10 +8354,6 @@ packages: defu@6.1.4: resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} - del@7.1.0: - resolution: {integrity: sha512-v2KyNk7efxhlyHpjEvfyxaAihKKK0nWCuf6ZtqZcFFpQRG0bJ12Qsr0RpvsICMjAAZ8DOVCxrlqpxISlMHC4Kg==} - engines: {node: '>=14.16'} - delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} @@ -9011,24 +8919,14 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globalyzer@0.1.0: - resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} - globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} - globby@13.2.2: - resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - globby@14.0.2: resolution: {integrity: sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==} engines: {node: '>=18'} - globrex@0.1.2: - resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} - gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} @@ -9229,10 +9127,6 @@ packages: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} - indent-string@5.0.0: - resolution: {integrity: sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==} - engines: {node: '>=12'} - inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. @@ -9310,18 +9204,10 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} - is-path-cwd@3.0.0: - resolution: {integrity: sha512-kyiNFFLU0Ampr6SDZitD/DwUo4Zs1nSdnygUBqsu3LooL00Qvb5j+UnvApUn/TTj1J3OuE6BTdQ5rudKmU2ZaA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - is-path-inside@3.0.3: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} - is-path-inside@4.0.0: - resolution: {integrity: sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==} - engines: {node: '>=12'} - is-plain-obj@4.1.0: resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} engines: {node: '>=12'} @@ -9866,10 +9752,6 @@ packages: resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} engines: {node: '>= 8'} - minizlib@3.0.1: - resolution: {integrity: sha512-umcy022ILvb5/3Djuu8LWeqUa8D68JaBzlttKeMWen48SjabqS3iY5w/vzeMzMUNhLDifyhbOwKDSznB1vvrwg==} - engines: {node: '>= 18'} - mitt@3.0.1: resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} @@ -9881,11 +9763,6 @@ packages: engines: {node: '>=10'} hasBin: true - mkdirp@3.0.1: - resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==} - engines: {node: '>=10'} - hasBin: true - mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -10096,10 +9973,6 @@ packages: resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} engines: {node: '>=6'} - p-map@5.5.0: - resolution: {integrity: sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==} - engines: {node: '>=12'} - p-queue@8.0.1: resolution: {integrity: sha512-NXzu9aQJTAzbBqOt2hwsR63ea7yvxJc0PwN/zobNAudYfb1B7R08SzB4TsLeSbUCuG467NhnoT0oO6w1qRO+BA==} engines: {node: '>=18'} @@ -10715,11 +10588,6 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rimraf@5.0.5: - resolution: {integrity: sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==} - engines: {node: '>=14'} - hasBin: true - rollup@4.21.0: resolution: {integrity: sha512-vo+S/lfA2lMS7rZ2Qoubi6I5hwZwzXeUIctILZLbHI+laNtvhhOIon2S1JksA5UEDQ7l3vberd0fxK44lTYjbQ==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -10887,10 +10755,6 @@ packages: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} - slash@4.0.0: - resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} - engines: {node: '>=12'} - slash@5.1.0: resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==} engines: {node: '>=14.16'} @@ -11087,10 +10951,6 @@ packages: resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} - tar@7.4.3: - resolution: {integrity: sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==} - engines: {node: '>=18'} - term-size@2.2.1: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} engines: {node: '>=8'} @@ -11119,9 +10979,6 @@ packages: resolution: {integrity: sha512-wMctrWD2HZZLuIlchlkE2dfXJh7J2KDI9Dwl+2abPYg0mswQHfOAyQW3jJg1pY5VfttSINZuKcXoB3FGypVklA==} engines: {node: '>=8'} - tiny-glob@0.2.9: - resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} - tinybench@2.8.0: resolution: {integrity: sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==} @@ -11360,9 +11217,6 @@ packages: unist-util-visit@5.0.0: resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==} - universal-user-agent@7.0.2: - resolution: {integrity: sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==} - universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} @@ -11790,10 +11644,6 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - yallist@5.0.0: - resolution: {integrity: sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==} - engines: {node: '>=18'} - yaml-language-server@1.15.0: resolution: {integrity: sha512-N47AqBDCMQmh6mBLmI6oqxryHRzi33aPFPsJhYy3VTUGCdLHYjGh4FZzpUjRlphaADBBkDmnkM/++KNIOHi5Rw==} hasBin: true @@ -12887,10 +12737,6 @@ snapshots: wrap-ansi: 8.1.0 wrap-ansi-cjs: wrap-ansi@7.0.0 - '@isaacs/fs-minipass@4.0.1': - dependencies: - minipass: 7.1.2 - '@jridgewell/gen-mapping@0.3.5': dependencies: '@jridgewell/set-array': 1.2.1 @@ -13113,70 +12959,6 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 - '@octokit/action@7.0.0': - dependencies: - '@octokit/auth-action': 5.1.1 - '@octokit/core': 6.1.2 - '@octokit/plugin-paginate-rest': 11.3.0(@octokit/core@6.1.2) - '@octokit/plugin-rest-endpoint-methods': 13.2.1(@octokit/core@6.1.2) - '@octokit/types': 13.5.0 - undici: 6.19.7 - - '@octokit/auth-action@5.1.1': - dependencies: - '@octokit/auth-token': 5.1.1 - '@octokit/types': 13.5.0 - - '@octokit/auth-token@5.1.1': {} - - '@octokit/core@6.1.2': - dependencies: - '@octokit/auth-token': 5.1.1 - '@octokit/graphql': 8.1.1 - '@octokit/request': 9.1.1 - '@octokit/request-error': 6.1.1 - '@octokit/types': 13.5.0 - before-after-hook: 3.0.2 - universal-user-agent: 7.0.2 - - '@octokit/endpoint@10.1.1': - dependencies: - '@octokit/types': 13.5.0 - universal-user-agent: 7.0.2 - - '@octokit/graphql@8.1.1': - dependencies: - '@octokit/request': 9.1.1 - '@octokit/types': 13.5.0 - universal-user-agent: 7.0.2 - - '@octokit/openapi-types@22.2.0': {} - - '@octokit/plugin-paginate-rest@11.3.0(@octokit/core@6.1.2)': - dependencies: - '@octokit/core': 6.1.2 - '@octokit/types': 13.5.0 - - '@octokit/plugin-rest-endpoint-methods@13.2.1(@octokit/core@6.1.2)': - dependencies: - '@octokit/core': 6.1.2 - '@octokit/types': 13.5.0 - - '@octokit/request-error@6.1.1': - dependencies: - '@octokit/types': 13.5.0 - - '@octokit/request@9.1.1': - dependencies: - '@octokit/endpoint': 10.1.1 - '@octokit/request-error': 6.1.1 - '@octokit/types': 13.5.0 - universal-user-agent: 7.0.2 - - '@octokit/types@13.5.0': - dependencies: - '@octokit/openapi-types': 22.2.0 - '@oslojs/encoding@0.4.1': {} '@parse5/tools@0.3.0': @@ -13943,11 +13725,6 @@ snapshots: transitivePeerDependencies: - supports-color - aggregate-error@4.0.1: - dependencies: - clean-stack: 4.2.0 - indent-string: 5.0.0 - ajv@6.12.6: dependencies: fast-deep-equal: 3.1.3 @@ -14121,8 +13898,6 @@ snapshots: bcp-47-match@2.0.3: {} - before-after-hook@3.0.2: {} - better-path-resolve@1.0.0: dependencies: is-windows: 1.0.2 @@ -14301,8 +14076,6 @@ snapshots: chownr@2.0.0: {} - chownr@3.0.0: {} - ci-info@3.9.0: {} ci-info@4.0.0: {} @@ -14315,10 +14088,6 @@ snapshots: dependencies: source-map: 0.6.1 - clean-stack@4.2.0: - dependencies: - escape-string-regexp: 5.0.0 - cli-boxes@3.0.0: {} cli-cursor@4.0.0: @@ -14537,17 +14306,6 @@ snapshots: defu@6.1.4: {} - del@7.1.0: - dependencies: - globby: 13.2.2 - graceful-fs: 4.2.11 - is-glob: 4.0.3 - is-path-cwd: 3.0.0 - is-path-inside: 4.0.0 - p-map: 5.5.0 - rimraf: 3.0.2 - slash: 4.0.0 - delayed-stream@1.0.0: {} delegates@1.0.0: {} @@ -15101,8 +14859,6 @@ snapshots: globals@14.0.0: {} - globalyzer@0.1.0: {} - globby@11.1.0: dependencies: array-union: 2.1.0 @@ -15112,14 +14868,6 @@ snapshots: merge2: 1.4.1 slash: 3.0.0 - globby@13.2.2: - dependencies: - dir-glob: 3.0.1 - fast-glob: 3.3.2 - ignore: 5.3.1 - merge2: 1.4.1 - slash: 4.0.0 - globby@14.0.2: dependencies: '@sindresorhus/merge-streams': 2.3.0 @@ -15129,8 +14877,6 @@ snapshots: slash: 5.1.0 unicorn-magic: 0.1.0 - globrex@0.1.2: {} - gopd@1.0.1: dependencies: get-intrinsic: 1.2.4 @@ -15448,8 +15194,6 @@ snapshots: imurmurhash@0.1.4: {} - indent-string@5.0.0: {} - inflight@1.0.6: dependencies: once: 1.4.0 @@ -15506,12 +15250,8 @@ snapshots: is-number@7.0.0: {} - is-path-cwd@3.0.0: {} - is-path-inside@3.0.3: {} - is-path-inside@4.0.0: {} - is-plain-obj@4.1.0: {} is-potential-custom-element-name@1.0.1: {} @@ -16350,19 +16090,12 @@ snapshots: minipass: 3.3.6 yallist: 4.0.0 - minizlib@3.0.1: - dependencies: - minipass: 7.1.2 - rimraf: 5.0.5 - mitt@3.0.1: {} mj-context-menu@0.6.1: {} mkdirp@1.0.4: {} - mkdirp@3.0.1: {} - mri@1.2.0: {} mrmime@2.0.0: {} @@ -16567,10 +16300,6 @@ snapshots: p-map@2.1.0: {} - p-map@5.5.0: - dependencies: - aggregate-error: 4.0.1 - p-queue@8.0.1: dependencies: eventemitter3: 5.0.1 @@ -17293,10 +17022,6 @@ snapshots: dependencies: glob: 7.2.3 - rimraf@5.0.5: - dependencies: - glob: 10.3.12 - rollup@4.21.0: dependencies: '@types/estree': 1.0.5 @@ -17522,8 +17247,6 @@ snapshots: slash@3.0.0: {} - slash@4.0.0: {} - slash@5.1.0: {} slice-ansi@5.0.0: @@ -17755,15 +17478,6 @@ snapshots: mkdirp: 1.0.4 yallist: 4.0.0 - tar@7.4.3: - dependencies: - '@isaacs/fs-minipass': 4.0.1 - chownr: 3.0.0 - minipass: 7.1.2 - minizlib: 3.0.1 - mkdirp: 3.0.1 - yallist: 5.0.0 - term-size@2.2.1: {} terminal-link@3.0.0: @@ -17787,11 +17501,6 @@ snapshots: timestring@6.0.0: {} - tiny-glob@0.2.9: - dependencies: - globalyzer: 0.1.0 - globrex: 0.1.2 - tinybench@2.8.0: {} tinypool@1.0.0: {} @@ -18016,8 +17725,6 @@ snapshots: unist-util-is: 6.0.0 unist-util-visit-parents: 6.0.1 - universal-user-agent@7.0.2: {} - universalify@0.1.2: {} universalify@0.2.0: {} @@ -18437,8 +18144,6 @@ snapshots: yallist@4.0.0: {} - yallist@5.0.0: {} - yaml-language-server@1.15.0: dependencies: ajv: 8.17.1 diff --git a/scripts/cmd/build.js b/scripts/cmd/build.js index 5dd2006432..e1c7129938 100644 --- a/scripts/cmd/build.js +++ b/scripts/cmd/build.js @@ -1,10 +1,8 @@ -import { deleteAsync } from 'del'; +import fs from 'node:fs/promises'; import esbuild from 'esbuild'; import { copy } from 'esbuild-plugin-copy'; +import glob from 'fast-glob'; import { dim, green, red, yellow } from 'kleur/colors'; -import { promises as fs } from 'node:fs'; -import glob from 'tiny-glob'; -import svelte from '../utils/svelte-plugin.js'; import prebuild from './prebuild.js'; /** @type {import('esbuild').BuildOptions} */ @@ -44,8 +42,8 @@ export default async function build(...args) { .map((f) => f.replace(/^'/, '').replace(/'$/, '')); // Needed for Windows: glob strings contain surrounding string chars??? remove these let entryPoints = [].concat( ...(await Promise.all( - patterns.map((pattern) => glob(pattern, { filesOnly: true, absolute: true })) - )) + patterns.map((pattern) => glob(pattern, { filesOnly: true, absolute: true })), + )), ); const noClean = args.includes('--no-clean-dist'); @@ -67,6 +65,16 @@ export default async function build(...args) { await clean(outdir); } + const copyPlugin = copyWASM + ? copy({ + resolveFrom: 'cwd', + assets: { + from: ['./src/assets/services/vendor/squoosh/**/*.wasm'], + to: ['./dist/assets/services/vendor/squoosh'], + }, + }) + : null; + if (!isDev) { await esbuild.build({ ...config, @@ -76,6 +84,7 @@ export default async function build(...args) { outdir, outExtension: forceCJS ? { '.js': '.cjs' } : {}, format, + plugins: [copyPlugin].filter(Boolean), }); return; } @@ -93,7 +102,7 @@ export default async function build(...args) { } else { if (result.warnings.length) { console.log( - dim(`[${date}] `) + yellow('⚠ updated with warnings:\n' + result.warnings.join('\n')) + dim(`[${date}] `) + yellow('⚠ updated with warnings:\n' + result.warnings.join('\n')), ); } console.log(dim(`[${date}] `) + green('✔ updated')); @@ -108,21 +117,7 @@ export default async function build(...args) { outdir, format, sourcemap: 'linked', - plugins: [ - rebuildPlugin, - svelte({ isDev }), - ...(copyWASM - ? [ - copy({ - resolveFrom: 'cwd', - assets: { - from: ['./src/assets/services/vendor/squoosh/**/*.wasm'], - to: ['./dist/assets/services/vendor/squoosh'], - }, - }), - ] - : []), - ], + plugins: [rebuildPlugin, copyPlugin].filter(Boolean), }); await builder.watch(); @@ -133,9 +128,8 @@ export default async function build(...args) { } async function clean(outdir) { - await deleteAsync([`${outdir}/**`, `!${outdir}/**/*.d.ts`], { - onlyFiles: true, - }); + const files = await glob([`${outdir}/**`, `!${outdir}/**/*.d.ts`], { filesOnly: true }); + await Promise.all(files.map((file) => fs.rm(file, { force: true }))); } /** @@ -148,7 +142,7 @@ async function getDefinedEntries() { PACKAGE_VERSION: await getInternalPackageVersion('./package.json'), /** The current version (at the time of building) for `astro` */ ASTRO_VERSION: await getInternalPackageVersion( - new URL('../../packages/astro/package.json', import.meta.url) + new URL('../../packages/astro/package.json', import.meta.url), ), /** The current version (at the time of building) for `@astrojs/check` */ ASTRO_CHECK_VERSION: await getWorkspacePackageVersion('@astrojs/check'), @@ -173,13 +167,13 @@ async function getInternalPackageVersion(path) { async function getWorkspacePackageVersion(packageName) { const { dependencies, devDependencies } = await readPackageJSON( - new URL('../../package.json', import.meta.url) + new URL('../../package.json', import.meta.url), ); const deps = { ...dependencies, ...devDependencies }; const version = deps[packageName]; if (!version) { throw new Error( - `Unable to resolve "${packageName}". Is it a dependency of the workspace root?` + `Unable to resolve "${packageName}". Is it a dependency of the workspace root?`, ); } return version.replace(/^\D+/, ''); diff --git a/scripts/cmd/copy.js b/scripts/cmd/copy.js deleted file mode 100644 index 948ed114fe..0000000000 --- a/scripts/cmd/copy.js +++ /dev/null @@ -1,86 +0,0 @@ -import { globby as glob } from 'globby'; -import { promises as fs, readFileSync } from 'node:fs'; -import { posix } from 'node:path'; -import { parseArgs } from 'node:util'; -import * as tar from 'tar/create'; - -const { resolve, dirname, sep, join } = posix; - -export default async function copy() { - const args = parseArgs({ - allowPositionals: true, - options: { - tgz: { type: 'boolean' }, - }, - }); - const patterns = args.positionals.slice(1); - const isCompress = args.values.tgz; - - if (isCompress) { - const files = await glob(patterns, { gitignore: true }); - const rootDir = resolveRootDir(files); - const destDir = rootDir.replace(/^[^/]+/, 'dist'); - - const templates = files.reduce((acc, curr) => { - const name = curr.replace(rootDir, '').slice(1).split(sep)[0]; - if (acc[name]) { - acc[name].push(resolve(curr)); - } else { - acc[name] = [resolve(curr)]; - } - return acc; - }, {}); - - let meta = {}; - return Promise.all( - Object.entries(templates).map(([template, files]) => { - const cwd = resolve(join(rootDir, template)); - const dest = join(destDir, `${template}.tgz`); - const metafile = files.find((f) => f.endsWith('meta.json')); - if (metafile) { - files = files.filter((f) => f !== metafile); - meta[template] = JSON.parse(readFileSync(metafile).toString()); - } - return fs.mkdir(dirname(dest), { recursive: true }).then(() => - tar.create( - { - gzip: true, - portable: true, - file: dest, - cwd, - }, - files.map((f) => f.replace(cwd, '').slice(1)) - ) - ); - }) - ).then(() => { - if (Object.keys(meta).length > 0) { - return fs.writeFile(resolve(destDir, 'meta.json'), JSON.stringify(meta, null, 2)); - } - }); - } - - const files = await glob(patterns); - await Promise.all( - files.map((file) => { - const dest = resolve(file.replace(/^[^/]+/, 'dist')); - return fs - .mkdir(dirname(dest), { recursive: true }) - .then(() => fs.copyFile(resolve(file), dest, fs.constants.COPYFILE_FICLONE)); - }) - ); -} - -function resolveRootDir(files) { - return files - .reduce((acc, curr) => { - const currParts = curr.split(sep); - if (acc.length === 0) return currParts; - const result = []; - currParts.forEach((part, i) => { - if (acc[i] === part) result.push(part); - }); - return result; - }, []) - .join(sep); -} diff --git a/scripts/cmd/prebuild.js b/scripts/cmd/prebuild.js index de3a369107..7c4174abf3 100644 --- a/scripts/cmd/prebuild.js +++ b/scripts/cmd/prebuild.js @@ -1,9 +1,9 @@ -import esbuild from 'esbuild'; -import { red } from 'kleur/colors'; import fs from 'node:fs'; import path from 'node:path'; import { fileURLToPath, pathToFileURL } from 'node:url'; -import glob from 'tiny-glob'; +import esbuild from 'esbuild'; +import glob from 'fast-glob'; +import { red } from 'kleur/colors'; function escapeTemplateLiterals(str) { return str.replace(/\`/g, '\\`').replace(/\$\{/g, '\\${'); @@ -23,10 +23,11 @@ export default async function prebuild(...args) { } let patterns = args; + // NOTE: absolute paths returned are forward slashes on windows let entryPoints = [].concat( ...(await Promise.all( - patterns.map((pattern) => glob(pattern, { filesOnly: true, absolute: true })) - )) + patterns.map((pattern) => glob(pattern, { onlyFiles: true, absolute: true })), + )), ); function getPrebuildURL(entryfilepath, dev = false) { @@ -43,20 +44,20 @@ export default async function prebuild(...args) { let tscode = await fs.promises.readFile(filepath, 'utf-8'); // If we're bundling a client directive, modify the code to match `packages/astro/src/core/client-directive/build.ts`. // If updating this code, make sure to also update that file. - if (filepath.includes(`runtime${path.sep}client`)) { + if (filepath.includes('runtime/client')) { // `export default xxxDirective` is a convention used in the current client directives that we use // to make sure we bundle this right. We'll error below if this convention isn't followed. const newTscode = tscode.replace( /export default (.*?)Directive/, (_, name) => - `(self.Astro || (self.Astro = {})).${name} = ${name}Directive;window.dispatchEvent(new Event('astro:${name}'))` + `(self.Astro || (self.Astro = {})).${name} = ${name}Directive;window.dispatchEvent(new Event('astro:${name}'))`, ); if (newTscode === tscode) { console.error( red( `${filepath} doesn't follow the \`export default xxxDirective\` convention. The prebuilt output may be wrong. ` + - `For more information, check out ${fileURLToPath(import.meta.url)}` - ) + `For more information, check out ${fileURLToPath(import.meta.url)}`, + ), ); } tscode = newTscode; @@ -91,7 +92,7 @@ export default async function prebuild(...args) { dev: true, } : undefined, - ].filter((entry) => entry) + ].filter((entry) => entry), ); for (const result of results) { diff --git a/scripts/cmd/test.js b/scripts/cmd/test.js index 17f6ecd041..3182c4b907 100644 --- a/scripts/cmd/test.js +++ b/scripts/cmd/test.js @@ -1,10 +1,10 @@ -import { run } from 'node:test'; -import { spec } from 'node:test/reporters'; import fs from 'node:fs/promises'; import path from 'node:path'; +import { run } from 'node:test'; +import { spec } from 'node:test/reporters'; import { pathToFileURL } from 'node:url'; import { parseArgs } from 'node:util'; -import glob from 'tiny-glob'; +import glob from 'fast-glob'; const isCI = !!process.env.CI; const defaultTimeout = isCI ? 1400000 : 600000; @@ -31,7 +31,11 @@ export default async function test() { const pattern = args.positionals[1]; if (!pattern) throw new Error('Missing test glob pattern'); - const files = await glob(pattern, { filesOnly: true, absolute: true }); + const files = await glob(pattern, { + filesOnly: true, + absolute: true, + ignore: ['**/node_modules/**'], + }); // For some reason, the `only` option does not work and we need to explicitly set the CLI flag instead. // Node.js requires opt-in to run .only tests :( @@ -48,7 +52,7 @@ export default async function test() { await fs.mkdir(path.dirname(tempTestFile), { recursive: true }); await fs.writeFile( tempTestFile, - files.map((f) => `import ${JSON.stringify(pathToFileURL(f).toString())};`).join('\n') + files.map((f) => `import ${JSON.stringify(pathToFileURL(f).toString())};`).join('\n'), ); files.length = 0; diff --git a/scripts/deps/update-example-versions.js b/scripts/deps/update-example-versions.js index 13018a7919..6c9f8d01d8 100644 --- a/scripts/deps/update-example-versions.js +++ b/scripts/deps/update-example-versions.js @@ -1,5 +1,5 @@ -import path from 'node:path'; import fs from 'node:fs/promises'; +import path from 'node:path'; import { globby as glob } from 'globby'; /* diff --git a/scripts/index.js b/scripts/index.js index 381500ac4e..9129bd4f46 100755 --- a/scripts/index.js +++ b/scripts/index.js @@ -8,11 +8,6 @@ export default async function run() { await build(...args, cmd === 'dev' ? 'IS_DEV' : undefined); break; } - case 'copy': { - const { default: copy } = await import('./cmd/copy.js'); - await copy(...args); - break; - } case 'prebuild': { const { default: prebuild } = await import('./cmd/prebuild.js'); await prebuild(...args); diff --git a/scripts/package.json b/scripts/package.json index 12bf98b79b..35bf517a66 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -8,20 +8,12 @@ "astro-scripts": "./index.js" }, "dependencies": { - "arg": "^5.0.2", "esbuild": "^0.21.5", - "globby": "^14.0.2", - "kleur": "^4.1.5", - "p-limit": "^6.1.0", - "svelte": "^4.2.18", - "tar": "^7.4.3", - "tiny-glob": "^0.2.9" - }, - "devDependencies": { - "@octokit/action": "^7.0.0", - "del": "^7.1.0", "esbuild-plugin-copy": "^2.1.1", "execa": "^8.0.1", + "fast-glob": "^3.3.2", + "kleur": "^4.1.5", + "p-limit": "^6.1.0", "tsconfck": "^3.1.1" } } diff --git a/scripts/stats/index.js b/scripts/stats/index.js deleted file mode 100644 index eb37aa7220..0000000000 --- a/scripts/stats/index.js +++ /dev/null @@ -1,130 +0,0 @@ -// @ts-check -import { Octokit } from '@octokit/action'; -import { readFileSync, writeFileSync } from 'node:fs'; - -const octokit = new Octokit(); -const owner = 'snowpackjs'; -const repo = 'astro'; - -// Relevant IDs captured via: https://docs.github.com/en/graphql/overview/explorer -// query { -// repository(name:"astro", owner:"snowpackjs") { -// project(number: 3) { -// columns(first: 100) { -// nodes { -// id -// databaseId -// name -// } -// } -// } -// } -// } - -const COLUMN_ID_BUGS_NEEDS_TRIAGE = 14724521; -const COLUMN_ID_BUGS_ACCEPTED = 14724515; -const COLUMN_ID_BUGS_PRIORITIZED = 14946516; -// const COLUMN_ID_RFCS_IN_PROGRESS = 14946333; -// const COLUMN_ID_RFCS_ACCEPTED = 14946335; -// const COLUMN_ID_RFCS_PRIORITIZED = 14946454; - -// CREATE LOCAL COPIES OF DATA (Useful for debugging locally) -// Command: -// GITHUB_ACTION=test GITHUB_TOKEN=XXXXXXXXX node scripts/stats/index.js -// Code: -// writeFileSync('pulls.json', JSON.stringify(await octokit.paginate("GET /repos/{owner}/{repo}/pulls", { -// owner, -// repo, -// }))); -// writeFileSync('issues.json', JSON.stringify(await octokit.paginate("GET /repos/{owner}/{repo}/issues", { -// owner, -// repo, -// }))); -// const issues = JSON.parse(readFileSync('issues.json').toString()); -// const pulls = JSON.parse(readFileSync('pulls.json').toString()); - -async function countCards(column_id) { - return octokit.paginate('GET /projects/columns/{column_id}/cards', { - column_id, - mediaType: { - previews: ['inertia'], - }, - }); -} -async function countCommits(since) { - return octokit.paginate('GET /repos/{owner}/{repo}/commits', { - owner, - repo, - since: since.toISOString(), - }); -} - -export async function run() { - const twentyFourHoursAgo = new Date(); - twentyFourHoursAgo.setDate(twentyFourHoursAgo.getDate() - 1); - - const allOpenIssues = await octokit.paginate('GET /repos/{owner}/{repo}/issues', { - owner, - repo, - }); - const openIssues = allOpenIssues.filter((iss) => !iss.pull_request); - const openPulls = allOpenIssues.filter((iss) => iss.pull_request); - - const allIssuesLastTwentyFourHours = await octokit.paginate('GET /repos/{owner}/{repo}/issues', { - owner, - repo, - state: 'all', - per_page: 100, - since: twentyFourHoursAgo.toISOString(), - }); - const issuesLastTwentyFourHours = allIssuesLastTwentyFourHours.filter( - (iss) => new Date(iss.created_at) > twentyFourHoursAgo && !iss.pull_request - ); - const pullsLastTwentyFourHours = allIssuesLastTwentyFourHours.filter( - (iss) => new Date(iss.created_at) > twentyFourHoursAgo && iss.pull_request - ); - - const entry = [ - // Date (Human Readable) - `"${new Date().toLocaleDateString('en-US', { - weekday: 'long', - year: 'numeric', - month: 'long', - day: 'numeric', - })}"`, - // Commits in last 24 hours - (await countCommits(twentyFourHoursAgo)).length, - // New Issues(All) in last 24 hours - issuesLastTwentyFourHours.length, - // New Issues(Bugs) in last 24 hours - issuesLastTwentyFourHours.filter((iss) => iss.title.startsWith('🐛 BUG:')).length, - // New Issues(RFC) in last 24 hours - issuesLastTwentyFourHours.filter((iss) => iss.title.startsWith('💡 RFC:')).length, - // New Issues(Docs) in last 24 hours - issuesLastTwentyFourHours.filter((iss) => iss.title.startsWith('📘 DOC:')).length, - // New Pull Requests in last 24 hours - pullsLastTwentyFourHours.length, - // Pull requests - openPulls.length, - // Open Issues - openIssues.length, - // Bugs: Needs Triage - (await countCards(COLUMN_ID_BUGS_NEEDS_TRIAGE)).length, - // Bugs: Accepted - (await countCards(COLUMN_ID_BUGS_ACCEPTED)).length + - (await countCards(COLUMN_ID_BUGS_PRIORITIZED)).length, - // RFC: In Progress - 0, // (await countCards(COLUMN_ID_RFCS_IN_PROGRESS)).length, - // RFC: Accepted - 0, // (await countCards(COLUMN_ID_RFCS_ACCEPTED)).length + (await countCards(COLUMN_ID_RFCS_PRIORITIZED)).length, - // Date (ISO) - `"${new Date().toISOString()}"`, - ].join(','); - - const statCsv = readFileSync('scripts/stats/stats.csv', { encoding: 'utf-8' }); - const [statHeader, ...statItems] = statCsv.split('\n'); - const updatedStatCsv = [statHeader, entry, ...statItems].join('\n'); - writeFileSync('scripts/stats/stats.csv', updatedStatCsv); -} - -run(); diff --git a/scripts/stats/stats.csv b/scripts/stats/stats.csv deleted file mode 100644 index c56b92bad2..0000000000 --- a/scripts/stats/stats.csv +++ /dev/null @@ -1,270 +0,0 @@ -Date,Commits (24hr),Issues (24hr),Issues:BUG (24hr),Issues:RFC (24hr),Issues:DOC (24hr),PRs (24hr),Open PRs,Open Issues,Bugs: Needs Triage,Bugs: Accepted,RFC: In Progress,RFC: Accepted,Date (ISO) -"Monday, June 27, 2022",1,4,4,0,0,3,24,82,58,16,0,0,"2022-06-27T12:02:10.213Z" -"Sunday, June 26, 2022",2,2,2,0,0,3,21,78,54,16,0,0,"2022-06-26T12:02:05.156Z" -"Saturday, June 25, 2022",13,4,4,0,0,8,20,76,52,16,0,0,"2022-06-25T12:02:03.060Z" -"Friday, June 24, 2022",14,3,3,0,0,8,21,75,51,16,0,0,"2022-06-24T12:01:59.940Z" -"Thursday, June 23, 2022",24,4,4,0,0,11,21,75,51,16,0,0,"2022-06-23T12:02:04.952Z" -"Wednesday, June 22, 2022",13,5,5,0,0,12,23,75,51,16,0,0,"2022-06-22T12:02:19.701Z" -"Tuesday, June 21, 2022",12,3,3,0,0,7,20,77,50,17,0,0,"2022-06-21T12:02:07.113Z" -"Monday, June 20, 2022",1,3,3,0,0,1,20,81,52,20,0,0,"2022-06-20T12:01:57.157Z" -"Sunday, June 19, 2022",1,7,7,0,0,1,19,78,49,20,0,0,"2022-06-19T12:01:50.559Z" -"Saturday, June 18, 2022",5,5,4,0,0,7,18,72,43,20,0,0,"2022-06-18T12:02:43.107Z" -"Friday, June 17, 2022",17,7,6,0,0,9,16,68,39,20,0,0,"2022-06-17T12:02:08.929Z" -"Thursday, June 16, 2022",6,1,1,0,0,3,15,62,34,20,0,0,"2022-06-16T12:02:16.472Z" -"Wednesday, June 15, 2022",15,3,3,0,0,8,16,64,35,21,0,0,"2022-06-15T12:02:03.380Z" -"Tuesday, June 14, 2022",2,3,3,0,0,5,17,64,35,21,0,0,"2022-06-14T12:02:10.537Z" -"Monday, June 13, 2022",1,3,3,0,0,2,13,64,35,21,0,0,"2022-06-13T12:02:15.933Z" -"Sunday, June 12, 2022",1,4,4,0,0,1,12,61,32,21,0,0,"2022-06-12T12:02:09.349Z" -"Saturday, June 11, 2022",11,1,1,0,0,5,11,57,28,21,0,0,"2022-06-11T12:02:39.313Z" -"Friday, June 10, 2022",4,2,2,0,0,1,15,58,29,21,0,0,"2022-06-10T12:02:31.071Z" -"Thursday, June 9, 2022",4,5,5,0,0,5,16,57,28,21,0,0,"2022-06-09T12:02:24.146Z" -"Wednesday, June 8, 2022",10,2,2,0,0,5,13,55,26,21,0,0,"2022-06-08T12:02:08.232Z" -"Tuesday, June 7, 2022",14,7,7,0,0,8,14,59,31,20,0,0,"2022-06-07T12:01:56.537Z" -"Monday, June 6, 2022",1,3,3,0,0,0,17,60,31,21,0,0,"2022-06-06T12:02:05.036Z" -"Sunday, June 5, 2022",0,2,1,0,0,1,17,56,27,21,0,0,"2022-06-05T12:02:44.649Z" -"Saturday, June 4, 2022",10,2,2,0,0,5,15,55,26,21,0,0,"2022-06-04T12:01:42.225Z" -"Friday, June 3, 2022",12,2,2,0,0,12,16,56,25,23,0,0,"2022-06-03T12:02:09.325Z" -"Thursday, June 2, 2022",6,2,2,0,0,4,15,58,26,24,0,0,"2022-06-02T12:02:22.357Z" -"Wednesday, June 1, 2022",17,5,5,0,0,8,15,58,26,25,0,0,"2022-06-01T12:02:41.045Z" -"Tuesday, May 31, 2022",6,3,3,0,0,2,18,68,36,25,0,0,"2022-05-31T12:02:20.938Z" -"Monday, May 30, 2022",0,4,4,0,0,2,20,68,36,25,0,0,"2022-05-30T12:02:19.315Z" -"Sunday, May 29, 2022",1,3,3,0,0,0,18,64,32,25,0,0,"2022-05-29T12:02:00.190Z" -"Saturday, May 28, 2022",5,5,5,0,0,5,18,62,30,25,0,0,"2022-05-28T12:02:02.301Z" -"Friday, May 27, 2022",6,3,3,0,0,7,17,59,30,22,0,0,"2022-05-27T12:02:13.230Z" -"Thursday, May 26, 2022",4,4,4,0,0,3,14,57,27,23,0,0,"2022-05-26T12:01:59.687Z" -"Wednesday, May 25, 2022",15,2,2,0,0,8,15,55,25,23,0,0,"2022-05-25T12:02:11.459Z" -"Tuesday, May 24, 2022",8,1,1,0,0,7,17,64,28,29,0,0,"2022-05-24T12:02:26.138Z" -"Monday, May 23, 2022",1,1,1,0,0,1,15,66,29,29,0,0,"2022-05-23T12:02:25.550Z" -"Sunday, May 22, 2022",0,0,0,0,0,1,14,64,27,29,0,0,"2022-05-22T12:02:29.442Z" -"Saturday, May 21, 2022",11,2,2,0,0,3,13,64,27,29,0,0,"2022-05-21T12:02:14.687Z" -"Friday, May 20, 2022",11,2,2,0,0,8,16,69,28,33,0,0,"2022-05-20T12:02:16.756Z" -"Thursday, May 19, 2022",12,1,1,0,0,8,14,71,36,28,0,0,"2022-05-19T12:02:20.678Z" -"Wednesday, May 18, 2022",6,2,2,0,0,7,14,72,36,29,0,0,"2022-05-18T12:02:14.860Z" -"Tuesday, May 17, 2022",15,1,1,0,0,9,11,72,35,30,0,0,"2022-05-17T12:02:18.523Z" -"Monday, May 16, 2022",2,1,1,0,0,2,12,75,36,31,0,0,"2022-05-16T12:06:42.223Z" -"Sunday, May 15, 2022",1,2,2,0,0,1,11,74,35,31,0,0,"2022-05-15T12:01:59.884Z" -"Saturday, May 14, 2022",1,4,4,0,0,3,10,72,33,31,0,0,"2022-05-14T12:01:51.743Z" -"Friday, May 13, 2022",17,6,6,0,0,5,7,70,35,28,0,0,"2022-05-13T12:01:50.988Z" -"Thursday, May 12, 2022",19,4,4,0,0,5,15,69,35,26,0,0,"2022-05-12T12:02:01.326Z" -"Wednesday, May 11, 2022",6,7,7,0,0,12,23,75,39,27,0,0,"2022-05-11T12:04:15.277Z" -"Tuesday, May 10, 2022",0,2,2,0,0,0,16,136,96,35,0,0,"2022-05-10T12:02:52.912Z" -"Monday, May 9, 2022",0,1,1,0,0,0,16,134,94,35,0,0,"2022-05-09T12:02:22.292Z" -"Sunday, May 8, 2022",1,1,1,0,0,2,16,133,93,35,0,0,"2022-05-08T12:01:57.320Z" -"Saturday, May 7, 2022",6,2,2,0,0,2,14,133,93,35,0,0,"2022-05-07T12:01:57.661Z" -"Friday, May 6, 2022",9,4,4,0,0,8,16,131,91,35,0,0,"2022-05-06T12:02:34.760Z" -"Thursday, May 5, 2022",7,4,4,0,0,7,15,130,89,35,0,0,"2022-05-05T12:06:32.776Z" -"Wednesday, May 4, 2022",26,5,5,0,0,17,13,127,87,34,0,0,"2022-05-04T12:02:35.130Z" -"Tuesday, May 3, 2022",2,5,5,0,0,4,21,126,87,35,0,0,"2022-05-03T12:02:09.032Z" -"Monday, May 2, 2022",0,4,4,0,0,1,19,123,84,35,0,0,"2022-05-02T12:03:54.032Z" -"Sunday, May 1, 2022",1,3,3,0,0,3,18,119,80,35,0,0,"2022-05-01T12:02:12.599Z" -"Saturday, April 30, 2022",8,0,0,0,0,7,15,117,78,35,0,0,"2022-04-30T12:05:09.128Z" -"Friday, April 29, 2022",2,2,2,0,0,6,18,118,78,36,0,0,"2022-04-29T12:02:04.063Z" -"Thursday, April 28, 2022",7,4,4,0,0,6,14,116,76,36,0,0,"2022-04-28T12:06:59.457Z" -"Wednesday, April 27, 2022",17,4,3,0,0,11,13,112,73,35,0,0,"2022-04-27T12:02:20.277Z" -"Tuesday, April 26, 2022",2,3,3,0,0,0,13,108,69,35,0,0,"2022-04-26T12:06:57.154Z" -"Monday, April 25, 2022",2,3,3,0,0,2,14,105,66,35,0,0,"2022-04-25T12:06:54.900Z" -"Sunday, April 24, 2022",1,4,4,0,0,1,13,102,63,35,0,0,"2022-04-24T12:01:45.655Z" -"Saturday, April 23, 2022",10,1,1,0,0,9,12,98,59,35,0,0,"2022-04-23T12:05:15.509Z" -"Friday, April 22, 2022",20,4,4,0,0,16,12,98,59,35,0,0,"2022-04-22T12:02:01.807Z" -"Thursday, April 21, 2022",7,3,3,0,0,6,9,101,58,37,0,0,"2022-04-21T12:04:09.984Z" -"Wednesday, April 20, 2022",19,0,0,0,0,7,6,108,61,40,0,0,"2022-04-20T12:02:15.590Z" -"Tuesday, April 19, 2022",10,7,5,0,0,9,11,111,62,41,0,0,"2022-04-19T12:07:06.778Z" -"Monday, April 18, 2022",1,2,2,0,0,2,12,112,64,42,0,0,"2022-04-18T12:02:08.237Z" -"Sunday, April 17, 2022",1,3,3,0,0,0,10,110,63,41,0,0,"2022-04-17T12:02:01.010Z" -"Saturday, April 16, 2022",6,3,3,0,0,3,10,107,60,41,0,0,"2022-04-16T12:01:58.759Z" -"Friday, April 15, 2022",9,4,4,0,0,3,10,109,62,41,0,0,"2022-04-15T12:02:05.075Z" -"Thursday, April 14, 2022",7,3,3,0,0,7,12,111,64,41,0,0,"2022-04-14T12:02:08.617Z" -"Wednesday, April 13, 2022",11,4,4,0,0,10,11,116,63,46,0,0,"2022-04-13T12:02:55.765Z" -"Tuesday, April 12, 2022",8,9,9,0,0,4,8,117,67,43,0,0,"2022-04-12T12:03:53.659Z" -"Monday, April 11, 2022",30,9,9,0,0,10,12,109,63,40,0,0,"2022-04-11T12:03:11.469Z" -"Sunday, April 10, 2022",0,8,8,0,0,4,19,103,58,39,0,0,"2022-04-10T12:02:05.421Z" -"Saturday, April 9, 2022",1,1,1,0,0,6,15,95,50,39,0,0,"2022-04-09T12:01:49.149Z" -"Friday, April 8, 2022",13,9,8,0,0,9,9,97,49,41,0,0,"2022-04-08T12:01:59.641Z" -"Thursday, April 7, 2022",17,6,6,0,0,7,6,93,47,40,0,0,"2022-04-07T12:07:02.763Z" -"Wednesday, April 6, 2022",3,2,2,0,0,9,11,91,44,41,0,0,"2022-04-06T12:02:17.434Z" -"Tuesday, April 5, 2022",17,4,4,0,0,8,4,90,44,40,0,0,"2022-04-05T12:02:04.260Z" -"Monday, April 4, 2022",9,3,3,0,0,5,5,89,43,40,0,0,"2022-04-04T12:03:17.763Z" -"Sunday, April 3, 2022",13,2,2,0,0,8,7,88,42,40,0,0,"2022-04-03T12:01:50.051Z" -"Saturday, April 2, 2022",5,0,0,0,0,4,8,88,42,40,0,0,"2022-04-02T12:01:53.880Z" -"Friday, April 1, 2022",13,0,0,0,0,7,7,90,43,41,0,0,"2022-04-01T12:04:00.672Z" -"Thursday, March 31, 2022",6,4,4,0,0,6,10,93,46,41,0,0,"2022-03-31T12:02:11.044Z" -"Wednesday, March 30, 2022",9,2,2,0,0,10,10,90,43,41,0,0,"2022-03-30T12:02:39.303Z" -"Tuesday, March 29, 2022",19,8,8,0,0,9,5,88,41,41,0,0,"2022-03-29T12:06:39.897Z" -"Monday, March 28, 2022",1,7,7,0,0,2,8,83,36,41,0,0,"2022-03-28T12:02:00.954Z" -"Sunday, March 27, 2022",1,2,2,0,0,2,6,77,29,41,0,0,"2022-03-27T12:01:52.463Z" -"Saturday, March 26, 2022",22,5,5,0,0,12,5,75,27,41,0,0,"2022-03-26T12:03:34.243Z" -"Friday, March 25, 2022",18,2,2,0,0,7,6,73,25,40,0,0,"2022-03-25T12:02:05.476Z" -"Thursday, March 24, 2022",8,4,4,0,0,6,11,73,25,41,0,0,"2022-03-24T12:01:58.117Z" -"Wednesday, March 23, 2022",4,1,1,0,0,7,10,69,22,41,0,0,"2022-03-23T12:06:40.033Z" -"Tuesday, March 22, 2022",15,1,1,0,0,6,5,69,23,40,0,0,"2022-03-22T12:01:59.424Z" -"Monday, March 21, 2022",3,2,2,0,0,3,8,69,24,39,0,0,"2022-03-21T12:06:33.558Z" -"Saturday, March 19, 2022",12,2,2,0,0,8,5,69,24,39,0,0,"2022-03-19T12:02:50.935Z" -"Friday, March 18, 2022",5,2,2,0,0,4,6,71,24,41,0,0,"2022-03-18T12:01:47.909Z" -"Thursday, March 17, 2022",6,6,6,0,0,6,5,70,24,41,0,0,"2022-03-17T12:02:03.750Z" -"Wednesday, March 16, 2022",25,2,2,0,0,12,3,66,21,41,0,0,"2022-03-16T12:01:55.986Z" -"Tuesday, March 15, 2022",8,1,1,0,0,10,7,69,22,43,0,0,"2022-03-15T12:02:08.030Z" -"Monday, March 14, 2022",1,5,5,0,0,0,4,71,25,42,0,0,"2022-03-14T12:01:43.105Z" -"Sunday, March 13, 2022",0,6,6,0,0,1,4,70,25,41,0,0,"2022-03-13T12:01:45.133Z" -"Saturday, March 12, 2022",11,4,4,0,0,6,3,64,19,41,0,0,"2022-03-12T12:01:35.541Z" -"Friday, March 11, 2022",19,1,1,0,0,9,3,98,25,65,0,0,"2022-03-11T12:02:08.157Z" -"Thursday, March 10, 2022",20,2,2,0,0,9,11,99,25,66,0,0,"2022-03-10T12:02:00.120Z" -"Wednesday, March 9, 2022",7,0,0,0,0,9,15,98,24,66,0,0,"2022-03-09T12:01:52.983Z" -"Tuesday, March 8, 2022",4,1,1,0,0,2,12,101,25,68,0,0,"2022-03-08T12:02:05.603Z" -"Monday, March 7, 2022",0,1,1,0,0,1,13,102,26,68,0,0,"2022-03-07T12:02:16.928Z" -"Sunday, March 6, 2022",1,2,2,0,0,0,12,101,25,68,0,0,"2022-03-06T12:01:58.491Z" -"Saturday, March 5, 2022",11,1,1,0,0,6,12,99,23,68,0,0,"2022-03-05T12:01:58.094Z" -"Friday, March 4, 2022",6,1,0,0,0,9,13,99,21,70,0,0,"2022-03-04T12:02:11.658Z" -"Thursday, March 3, 2022",9,2,2,0,0,5,12,99,21,71,0,0,"2022-03-03T12:07:54.171Z" -"Wednesday, March 2, 2022",4,0,0,0,0,9,16,98,20,71,0,0,"2022-03-02T12:07:02.784Z" -"Tuesday, March 1, 2022",12,3,3,0,0,10,13,99,21,71,0,0,"2022-03-01T12:06:43.489Z" -"Tuesday, March 1, 2022",10,1,1,0,0,9,14,98,21,70,0,0,"2022-03-01T05:45:14.315Z" -"Monday, February 28, 2022",2,3,3,0,0,2,14,99,21,71,0,0,"2022-02-28T12:02:08.119Z" -"Sunday, February 27, 2022",1,2,2,0,0,1,14,96,19,70,0,0,"2022-02-27T12:02:10.424Z" -"Saturday, February 26, 2022",9,5,5,0,0,4,14,93,16,70,0,0,"2022-02-26T12:02:08.229Z" -"Friday, February 25, 2022",9,2,2,0,0,5,16,90,13,70,0,0,"2022-02-25T12:01:57.890Z" -"Thursday, February 24, 2022",7,3,3,0,0,3,17,90,13,70,0,0,"2022-02-24T12:01:59.430Z" -"Wednesday, February 23, 2022",4,2,2,0,0,3,19,90,14,69,0,0,"2022-02-23T12:02:05.913Z" -"Tuesday, February 22, 2022",2,2,2,0,0,3,18,88,12,69,0,0,"2022-02-22T12:02:43.311Z" -"Monday, February 21, 2022",1,4,4,0,0,0,16,86,11,68,0,0,"2022-02-21T12:01:54.122Z" -"Sunday, February 20, 2022",1,3,3,0,0,5,16,83,8,68,0,0,"2022-02-20T12:01:50.762Z" -"Saturday, February 19, 2022",12,1,1,0,0,9,11,79,4,68,0,0,"2022-02-19T12:01:59.309Z" -"Friday, February 18, 2022",6,5,5,0,0,7,13,78,3,68,0,0,"2022-02-18T12:02:06.389Z" -"Thursday, February 17, 2022",14,2,2,0,0,6,12,82,0,71,0,0,"2022-02-17T12:01:44.444Z" -"Wednesday, February 16, 2022",10,2,2,0,0,6,15,82,1,69,0,0,"2022-02-16T12:02:09.192Z" -"Tuesday, February 15, 2022",5,4,4,0,0,3,14,112,17,70,0,0,"2022-02-15T12:02:06.622Z" -"Monday, February 14, 2022",0,2,2,0,0,0,12,123,12,80,0,0,"2022-02-14T12:02:09.369Z" -"Sunday, February 13, 2022",1,2,2,0,0,0,12,121,10,80,0,0,"2022-02-13T12:01:45.830Z" -"Saturday, February 12, 2022",8,1,1,0,0,4,12,119,8,80,0,0,"2022-02-12T12:01:50.637Z" -"Friday, February 11, 2022",3,3,3,0,0,1,12,119,8,80,0,0,"2022-02-11T12:01:47.482Z" -"Thursday, February 10, 2022",5,1,1,0,0,3,12,117,6,80,0,0,"2022-02-10T12:01:55.410Z" -"Wednesday, February 9, 2022",6,5,5,0,0,10,11,116,6,79,0,0,"2022-02-09T12:01:50.292Z" -"Tuesday, February 8, 2022",15,0,0,0,0,3,5,114,3,80,0,0,"2022-02-08T12:01:47.001Z" -"Monday, February 7, 2022",2,1,1,0,0,1,17,115,4,80,0,0,"2022-02-07T12:01:56.051Z" -"Sunday, February 6, 2022",0,0,0,0,0,1,17,114,3,80,0,0,"2022-02-06T12:03:49.183Z" -"Saturday, February 5, 2022",4,2,2,0,0,3,16,114,3,80,0,0,"2022-02-05T12:03:08.856Z" -"Friday, February 4, 2022",5,3,3,0,0,5,15,114,1,82,0,0,"2022-02-04T12:02:09.216Z" -"Thursday, February 3, 2022",9,1,1,0,0,4,14,113,1,81,0,0,"2022-02-03T12:01:59.204Z" -"Wednesday, February 2, 2022",3,1,1,0,0,6,15,113,0,82,0,0,"2022-02-02T12:01:54.492Z" -"Tuesday, February 1, 2022",21,1,1,0,0,8,10,112,0,81,0,0,"2022-02-01T12:02:08.478Z" -"Monday, January 31, 2022",1,2,2,0,0,4,19,113,9,73,0,0,"2022-01-31T12:01:45.838Z" -"Sunday, January 30, 2022",3,1,1,0,0,4,15,110,6,73,0,0,"2022-01-30T12:01:50.356Z" -"Saturday, January 29, 2022",18,1,1,0,0,9,12,109,5,73,0,0,"2022-01-29T12:01:53.380Z" -"Friday, January 28, 2022",7,3,3,0,0,4,11,124,4,73,0,0,"2022-01-28T12:02:02.682Z" -"Thursday, January 27, 2022",1,3,3,0,0,1,13,122,4,71,0,0,"2022-01-27T12:02:03.363Z" -"Wednesday, January 26, 2022",11,1,1,0,0,14,13,119,1,71,0,0,"2022-01-26T12:01:48.421Z" -"Tuesday, January 25, 2022",10,2,2,0,0,3,10,121,1,73,0,0,"2022-01-25T12:02:07.395Z" -"Monday, January 24, 2022",1,2,2,0,0,0,15,120,2,73,0,0,"2022-01-24T12:02:01.272Z" -"Sunday, January 23, 2022",0,0,0,0,0,1,15,118,0,73,0,0,"2022-01-23T12:02:37.070Z" -"Saturday, January 22, 2022",4,2,1,0,1,9,14,118,0,73,0,0,"2022-01-22T12:01:53.141Z" -"Friday, January 21, 2022",14,1,1,0,0,11,8,118,16,59,0,0,"2022-01-21T12:02:01.917Z" -"Thursday, January 20, 2022",17,1,1,0,0,6,9,118,17,58,0,0,"2022-01-20T12:01:58.903Z" -"Wednesday, January 19, 2022",9,2,2,0,0,5,16,118,16,58,0,0,"2022-01-19T12:01:52.352Z" -"Tuesday, January 18, 2022",1,2,2,0,0,1,16,123,22,56,0,0,"2022-01-18T12:02:00.655Z" -"Monday, January 17, 2022",0,4,3,0,1,5,15,122,21,56,0,0,"2022-01-17T12:02:13.006Z" -"Sunday, January 16, 2022",0,2,2,0,0,1,11,118,18,56,0,0,"2022-01-16T12:01:58.920Z" -"Saturday, January 15, 2022",12,4,4,0,0,5,10,117,17,56,0,0,"2022-01-15T12:01:48.438Z" -"Friday, January 14, 2022",8,1,0,0,0,19,24,116,13,58,0,0,"2022-01-14T12:01:57.514Z" -"Thursday, January 13, 2022",7,0,0,0,0,4,9,120,13,59,0,0,"2022-01-13T12:02:10.552Z" -"Wednesday, January 12, 2022",7,1,1,0,0,7,9,120,13,59,0,0,"2022-01-12T12:02:06.777Z" -"Tuesday, January 11, 2022",9,0,0,0,0,2,7,126,15,62,0,0,"2022-01-11T12:02:13.784Z" -"Monday, January 10, 2022",1,1,1,0,0,1,14,130,16,63,0,0,"2022-01-10T12:02:01.765Z" -"Sunday, January 9, 2022",2,3,3,0,0,4,14,129,16,63,0,0,"2022-01-09T12:05:15.550Z" -"Saturday, January 8, 2022",10,3,3,0,0,7,11,126,14,62,0,0,"2022-01-08T12:01:47.468Z" -"Friday, January 7, 2022",6,4,4,0,0,3,10,126,13,62,0,0,"2022-01-07T12:02:01.732Z" -"Thursday, January 6, 2022",11,8,4,0,0,8,10,124,11,63,0,0,"2022-01-06T12:01:56.874Z" -"Wednesday, January 5, 2022",16,1,0,0,1,8,9,119,22,55,0,0,"2022-01-05T12:01:53.686Z" -"Tuesday, January 4, 2022",1,0,0,0,0,2,12,120,30,51,0,0,"2022-01-04T12:02:08.917Z" -"Monday, January 3, 2022",0,0,0,0,0,0,11,121,31,51,0,0,"2022-01-03T12:01:56.590Z" -"Sunday, January 2, 2022",1,0,0,0,0,1,11,121,31,51,0,0,"2022-01-02T12:01:43.450Z" -"Saturday, January 1, 2022",0,0,0,0,0,0,10,121,31,51,0,0,"2022-01-01T12:03:25.988Z" -"Friday, December 31, 2021",9,4,4,0,0,5,9,121,31,51,0,0,"2021-12-31T12:02:10.209Z" -"Thursday, December 30, 2021",2,3,3,0,0,0,10,117,27,51,0,0,"2021-12-30T12:01:46.229Z" -"Wednesday, December 29, 2021",1,1,1,0,0,1,12,115,25,52,0,0,"2021-12-29T12:02:03.038Z" -"Tuesday, December 28, 2021",1,2,2,0,0,1,11,114,24,52,0,0,"2021-12-28T12:02:05.628Z" -"Monday, December 27, 2021",1,4,4,0,0,1,10,112,22,52,0,0,"2021-12-27T12:06:50.733Z" -"Sunday, December 26, 2021",0,0,0,0,0,0,10,108,18,52,0,0,"2021-12-26T12:02:56.381Z" -"Saturday, December 25, 2021",1,4,3,0,1,3,10,108,18,52,0,0,"2021-12-25T12:01:50.323Z" -"Friday, December 24, 2021",12,3,2,0,1,9,7,104,16,51,0,0,"2021-12-24T12:02:06.103Z" -"Tuesday, December 14, 2021",20,2,2,0,0,5,7,94,33,30,0,0,"2021-12-14T16:54:53.687Z" -"Tuesday, November 23, 2021",24,10,10,0,0,12,11,154,7,36,52,6,"2021-11-23T12:05:23.189Z" -"Monday, November 22, 2021",2,4,2,0,2,3,16,157,3,39,52,6,"2021-11-22T12:05:10.892Z" -"Sunday, November 21, 2021",2,8,7,0,1,7,14,155,3,38,53,6,"2021-11-21T12:05:08.366Z" -"Saturday, November 20, 2021",49,10,4,1,4,33,9,150,4,32,53,6,"2021-11-20T12:04:55.665Z" -"Friday, November 19, 2021",15,12,3,1,0,10,12,207,2,70,51,10,"2021-11-19T12:05:11.926Z" -"Thursday, November 18, 2021",23,8,4,0,2,18,13,204,6,68,50,10,"2021-11-18T12:05:16.274Z" -"Wednesday, November 17, 2021",9,5,4,0,0,4,10,204,8,67,50,10,"2021-11-17T12:05:18.908Z" -"Tuesday, November 16, 2021",11,3,1,2,0,7,13,202,7,66,52,10,"2021-11-16T12:07:13.435Z" -"Monday, November 15, 2021",2,5,1,4,0,2,16,201,7,67,50,10,"2021-11-15T12:05:40.064Z" -"Sunday, November 14, 2021",1,8,6,1,1,2,14,197,10,65,46,10,"2021-11-14T12:05:17.813Z" -"Saturday, November 13, 2021",5,4,2,2,0,5,12,189,4,65,45,10,"2021-11-13T12:08:16.420Z" -"Friday, November 12, 2021",19,7,7,0,0,8,11,186,3,65,43,10,"2021-11-12T12:05:20.318Z" -"Thursday, November 11, 2021",10,3,2,1,0,5,16,180,1,63,43,10,"2021-11-11T12:05:19.502Z" -"Wednesday, November 10, 2021",7,3,1,0,1,7,18,220,4,78,44,11,"2021-11-10T12:05:26.569Z" -"Monday, November 8, 2021",5,3,1,2,0,4,18,217,4,77,43,11,"2021-11-08T12:05:08.981Z" -"Sunday, November 7, 2021",0,4,4,0,0,3,16,214,4,76,41,11,"2021-11-07T12:09:00.481Z" -"Saturday, November 6, 2021",2,0,0,0,0,3,13,211,1,76,41,11,"2021-11-06T12:07:11.382Z" -"Friday, November 5, 2021",2,4,2,1,1,6,13,211,1,76,41,11,"2021-11-05T12:05:33.159Z" -"Thursday, November 4, 2021",3,1,1,0,0,4,8,210,3,74,40,13,"2021-11-04T12:05:15.923Z" -"Wednesday, November 3, 2021",11,4,0,2,0,4,6,217,16,70,40,13,"2021-11-03T12:04:59.384Z" -"Tuesday, November 2, 2021",6,3,1,1,0,3,13,218,26,66,39,13,"2021-11-02T12:05:35.560Z" -"Monday, November 1, 2021",0,3,3,0,0,1,15,223,30,62,38,14,"2021-11-01T12:05:36.700Z" -"Sunday, October 31, 2021",1,1,1,0,0,1,14,221,27,63,38,14,"2021-10-31T12:05:07.491Z" -"Saturday, October 30, 2021",5,4,3,1,0,11,13,220,26,63,38,14,"2021-10-30T12:06:23.911Z" -"Friday, October 29, 2021",1,2,1,1,0,9,13,218,23,64,37,14,"2021-10-29T12:05:26.320Z" -"Thursday, October 28, 2021",0,5,5,0,0,9,9,220,35,53,36,14,"2021-10-28T12:05:36.934Z" -"Wednesday, October 27, 2021",1,1,1,0,0,14,10,216,31,53,36,14,"2021-10-27T12:05:11.199Z" -"Tuesday, October 26, 2021",4,4,2,1,0,6,4,215,30,53,36,14,"2021-10-26T12:06:21.795Z" -"Monday, October 25, 2021",1,3,2,1,0,1,7,217,30,53,36,14,"2021-10-25T12:05:36.120Z" -"Sunday, October 24, 2021",0,0,0,0,0,0,6,214,28,53,35,14,"2021-10-24T12:05:42.586Z" -"Saturday, October 23, 2021",7,3,2,1,0,16,6,214,28,53,35,14,"2021-10-23T12:05:23.725Z" -"Friday, October 22, 2021",2,2,1,1,0,7,10,212,26,53,34,15,"2021-10-22T12:05:17.551Z" -"Thursday, October 21, 2021",5,2,2,0,0,8,8,210,26,53,33,15,"2021-10-21T12:05:31.148Z" -"Wednesday, October 20, 2021",2,3,3,0,0,11,10,208,25,52,33,15,"2021-10-20T12:05:42.078Z" -"Tuesday, October 19, 2021",16,1,1,0,0,8,7,205,22,52,33,15,"2021-10-19T12:05:19.601Z" -"Monday, October 18, 2021",1,1,0,1,0,7,15,204,21,52,33,15,"2021-10-18T12:07:19.562Z" -"Sunday, October 17, 2021",1,0,0,0,0,5,9,203,21,52,32,15,"2021-10-17T12:05:17.702Z" -"Saturday, October 16, 2021",3,2,1,0,1,5,4,203,21,52,32,15,"2021-10-16T12:05:18.119Z" -"Friday, October 15, 2021",8,2,2,0,0,9,5,203,22,53,32,15,"2021-10-15T12:05:10.204Z" -"Thursday, October 14, 2021",8,3,3,0,0,6,7,202,21,53,32,15,"2021-10-14T12:15:34.689Z" -"Wednesday, October 13, 2021",16,5,4,0,0,3,8,199,18,53,32,15,"2021-10-13T12:15:38.734Z" -"Tuesday, October 12, 2021",7,3,3,0,0,6,19,197,15,54,33,14,"2021-10-12T12:05:36.457Z" -"Monday, October 11, 2021",3,1,1,0,0,2,18,195,12,54,33,15,"2021-10-11T12:06:07.437Z" -"Sunday, October 10, 2021",6,0,0,0,0,3,19,195,11,54,33,15,"2021-10-10T12:05:25.390Z" -"Saturday, October 9, 2021",1,5,3,1,1,3,19,195,11,54,33,15,"2021-10-09T12:05:15.979Z" -"Friday, October 8, 2021",1,2,1,1,0,5,17,190,9,54,32,15,"2021-10-08T12:05:24.361Z" -"Thursday, October 7, 2021",4,0,0,0,0,6,12,188,8,54,31,15,"2021-10-07T12:05:21.928Z" -"Wednesday, October 6, 2021",4,6,4,1,1,3,8,190,10,56,30,16,"2021-10-06T12:05:22.904Z" -"Tuesday, October 5, 2021",1,2,1,1,0,4,10,189,6,56,35,14,"2021-10-05T12:05:17.480Z" -"Monday, October 4, 2021",1,3,2,0,0,0,6,188,8,55,34,14,"2021-10-04T12:05:26.660Z" -"Sunday, October 3, 2021",3,1,1,0,0,3,6,186,7,55,34,14,"2021-10-03T12:05:31.684Z" -"Saturday, October 2, 2021",12,0,0,0,0,7,5,184,5,55,34,14,"2021-10-02T12:05:33.697Z" -"Friday, October 1, 2021",5,0,0,0,0,9,8,188,18,53,34,14,"2021-10-01T12:08:16.589Z" -"Thursday, September 30, 2021",5,3,1,1,0,5,6,193,29,50,34,14,"2021-09-30T12:06:24.182Z" -"Wednesday, September 29, 2021",6,5,4,1,0,1,9,190,28,50,33,14,"2021-09-29T12:05:28.424Z" -"Tuesday, September 28, 2021",4,1,0,0,1,6,14,190,23,51,34,12,"2021-09-28T12:05:21.122Z" -"Monday, September 27, 2021",1,0,0,0,0,1,12,197,23,52,41,12,"2021-09-27T12:05:19.921Z" -"Sunday, September 26, 2021",1,5,4,0,1,4,11,197,23,52,41,12,"2021-09-26T12:08:47.121Z" -"Saturday, September 25, 2021",9,2,1,0,0,2,8,192,19,52,41,12,"2021-09-25T12:06:27.156Z" -"Friday, September 24, 2021",9,3,2,0,0,7,11,190,18,52,41,12,"2021-09-24T12:05:17.886Z" -"Thursday, September 23, 2021",1,1,1,0,0,2,13,187,16,52,41,12,"2021-09-23T12:05:25.606Z" -"Wednesday, September 22, 2021",2,1,0,1,0,7,13,196,18,53,41,13,"2021-09-22T12:05:16.758Z" -"Tuesday, September 21, 2021",6,2,2,0,0,4,12,195,18,53,40,13,"2021-09-21T12:05:24.427Z" -"Monday, September 20, 2021",1,2,2,0,0,2,13,194,16,53,40,13,"2021-09-20T12:05:24.215Z" -"Sunday, September 19, 2021",1,0,0,0,0,5,11,192,14,53,40,13,"2021-09-19T12:05:42.171Z" -"Saturday, September 18, 2021",6,1,1,0,0,3,6,193,14,53,40,13,"2021-09-18T12:07:37.446Z" -"Friday, September 17, 2021",7,1,0,0,0,5,5,195,13,54,41,13,"2021-09-17T12:05:15.464Z" -"Thursday, September 16, 2021",4,2,2,0,0,3,4,195,14,54,41,13,"2021-09-16T12:05:30.904Z" -"Wednesday, September 15, 2021",16,4,2,1,0,6,4,194,12,54,41,14,"2021-09-15T12:05:55.219Z" -"Tuesday, September 14, 2021",7,4,4,0,0,7,12,191,12,52,43,12,"2021-09-14T12:07:03.530Z" -"Monday, September 13, 2021",1,1,1,0,0,0,10,187,8,52,43,12,"2021-09-13T12:08:08.013Z" -"Sunday, September 12, 2021",0,2,1,1,0,0,10,186,7,52,43,12,"2021-09-12T12:08:11.836Z" -"Saturday, September 11, 2021",2,2,0,2,0,2,10,184,6,52,42,12,"2021-09-11T12:06:55.070Z" -"Friday, September 10, 2021",6,0,0,0,0,4,11,181,6,52,39,12,"2021-09-10T12:04:51.984Z" -"Thursday, September 9, 2021",5,2,1,1,0,1,10,181,6,52,39,12,"2021-09-09T12:07:12.662Z" -"Wednesday, September 8, 2021",4,4,4,0,0,5,12,181,4,59,38,12,"2021-09-08T12:06:33.698Z" -"Tuesday, September 7, 2021",3,3,1,0,1,4,10,183,9,57,38,12,"2021-09-07T12:04:36.739Z" -"Monday, September 6, 2021",12,5,4,1,0,1,9,182,9,55,38,12,"2021-09-06T12:09:10.713Z" -"Sunday, September 5, 2021",2,2,2,0,0,5,12,177,5,55,38,12,"2021-09-05T12:09:11.805Z" -"Saturday, September 4, 2021",9,4,2,2,0,6,11,176,5,54,38,12,"2021-09-04T12:05:49.637Z" -"Friday, September 3, 2021",1,0,0,0,0,4,12,172,3,54,36,12,"2021-09-03T12:05:00.018Z" -"Thursday, September 2, 2021",18,4,3,1,0,5,8,172,3,54,36,12,"2021-09-02T12:04:50.438Z" diff --git a/scripts/utils/svelte-plugin.js b/scripts/utils/svelte-plugin.js deleted file mode 100644 index 6781c28a40..0000000000 --- a/scripts/utils/svelte-plugin.js +++ /dev/null @@ -1,70 +0,0 @@ -// @ts-nocheck -import { promises as fs } from 'node:fs'; -import { dirname, isAbsolute, join, relative } from 'node:path'; -import { compile } from 'svelte/compiler'; - -const convertMessage = ({ message, start, end, filename, frame }) => ({ - text: message, - location: start && - end && { - file: filename, - line: start.line, - column: start.column, - length: start.line === end.line ? end.column - start.column : 0, - lineText: frame, - }, -}); - -const handleLoad = async (args, generate, { isDev }) => { - const { path } = args; - const source = await fs.readFile(path, 'utf8'); - const filename = relative(process.cwd(), path); - - try { - let compileOptions = { dev: isDev, css: false, generate, hydratable: true }; - - let { js, warnings } = compile(source, { ...compileOptions, filename }); - let contents = js.code + `\n//# sourceMappingURL=` + js.map.toUrl(); - - return { - loader: 'js', - contents, - resolveDir: dirname(path), - warnings: warnings.map((w) => convertMessage(w)), - }; - } catch (e) { - return { errors: [convertMessage(e)] }; - } -}; - -export default function sveltePlugin({ isDev = false }) { - return { - name: 'svelte-esbuild', - setup(build) { - build.onResolve({ filter: /\.svelte$/ }, (args) => { - let path = args.path.replace(/\.(?:client|server)/, ''); - path = isAbsolute(path) ? path : join(args.resolveDir, path); - - if (/\.client\.svelte$/.test(args.path)) { - return { - path, - namespace: 'svelte:client', - }; - } - - if (/\.server\.svelte$/.test(args.path)) { - return { - path, - namespace: 'svelte:server', - }; - } - }); - build.onLoad({ filter: /.*/, namespace: 'svelte:client' }, (args) => - handleLoad(args, 'dom', { isDev }) - ); - build.onLoad({ filter: /.*/, namespace: 'svelte:server' }, (args) => - handleLoad(args, 'ssr', { isDev }) - ); - }, - }; -}