From 32003931f7e64c8eb63c7b238e106236456387da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Wed, 17 Jul 2024 04:18:18 +0800 Subject: [PATCH] refactor: upgrade some deps --- package.json | 21 ++--- pnpm-lock.yaml | 239 ++++++++++++++++++++---------------------------- src/cli-main.ts | 4 +- 3 files changed, 109 insertions(+), 155 deletions(-) diff --git a/package.json b/package.json index f919429e1..c039fd3d7 100644 --- a/package.json +++ b/package.json @@ -30,9 +30,9 @@ }, "dependencies": { "bundle-require": "^4.0.0", - "cac": "^6.7.12", + "cac": "^6.7.14", "chokidar": "^3.5.1", - "debug": "^4.3.1", + "debug": "^4.3.5", "esbuild": "^0.21.4", "execa": "^5.0.0", "globby": "^11.0.3", @@ -48,14 +48,13 @@ "@microsoft/api-extractor": "^7.38.3", "@rollup/plugin-json": "6.0.1", "@swc/core": "1.2.218", - "@types/debug": "4.1.7", - "@types/flat": "5.0.2", + "@types/debug": "4.1.12", "@types/fs-extra": "11.0.4", - "@types/node": "14.18.12", - "@types/resolve": "1.20.1", - "colorette": "2.0.16", - "consola": "2.15.3", - "flat": "5.0.2", + "@types/node": "20.14.11", + "@types/resolve": "1.20.6", + "colorette": "2.0.20", + "consola": "3.2.3", + "flat": "6.0.1", "fs-extra": "11.2.0", "postcss": "8.4.12", "postcss-simple-vars": "6.0.3", @@ -66,8 +65,8 @@ "strip-json-comments": "4.0.0", "svelte": "3.46.4", "svelte-preprocess": "5.0.3", - "terser": "^5.16.0", - "ts-essentials": "9.1.2", + "terser": "^5.31.3", + "ts-essentials": "10.0.1", "tsconfig-paths": "3.12.0", "tsup": "8.1.0", "typescript": "5.5.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2e8a7ee59..84c0597a9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,14 +12,14 @@ importers: specifier: ^4.0.0 version: 4.0.0(esbuild@0.21.4) cac: - specifier: ^6.7.12 - version: 6.7.12 + specifier: ^6.7.14 + version: 6.7.14 chokidar: specifier: ^3.5.1 version: 3.5.2 debug: - specifier: ^4.3.1 - version: 4.3.2 + specifier: ^4.3.5 + version: 4.3.5 esbuild: specifier: ^0.21.4 version: 0.21.4 @@ -53,7 +53,7 @@ importers: devDependencies: '@microsoft/api-extractor': specifier: ^7.38.3 - version: 7.38.3(@types/node@14.18.12) + version: 7.38.3(@types/node@20.14.11) '@rollup/plugin-json': specifier: 6.0.1 version: 6.0.1(rollup@4.0.2) @@ -61,29 +61,26 @@ importers: specifier: 1.2.218 version: 1.2.218 '@types/debug': - specifier: 4.1.7 - version: 4.1.7 - '@types/flat': - specifier: 5.0.2 - version: 5.0.2 + specifier: 4.1.12 + version: 4.1.12 '@types/fs-extra': specifier: 11.0.4 version: 11.0.4 '@types/node': - specifier: 14.18.12 - version: 14.18.12 + specifier: 20.14.11 + version: 20.14.11 '@types/resolve': - specifier: 1.20.1 - version: 1.20.1 + specifier: 1.20.6 + version: 1.20.6 colorette: - specifier: 2.0.16 - version: 2.0.16 + specifier: 2.0.20 + version: 2.0.20 consola: - specifier: 2.15.3 - version: 2.15.3 + specifier: 3.2.3 + version: 3.2.3 flat: - specifier: 5.0.2 - version: 5.0.2 + specifier: 6.0.1 + version: 6.0.1 fs-extra: specifier: 11.2.0 version: 11.2.0 @@ -115,23 +112,23 @@ importers: specifier: 5.0.3 version: 5.0.3(postcss-load-config@4.0.1(postcss@8.4.12))(postcss@8.4.12)(sass@1.62.1)(svelte@3.46.4)(typescript@5.5.3) terser: - specifier: ^5.16.0 - version: 5.16.0 + specifier: ^5.31.3 + version: 5.31.3 ts-essentials: - specifier: 9.1.2 - version: 9.1.2(typescript@5.5.3) + specifier: 10.0.1 + version: 10.0.1(typescript@5.5.3) tsconfig-paths: specifier: 3.12.0 version: 3.12.0 tsup: specifier: 8.1.0 - version: 8.1.0(@microsoft/api-extractor@7.38.3(@types/node@14.18.12))(@swc/core@1.2.218)(postcss@8.4.12)(typescript@5.5.3) + version: 8.1.0(@microsoft/api-extractor@7.38.3(@types/node@20.14.11))(@swc/core@1.2.218)(postcss@8.4.12)(typescript@5.5.3) typescript: specifier: 5.5.3 version: 5.5.3 vitest: specifier: 2.0.3 - version: 2.0.3(@types/node@14.18.12)(sass@1.62.1)(terser@5.16.0) + version: 2.0.3(@types/node@20.14.11)(sass@1.62.1)(terser@5.31.3) wait-for-expect: specifier: 3.0.2 version: 3.0.2 @@ -292,32 +289,20 @@ packages: cpu: [x64] os: [win32] - '@jridgewell/gen-mapping@0.3.2': - resolution: {integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==} - engines: {node: '>=6.0.0'} - '@jridgewell/gen-mapping@0.3.5': resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} engines: {node: '>=6.0.0'} - '@jridgewell/resolve-uri@3.1.0': - resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} - engines: {node: '>=6.0.0'} - '@jridgewell/resolve-uri@3.1.2': resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} - '@jridgewell/set-array@1.1.2': - resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} - engines: {node: '>=6.0.0'} - '@jridgewell/set-array@1.2.1': resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} engines: {node: '>=6.0.0'} - '@jridgewell/source-map@0.3.2': - resolution: {integrity: sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==} + '@jridgewell/source-map@0.3.6': + resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} '@jridgewell/sourcemap-codec@1.4.14': resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} @@ -328,9 +313,6 @@ packages: '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - '@jridgewell/trace-mapping@0.3.17': - resolution: {integrity: sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==} - '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} @@ -617,8 +599,8 @@ packages: '@types/argparse@1.0.38': resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} - '@types/debug@4.1.7': - resolution: {integrity: sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==} + '@types/debug@4.1.12': + resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} '@types/estree@1.0.0': resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==} @@ -626,9 +608,6 @@ packages: '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} - '@types/flat@5.0.2': - resolution: {integrity: sha512-3zsplnP2djeps5P9OyarTxwRpMLoe5Ash8aL9iprw0JxB+FAHjY+ifn4yZUuW4/9hqtnmor6uvjSRzJhiVbrEQ==} - '@types/fs-extra@11.0.4': resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==} @@ -638,17 +617,17 @@ packages: '@types/jsonfile@6.1.4': resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==} - '@types/ms@0.7.31': - resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} + '@types/ms@0.7.34': + resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} - '@types/node@14.18.12': - resolution: {integrity: sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A==} + '@types/node@20.14.11': + resolution: {integrity: sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==} '@types/pug@2.0.6': resolution: {integrity: sha512-SnHmG9wN1UVmagJOnyo/qkk0Z7gejYxOYYmaAwr5u2yFYfsupN3sg10kyzN8Hep/2zbHxCnsumxOoRIRMBwKCg==} - '@types/resolve@1.20.1': - resolution: {integrity: sha512-Ku5+GPFa12S3W26Uwtw+xyrtIpaZsGYHH6zxNbZlstmlvMYSZRzOwzwsXbxlVUbHyUucctSyuFtu6bNxwYomIw==} + '@types/resolve@1.20.6': + resolution: {integrity: sha512-A4STmOXPhMUtHH+S6ymgE2GiBSMqf4oTvcQZMcHzokuTLVYzXTB8ttjcgxOVaAp2lGwEdzZ0J+cRbbeevQj1UQ==} '@vitest/expect@2.0.3': resolution: {integrity: sha512-X6AepoOYePM0lDNUPsGXTxgXZAl3EXd0GYe/MZyVE4HzkUqyUVC6S3PrY5mClDJ6/7/7vALLMV3+xD/Ko60Hqg==} @@ -668,8 +647,8 @@ packages: '@vitest/utils@2.0.3': resolution: {integrity: sha512-c/UdELMuHitQbbc/EVctlBaxoYAwQPQdSNwv7z/vHyBKy2edYZaFgptE27BRueZB7eW8po+cllotMNTDpL3HWg==} - acorn@8.8.1: - resolution: {integrity: sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==} + acorn@8.12.1: + resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} engines: {node: '>=0.4.0'} hasBin: true @@ -724,10 +703,6 @@ packages: peerDependencies: esbuild: '>=0.17' - cac@6.7.12: - resolution: {integrity: sha512-rM7E2ygtMkJqD9c7WnFU6fruFcN3xe4FM5yUmgxhZzIKJk4uHl9U/fhwdajGFQbQuv43FAUo1Fe8gX/oIKDeSA==} - engines: {node: '>=8'} - cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -754,8 +729,8 @@ packages: color-name@1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - colorette@2.0.16: - resolution: {integrity: sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==} + colorette@2.0.20: + resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} colors@1.2.5: resolution: {integrity: sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==} @@ -775,22 +750,14 @@ packages: concat-map@0.0.1: resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} - consola@2.15.3: - resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} + consola@3.2.3: + resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} + engines: {node: ^14.18.0 || >=16.10.0} cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} - debug@4.3.2: - resolution: {integrity: sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - debug@4.3.5: resolution: {integrity: sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==} engines: {node: '>=6.0'} @@ -855,8 +822,9 @@ packages: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} - flat@5.0.2: - resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} + flat@6.0.1: + resolution: {integrity: sha512-/3FfIa8mbrg3xE7+wAhWeV+bd7L2Mof+xtZb5dRDKZ+wDvYJK4WDYeIOuOhre5Yv5aQObZrlbRmk3RTSiuQBtw==} + engines: {node: '>=18'} hasBin: true fs-extra@11.2.0: @@ -1396,8 +1364,8 @@ packages: resolution: {integrity: sha512-qKJzw6DpA33CIa+C/rGp4AUdSfii0DOTCzj/2YpSKKayw5WGSS624Et9L1nU1k2OVRS9vaENQXp2CVZNU+xvIg==} engines: {node: '>= 8'} - terser@5.16.0: - resolution: {integrity: sha512-KjTV81QKStSfwbNiwlBXfcgMcOloyuRdb62/iLFPGBcVNF4EXjhdYBhYHmbJpiBrVxZhDvltE11j+LBQUxEEJg==} + terser@5.31.3: + resolution: {integrity: sha512-pAfYn3NIZLyZpa83ZKigvj6Rn9c/vd5KfYGX7cN1mnzqgDcxWvrU5ZtAfIKhEXz9nRecw4z3LXkjaq96/qZqAA==} engines: {node: '>=10'} hasBin: true @@ -1434,10 +1402,13 @@ packages: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true - ts-essentials@9.1.2: - resolution: {integrity: sha512-EaSmXsAhEiirrTY1Oaa7TSpei9dzuCuFPmjKRJRPamERYtfaGS8/KpOSbjergLz/Y76/aZlV9i/krgzsuWEBbg==} + ts-essentials@10.0.1: + resolution: {integrity: sha512-HPH+H2bkkO8FkMDau+hFvv7KYozzned9Zr1Urn7rRPXMF4mZmCKOq+u4AI1AAW+2bofIOXTuSdKo9drQuni2dQ==} peerDependencies: - typescript: '>=4.1.0' + typescript: '>=4.5.0' + peerDependenciesMeta: + typescript: + optional: true ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} @@ -1474,6 +1445,9 @@ packages: engines: {node: '>=14.17'} hasBin: true + undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} @@ -1674,30 +1648,20 @@ snapshots: '@esbuild/win32-x64@0.21.4': optional: true - '@jridgewell/gen-mapping@0.3.2': - dependencies: - '@jridgewell/set-array': 1.1.2 - '@jridgewell/sourcemap-codec': 1.4.14 - '@jridgewell/trace-mapping': 0.3.17 - '@jridgewell/gen-mapping@0.3.5': dependencies: '@jridgewell/set-array': 1.2.1 '@jridgewell/sourcemap-codec': 1.5.0 '@jridgewell/trace-mapping': 0.3.25 - '@jridgewell/resolve-uri@3.1.0': {} - '@jridgewell/resolve-uri@3.1.2': {} - '@jridgewell/set-array@1.1.2': {} - '@jridgewell/set-array@1.2.1': {} - '@jridgewell/source-map@0.3.2': + '@jridgewell/source-map@0.3.6': dependencies: - '@jridgewell/gen-mapping': 0.3.2 - '@jridgewell/trace-mapping': 0.3.17 + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 '@jridgewell/sourcemap-codec@1.4.14': {} @@ -1705,30 +1669,25 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.0': {} - '@jridgewell/trace-mapping@0.3.17': - dependencies: - '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 - '@jridgewell/trace-mapping@0.3.25': dependencies: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@microsoft/api-extractor-model@7.28.2(@types/node@14.18.12)': + '@microsoft/api-extractor-model@7.28.2(@types/node@20.14.11)': dependencies: '@microsoft/tsdoc': 0.14.2 '@microsoft/tsdoc-config': 0.16.2 - '@rushstack/node-core-library': 3.61.0(@types/node@14.18.12) + '@rushstack/node-core-library': 3.61.0(@types/node@20.14.11) transitivePeerDependencies: - '@types/node' - '@microsoft/api-extractor@7.38.3(@types/node@14.18.12)': + '@microsoft/api-extractor@7.38.3(@types/node@20.14.11)': dependencies: - '@microsoft/api-extractor-model': 7.28.2(@types/node@14.18.12) + '@microsoft/api-extractor-model': 7.28.2(@types/node@20.14.11) '@microsoft/tsdoc': 0.14.2 '@microsoft/tsdoc-config': 0.16.2 - '@rushstack/node-core-library': 3.61.0(@types/node@14.18.12) + '@rushstack/node-core-library': 3.61.0(@types/node@20.14.11) '@rushstack/rig-package': 0.5.1 '@rushstack/ts-command-line': 4.17.1 colors: 1.2.5 @@ -1859,7 +1818,7 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.18.1': optional: true - '@rushstack/node-core-library@3.61.0(@types/node@14.18.12)': + '@rushstack/node-core-library@3.61.0(@types/node@20.14.11)': dependencies: colors: 1.2.5 fs-extra: 7.0.1 @@ -1869,7 +1828,7 @@ snapshots: semver: 7.5.4 z-schema: 5.0.5 optionalDependencies: - '@types/node': 14.18.12 + '@types/node': 20.14.11 '@rushstack/rig-package@0.5.1': dependencies: @@ -1940,34 +1899,34 @@ snapshots: '@types/argparse@1.0.38': {} - '@types/debug@4.1.7': + '@types/debug@4.1.12': dependencies: - '@types/ms': 0.7.31 + '@types/ms': 0.7.34 '@types/estree@1.0.0': {} '@types/estree@1.0.5': {} - '@types/flat@5.0.2': {} - '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 14.18.12 + '@types/node': 20.14.11 '@types/json5@0.0.29': {} '@types/jsonfile@6.1.4': dependencies: - '@types/node': 14.18.12 + '@types/node': 20.14.11 - '@types/ms@0.7.31': {} + '@types/ms@0.7.34': {} - '@types/node@14.18.12': {} + '@types/node@20.14.11': + dependencies: + undici-types: 5.26.5 '@types/pug@2.0.6': {} - '@types/resolve@1.20.1': {} + '@types/resolve@1.20.6': {} '@vitest/expect@2.0.3': dependencies: @@ -2002,7 +1961,7 @@ snapshots: loupe: 3.1.1 tinyrainbow: 1.2.0 - acorn@8.8.1: {} + acorn@8.12.1: {} ajv@6.12.6: dependencies: @@ -2053,8 +2012,6 @@ snapshots: esbuild: 0.21.4 load-tsconfig: 0.2.3 - cac@6.7.12: {} - cac@6.7.14: {} chai@5.1.1: @@ -2094,7 +2051,7 @@ snapshots: color-name@1.1.3: optional: true - colorette@2.0.16: {} + colorette@2.0.20: {} colors@1.2.5: {} @@ -2107,7 +2064,7 @@ snapshots: concat-map@0.0.1: {} - consola@2.15.3: {} + consola@3.2.3: {} cross-spawn@7.0.3: dependencies: @@ -2115,10 +2072,6 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - debug@4.3.2: - dependencies: - ms: 2.1.2 - debug@4.3.5: dependencies: ms: 2.1.2 @@ -2212,7 +2165,7 @@ snapshots: dependencies: to-regex-range: 5.0.1 - flat@5.0.2: {} + flat@6.0.1: {} fs-extra@11.2.0: dependencies: @@ -2677,10 +2630,10 @@ snapshots: svelte@3.46.4: {} - terser@5.16.0: + terser@5.31.3: dependencies: - '@jridgewell/source-map': 0.3.2 - acorn: 8.8.1 + '@jridgewell/source-map': 0.3.6 + acorn: 8.12.1 commander: 2.20.3 source-map-support: 0.5.21 @@ -2710,8 +2663,8 @@ snapshots: tree-kill@1.2.2: {} - ts-essentials@9.1.2(typescript@5.5.3): - dependencies: + ts-essentials@10.0.1(typescript@5.5.3): + optionalDependencies: typescript: 5.5.3 ts-interface-checker@0.1.13: {} @@ -2723,12 +2676,12 @@ snapshots: minimist: 1.2.5 strip-bom: 3.0.0 - tsup@8.1.0(@microsoft/api-extractor@7.38.3(@types/node@14.18.12))(@swc/core@1.2.218)(postcss@8.4.12)(typescript@5.5.3): + tsup@8.1.0(@microsoft/api-extractor@7.38.3(@types/node@20.14.11))(@swc/core@1.2.218)(postcss@8.4.12)(typescript@5.5.3): dependencies: bundle-require: 4.0.0(esbuild@0.21.4) - cac: 6.7.12 + cac: 6.7.14 chokidar: 3.5.2 - debug: 4.3.2 + debug: 4.3.5 esbuild: 0.21.4 execa: 5.1.1 globby: 11.0.4 @@ -2740,7 +2693,7 @@ snapshots: sucrase: 3.20.3 tree-kill: 1.2.2 optionalDependencies: - '@microsoft/api-extractor': 7.38.3(@types/node@14.18.12) + '@microsoft/api-extractor': 7.38.3(@types/node@20.14.11) '@swc/core': 1.2.218 postcss: 8.4.12 typescript: 5.5.3 @@ -2752,6 +2705,8 @@ snapshots: typescript@5.5.3: {} + undici-types@5.26.5: {} + universalify@0.1.2: {} universalify@2.0.1: {} @@ -2762,13 +2717,13 @@ snapshots: validator@13.11.0: {} - vite-node@2.0.3(@types/node@14.18.12)(sass@1.62.1)(terser@5.16.0): + vite-node@2.0.3(@types/node@20.14.11)(sass@1.62.1)(terser@5.31.3): dependencies: cac: 6.7.14 debug: 4.3.5 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.3.4(@types/node@14.18.12)(sass@1.62.1)(terser@5.16.0) + vite: 5.3.4(@types/node@20.14.11)(sass@1.62.1)(terser@5.31.3) transitivePeerDependencies: - '@types/node' - less @@ -2779,18 +2734,18 @@ snapshots: - supports-color - terser - vite@5.3.4(@types/node@14.18.12)(sass@1.62.1)(terser@5.16.0): + vite@5.3.4(@types/node@20.14.11)(sass@1.62.1)(terser@5.31.3): dependencies: esbuild: 0.21.4 postcss: 8.4.39 rollup: 4.18.1 optionalDependencies: - '@types/node': 14.18.12 + '@types/node': 20.14.11 fsevents: 2.3.3 sass: 1.62.1 - terser: 5.16.0 + terser: 5.31.3 - vitest@2.0.3(@types/node@14.18.12)(sass@1.62.1)(terser@5.16.0): + vitest@2.0.3(@types/node@20.14.11)(sass@1.62.1)(terser@5.31.3): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.3 @@ -2808,11 +2763,11 @@ snapshots: tinybench: 2.8.0 tinypool: 1.0.0 tinyrainbow: 1.2.0 - vite: 5.3.4(@types/node@14.18.12)(sass@1.62.1)(terser@5.16.0) - vite-node: 2.0.3(@types/node@14.18.12)(sass@1.62.1)(terser@5.16.0) + vite: 5.3.4(@types/node@20.14.11)(sass@1.62.1)(terser@5.31.3) + vite-node: 2.0.3(@types/node@20.14.11)(sass@1.62.1)(terser@5.31.3) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 14.18.12 + '@types/node': 20.14.11 transitivePeerDependencies: - less - lightningcss diff --git a/src/cli-main.ts b/src/cli-main.ts index 588754466..78c3dfa54 100644 --- a/src/cli-main.ts +++ b/src/cli-main.ts @@ -1,5 +1,5 @@ import { cac } from 'cac' -import flat from 'flat' +import { flatten } from 'flat' import type { Format, Options } from '.' import { version } from '../package.json' import { slash } from './utils' @@ -139,7 +139,7 @@ export async function main(options: Options = {}) { options.inject = inject } if (flags.define) { - const define: Record = flat(flags.define) + const define: Record = flatten(flags.define) options.define = define } if (flags.loader) {