From fecae8ee91b8e494618326ebb785f39a10f3a5c1 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Wed, 6 Sep 2023 10:49:40 +0200 Subject: [PATCH 01/10] chore: update deps --- package.json | 14 +- pnpm-lock.yaml | 811 +++++++++++++++++++++++++++++++++---------------- 2 files changed, 557 insertions(+), 268 deletions(-) diff --git a/package.json b/package.json index b3ed22c..3c0ca26 100644 --- a/package.json +++ b/package.json @@ -37,22 +37,22 @@ "test": "vitest" }, "dependencies": { - "@babel/parser": "^7.22.13", - "@babel/types": "^7.22.11", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15", "recast": "^0.23.4" }, "devDependencies": { - "@types/node": "^20.5.7", + "@types/node": "^20.5.9", "@vitest/coverage-v8": "^0.34.3", "@vitest/ui": "^0.34.3", "changelogen": "^0.5.5", "eslint": "^8.48.0", "eslint-config-unjs": "^0.2.1", - "lint-staged": "^13.3.0", - "prettier": "^2.8.8", + "lint-staged": "^14.0.1", + "prettier": "^3.0.3", "simple-git-hooks": "^2.9.0", "typescript": "^5.2.2", - "unbuild": "^1.2.1", + "unbuild": "^2.0.0", "vitest": "^0.34.3" }, "simple-git-hooks": { @@ -64,5 +64,5 @@ "prettier -w" ] }, - "packageManager": "pnpm@8.7.0" + "packageManager": "pnpm@8.7.4" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 62e89a8..d1c0946 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,19 +6,19 @@ settings: dependencies: '@babel/parser': - specifier: ^7.22.13 - version: 7.22.13 + specifier: ^7.22.15 + version: 7.22.15 '@babel/types': - specifier: ^7.22.11 - version: 7.22.11 + specifier: ^7.22.15 + version: 7.22.15 recast: specifier: ^0.23.4 version: 0.23.4 devDependencies: '@types/node': - specifier: ^20.5.7 - version: 20.5.7 + specifier: ^20.5.9 + version: 20.5.9 '@vitest/coverage-v8': specifier: ^0.34.3 version: 0.34.3(vitest@0.34.3) @@ -35,11 +35,11 @@ devDependencies: specifier: ^0.2.1 version: 0.2.1(eslint@8.48.0)(typescript@5.2.2) lint-staged: - specifier: ^13.3.0 - version: 13.3.0 + specifier: ^14.0.1 + version: 14.0.1 prettier: - specifier: ^2.8.8 - version: 2.8.8 + specifier: ^3.0.3 + version: 3.0.3 simple-git-hooks: specifier: ^2.9.0 version: 2.9.0 @@ -47,8 +47,8 @@ devDependencies: specifier: ^5.2.2 version: 5.2.2 unbuild: - specifier: ^1.2.1 - version: 1.2.1 + specifier: ^2.0.0 + version: 2.0.0(typescript@5.2.2) vitest: specifier: ^0.34.3 version: 0.34.3(@vitest/ui@0.34.3) @@ -76,135 +76,143 @@ packages: '@babel/highlight': 7.18.6 dev: true - /@babel/compat-data@7.21.4: - resolution: {integrity: sha512-/DYyDpeCfaVinT40FPGdkkb+lYSKvsVuMjDAG7jPOWWiM1ibOaB9CXJAlc4d1QpP/U2q2P9jbrSlClKSErd55g==} + /@babel/code-frame@7.22.13: + resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.22.13 + chalk: 2.4.2 + dev: true + + /@babel/compat-data@7.22.9: + resolution: {integrity: sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==} engines: {node: '>=6.9.0'} dev: true - /@babel/core@7.21.4: - resolution: {integrity: sha512-qt/YV149Jman/6AfmlxJ04LMIu8bMoyl3RB91yTFrxQmgbrSvQMy7cI8Q62FHx1t8wJ8B5fu0UDoLwHAhUo1QA==} + /@babel/core@7.22.15: + resolution: {integrity: sha512-PtZqMmgRrvj8ruoEOIwVA3yoF91O+Hgw9o7DAUTNBA6Mo2jpu31clx9a7Nz/9JznqetTR6zwfC4L3LAjKQXUwA==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.1 - '@babel/code-frame': 7.21.4 - '@babel/generator': 7.21.4 - '@babel/helper-compilation-targets': 7.21.4(@babel/core@7.21.4) - '@babel/helper-module-transforms': 7.21.2 - '@babel/helpers': 7.21.0 - '@babel/parser': 7.22.13 - '@babel/template': 7.20.7 - '@babel/traverse': 7.21.4 - '@babel/types': 7.22.11 + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.22.15 + '@babel/helper-compilation-targets': 7.22.15 + '@babel/helper-module-transforms': 7.22.15(@babel/core@7.22.15) + '@babel/helpers': 7.22.15 + '@babel/parser': 7.22.15 + '@babel/template': 7.22.15 + '@babel/traverse': 7.22.15 + '@babel/types': 7.22.15 convert-source-map: 1.9.0 debug: 4.3.4 gensync: 1.0.0-beta.2 json5: 2.2.3 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true - /@babel/generator@7.21.4: - resolution: {integrity: sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA==} + /@babel/generator@7.22.15: + resolution: {integrity: sha512-Zu9oWARBqeVOW0dZOjXc3JObrzuqothQ3y/n1kUtrjCoCPLkXUwMvOo/F/TCfoHMbWIFlWwpZtkZVb9ga4U2pA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.22.15 '@jridgewell/gen-mapping': 0.3.2 '@jridgewell/trace-mapping': 0.3.17 jsesc: 2.5.2 dev: true - /@babel/helper-compilation-targets@7.21.4(@babel/core@7.21.4): - resolution: {integrity: sha512-Fa0tTuOXZ1iL8IeDFUWCzjZcn+sJGd9RZdH9esYVjEejGmzf+FFYQpMi/kZUk2kPy/q1H3/GPw7np8qar/stfg==} + /@babel/helper-compilation-targets@7.22.15: + resolution: {integrity: sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 dependencies: - '@babel/compat-data': 7.21.4 - '@babel/core': 7.21.4 - '@babel/helper-validator-option': 7.21.0 - browserslist: 4.21.5 + '@babel/compat-data': 7.22.9 + '@babel/helper-validator-option': 7.22.15 + browserslist: 4.21.10 lru-cache: 5.1.1 - semver: 6.3.0 + semver: 6.3.1 dev: true - /@babel/helper-environment-visitor@7.18.9: - resolution: {integrity: sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==} + /@babel/helper-environment-visitor@7.22.5: + resolution: {integrity: sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==} engines: {node: '>=6.9.0'} dev: true - /@babel/helper-function-name@7.21.0: - resolution: {integrity: sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==} + /@babel/helper-function-name@7.22.5: + resolution: {integrity: sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.20.7 - '@babel/types': 7.22.11 + '@babel/template': 7.22.15 + '@babel/types': 7.22.15 dev: true - /@babel/helper-hoist-variables@7.18.6: - resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} + /@babel/helper-hoist-variables@7.22.5: + resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.22.15 dev: true - /@babel/helper-module-imports@7.18.6: - resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} + /@babel/helper-module-imports@7.22.15: + resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.22.15 dev: true - /@babel/helper-module-transforms@7.21.2: - resolution: {integrity: sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ==} + /@babel/helper-module-transforms@7.22.15(@babel/core@7.22.15): + resolution: {integrity: sha512-l1UiX4UyHSFsYt17iQ3Se5pQQZZHa22zyIXURmvkmLCD4t/aU+dvNWHatKac/D9Vm9UES7nvIqHs4jZqKviUmQ==} engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 dependencies: - '@babel/helper-environment-visitor': 7.18.9 - '@babel/helper-module-imports': 7.18.6 - '@babel/helper-simple-access': 7.20.2 - '@babel/helper-split-export-declaration': 7.18.6 - '@babel/helper-validator-identifier': 7.22.5 - '@babel/template': 7.20.7 - '@babel/traverse': 7.21.4 - '@babel/types': 7.22.11 - transitivePeerDependencies: - - supports-color + '@babel/core': 7.22.15 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-module-imports': 7.22.15 + '@babel/helper-simple-access': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/helper-validator-identifier': 7.22.15 dev: true - /@babel/helper-simple-access@7.20.2: - resolution: {integrity: sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==} + /@babel/helper-simple-access@7.22.5: + resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.22.15 dev: true - /@babel/helper-split-export-declaration@7.18.6: - resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==} + /@babel/helper-split-export-declaration@7.22.6: + resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.22.15 dev: true /@babel/helper-string-parser@7.22.5: resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} engines: {node: '>=6.9.0'} + /@babel/helper-validator-identifier@7.22.15: + resolution: {integrity: sha512-4E/F9IIEi8WR94324mbDUMo074YTheJmd7eZF5vITTeYchqAi6sYXRLHUVsmkdmY4QjfKTcB2jB7dVP3NaBElQ==} + engines: {node: '>=6.9.0'} + /@babel/helper-validator-identifier@7.22.5: resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} engines: {node: '>=6.9.0'} + dev: true - /@babel/helper-validator-option@7.21.0: - resolution: {integrity: sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==} + /@babel/helper-validator-option@7.22.15: + resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} engines: {node: '>=6.9.0'} dev: true - /@babel/helpers@7.21.0: - resolution: {integrity: sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==} + /@babel/helpers@7.22.15: + resolution: {integrity: sha512-7pAjK0aSdxOwR+CcYAqgWOGy5dcfvzsTIfFTb2odQqW47MDfv14UaJDY6eng8ylM2EaeKXdxaSWESbkmaQHTmw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.20.7 - '@babel/traverse': 7.21.4 - '@babel/types': 7.22.11 + '@babel/template': 7.22.15 + '@babel/traverse': 7.22.15 + '@babel/types': 7.22.15 transitivePeerDependencies: - supports-color dev: true @@ -219,51 +227,61 @@ packages: js-tokens: 4.0.0 dev: true - /@babel/parser@7.22.13: - resolution: {integrity: sha512-3l6+4YOvc9wx7VlCSw4yQfcBo01ECA8TicQfbnCPuCEpRQrf+gTUyGdxNw+pyTUyywp6JRD1w0YQs9TpBXYlkw==} + /@babel/highlight@7.22.13: + resolution: {integrity: sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==} + engines: {node: '>=6.9.0'} + requiresBuild: true + dependencies: + '@babel/helper-validator-identifier': 7.22.5 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: true + + /@babel/parser@7.22.15: + resolution: {integrity: sha512-RWmQ/sklUN9BvGGpCDgSubhHWfAx24XDTDObup4ffvxaYsptOg2P3KG0j+1eWKLxpkX0j0uHxmpq2Z1SP/VhxA==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.22.15 - /@babel/standalone@7.21.4: - resolution: {integrity: sha512-Rw4nGqH/iyVeYxARKcz7iGP+njkPsVqJ45TmXMONoGoxooWjXCAs+CUcLeAZdBGCLqgaPvHKCYvIaDT2Iq+KfA==} + /@babel/standalone@7.22.15: + resolution: {integrity: sha512-8qE83Gths6g29KOpYF9uaFPOXa3oaFF1/88ejKwgkGAZRIkdmoR/jPIzVviAsWNSaZdIdMLWwKSoXpuk9iNGmw==} engines: {node: '>=6.9.0'} dev: true - /@babel/template@7.20.7: - resolution: {integrity: sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==} + /@babel/template@7.22.15: + resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.21.4 - '@babel/parser': 7.22.13 - '@babel/types': 7.22.11 + '@babel/code-frame': 7.22.13 + '@babel/parser': 7.22.15 + '@babel/types': 7.22.15 dev: true - /@babel/traverse@7.21.4: - resolution: {integrity: sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q==} + /@babel/traverse@7.22.15: + resolution: {integrity: sha512-DdHPwvJY0sEeN4xJU5uRLmZjgMMDIvMPniLuYzUVXj/GGzysPl0/fwt44JBkyUIzGJPV8QgHMcQdQ34XFuKTYQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.21.4 - '@babel/generator': 7.21.4 - '@babel/helper-environment-visitor': 7.18.9 - '@babel/helper-function-name': 7.21.0 - '@babel/helper-hoist-variables': 7.18.6 - '@babel/helper-split-export-declaration': 7.18.6 - '@babel/parser': 7.22.13 - '@babel/types': 7.22.11 + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.22.15 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-function-name': 7.22.5 + '@babel/helper-hoist-variables': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/parser': 7.22.15 + '@babel/types': 7.22.15 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color dev: true - /@babel/types@7.22.11: - resolution: {integrity: sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==} + /@babel/types@7.22.15: + resolution: {integrity: sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.22.5 - '@babel/helper-validator-identifier': 7.22.5 + '@babel/helper-validator-identifier': 7.22.15 to-fast-properties: 2.0.0 /@bcoe/v8-coverage@0.2.3: @@ -279,8 +297,17 @@ packages: dev: true optional: true - /@esbuild/android-arm64@0.17.16: - resolution: {integrity: sha512-QX48qmsEZW+gcHgTmAj+x21mwTz8MlYQBnzF6861cNdQGvj2jzzFjqH0EBabrIa/WVZ2CHolwMoqxVryqKt8+Q==} + /@esbuild/android-arm64@0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64@0.19.2: + resolution: {integrity: sha512-lsB65vAbe90I/Qe10OjkmrdxSX4UJDjosDgb8sZUKcg3oefEuW2OT2Vozz8ef7wrJbMcmhvCC+hciF8jY/uAkw==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -297,8 +324,17 @@ packages: dev: true optional: true - /@esbuild/android-arm@0.17.16: - resolution: {integrity: sha512-baLqRpLe4JnKrUXLJChoTN0iXZH7El/mu58GE3WIA6/H834k0XWvLRmGLG8y8arTRS9hJJibPnF0tiGhmWeZgw==} + /@esbuild/android-arm@0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.19.2: + resolution: {integrity: sha512-tM8yLeYVe7pRyAu9VMi/Q7aunpLwD139EY1S99xbQkT4/q2qa6eA4ige/WJQYdJ8GBL1K33pPFhPfPdJ/WzT8Q==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -315,8 +351,17 @@ packages: dev: true optional: true - /@esbuild/android-x64@0.17.16: - resolution: {integrity: sha512-G4wfHhrrz99XJgHnzFvB4UwwPxAWZaZBOFXh+JH1Duf1I4vIVfuYY9uVLpx4eiV2D/Jix8LJY+TAdZ3i40tDow==} + /@esbuild/android-x64@0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.19.2: + resolution: {integrity: sha512-qK/TpmHt2M/Hg82WXHRc/W/2SGo/l1thtDHZWqFq7oi24AjZ4O/CpPSu6ZuYKFkEgmZlFoa7CooAyYmuvnaG8w==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -333,8 +378,17 @@ packages: dev: true optional: true - /@esbuild/darwin-arm64@0.17.16: - resolution: {integrity: sha512-/Ofw8UXZxuzTLsNFmz1+lmarQI6ztMZ9XktvXedTbt3SNWDn0+ODTwxExLYQ/Hod91EZB4vZPQJLoqLF0jvEzA==} + /@esbuild/darwin-arm64@0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.19.2: + resolution: {integrity: sha512-Ora8JokrvrzEPEpZO18ZYXkH4asCdc1DLdcVy8TGf5eWtPO1Ie4WroEJzwI52ZGtpODy3+m0a2yEX9l+KUn0tA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -351,8 +405,17 @@ packages: dev: true optional: true - /@esbuild/darwin-x64@0.17.16: - resolution: {integrity: sha512-SzBQtCV3Pdc9kyizh36Ol+dNVhkDyIrGb/JXZqFq8WL37LIyrXU0gUpADcNV311sCOhvY+f2ivMhb5Tuv8nMOQ==} + /@esbuild/darwin-x64@0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.19.2: + resolution: {integrity: sha512-tP+B5UuIbbFMj2hQaUr6EALlHOIOmlLM2FK7jeFBobPy2ERdohI4Ka6ZFjZ1ZYsrHE/hZimGuU90jusRE0pwDw==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -369,8 +432,17 @@ packages: dev: true optional: true - /@esbuild/freebsd-arm64@0.17.16: - resolution: {integrity: sha512-ZqftdfS1UlLiH1DnS2u3It7l4Bc3AskKeu+paJSfk7RNOMrOxmeFDhLTMQqMxycP1C3oj8vgkAT6xfAuq7ZPRA==} + /@esbuild/freebsd-arm64@0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.19.2: + resolution: {integrity: sha512-YbPY2kc0acfzL1VPVK6EnAlig4f+l8xmq36OZkU0jzBVHcOTyQDhnKQaLzZudNJQyymd9OqQezeaBgkTGdTGeQ==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -387,8 +459,17 @@ packages: dev: true optional: true - /@esbuild/freebsd-x64@0.17.16: - resolution: {integrity: sha512-rHV6zNWW1tjgsu0dKQTX9L0ByiJHHLvQKrWtnz8r0YYJI27FU3Xu48gpK2IBj1uCSYhJ+pEk6Y0Um7U3rIvV8g==} + /@esbuild/freebsd-x64@0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.19.2: + resolution: {integrity: sha512-nSO5uZT2clM6hosjWHAsS15hLrwCvIWx+b2e3lZ3MwbYSaXwvfO528OF+dLjas1g3bZonciivI8qKR/Hm7IWGw==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -405,8 +486,17 @@ packages: dev: true optional: true - /@esbuild/linux-arm64@0.17.16: - resolution: {integrity: sha512-8yoZhGkU6aHu38WpaM4HrRLTFc7/VVD9Q2SvPcmIQIipQt2I/GMTZNdEHXoypbbGao5kggLcxg0iBKjo0SQYKA==} + /@esbuild/linux-arm64@0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.19.2: + resolution: {integrity: sha512-ig2P7GeG//zWlU0AggA3pV1h5gdix0MA3wgB+NsnBXViwiGgY77fuN9Wr5uoCrs2YzaYfogXgsWZbm+HGr09xg==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -423,8 +513,17 @@ packages: dev: true optional: true - /@esbuild/linux-arm@0.17.16: - resolution: {integrity: sha512-n4O8oVxbn7nl4+m+ISb0a68/lcJClIbaGAoXwqeubj/D1/oMMuaAXmJVfFlRjJLu/ZvHkxoiFJnmbfp4n8cdSw==} + /@esbuild/linux-arm@0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.19.2: + resolution: {integrity: sha512-Odalh8hICg7SOD7XCj0YLpYCEc+6mkoq63UnExDCiRA2wXEmGlK5JVrW50vZR9Qz4qkvqnHcpH+OFEggO3PgTg==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -441,8 +540,17 @@ packages: dev: true optional: true - /@esbuild/linux-ia32@0.17.16: - resolution: {integrity: sha512-9ZBjlkdaVYxPNO8a7OmzDbOH9FMQ1a58j7Xb21UfRU29KcEEU3VTHk+Cvrft/BNv0gpWJMiiZ/f4w0TqSP0gLA==} + /@esbuild/linux-ia32@0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.19.2: + resolution: {integrity: sha512-mLfp0ziRPOLSTek0Gd9T5B8AtzKAkoZE70fneiiyPlSnUKKI4lp+mGEnQXcQEHLJAcIYDPSyBvsUbKUG2ri/XQ==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -459,8 +567,17 @@ packages: dev: true optional: true - /@esbuild/linux-loong64@0.17.16: - resolution: {integrity: sha512-TIZTRojVBBzdgChY3UOG7BlPhqJz08AL7jdgeeu+kiObWMFzGnQD7BgBBkWRwOtKR1i2TNlO7YK6m4zxVjjPRQ==} + /@esbuild/linux-loong64@0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.19.2: + resolution: {integrity: sha512-hn28+JNDTxxCpnYjdDYVMNTR3SKavyLlCHHkufHV91fkewpIyQchS1d8wSbmXhs1fiYDpNww8KTFlJ1dHsxeSw==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -477,8 +594,17 @@ packages: dev: true optional: true - /@esbuild/linux-mips64el@0.17.16: - resolution: {integrity: sha512-UPeRuFKCCJYpBbIdczKyHLAIU31GEm0dZl1eMrdYeXDH+SJZh/i+2cAmD3A1Wip9pIc5Sc6Kc5cFUrPXtR0XHA==} + /@esbuild/linux-mips64el@0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.19.2: + resolution: {integrity: sha512-KbXaC0Sejt7vD2fEgPoIKb6nxkfYW9OmFUK9XQE4//PvGIxNIfPk1NmlHmMg6f25x57rpmEFrn1OotASYIAaTg==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -495,8 +621,17 @@ packages: dev: true optional: true - /@esbuild/linux-ppc64@0.17.16: - resolution: {integrity: sha512-io6yShgIEgVUhExJejJ21xvO5QtrbiSeI7vYUnr7l+v/O9t6IowyhdiYnyivX2X5ysOVHAuyHW+Wyi7DNhdw6Q==} + /@esbuild/linux-ppc64@0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.19.2: + resolution: {integrity: sha512-dJ0kE8KTqbiHtA3Fc/zn7lCd7pqVr4JcT0JqOnbj4LLzYnp+7h8Qi4yjfq42ZlHfhOCM42rBh0EwHYLL6LEzcw==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -513,8 +648,17 @@ packages: dev: true optional: true - /@esbuild/linux-riscv64@0.17.16: - resolution: {integrity: sha512-WhlGeAHNbSdG/I2gqX2RK2gfgSNwyJuCiFHMc8s3GNEMMHUI109+VMBfhVqRb0ZGzEeRiibi8dItR3ws3Lk+cA==} + /@esbuild/linux-riscv64@0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.19.2: + resolution: {integrity: sha512-7Z/jKNFufZ/bbu4INqqCN6DDlrmOTmdw6D0gH+6Y7auok2r02Ur661qPuXidPOJ+FSgbEeQnnAGgsVynfLuOEw==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -531,8 +675,17 @@ packages: dev: true optional: true - /@esbuild/linux-s390x@0.17.16: - resolution: {integrity: sha512-gHRReYsJtViir63bXKoFaQ4pgTyah4ruiMRQ6im9YZuv+gp3UFJkNTY4sFA73YDynmXZA6hi45en4BGhNOJUsw==} + /@esbuild/linux-s390x@0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.19.2: + resolution: {integrity: sha512-U+RinR6aXXABFCcAY4gSlv4CL1oOVvSSCdseQmGO66H+XyuQGZIUdhG56SZaDJQcLmrSfRmx5XZOWyCJPRqS7g==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -549,8 +702,17 @@ packages: dev: true optional: true - /@esbuild/linux-x64@0.17.16: - resolution: {integrity: sha512-mfiiBkxEbUHvi+v0P+TS7UnA9TeGXR48aK4XHkTj0ZwOijxexgMF01UDFaBX7Q6CQsB0d+MFNv9IiXbIHTNd4g==} + /@esbuild/linux-x64@0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.19.2: + resolution: {integrity: sha512-oxzHTEv6VPm3XXNaHPyUTTte+3wGv7qVQtqaZCrgstI16gCuhNOtBXLEBkBREP57YTd68P0VgDgG73jSD8bwXQ==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -567,8 +729,17 @@ packages: dev: true optional: true - /@esbuild/netbsd-x64@0.17.16: - resolution: {integrity: sha512-n8zK1YRDGLRZfVcswcDMDM0j2xKYLNXqei217a4GyBxHIuPMGrrVuJ+Ijfpr0Kufcm7C1k/qaIrGy6eG7wvgmA==} + /@esbuild/netbsd-x64@0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.19.2: + resolution: {integrity: sha512-WNa5zZk1XpTTwMDompZmvQLHszDDDN7lYjEHCUmAGB83Bgs20EMs7ICD+oKeT6xt4phV4NDdSi/8OfjPbSbZfQ==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -585,8 +756,17 @@ packages: dev: true optional: true - /@esbuild/openbsd-x64@0.17.16: - resolution: {integrity: sha512-lEEfkfsUbo0xC47eSTBqsItXDSzwzwhKUSsVaVjVji07t8+6KA5INp2rN890dHZeueXJAI8q0tEIfbwVRYf6Ew==} + /@esbuild/openbsd-x64@0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.19.2: + resolution: {integrity: sha512-S6kI1aT3S++Dedb7vxIuUOb3oAxqxk2Rh5rOXOTYnzN8JzW1VzBd+IqPiSpgitu45042SYD3HCoEyhLKQcDFDw==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -603,8 +783,17 @@ packages: dev: true optional: true - /@esbuild/sunos-x64@0.17.16: - resolution: {integrity: sha512-jlRjsuvG1fgGwnE8Afs7xYDnGz0dBgTNZfgCK6TlvPH3Z13/P5pi6I57vyLE8qZYLrGVtwcm9UbUx1/mZ8Ukag==} + /@esbuild/sunos-x64@0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.19.2: + resolution: {integrity: sha512-VXSSMsmb+Z8LbsQGcBMiM+fYObDNRm8p7tkUDMPG/g4fhFX5DEFmjxIEa3N8Zr96SjsJ1woAhF0DUnS3MF3ARw==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -621,8 +810,17 @@ packages: dev: true optional: true - /@esbuild/win32-arm64@0.17.16: - resolution: {integrity: sha512-TzoU2qwVe2boOHl/3KNBUv2PNUc38U0TNnzqOAcgPiD/EZxT2s736xfC2dYQbszAwo4MKzzwBV0iHjhfjxMimg==} + /@esbuild/win32-arm64@0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.19.2: + resolution: {integrity: sha512-5NayUlSAyb5PQYFAU9x3bHdsqB88RC3aM9lKDAz4X1mo/EchMIT1Q+pSeBXNgkfNmRecLXA0O8xP+x8V+g/LKg==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -639,8 +837,17 @@ packages: dev: true optional: true - /@esbuild/win32-ia32@0.17.16: - resolution: {integrity: sha512-B8b7W+oo2yb/3xmwk9Vc99hC9bNolvqjaTZYEfMQhzdpBsjTvZBlXQ/teUE55Ww6sg//wlcDjOaqldOKyigWdA==} + /@esbuild/win32-ia32@0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.19.2: + resolution: {integrity: sha512-47gL/ek1v36iN0wL9L4Q2MFdujR0poLZMJwhO2/N3gA89jgHp4MR8DKCmwYtGNksbfJb9JoTtbkoe6sDhg2QTA==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -657,8 +864,17 @@ packages: dev: true optional: true - /@esbuild/win32-x64@0.17.16: - resolution: {integrity: sha512-xJ7OH/nanouJO9pf03YsL9NAFQBHd8AqfrQd7Pf5laGyyTt/gToul6QYOA/i5i/q8y9iaM5DQFNTgpi995VkOg==} + /@esbuild/win32-x64@0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.19.2: + resolution: {integrity: sha512-tcuhV7ncXBqbt/Ybf0IyrMcwVOAPDckMK9rXNHtF17UTK18OKLpg08glminN06pt2WCoALhXdLfSPbVvK/6fxw==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -806,7 +1022,7 @@ packages: resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} dev: true - /@rollup/plugin-alias@5.0.0(rollup@3.20.2): + /@rollup/plugin-alias@5.0.0(rollup@3.29.0): resolution: {integrity: sha512-l9hY5chSCjuFRPsnRm16twWBiSApl2uYFLsepQYwtBuAxNMQ/1dJqADld40P0Jkqm65GRTLy/AC6hnpVebtLsA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -815,12 +1031,12 @@ packages: rollup: optional: true dependencies: - rollup: 3.20.2 + rollup: 3.29.0 slash: 4.0.0 dev: true - /@rollup/plugin-commonjs@24.1.0(rollup@3.20.2): - resolution: {integrity: sha512-eSL45hjhCWI0jCCXcNtLVqM5N1JlBGvlFfY0m6oOYnLCJ6N0qEXoZql4sY2MOUArzhH4SA/qBpTxvvZp2Sc+DQ==} + /@rollup/plugin-commonjs@25.0.4(rollup@3.29.0): + resolution: {integrity: sha512-L92Vz9WUZXDnlQQl3EwbypJR4+DM2EbsO+/KOcEkP4Mc6Ct453EeDB2uH9lgRwj4w5yflgNpq9pHOiY8aoUXBQ==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^2.68.0||^3.0.0 @@ -828,16 +1044,16 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.20.2) + '@rollup/pluginutils': 5.0.4(rollup@3.29.0) commondir: 1.0.1 estree-walker: 2.0.2 glob: 8.1.0 is-reference: 1.2.1 magic-string: 0.27.0 - rollup: 3.20.2 + rollup: 3.29.0 dev: true - /@rollup/plugin-json@6.0.0(rollup@3.20.2): + /@rollup/plugin-json@6.0.0(rollup@3.29.0): resolution: {integrity: sha512-i/4C5Jrdr1XUarRhVu27EEwjt4GObltD7c+MkCIpO2QIbojw8MUs+CCTqOphQi3Qtg1FLmYt+l+6YeoIf51J7w==} engines: {node: '>=14.0.0'} peerDependencies: @@ -846,12 +1062,12 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.20.2) - rollup: 3.20.2 + '@rollup/pluginutils': 5.0.4(rollup@3.29.0) + rollup: 3.29.0 dev: true - /@rollup/plugin-node-resolve@15.0.2(rollup@3.20.2): - resolution: {integrity: sha512-Y35fRGUjC3FaurG722uhUuG8YHOJRJQbI6/CkbRkdPotSpDj9NtIN85z1zrcyDcCQIW4qp5mgG72U+gJ0TAFEg==} + /@rollup/plugin-node-resolve@15.2.1(rollup@3.29.0): + resolution: {integrity: sha512-nsbUg588+GDSu8/NS8T4UAshO6xeaOfINNuXeVHcKV02LJtoRaM1SiOacClw4kws1SFiNhdLGxlbMY9ga/zs/w==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^2.78.0||^3.0.0 @@ -859,16 +1075,16 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.20.2) + '@rollup/pluginutils': 5.0.4(rollup@3.29.0) '@types/resolve': 1.20.2 deepmerge: 4.3.0 is-builtin-module: 3.2.1 is-module: 1.0.0 resolve: 1.22.2 - rollup: 3.20.2 + rollup: 3.29.0 dev: true - /@rollup/plugin-replace@5.0.2(rollup@3.20.2): + /@rollup/plugin-replace@5.0.2(rollup@3.29.0): resolution: {integrity: sha512-M9YXNekv/C/iHHK+cvORzfRYfPbq0RDD8r0G+bMiTXjNGKulPnCT9O3Ss46WfhI6ZOCgApOP7xAdmCQJ+U2LAA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -877,13 +1093,13 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.20.2) + '@rollup/pluginutils': 5.0.4(rollup@3.29.0) magic-string: 0.27.0 - rollup: 3.20.2 + rollup: 3.29.0 dev: true - /@rollup/pluginutils@5.0.2(rollup@3.20.2): - resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} + /@rollup/pluginutils@5.0.4(rollup@3.29.0): + resolution: {integrity: sha512-0KJnIoRI8A+a1dqOYLxH8vBf8bphDmty5QvIm2hqm7oFCFYKCAZWWd2hXgMibaPsNDhI0AtpYfQZJG47pt/k4g==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0 @@ -894,7 +1110,7 @@ packages: '@types/estree': 1.0.0 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 3.20.2 + rollup: 3.29.0 dev: true /@sinclair/typebox@0.27.8: @@ -927,8 +1143,8 @@ packages: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true - /@types/node@20.5.7: - resolution: {integrity: sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA==} + /@types/node@20.5.9: + resolution: {integrity: sha512-PcGNd//40kHAS3sTlzKB9C9XL4K0sTup8nbG5lC14kzEteTNuAFh9u5nA0o5TWnSG2r/JNPRXFVcHJIIeRlmqQ==} dev: true /@types/normalize-package-data@2.4.1: @@ -1339,15 +1555,15 @@ packages: fill-range: 7.0.1 dev: true - /browserslist@4.21.5: - resolution: {integrity: sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==} + /browserslist@4.21.10: + resolution: {integrity: sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001451 - electron-to-chromium: 1.4.295 - node-releases: 2.0.10 - update-browserslist-db: 1.0.10(browserslist@4.21.5) + caniuse-lite: 1.0.30001527 + electron-to-chromium: 1.4.508 + node-releases: 2.0.13 + update-browserslist-db: 1.0.11(browserslist@4.21.10) dev: true /builtin-modules@3.3.0: @@ -1402,8 +1618,8 @@ packages: engines: {node: '>=6'} dev: true - /caniuse-lite@1.0.30001451: - resolution: {integrity: sha512-XY7UbUpGRatZzoRft//5xOa69/1iGJRBlrieH6QYrkKLIFn3m7OVEJ81dSrKoy2BnKsdbX5cLrOispZNYo9v2w==} + /caniuse-lite@1.0.30001527: + resolution: {integrity: sha512-YkJi7RwPgWtXVSgK4lG9AHH57nSzvvOp9MesgXmw4Q7n0C3H04L0foHqfxcmSAm5AcWb8dW9AYj2tR7/5GnddQ==} dev: true /chai@4.3.7: @@ -1437,11 +1653,6 @@ packages: supports-color: 7.2.0 dev: true - /chalk@5.2.0: - resolution: {integrity: sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==} - engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - dev: true - /chalk@5.3.0: resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} @@ -1499,6 +1710,12 @@ packages: engines: {node: '>=8'} dev: true + /citty@0.1.3: + resolution: {integrity: sha512-tb6zTEb2BDSrzFedqFYFUKUuKNaxVJWCm7o02K4kADGkBDyyiz7D40rDMpguczdZyAN3aetd5fhpB01HkreNyg==} + dependencies: + consola: 3.2.3 + dev: true + /clean-regexp@1.0.0: resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} engines: {node: '>=4'} @@ -1700,8 +1917,8 @@ packages: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true - /electron-to-chromium@1.4.295: - resolution: {integrity: sha512-lEO94zqf1bDA3aepxwnWoHUjA8sZ+2owgcSZjYQy0+uOSEclJX0VieZC+r+wLpSxUHRd6gG32znTWmr+5iGzFw==} + /electron-to-chromium@1.4.508: + resolution: {integrity: sha512-FFa8QKjQK/A5QuFr2167myhMesGrhlOBD+3cYNxO9/S4XzHEXesyTD/1/xF644gC8buFPz3ca6G1LOQD0tZrrg==} dev: true /emoji-regex@9.2.2: @@ -1819,34 +2036,64 @@ packages: '@esbuild/win32-x64': 0.16.17 dev: true - /esbuild@0.17.16: - resolution: {integrity: sha512-aeSuUKr9aFVY9Dc8ETVELGgkj4urg5isYx8pLf4wlGgB0vTFjxJQdHnNH6Shmx4vYYrOTLCHtRI5i1XZ9l2Zcg==} + /esbuild@0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + + /esbuild@0.19.2: + resolution: {integrity: sha512-G6hPax8UbFakEj3hWO0Vs52LQ8k3lnBhxZWomUJDxfz3rZTLqF5k/FCzuNdLx2RbpBiQQF9H9onlDDH1lZsnjg==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.17.16 - '@esbuild/android-arm64': 0.17.16 - '@esbuild/android-x64': 0.17.16 - '@esbuild/darwin-arm64': 0.17.16 - '@esbuild/darwin-x64': 0.17.16 - '@esbuild/freebsd-arm64': 0.17.16 - '@esbuild/freebsd-x64': 0.17.16 - '@esbuild/linux-arm': 0.17.16 - '@esbuild/linux-arm64': 0.17.16 - '@esbuild/linux-ia32': 0.17.16 - '@esbuild/linux-loong64': 0.17.16 - '@esbuild/linux-mips64el': 0.17.16 - '@esbuild/linux-ppc64': 0.17.16 - '@esbuild/linux-riscv64': 0.17.16 - '@esbuild/linux-s390x': 0.17.16 - '@esbuild/linux-x64': 0.17.16 - '@esbuild/netbsd-x64': 0.17.16 - '@esbuild/openbsd-x64': 0.17.16 - '@esbuild/sunos-x64': 0.17.16 - '@esbuild/win32-arm64': 0.17.16 - '@esbuild/win32-ia32': 0.17.16 - '@esbuild/win32-x64': 0.17.16 + '@esbuild/android-arm': 0.19.2 + '@esbuild/android-arm64': 0.19.2 + '@esbuild/android-x64': 0.19.2 + '@esbuild/darwin-arm64': 0.19.2 + '@esbuild/darwin-x64': 0.19.2 + '@esbuild/freebsd-arm64': 0.19.2 + '@esbuild/freebsd-x64': 0.19.2 + '@esbuild/linux-arm': 0.19.2 + '@esbuild/linux-arm64': 0.19.2 + '@esbuild/linux-ia32': 0.19.2 + '@esbuild/linux-loong64': 0.19.2 + '@esbuild/linux-mips64el': 0.19.2 + '@esbuild/linux-ppc64': 0.19.2 + '@esbuild/linux-riscv64': 0.19.2 + '@esbuild/linux-s390x': 0.19.2 + '@esbuild/linux-x64': 0.19.2 + '@esbuild/netbsd-x64': 0.19.2 + '@esbuild/openbsd-x64': 0.19.2 + '@esbuild/sunos-x64': 0.19.2 + '@esbuild/win32-arm64': 0.19.2 + '@esbuild/win32-ia32': 0.19.2 + '@esbuild/win32-x64': 0.19.2 dev: true /escalade@3.1.1: @@ -2540,6 +2787,17 @@ packages: slash: 4.0.0 dev: true + /globby@13.2.2: + resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + dir-glob: 3.0.1 + fast-glob: 3.3.1 + ignore: 5.2.4 + merge2: 1.4.1 + slash: 4.0.0 + dev: true + /globrex@0.1.2: resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} dev: true @@ -2929,6 +3187,11 @@ packages: hasBin: true dev: true + /jiti@1.19.3: + resolution: {integrity: sha512-5eEbBDQT/jF1xg6l36P+mWGGoH9Spuy0PCdSr2dtWRDGC6ph/w9ZCL4lmESW8f8F7MwT3XKescfP0wnZWAKL9w==} + hasBin: true + dev: true + /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} requiresBuild: true @@ -3012,8 +3275,8 @@ packages: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true - /lint-staged@13.3.0: - resolution: {integrity: sha512-mPRtrYnipYYv1FEE134ufbWpeggNTo+O/UPzngoaKzbzHAthvR55am+8GfHTnqNRQVRRrYQLGW9ZyUoD7DsBHQ==} + /lint-staged@14.0.1: + resolution: {integrity: sha512-Mw0cL6HXnHN1ag0mN/Dg4g6sr8uf8sn98w2Oc1ECtFto9tvRF7nkXGJRbx8gPlHyoR0pLyBr2lQHbWwmUHe1Sw==} engines: {node: ^16.14.0 || >=18.0.0} hasBin: true dependencies: @@ -3120,6 +3383,13 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true + /magic-string@0.30.3: + resolution: {integrity: sha512-B7xGbll2fG/VjP+SWg4sX3JynwIU0mjoTc6MPpKNuIvftk6u6vqhDnk1R80b8C2GBR6ywqy+1DcKBrevBg+bmw==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + /make-dir@4.0.0: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} @@ -3202,23 +3472,24 @@ packages: hasBin: true dev: true - /mkdist@1.2.0(typescript@5.2.2): - resolution: {integrity: sha512-UTqu/bXmIk/+VKNVgufAeMyjUcNy1dn9Bl7wL1zZlCKVrpDgj/VllmZBeh3ZCC/2HWqUrt6frNFTKt9TRZbNvQ==} + /mkdist@1.3.0(typescript@5.2.2): + resolution: {integrity: sha512-ZQrUvcL7LkRdzMREpDyg9AT18N9Tl5jc2qeKAUeEw0KGsgykbHbuRvysGAzTuGtwuSg0WQyNit5jh/k+Er3JEg==} hasBin: true peerDependencies: - sass: ^1.60.0 - typescript: '>=4.9.5' + sass: ^1.63.6 + typescript: '>=5.1.6' peerDependenciesMeta: sass: optional: true typescript: optional: true dependencies: + citty: 0.1.3 defu: 6.1.2 - esbuild: 0.17.16 + esbuild: 0.18.20 fs-extra: 11.1.1 - globby: 13.1.4 - jiti: 1.18.2 + globby: 13.2.2 + jiti: 1.19.3 mlly: 1.4.0 mri: 1.2.0 pathe: 1.1.1 @@ -3270,8 +3541,8 @@ packages: resolution: {integrity: sha512-5IAMBTl9p6PaAjYCnMv5FmqIF6GcZnawAVnzaCG0rX2aYZJ4CxEkZNtVPuTRug7fL7wyM5BQYTlAzcyMPi6oTQ==} dev: true - /node-releases@2.0.10: - resolution: {integrity: sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==} + /node-releases@2.0.13: + resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} dev: true /normalize-package-data@2.5.0: @@ -3540,14 +3811,14 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /prettier@2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} + /prettier@3.0.3: + resolution: {integrity: sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==} + engines: {node: '>=14'} hasBin: true dev: true - /pretty-bytes@6.1.0: - resolution: {integrity: sha512-Rk753HI8f4uivXi4ZCIYdhmG1V+WKzvRMg/X+M42a6t7D07RcmopXJMDNk6N++7Bl75URRGsb40ruvg7Hcp2wQ==} + /pretty-bytes@6.1.1: + resolution: {integrity: sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==} engines: {node: ^14.13.1 || >=16.0.0} dev: true @@ -3686,18 +3957,18 @@ packages: glob: 7.2.3 dev: true - /rollup-plugin-dts@5.3.0(rollup@3.20.2)(typescript@5.2.2): - resolution: {integrity: sha512-8FXp0ZkyZj1iU5klkIJYLjIq/YZSwBoERu33QBDxm/1yw5UU4txrEtcmMkrq+ZiKu3Q4qvPCNqc3ovX6rjqzbQ==} - engines: {node: '>=v14'} + /rollup-plugin-dts@6.0.1(rollup@3.29.0)(typescript@5.2.2): + resolution: {integrity: sha512-XJbCldVrp4TLc2Hg4DfrRiJgzJ73uhZB0sPSDizgdlrhSJ1bsIkkRMkwRKNQYgkbfMz4CHLdbnFKVivHE0vsPA==} + engines: {node: '>=16'} peerDependencies: - rollup: ^3.0.0 - typescript: ^4.1 || ^5.0 + rollup: ^3.25 + typescript: ^4.5 || ^5.0 dependencies: - magic-string: 0.30.1 - rollup: 3.20.2 + magic-string: 0.30.3 + rollup: 3.29.0 typescript: 5.2.2 optionalDependencies: - '@babel/code-frame': 7.21.4 + '@babel/code-frame': 7.22.13 dev: true /rollup@3.20.2: @@ -3708,6 +3979,14 @@ packages: fsevents: 2.3.2 dev: true + /rollup@3.29.0: + resolution: {integrity: sha512-nszM8DINnx1vSS+TpbWKMkxem0CDWk3cSit/WWCBVs9/JZ1I/XLwOsiUglYuYReaeWWSsW9kge5zE5NZtf/a4w==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + /run-applescript@5.0.0: resolution: {integrity: sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==} engines: {node: '>=12'} @@ -3749,6 +4028,11 @@ packages: hasBin: true dev: true + /semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + dev: true + /semver@7.5.4: resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} engines: {node: '>=10'} @@ -4128,35 +4412,40 @@ packages: which-boxed-primitive: 1.0.2 dev: true - /unbuild@1.2.1: - resolution: {integrity: sha512-J4efk69Aye43tWcBPCsLK7TIRppGrEN4pAlDzRKo3HSE6MgTSTBxSEuE3ccx7ixc62JvGQ/CoFXYqqF2AHozow==} + /unbuild@2.0.0(typescript@5.2.2): + resolution: {integrity: sha512-JWCUYx3Oxdzvw2J9kTAp+DKE8df/BnH/JTSj6JyA4SH40ECdFu7FoJJcrm8G92B7TjofQ6GZGjJs50TRxoH6Wg==} hasBin: true + peerDependencies: + typescript: ^5.1.6 + peerDependenciesMeta: + typescript: + optional: true dependencies: - '@rollup/plugin-alias': 5.0.0(rollup@3.20.2) - '@rollup/plugin-commonjs': 24.1.0(rollup@3.20.2) - '@rollup/plugin-json': 6.0.0(rollup@3.20.2) - '@rollup/plugin-node-resolve': 15.0.2(rollup@3.20.2) - '@rollup/plugin-replace': 5.0.2(rollup@3.20.2) - '@rollup/pluginutils': 5.0.2(rollup@3.20.2) - chalk: 5.2.0 + '@rollup/plugin-alias': 5.0.0(rollup@3.29.0) + '@rollup/plugin-commonjs': 25.0.4(rollup@3.29.0) + '@rollup/plugin-json': 6.0.0(rollup@3.29.0) + '@rollup/plugin-node-resolve': 15.2.1(rollup@3.29.0) + '@rollup/plugin-replace': 5.0.2(rollup@3.29.0) + '@rollup/pluginutils': 5.0.4(rollup@3.29.0) + chalk: 5.3.0 + citty: 0.1.3 consola: 3.2.3 defu: 6.1.2 - esbuild: 0.17.16 - globby: 13.1.4 + esbuild: 0.19.2 + globby: 13.2.2 hookable: 5.5.3 - jiti: 1.18.2 - magic-string: 0.30.1 - mkdist: 1.2.0(typescript@5.2.2) + jiti: 1.19.3 + magic-string: 0.30.3 + mkdist: 1.3.0(typescript@5.2.2) mlly: 1.4.0 - mri: 1.2.0 pathe: 1.1.1 pkg-types: 1.0.3 - pretty-bytes: 6.1.0 - rollup: 3.20.2 - rollup-plugin-dts: 5.3.0(rollup@3.20.2)(typescript@5.2.2) + pretty-bytes: 6.1.1 + rollup: 3.29.0 + rollup-plugin-dts: 6.0.1(rollup@3.29.0)(typescript@5.2.2) scule: 1.0.0 typescript: 5.2.2 - untyped: 1.3.2 + untyped: 1.4.0 transitivePeerDependencies: - sass - supports-color @@ -4172,28 +4461,28 @@ packages: engines: {node: '>=8'} dev: true - /untyped@1.3.2: - resolution: {integrity: sha512-z219Z65rOGD6jXIvIhpZFfwWdqQckB8sdZec2NO+TkcH1Bph7gL0hwLzRJs1KsOo4Jz4mF9guBXhsEnyEBGVfw==} + /untyped@1.4.0: + resolution: {integrity: sha512-Egkr/s4zcMTEuulcIb7dgURS6QpN7DyqQYdf+jBtiaJvQ+eRsrtWUoX84SbvQWuLkXsOjM+8sJC9u6KoMK/U7Q==} hasBin: true dependencies: - '@babel/core': 7.21.4 - '@babel/standalone': 7.21.4 - '@babel/types': 7.22.11 + '@babel/core': 7.22.15 + '@babel/standalone': 7.22.15 + '@babel/types': 7.22.15 defu: 6.1.2 - jiti: 1.18.2 + jiti: 1.19.3 mri: 1.2.0 scule: 1.0.0 transitivePeerDependencies: - supports-color dev: true - /update-browserslist-db@1.0.10(browserslist@4.21.5): - resolution: {integrity: sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==} + /update-browserslist-db@1.0.11(browserslist@4.21.10): + resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' dependencies: - browserslist: 4.21.5 + browserslist: 4.21.10 escalade: 3.1.1 picocolors: 1.0.0 dev: true @@ -4230,7 +4519,7 @@ packages: spdx-expression-parse: 3.0.1 dev: true - /vite-node@0.34.3(@types/node@20.5.7): + /vite-node@0.34.3(@types/node@20.5.9): resolution: {integrity: sha512-+0TzJf1g0tYXj6tR2vEyiA42OPq68QkRZCu/ERSo2PtsDJfBpDyEfuKbRvLmZqi/CgC7SCBtyC+WjTGNMRIaig==} engines: {node: '>=v14.18.0'} hasBin: true @@ -4240,7 +4529,7 @@ packages: mlly: 1.4.0 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.1.1(@types/node@20.5.7) + vite: 4.1.1(@types/node@20.5.9) transitivePeerDependencies: - '@types/node' - less @@ -4251,7 +4540,7 @@ packages: - terser dev: true - /vite@4.1.1(@types/node@20.5.7): + /vite@4.1.1(@types/node@20.5.9): resolution: {integrity: sha512-LM9WWea8vsxhr782r9ntg+bhSFS06FJgCvvB0+8hf8UWtvaiDagKYWXndjfX6kGl74keHJUcpzrQliDXZlF5yg==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -4276,7 +4565,7 @@ packages: terser: optional: true dependencies: - '@types/node': 20.5.7 + '@types/node': 20.5.9 esbuild: 0.16.17 postcss: 8.4.21 resolve: 1.22.2 @@ -4318,7 +4607,7 @@ packages: dependencies: '@types/chai': 4.3.5 '@types/chai-subset': 1.3.3 - '@types/node': 20.5.7 + '@types/node': 20.5.9 '@vitest/expect': 0.34.3 '@vitest/runner': 0.34.3 '@vitest/snapshot': 0.34.3 @@ -4338,8 +4627,8 @@ packages: strip-literal: 1.0.1 tinybench: 2.5.0 tinypool: 0.7.0 - vite: 4.1.1(@types/node@20.5.7) - vite-node: 0.34.3(@types/node@20.5.7) + vite: 4.1.1(@types/node@20.5.9) + vite-node: 0.34.3(@types/node@20.5.9) why-is-node-running: 2.2.2 transitivePeerDependencies: - less From 16b55baa9400b8220da7281bf3e3cb98bf29e85f Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Wed, 6 Sep 2023 14:06:03 +0200 Subject: [PATCH 02/10] feat: bundle-recast --- .eslintignore | 1 + .github/workflows/ci.yml | 3 +- .gitignore | 1 + build.config.ts | 22 + helpers.d.ts | 2 +- package.json | 39 +- pnpm-lock.yaml | 743 +++++++++++----------------- pnpm-workspace.yaml | 2 + scripts/vendor.ts | 96 ++++ src/builders.ts | 4 +- src/code.ts | 10 +- src/format.ts | 2 +- src/helpers/config.ts | 4 +- src/helpers/nuxt.ts | 2 +- src/helpers/vite.ts | 16 +- src/proxy/_utils.ts | 16 +- src/proxy/array.ts | 8 +- src/proxy/exports.ts | 8 +- src/proxy/function-call.ts | 6 +- src/proxy/identifier.ts | 2 +- src/proxy/imports.ts | 23 +- src/proxy/module.ts | 2 +- src/proxy/new-expression.ts | 6 +- src/proxy/object.ts | 11 +- test/_utils.ts | 4 +- test/array.test.ts | 12 +- test/builders/expression.test.ts | 6 +- test/builders/function-call.test.ts | 6 +- test/builders/raw.test.ts | 14 +- test/errors.test.ts | 26 +- test/exports.test.ts | 18 +- test/format.test.ts | 2 +- test/function-call.test.ts | 14 +- test/general.test.ts | 64 +-- test/helpers/nuxt.test.ts | 9 +- test/helpers/vite.test.ts | 24 +- test/imports.test.ts | 12 +- test/object.test.ts | 30 +- test/utils.test.ts | 8 +- tsconfig.json | 15 +- vitest.config.ts | 21 + 41 files changed, 661 insertions(+), 653 deletions(-) create mode 100644 pnpm-workspace.yaml create mode 100644 scripts/vendor.ts create mode 100644 vitest.config.ts diff --git a/.eslintignore b/.eslintignore index 9c62828..450ea1c 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ node_modules coverage dist +vendor diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8c6141..71f78ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,5 +21,6 @@ jobs: - run: pnpm install - run: pnpm lint - run: pnpm build - - run: pnpm vitest --coverage + - run: pnpm test --coverage + - run: pnpm test:build - uses: codecov/codecov-action@v3 diff --git a/.gitignore b/.gitignore index bb9eace..bace84d 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ types *.env* .idea .history +vendor diff --git a/build.config.ts b/build.config.ts index f5c4377..e1bd1f1 100644 --- a/build.config.ts +++ b/build.config.ts @@ -1,3 +1,4 @@ +import { resolve } from "node:path"; import { defineBuildConfig } from "unbuild"; export default defineBuildConfig({ @@ -6,5 +7,26 @@ export default defineBuildConfig({ declaration: true, rollup: { emitCJS: true, + inlineDependencies: true, + dts: { + respectExternal: true, + } }, + alias: { + 'source-map': 'source-map-js', + // eslint-disable-next-line unicorn/prefer-module + assert: resolve(__dirname, 'stubs/assert/index.js'), + // eslint-disable-next-line unicorn/prefer-module + recast: resolve(__dirname, 'vendor/recast/main.ts'), + // eslint-disable-next-line unicorn/prefer-module + 'ast-types': resolve(__dirname, 'vendor/ast-types/src/main.ts'), + }, + hooks: { + 'rollup:dts:options': (ctx, options) => { + // @ts-expect-error filter out commonjs plugin in dts build + options.plugins = options.plugins.filter((plugin) => { + return plugin && plugin.name !== 'commonjs' + }) + } + } }); diff --git a/helpers.d.ts b/helpers.d.ts index 3de006d..fbac79a 100644 --- a/helpers.d.ts +++ b/helpers.d.ts @@ -1 +1 @@ -export * from "./dist/helpers.d.ts"; +export * from "./dist/helpers.js"; diff --git a/package.json b/package.json index 3c0ca26..42f2086 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ ], "scripts": { "build": "unbuild", + "prepare": "esno ./scripts/vendor.ts", "dev": "vitest dev", "dev:ui": "vitest dev --ui", "lint": "eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test", @@ -34,27 +35,38 @@ "prepack": "pnpm run build", "typecheck": "tsc --noEmit", "release": "pnpm run test run && changelogen --release && npm publish && git push --follow-tags", - "test": "vitest" + "test": "vitest", + "test:build": "TEST_BUILD=true vitest", + "test:full": "pnpm run test && pnpm run build && pnpm run test:build" }, "dependencies": { "@babel/parser": "^7.22.15", "@babel/types": "^7.22.15", - "recast": "^0.23.4" + "source-map-js": "^1.0.2" }, "devDependencies": { "@types/node": "^20.5.9", "@vitest/coverage-v8": "^0.34.3", "@vitest/ui": "^0.34.3", + "ast-types": "^0.16.1", "changelogen": "^0.5.5", - "eslint": "^8.48.0", "eslint-config-unjs": "^0.2.1", + "eslint": "^8.48.0", + "execa": "^8.0.1", "lint-staged": "^14.0.1", + "magicast": "workspace:*", "prettier": "^3.0.3", + "recast": "^0.23.4", "simple-git-hooks": "^2.9.0", + "source-map": "npm:source-map-js@latest", + "tiged": "^2.12.5", "typescript": "^5.2.2", "unbuild": "^2.0.0", "vitest": "^0.34.3" }, + "resolutions": { + "source-map": "npm:source-map-js@latest" + }, "simple-git-hooks": { "pre-commit": "pnpm lint-staged" }, @@ -64,5 +76,24 @@ "prettier -w" ] }, - "packageManager": "pnpm@8.7.4" + "packageManager": "pnpm@8.7.4", + "pnpm": { + "overrides": { + "array-includes": "npm:@nolyfill/array-includes@latest", + "array.prototype.flat": "npm:@nolyfill/array.prototype.flat@latest", + "array.prototype.flatmap": "npm:@nolyfill/array.prototype.flatmap@latest", + "available-typed-arrays": "npm:@nolyfill/available-typed-arrays@latest", + "define-properties": "npm:@nolyfill/define-properties@latest", + "function-bind": "npm:@nolyfill/function-bind@latest", + "gopd": "npm:@nolyfill/gopd@latest", + "has": "npm:@nolyfill/has@latest", + "has-symbols": "npm:@nolyfill/has-symbols@latest", + "has-tostringtag": "npm:@nolyfill/has-tostringtag@latest", + "is-arguments": "npm:@nolyfill/is-arguments@latest", + "is-generator-function": "npm:@nolyfill/is-generator-function@latest", + "object-is": "npm:@nolyfill/object-is@latest", + "object.values": "npm:@nolyfill/object.values@latest", + "which-typed-array": "npm:@nolyfill/which-typed-array@latest" + } + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d1c0946..b78e881 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,54 +4,91 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false -dependencies: - '@babel/parser': - specifier: ^7.22.15 - version: 7.22.15 - '@babel/types': - specifier: ^7.22.15 - version: 7.22.15 - recast: - specifier: ^0.23.4 - version: 0.23.4 - -devDependencies: - '@types/node': - specifier: ^20.5.9 - version: 20.5.9 - '@vitest/coverage-v8': - specifier: ^0.34.3 - version: 0.34.3(vitest@0.34.3) - '@vitest/ui': - specifier: ^0.34.3 - version: 0.34.3(vitest@0.34.3) - changelogen: - specifier: ^0.5.5 - version: 0.5.5 - eslint: - specifier: ^8.48.0 - version: 8.48.0 - eslint-config-unjs: - specifier: ^0.2.1 - version: 0.2.1(eslint@8.48.0)(typescript@5.2.2) - lint-staged: - specifier: ^14.0.1 - version: 14.0.1 - prettier: - specifier: ^3.0.3 - version: 3.0.3 - simple-git-hooks: - specifier: ^2.9.0 - version: 2.9.0 - typescript: - specifier: ^5.2.2 - version: 5.2.2 - unbuild: - specifier: ^2.0.0 - version: 2.0.0(typescript@5.2.2) - vitest: - specifier: ^0.34.3 - version: 0.34.3(@vitest/ui@0.34.3) +overrides: + array-includes: npm:@nolyfill/array-includes@latest + array.prototype.flat: npm:@nolyfill/array.prototype.flat@latest + array.prototype.flatmap: npm:@nolyfill/array.prototype.flatmap@latest + available-typed-arrays: npm:@nolyfill/available-typed-arrays@latest + define-properties: npm:@nolyfill/define-properties@latest + function-bind: npm:@nolyfill/function-bind@latest + gopd: npm:@nolyfill/gopd@latest + has: npm:@nolyfill/has@latest + has-symbols: npm:@nolyfill/has-symbols@latest + has-tostringtag: npm:@nolyfill/has-tostringtag@latest + is-arguments: npm:@nolyfill/is-arguments@latest + is-generator-function: npm:@nolyfill/is-generator-function@latest + object-is: npm:@nolyfill/object-is@latest + object.values: npm:@nolyfill/object.values@latest + which-typed-array: npm:@nolyfill/which-typed-array@latest + +importers: + + .: + dependencies: + '@babel/parser': + specifier: ^7.22.15 + version: 7.22.15 + '@babel/types': + specifier: ^7.22.15 + version: 7.22.15 + source-map-js: + specifier: ^1.0.2 + version: 1.0.2 + devDependencies: + '@types/node': + specifier: ^20.5.9 + version: 20.5.9 + '@vitest/coverage-v8': + specifier: ^0.34.3 + version: 0.34.3(vitest@0.34.3) + '@vitest/ui': + specifier: ^0.34.3 + version: 0.34.3(vitest@0.34.3) + ast-types: + specifier: ^0.16.1 + version: 0.16.1 + changelogen: + specifier: ^0.5.5 + version: 0.5.5 + eslint: + specifier: ^8.48.0 + version: 8.48.0 + eslint-config-unjs: + specifier: ^0.2.1 + version: 0.2.1(eslint@8.48.0)(typescript@5.2.2) + execa: + specifier: ^8.0.1 + version: 8.0.1 + lint-staged: + specifier: ^14.0.1 + version: 14.0.1 + magicast: + specifier: workspace:* + version: 'link:' + prettier: + specifier: ^3.0.3 + version: 3.0.3 + recast: + specifier: ^0.23.4 + version: 0.23.4 + simple-git-hooks: + specifier: ^2.9.0 + version: 2.9.0 + source-map: + specifier: npm:source-map-js@latest + version: /source-map-js@1.0.2 + tiged: + specifier: ^2.12.5 + version: 2.12.5 + typescript: + specifier: ^5.2.2 + version: 5.2.2 + unbuild: + specifier: ^2.0.0 + version: 2.0.0(typescript@5.2.2) + vitest: + specifier: ^0.34.3 + version: 0.34.3(@vitest/ui@0.34.3) packages: @@ -1006,6 +1043,101 @@ packages: fastq: 1.15.0 dev: true + /@nolyfill/array-includes@1.0.21: + resolution: {integrity: sha512-P+SLU5wuJmHnuo1Nhy/3l4yneHm6M+WmISz5tCVGLc0rytUBRfACmneLTryh4nlobAhUulDkBL+VoldU1g3zoA==} + engines: {node: '>=12.4.0'} + dependencies: + '@nolyfill/shared': 1.0.21 + dev: true + + /@nolyfill/array.prototype.flat@1.0.21: + resolution: {integrity: sha512-RoyB6qmcOSuflZH+XcZAkE1aBrYIV/3qdIGk6EG1afCdZSkUUCz0PAT8h3lHdtgVh+ge82hMK2SdCur2YeNj8A==} + engines: {node: '>=12.4.0'} + dependencies: + '@nolyfill/shared': 1.0.21 + dev: true + + /@nolyfill/array.prototype.flatmap@1.0.21: + resolution: {integrity: sha512-VWUiJBWk4qDgktkeQRzrtYlQdBRnEU3vfjoQxcBmdn3vSnq7ujKCBox4cdpZe9LZK9FU9Y1L4UteyW5THat2CQ==} + engines: {node: '>=12.4.0'} + dependencies: + '@nolyfill/shared': 1.0.21 + dev: true + + /@nolyfill/available-typed-arrays@1.0.21: + resolution: {integrity: sha512-JhNt/GI0AlGLhfpeh4H9eo71zvWbG6oRMzGaZiubR+9muc8vtACsoGD/Yv+dIx1D9ab2aXqxhP3A7Wc8Mu4u5w==} + engines: {node: '>=12.4.0'} + dev: true + + /@nolyfill/define-properties@1.0.21: + resolution: {integrity: sha512-q1xDIx9cYp6N1BjT8Kdq4GJwiJWxG1LV9jWDvz3hw/Q24m/DYSGXv+RTpB3rNZoorn4xweF2jklmxFFhhyKimA==} + engines: {node: '>=12.4.0'} + dependencies: + '@nolyfill/shared': 1.0.21 + dev: true + + /@nolyfill/function-bind@1.0.21: + resolution: {integrity: sha512-0Jsaoxp/9HJqCa3GzEzJcoi4+VfupD/o+1pBG0qJ0X3d+sKbbfSej2Faiyp0fTHH36mhsdAKi2TahEx9JV08ZA==} + engines: {node: '>=12.4.0'} + dev: true + + /@nolyfill/gopd@1.0.21: + resolution: {integrity: sha512-zSg1OEGXGcIfBWkq83frp/1LQD4NPxnNh8ECO05mcZtHjeSAtgq726gOOq3tsdlR8d696Gjq3Hw8wiaPmgafyg==} + engines: {node: '>=12.4.0'} + dev: true + + /@nolyfill/has-symbols@1.0.21: + resolution: {integrity: sha512-fx+nNcrPdXoPH+nKNlqRfeOOxCu7IqFAh6KqzVbuHdu5QHpPT74TmobOQzruTYq+nHeSsw3+9uc32aSa4jrkNw==} + engines: {node: '>=12.4.0'} + dev: true + + /@nolyfill/has-tostringtag@1.0.21: + resolution: {integrity: sha512-vcSJnah+I19svbYbOIQF/NK0S42rQLGDEWc67OEPXsZSy+VFlpsE42kVNZSykIecmZGuZ8iMlB0cpFii6Lfwhw==} + engines: {node: '>=12.4.0'} + dev: true + + /@nolyfill/has@1.0.21: + resolution: {integrity: sha512-Sf8iFaegjGp29hQVQjIc+nDR0uWqGkHsFC3jsUigFwGjpafgMaBtL++DpTU9jYAKDJEvslR1szl8qJjNGlhgcw==} + engines: {node: '>=12.4.0'} + dependencies: + '@nolyfill/shared': 1.0.21 + dev: true + + /@nolyfill/is-arguments@1.0.21: + resolution: {integrity: sha512-HRZGXP4Khz2W/Oma5TD0w2PMUNjFFCwc+GDQxX1/DfWFCewnVhdudjlUDH4/XOikYhGkxcG+YVJAXXsmcVWW7A==} + engines: {node: '>=12.4.0'} + dev: true + + /@nolyfill/is-generator-function@1.0.21: + resolution: {integrity: sha512-rxHlkx7kHiu7/nNgn/SV5cbuncZv52RzRJ+weVQsjj5xpLxsH298NGRLcHW48yYwPOdGvd3BnbpZe1kCo9QWaw==} + engines: {node: '>=12.4.0'} + dev: true + + /@nolyfill/object-is@1.0.21: + resolution: {integrity: sha512-iUQXK1Qvh6UjkcOd+xLY6ji/xBG6oSiStbc5Q73luWK3wNmwpIaO/FvZjE8OQFQzarSj6vI4EMUM8JKpwnZosg==} + engines: {node: '>=12.4.0'} + dependencies: + '@nolyfill/shared': 1.0.21 + dev: true + + /@nolyfill/object.values@1.0.21: + resolution: {integrity: sha512-5RPPiaknXoCnpwXZTy99Oo/sNega0wf5DsYQU6YOFa1kLhvwgc4x2/Np1F8zT7WwGE9C1POH3ZIuSMelpd79Ew==} + engines: {node: '>=12.4.0'} + dependencies: + '@nolyfill/shared': 1.0.21 + dev: true + + /@nolyfill/shared@1.0.21: + resolution: {integrity: sha512-qDc/NoaFU23E0hhiDPeUrvWzTXIPE+RbvRQtRWSeHHNmCIgYI9HS1jKzNYNJxv4jvZ/1VmM3L6rNVxbj+LBMNA==} + dev: true + + /@nolyfill/which-typed-array@1.0.21: + resolution: {integrity: sha512-/AqIVAAGLI6KH9idsre3pvup5H48fhtd2z4G2ACxEPCZVI1JycBMnuX6bcQTdOuYBm5ZzewZ1LNf/oGMiD9Jrg==} + engines: {node: '>=12.4.0'} + dependencies: + '@nolyfill/shared': 1.0.21 + dev: true + /@pkgr/utils@2.3.1: resolution: {integrity: sha512-wfzX8kc1PMyUILA+1Z/EqoE4UCXGy0iRGMhPwdfae1+f0OXlLqCk+By+aMzgJBzR9AzS4CDizioG6Ss1gvAFJw==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} @@ -1400,6 +1532,11 @@ packages: uri-js: 4.4.1 dev: true + /ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + dev: true + /ansi-escapes@5.0.0: resolution: {integrity: sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==} engines: {node: '>=12'} @@ -1454,50 +1591,19 @@ packages: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true - /array-includes@3.1.6: - resolution: {integrity: sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.1 - get-intrinsic: 1.2.0 - is-string: 1.0.7 - dev: true - /array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} dev: true - /array.prototype.flat@1.3.1: - resolution: {integrity: sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.1 - es-shim-unscopables: 1.0.0 - dev: true - - /array.prototype.flatmap@1.3.1: - resolution: {integrity: sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.1 - es-shim-unscopables: 1.0.0 - dev: true - /assert@2.0.0: resolution: {integrity: sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==} dependencies: es6-object-assign: 1.1.0 is-nan: 1.3.2 - object-is: 1.1.5 + object-is: /@nolyfill/object-is@1.0.21 util: 0.12.5 - dev: false + dev: true /assertion-error@1.1.0: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} @@ -1508,11 +1614,7 @@ packages: engines: {node: '>=4'} dependencies: tslib: 2.5.0 - dev: false - - /available-typed-arrays@1.0.5: - resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} - engines: {node: '>= 0.4'} + dev: true /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -1610,8 +1712,9 @@ packages: /call-bind@1.0.2: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: - function-bind: 1.1.1 + function-bind: /@nolyfill/function-bind@1.0.21 get-intrinsic: 1.2.0 + dev: true /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} @@ -1761,6 +1864,10 @@ packages: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true + /colorette@1.2.1: + resolution: {integrity: sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==} + dev: true + /colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} dev: true @@ -1867,13 +1974,6 @@ packages: engines: {node: '>=12'} dev: true - /define-properties@1.2.0: - resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} - engines: {node: '>= 0.4'} - dependencies: - has-property-descriptors: 1.0.0 - object-keys: 1.1.1 - /defu@6.1.2: resolution: {integrity: sha512-+uO4+qr7msjNNWKYPHqN/3+Dx3NFkmIzayk2L1MyZQlvgZb/J1A0fo410dpKrN2SnqFjt8n4JL8fDJE0wIgjFQ==} dev: true @@ -1933,78 +2033,22 @@ packages: tapable: 2.2.1 dev: true - /error-ex@1.3.2: - resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - dependencies: - is-arrayish: 0.2.1 - dev: true - - /es-abstract@1.21.1: - resolution: {integrity: sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==} - engines: {node: '>= 0.4'} - dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - es-set-tostringtag: 2.0.1 - es-to-primitive: 1.2.1 - function-bind: 1.1.1 - function.prototype.name: 1.1.5 - get-intrinsic: 1.2.0 - get-symbol-description: 1.0.0 - globalthis: 1.0.3 - gopd: 1.0.1 - has: 1.0.3 - has-property-descriptors: 1.0.0 - has-proto: 1.0.1 - has-symbols: 1.0.3 - internal-slot: 1.0.5 - is-array-buffer: 3.0.1 - is-callable: 1.2.7 - is-negative-zero: 2.0.2 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.2 - is-string: 1.0.7 - is-typed-array: 1.1.10 - is-weakref: 1.0.2 - object-inspect: 1.12.3 - object-keys: 1.1.1 - object.assign: 4.1.4 - regexp.prototype.flags: 1.4.3 - safe-regex-test: 1.0.0 - string.prototype.trimend: 1.0.6 - string.prototype.trimstart: 1.0.6 - typed-array-length: 1.0.4 - unbox-primitive: 1.0.2 - which-typed-array: 1.1.9 - dev: true - - /es-set-tostringtag@2.0.1: - resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} - engines: {node: '>= 0.4'} - dependencies: - get-intrinsic: 1.2.0 - has: 1.0.3 - has-tostringtag: 1.0.0 - dev: true - - /es-shim-unscopables@1.0.0: - resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==} + /enquirer@2.3.6: + resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} + engines: {node: '>=8.6'} dependencies: - has: 1.0.3 + ansi-colors: 4.1.3 dev: true - /es-to-primitive@1.2.1: - resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} - engines: {node: '>= 0.4'} + /error-ex@1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} dependencies: - is-callable: 1.2.7 - is-date-object: 1.0.5 - is-symbol: 1.0.4 + is-arrayish: 0.2.1 dev: true /es6-object-assign@1.1.0: resolution: {integrity: sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==} - dev: false + dev: true /esbuild@0.16.17: resolution: {integrity: sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==} @@ -2163,7 +2207,7 @@ packages: resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==} dependencies: debug: 3.2.7 - is-core-module: 2.12.1 + is-core-module: 2.13.0 resolve: 1.22.2 transitivePeerDependencies: - supports-color @@ -2183,7 +2227,7 @@ packages: eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.48.0) get-tsconfig: 4.6.0 globby: 13.1.4 - is-core-module: 2.12.1 + is-core-module: 2.13.0 is-glob: 4.0.3 synckit: 0.8.5 transitivePeerDependencies: @@ -2256,19 +2300,19 @@ packages: optional: true dependencies: '@typescript-eslint/parser': 5.62.0(eslint@8.48.0)(typescript@5.2.2) - array-includes: 3.1.6 - array.prototype.flat: 1.3.1 - array.prototype.flatmap: 1.3.1 + array-includes: /@nolyfill/array-includes@1.0.21 + array.prototype.flat: /@nolyfill/array.prototype.flat@1.0.21 + array.prototype.flatmap: /@nolyfill/array.prototype.flatmap@1.0.21 debug: 3.2.7 doctrine: 2.1.0 eslint: 8.48.0 eslint-import-resolver-node: 0.3.7 eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.48.0) - has: 1.0.3 - is-core-module: 2.12.1 + has: /@nolyfill/has@1.0.21 + is-core-module: 2.13.0 is-glob: 4.0.3 minimatch: 3.1.2 - object.values: 1.1.6 + object.values: /@nolyfill/object.values@1.0.21 resolve: 1.22.2 semver: 6.3.0 tsconfig-paths: 3.14.1 @@ -2289,7 +2333,7 @@ packages: eslint: 8.48.0 eslint-plugin-es-x: 7.2.0(eslint@8.48.0) ignore: 5.2.4 - is-core-module: 2.12.1 + is-core-module: 2.13.0 minimatch: 3.1.2 resolve: 1.22.2 semver: 7.5.4 @@ -2436,7 +2480,7 @@ packages: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} hasBin: true - dev: false + dev: true /esquery@1.5.0: resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} @@ -2604,6 +2648,16 @@ packages: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: is-callable: 1.2.7 + dev: true + + /fs-extra@10.1.0: + resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} + engines: {node: '>=12'} + dependencies: + graceful-fs: 4.2.10 + jsonfile: 6.1.0 + universalify: 2.0.0 + dev: true /fs-extra@11.1.1: resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} @@ -2633,21 +2687,8 @@ packages: dev: true optional: true - /function-bind@1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - - /function.prototype.name@1.1.5: - resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.1 - functions-have-names: 1.2.3 - dev: true - - /functions-have-names@1.2.3: - resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + /fuzzysearch@1.0.3: + resolution: {integrity: sha512-s+kNWQuI3mo9OALw0HJ6YGmMbLqEufCh2nX/zzV5CrICQ/y4AwPxM+6TIiF9ItFCHXFCyM/BfCCmN57NTIJuPg==} dev: true /gensync@1.0.0-beta.2: @@ -2662,9 +2703,10 @@ packages: /get-intrinsic@1.2.0: resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==} dependencies: - function-bind: 1.1.1 - has: 1.0.3 - has-symbols: 1.0.3 + function-bind: /@nolyfill/function-bind@1.0.21 + has: /@nolyfill/has@1.0.21 + has-symbols: /@nolyfill/has-symbols@1.0.21 + dev: true /get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} @@ -2676,14 +2718,6 @@ packages: engines: {node: '>=16'} dev: true - /get-symbol-description@1.0.0: - resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.0 - dev: true - /get-tsconfig@4.6.0: resolution: {integrity: sha512-lgbo68hHTQnFddybKbbs/RDRJnJT5YyGy2kQzVwbq+g67X73i+5MVTval34QxGkOe9X5Ujf1UYpCaphLyltjEg==} dependencies: @@ -2753,13 +2787,6 @@ packages: type-fest: 0.20.2 dev: true - /globalthis@1.0.3: - resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} - engines: {node: '>= 0.4'} - dependencies: - define-properties: 1.2.0 - dev: true - /globalyzer@0.1.0: resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} dev: true @@ -2802,11 +2829,6 @@ packages: resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} dev: true - /gopd@1.0.1: - resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} - dependencies: - get-intrinsic: 1.2.0 - /graceful-fs@4.2.10: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} dev: true @@ -2815,10 +2837,6 @@ packages: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true - /has-bigints@1.0.2: - resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} - dev: true - /has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} @@ -2830,32 +2848,6 @@ packages: engines: {node: '>=8'} dev: true - /has-property-descriptors@1.0.0: - resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} - dependencies: - get-intrinsic: 1.2.0 - - /has-proto@1.0.1: - resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} - engines: {node: '>= 0.4'} - dev: true - - /has-symbols@1.0.3: - resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} - engines: {node: '>= 0.4'} - - /has-tostringtag@1.0.0: - resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} - engines: {node: '>= 0.4'} - dependencies: - has-symbols: 1.0.3 - - /has@1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} - dependencies: - function-bind: 1.1.1 - /hookable@5.5.3: resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} dev: true @@ -2868,6 +2860,16 @@ packages: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} dev: true + /https-proxy-agent@5.0.0: + resolution: {integrity: sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==} + engines: {node: '>= 6'} + dependencies: + agent-base: 6.0.2 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + /https-proxy-agent@5.0.1: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} @@ -2925,42 +2927,12 @@ packages: /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - - /internal-slot@1.0.5: - resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} - engines: {node: '>= 0.4'} - dependencies: - get-intrinsic: 1.2.0 - has: 1.0.3 - side-channel: 1.0.4 - dev: true - - /is-arguments@1.1.1: - resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 - dev: false - - /is-array-buffer@3.0.1: - resolution: {integrity: sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.0 - is-typed-array: 1.1.10 dev: true /is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: true - /is-bigint@1.0.4: - resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} - dependencies: - has-bigints: 1.0.2 - dev: true - /is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} @@ -2968,14 +2940,6 @@ packages: binary-extensions: 2.2.0 dev: true - /is-boolean-object@1.1.2: - resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 - dev: true - /is-builtin-module@3.2.1: resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} engines: {node: '>=6'} @@ -2986,18 +2950,12 @@ packages: /is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} - - /is-core-module@2.12.1: - resolution: {integrity: sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==} - dependencies: - has: 1.0.3 dev: true - /is-date-object@1.0.5: - resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} - engines: {node: '>= 0.4'} + /is-core-module@2.13.0: + resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} dependencies: - has-tostringtag: 1.0.0 + has: /@nolyfill/has@1.0.21 dev: true /is-docker@2.2.1: @@ -3022,13 +2980,6 @@ packages: engines: {node: '>=12'} dev: true - /is-generator-function@1.0.10: - resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} - engines: {node: '>= 0.4'} - dependencies: - has-tostringtag: 1.0.0 - dev: false - /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -3053,19 +3004,7 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - dev: false - - /is-negative-zero@2.0.2: - resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} - engines: {node: '>= 0.4'} - dev: true - - /is-number-object@1.0.7: - resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} - engines: {node: '>= 0.4'} - dependencies: - has-tostringtag: 1.0.0 + define-properties: /@nolyfill/define-properties@1.0.21 dev: true /is-number@7.0.0: @@ -3084,20 +3023,6 @@ packages: '@types/estree': 1.0.0 dev: true - /is-regex@1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 - dev: true - - /is-shared-array-buffer@1.0.2: - resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} - dependencies: - call-bind: 1.0.2 - dev: true - /is-stream@2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} @@ -3108,34 +3033,15 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true - /is-string@1.0.7: - resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} - engines: {node: '>= 0.4'} - dependencies: - has-tostringtag: 1.0.0 - dev: true - - /is-symbol@1.0.4: - resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} - engines: {node: '>= 0.4'} - dependencies: - has-symbols: 1.0.3 - dev: true - /is-typed-array@1.1.10: resolution: {integrity: sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==} engines: {node: '>= 0.4'} dependencies: - available-typed-arrays: 1.0.5 + available-typed-arrays: /@nolyfill/available-typed-arrays@1.0.21 call-bind: 1.0.2 for-each: 0.3.3 - gopd: 1.0.1 - has-tostringtag: 1.0.0 - - /is-weakref@1.0.2: - resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} - dependencies: - call-bind: 1.0.2 + gopd: /@nolyfill/gopd@1.0.21 + has-tostringtag: /@nolyfill/has-tostringtag@1.0.21 dev: true /is-wsl@2.2.0: @@ -3505,6 +3411,11 @@ packages: ufo: 1.1.2 dev: true + /mri@1.1.6: + resolution: {integrity: sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ==} + engines: {node: '>=4'} + dev: true + /mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -3573,41 +3484,6 @@ packages: path-key: 4.0.0 dev: true - /object-inspect@1.12.3: - resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} - dev: true - - /object-is@1.1.5: - resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - dev: false - - /object-keys@1.1.1: - resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} - engines: {node: '>= 0.4'} - - /object.assign@4.1.4: - resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - has-symbols: 1.0.3 - object-keys: 1.1.1 - dev: true - - /object.values@1.1.6: - resolution: {integrity: sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.1 - dev: true - /ofetch@1.1.1: resolution: {integrity: sha512-SSMoktrp9SNLi20BWfB/BnnKcL0RDigXThD/mZBeQxkIRv1xrd9183MtLdsqRYLYSqW0eTr5t8w8MqjNhvoOQQ==} dependencies: @@ -3887,22 +3763,13 @@ packages: esprima: 4.0.1 source-map: 0.6.1 tslib: 2.5.0 - dev: false + dev: true /regexp-tree@0.1.24: resolution: {integrity: sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw==} hasBin: true dev: true - /regexp.prototype.flags@1.4.3: - resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - functions-have-names: 1.2.3 - dev: true - /regexpp@3.2.0: resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} engines: {node: '>=8'} @@ -3928,7 +3795,7 @@ packages: resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} hasBin: true dependencies: - is-core-module: 2.12.1 + is-core-module: 2.13.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: true @@ -4000,14 +3867,6 @@ packages: queue-microtask: 1.2.3 dev: true - /safe-regex-test@1.0.0: - resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.0 - is-regex: 1.1.4 - dev: true - /safe-regex@2.1.1: resolution: {integrity: sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==} dependencies: @@ -4053,14 +3912,6 @@ packages: engines: {node: '>=8'} dev: true - /side-channel@1.0.4: - resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.0 - object-inspect: 1.12.3 - dev: true - /siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} dev: true @@ -4110,11 +3961,11 @@ packages: /source-map-js@1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} - dev: true /source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} + dev: true /spdx-correct@3.1.1: resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} @@ -4164,22 +4015,6 @@ packages: strip-ansi: 7.0.1 dev: true - /string.prototype.trimend@1.0.6: - resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.1 - dev: true - - /string.prototype.trimstart@1.0.6: - resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.1 - dev: true - /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -4285,6 +4120,31 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true + /tiged@2.12.5: + resolution: {integrity: sha512-divl34KaEXBUO8N2m5UcMdQZjqLZRzEq+ychP5bNYSGF0JQq1j6m4uF7WuQOCRomlBeu5vJfjkXtyYumijX+bA==} + engines: {node: '>=8.0.0'} + hasBin: true + dependencies: + colorette: 1.2.1 + enquirer: 2.3.6 + fs-extra: 10.1.0 + fuzzysearch: 1.0.3 + https-proxy-agent: 5.0.0 + mri: 1.1.6 + rimraf: 3.0.2 + tar: 6.1.13 + tiny-glob: 0.2.8 + transitivePeerDependencies: + - supports-color + dev: true + + /tiny-glob@0.2.8: + resolution: {integrity: sha512-vkQP7qOslq63XRX9kMswlby99kyO5OvKptw7AMwBVMjXEI7Tb61eoI5DydyEMOseyGS5anDN1VPoVxEvH01q8w==} + dependencies: + globalyzer: 0.1.0 + globrex: 0.1.2 + dev: true + /tiny-glob@0.2.9: resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} dependencies: @@ -4342,6 +4202,7 @@ packages: /tslib@2.5.0: resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==} + dev: true /tsutils@3.21.0(typescript@5.2.2): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} @@ -4385,14 +4246,6 @@ packages: engines: {node: '>=10'} dev: true - /typed-array-length@1.0.4: - resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} - dependencies: - call-bind: 1.0.2 - for-each: 0.3.3 - is-typed-array: 1.1.10 - dev: true - /typescript@5.2.2: resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} engines: {node: '>=14.17'} @@ -4403,15 +4256,6 @@ packages: resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==} dev: true - /unbox-primitive@1.0.2: - resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} - dependencies: - call-bind: 1.0.2 - has-bigints: 1.0.2 - has-symbols: 1.0.3 - which-boxed-primitive: 1.0.2 - dev: true - /unbuild@2.0.0(typescript@5.2.2): resolution: {integrity: sha512-JWCUYx3Oxdzvw2J9kTAp+DKE8df/BnH/JTSj6JyA4SH40ECdFu7FoJJcrm8G92B7TjofQ6GZGjJs50TRxoH6Wg==} hasBin: true @@ -4497,11 +4341,11 @@ packages: resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} dependencies: inherits: 2.0.4 - is-arguments: 1.1.1 - is-generator-function: 1.0.10 + is-arguments: /@nolyfill/is-arguments@1.0.21 + is-generator-function: /@nolyfill/is-generator-function@1.0.21 is-typed-array: 1.1.10 - which-typed-array: 1.1.9 - dev: false + which-typed-array: /@nolyfill/which-typed-array@1.0.21 + dev: true /v8-to-istanbul@9.1.0: resolution: {integrity: sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==} @@ -4639,27 +4483,6 @@ packages: - terser dev: true - /which-boxed-primitive@1.0.2: - resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} - dependencies: - is-bigint: 1.0.4 - is-boolean-object: 1.1.2 - is-number-object: 1.0.7 - is-string: 1.0.7 - is-symbol: 1.0.4 - dev: true - - /which-typed-array@1.1.9: - resolution: {integrity: sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==} - engines: {node: '>= 0.4'} - dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - for-each: 0.3.3 - gopd: 1.0.1 - has-tostringtag: 1.0.0 - is-typed-array: 1.1.10 - /which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..d50ce2a --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +packages: + - stubs/* diff --git a/scripts/vendor.ts b/scripts/vendor.ts new file mode 100644 index 0000000..b4ba6c2 --- /dev/null +++ b/scripts/vendor.ts @@ -0,0 +1,96 @@ +/* eslint-disable unicorn/prefer-top-level-await */ +import fs from 'node:fs' +import fsp from 'node:fs/promises' +import { execa } from 'execa' + +// This script clones recast and patches, and then re-bundle it so we get rid of the unnecessary polyfills + +async function cloneRecast() { + if (fs.existsSync('vendor/recast')) { + console.log('vendor/recast already exists') + } + else { + // Clone recast + await execa('npx', ['tiged', 'benjamn/recast#v0.23.4', 'vendor/recast'], { stdio: 'inherit' }) + + // Remove the tsconfig.json so it's targeting newer node versions + await fsp.rm('vendor/recast/tsconfig.json') + + // Remove the assert import and usage + await filterLines('vendor/recast/lib/patcher.ts', (line) => { + if (line.startsWith('import assert from')) { + return false + } + if (/^\s*assert\./.test(line)) { + return `false && ` + line + } + return line + }) + await filterLines('vendor/recast/lib/patcher.ts', (line) => { + if (line.startsWith('import assert from')) { + return false + } + if (/^\s*assert\./.test(line)) { + return `false && ` + line + } + return line + }) + + // Remove the require(), and since we are providing our own parser anyway + await filterLines('vendor/recast/lib/options.ts', (line) => { + if (line.includes('parser: require("../parsers/esprima")')) { + return false + } + return line + }) + + await filterLines('vendor/recast/lib/util.ts', (line) => { + if (line.includes('isBrowser() ? "\\n"')) { return 'return "\\n"' } + return line + }) + + console.log('vendor/recast cloned') + } +} + + +async function cloneAstTypes() { + if (fs.existsSync('vendor/ast-types')) { + console.log('vendor/ast-types already exists') + } + else { + // Clone recast + await execa('npx', ['tiged', 'benjamn/ast-types#v0.16.1', 'vendor/ast-types'], { stdio: 'inherit' }) + + // Remove the tsconfig.json so it's targeting newer node versions + await fsp.rm('vendor/ast-types/tsconfig.json') + + // Add import type + await filterLines('vendor/ast-types/src/main.ts', (line) => { + if (/^import\s*{\s*(ASTNode|Visitor)/.test(line)) { + return line.replace(/^import /, 'import type ') + } + return line + }) + + console.log('vendor/ast-types cloned') + } +} + +async function filterLines(file: string, filter: (line: string, index: number) => boolean | string) { + const content = await fsp.readFile(file, 'utf8') + const lines = content.split('\n') + const newContent = lines + .map((i, idx) => filter(i, idx)) + .filter(i => i !== false) + .join('\n') + if (newContent !== content) { + await fsp.writeFile(file, newContent) + } +} + + +await Promise.all([ + cloneRecast(), + cloneAstTypes(), +]) diff --git a/src/builders.ts b/src/builders.ts index 2349958..a072610 100644 --- a/src/builders.ts +++ b/src/builders.ts @@ -14,7 +14,7 @@ export const builders = { functionCall(callee: string, ...args: any[]): Proxified { const node = b.callExpression( b.identifier(callee), - args.map((i) => literalToAst(i) as any) + args.map((i) => literalToAst(i) as any), ); return proxifyFunctionCall(node as any); }, @@ -24,7 +24,7 @@ export const builders = { newExpression(callee: string, ...args: any[]): Proxified { const node = b.newExpression( b.identifier(callee), - args.map((i) => literalToAst(i) as any) + args.map((i) => literalToAst(i) as any), ); return proxifyNewExpression(node as any); }, diff --git a/src/code.ts b/src/code.ts index 51c1b02..e030d7a 100644 --- a/src/code.ts +++ b/src/code.ts @@ -14,7 +14,7 @@ import { proxify } from "./proxy/proxify"; export function parseModule( code: string, - options?: ParseOptions + options?: ParseOptions, ): ProxifiedModule { const node: ParsedFileNode = parse(code, { parser: options?.parser || getBabelParser(), @@ -25,7 +25,7 @@ export function parseModule( export function parseExpression( code: string, - options?: ParseOptions + options?: ParseOptions, ): Proxified { const root: ParsedFileNode = parse("(" + code + ")", { parser: options?.parser || getBabelParser(), @@ -50,7 +50,7 @@ export function parseExpression( export function generateCode( node: { $ast: ASTNode } | ASTNode | ProxifiedModule, - options: GenerateOptions = {} + options: GenerateOptions = {}, ): { code: string; map?: any } { const ast = (node as Proxified).$ast || node; @@ -69,7 +69,7 @@ export function generateCode( export async function loadFile( filename: string, - options: ParseOptions = {} + options: ParseOptions = {}, ): Promise> { const contents = await fsp.readFile(filename, "utf8"); options.sourceFileName = options.sourceFileName ?? filename; @@ -79,7 +79,7 @@ export async function loadFile( export async function writeFile( node: { ast: ASTNode } | ASTNode, filename?: string, - options?: ParseOptions + options?: ParseOptions, ): Promise { const ast = "ast" in node ? node.ast : node; const { code, map } = generateCode(ast, options); diff --git a/src/format.ts b/src/format.ts index a71760d..669f3d0 100644 --- a/src/format.ts +++ b/src/format.ts @@ -13,7 +13,7 @@ export interface CodeFormatOptions { export function detectCodeFormat( code: string, - userStyles: CodeFormatOptions = {} + userStyles: CodeFormatOptions = {}, ): CodeFormatOptions { // Detect features only user not specified const detect = { diff --git a/src/helpers/config.ts b/src/helpers/config.ts index 2a9a347..71be36a 100644 --- a/src/helpers/config.ts +++ b/src/helpers/config.ts @@ -25,14 +25,14 @@ export function getDefaultExportOptions(magicast: ProxifiedModule) { * If no config declaration is found, undefined is returned. */ export function getConfigFromVariableDeclaration( - magicast: ProxifiedModule + magicast: ProxifiedModule, ): { declaration: VariableDeclarator; config: ProxifiedObject | undefined; } { if (magicast.exports.default.$type !== "identifier") { throw new MagicastError( - `Not supported: Cannot modify this kind of default export (${magicast.exports.default.$type})` + `Not supported: Cannot modify this kind of default export (${magicast.exports.default.$type})`, ); } diff --git a/src/helpers/nuxt.ts b/src/helpers/nuxt.ts index 61afa94..ccc5cfe 100644 --- a/src/helpers/nuxt.ts +++ b/src/helpers/nuxt.ts @@ -6,7 +6,7 @@ export function addNuxtModule( magicast: ProxifiedModule, name: string, optionsKey?: string, - options?: any + options?: any, ) { const config = getDefaultExportOptions(magicast); diff --git a/src/helpers/vite.ts b/src/helpers/vite.ts index 657b5c3..1b51eb8 100644 --- a/src/helpers/vite.ts +++ b/src/helpers/vite.ts @@ -51,7 +51,7 @@ export interface UpdateVitePluginConfigOptions { export function addVitePlugin( magicast: ProxifiedModule, - plugin: AddVitePluginOptions + plugin: AddVitePluginOptions, ) { const config: Proxified | undefined = getDefaultExportOptions(magicast); @@ -72,7 +72,7 @@ export function addVitePlugin( export function findVitePluginCall( magicast: ProxifiedModule, - plugin: UpdateVitePluginConfigOptions | string + plugin: UpdateVitePluginConfigOptions | string, ): ProxifiedFunctionCall | undefined { const _plugin = typeof plugin === "string" ? { from: plugin, imported: "default" } : plugin; @@ -81,18 +81,18 @@ export function findVitePluginCall( const constructor = magicast.imports.$items.find( (i) => - i.from === _plugin.from && i.imported === (_plugin.imported || "default") + i.from === _plugin.from && i.imported === (_plugin.imported || "default"), )?.local; return config.plugins?.find( - (p: any) => p && p.$type === "function-call" && p.$callee === constructor + (p: any) => p && p.$type === "function-call" && p.$callee === constructor, ); } export function updateVitePluginConfig( magicast: ProxifiedModule, plugin: UpdateVitePluginConfigOptions | string, - handler: Record | ((args: any[]) => any[]) + handler: Record | ((args: any[]) => any[]), ) { const item = findVitePluginCall(magicast, plugin); if (!item) { @@ -116,7 +116,7 @@ export function updateVitePluginConfig( */ function insertPluginIntoVariableDeclarationConfig( magicast: ProxifiedModule, - plugin: AddVitePluginOptions + plugin: AddVitePluginOptions, ) { const { config: configObject, declaration } = getConfigFromVariableDeclaration(magicast); @@ -133,7 +133,7 @@ function insertPluginIntoVariableDeclarationConfig( ) { // @ts-ignore this works despite the type error because of recast declaration.init = generateCode( - builders.functionCall(declaration.init.callee.name, configObject) + builders.functionCall(declaration.init.callee.name, configObject), ).code; } } @@ -149,6 +149,6 @@ function insertPluginIntoConfig(plugin: AddVitePluginOptions, config: any) { 0, plugin.options ? builders.functionCall(plugin.constructor, plugin.options) - : builders.functionCall(plugin.constructor) + : builders.functionCall(plugin.constructor), ); } diff --git a/src/proxy/_utils.ts b/src/proxy/_utils.ts index c65c800..6d63cd9 100644 --- a/src/proxy/_utils.ts +++ b/src/proxy/_utils.ts @@ -74,13 +74,13 @@ export function literalToAst(value: any, seen = new Set()): ASTNode { literalToAst(key, seen) as any, literalToAst(value, seen) as any, ]) as any; - }) as any + }) as any, ), ]) as any; } if (Array.isArray(value)) { return b.arrayExpression( - value.map((n) => literalToAst(n, seen)) as any + value.map((n) => literalToAst(n, seen)) as any, ) as any; } if (typeof value === "object") { @@ -89,9 +89,9 @@ export function literalToAst(value: any, seen = new Set()): ASTNode { return b.property( "init", /^[$A-Z_a-z][\w$]*$/g.test(key) ? b.identifier(key) : b.literal(key), - literalToAst(value, seen) as any + literalToAst(value, seen) as any, ) as any; - }) + }), ) as any; } return b.literal(value) as any; @@ -99,7 +99,7 @@ export function literalToAst(value: any, seen = new Set()): ASTNode { export function makeProxyUtils( node: ASTNode, - extend: T = {} as T + extend: T = {} as T, ): Record { const obj = extend as any; obj[PROXY_KEY] = true; @@ -116,7 +116,7 @@ const propertyDescriptor = { export function createProxy( node: ASTNode, extend: any, - handler: ProxyHandler + handler: ProxyHandler, ): T { const utils = makeProxyUtils(node, extend); return new Proxy( @@ -124,7 +124,7 @@ export function createProxy( { ownKeys() { return Object.keys(utils).filter( - (i) => i !== PROXY_KEY && !i.startsWith("$") + (i) => i !== PROXY_KEY && !i.startsWith("$"), ); }, getOwnPropertyDescriptor() { @@ -155,6 +155,6 @@ export function createProxy( } return false; }, - } + }, ) as T; } diff --git a/src/proxy/array.ts b/src/proxy/array.ts index ff91783..e13cb8c 100644 --- a/src/proxy/array.ts +++ b/src/proxy/array.ts @@ -6,7 +6,7 @@ import { proxify } from "./proxify"; export function proxifyArrayElements( node: ASTNode, elements: ASTNode[], - mod?: ProxifiedModule + mod?: ProxifiedModule, ): ProxifiedArray { const getItem = (key: number) => { return elements[key]; @@ -36,7 +36,7 @@ export function proxifyArrayElements( const deleted = elements.splice( start, deleteCount, - ...items.map((n) => literalToAst(n)) + ...items.map((n) => literalToAst(n)), ); return deleted.map((n) => proxify(n as any, mod)); }, @@ -104,13 +104,13 @@ export function proxifyArrayElements( ownKeys() { return ["length", ...elements.map((_, i) => i.toString())]; }, - } + }, ); } export function proxifyArray( node: ASTNode, - mod?: ProxifiedModule + mod?: ProxifiedModule, ): ProxifiedArray { if (!("elements" in node)) { return undefined as any; diff --git a/src/proxy/exports.ts b/src/proxy/exports.ts index af16c16..a6000b0 100644 --- a/src/proxy/exports.ts +++ b/src/proxy/exports.ts @@ -53,8 +53,8 @@ export function createExportsProxy(root: Program, mod: ProxifiedModule) { : (b.exportNamedDeclaration( b.variableDeclaration("const", [ b.variableDeclarator(b.identifier(key), node), - ]) - ) as any) + ]), + ) as any), ); }; @@ -86,7 +86,7 @@ export function createExportsProxy(root: Program, mod: ProxifiedModule) { "declarations" in i.declaration ) { return i.declaration.declarations.map((d) => - "name" in d.id ? d.id.name : "" + "name" in d.id ? d.id.name : "", ); } return []; @@ -117,6 +117,6 @@ export function createExportsProxy(root: Program, mod: ProxifiedModule) { } return false; }, - } + }, ); } diff --git a/src/proxy/function-call.ts b/src/proxy/function-call.ts index 55c94fb..1eb020a 100644 --- a/src/proxy/function-call.ts +++ b/src/proxy/function-call.ts @@ -6,7 +6,7 @@ import { proxifyArrayElements } from "./array"; export function proxifyFunctionCall( node: ASTNode, - mod?: ProxifiedModule + mod?: ProxifiedModule, ): ProxifiedFunctionCall { if (node.type !== "CallExpression") { throw new MagicastError("Not a function call"); @@ -18,7 +18,7 @@ export function proxifyFunctionCall( } if (node.type === "MemberExpression") { return `${stringifyExpression(node.object)}.${stringifyExpression( - node.property + node.property, )}`; } throw new MagicastError("Not implemented"); @@ -33,6 +33,6 @@ export function proxifyFunctionCall( $callee: stringifyExpression(node.callee as any), $args: argumentsProxy, }, - {} + {}, ) as ProxifiedFunctionCall; } diff --git a/src/proxy/identifier.ts b/src/proxy/identifier.ts index 4b2de5f..4d7cde5 100644 --- a/src/proxy/identifier.ts +++ b/src/proxy/identifier.ts @@ -13,6 +13,6 @@ export function proxifyIdentifier(node: ASTNode): ProxifiedIdentifier { $type: "identifier", $name: node.name, }, - {} + {}, ) as ProxifiedIdentifier; } diff --git a/src/proxy/imports.ts b/src/proxy/imports.ts index 57108b6..e033b56 100644 --- a/src/proxy/imports.ts +++ b/src/proxy/imports.ts @@ -25,7 +25,7 @@ export function creatImportProxy( | ImportSpecifier | ImportNamespaceSpecifier | ImportDefaultSpecifier, - root: Program + root: Program, ): ProxifiedImportItem { if (_importProxyCache.has(specifier)) { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion @@ -52,7 +52,7 @@ export function creatImportProxy( set imported(value) { if (specifier.type !== "ImportSpecifier") { throw new MagicastError( - "Changing import name is not yet implemented" + "Changing import name is not yet implemented", ); } if (specifier.imported.type === "Identifier") { @@ -81,7 +81,7 @@ export function creatImportProxy( } const declaration = root.body.find( - (i) => i.type === "ImportDeclaration" && i.source.value === value + (i) => i.type === "ImportDeclaration" && i.source.value === value, ) as ImportDeclaration | undefined; if (declaration) { // TODO: insert after the last import maybe? @@ -90,8 +90,8 @@ export function creatImportProxy( root.body.unshift( b.importDeclaration( [specifier as any], - b.stringLiteral(value) - ) as any + b.stringLiteral(value), + ) as any, ); } }, @@ -107,7 +107,7 @@ export function creatImportProxy( ownKeys() { return ["imported", "local", "from", "toJSON"]; }, - } + }, ) as ProxifiedImportItem; _importProxyCache.set(specifier, proxy); return proxy; @@ -116,7 +116,7 @@ export function creatImportProxy( export function createImportsProxy( root: Program, // eslint-disable-next-line @typescript-eslint/no-unused-vars - mod: ProxifiedModule + mod: ProxifiedModule, ): ProxifiedImportsMap { // TODO: cache const getAllImports = () => { @@ -149,15 +149,14 @@ export function createImportsProxy( ? b.importNamespaceSpecifier(b.identifier(local)) : b.importSpecifier(b.identifier(value.imported), b.identifier(local)); - const declaration = imports.find( - (i) => i.from === value.from - )?.$declaration; + const declaration = imports.find((i) => i.from === value.from) + ?.$declaration; if (declaration) { // TODO: insert after the last import maybe? declaration.specifiers.push(specifier as any); } else { root.body.unshift( - b.importDeclaration([specifier], b.stringLiteral(value.from)) as any + b.importDeclaration([specifier], b.stringLiteral(value.from)) as any, ); } return true; @@ -211,7 +210,7 @@ export function createImportsProxy( has(_, prop) { return getAllImports().some((i) => i.local === prop); }, - } + }, ) as any as ProxifiedImportsMap; return proxy; diff --git a/src/proxy/module.ts b/src/proxy/module.ts index b529523..b9318f8 100644 --- a/src/proxy/module.ts +++ b/src/proxy/module.ts @@ -9,7 +9,7 @@ import { createProxy } from "./_utils"; export function proxifyModule( ast: ParsedFileNode, - code: string + code: string, ): ProxifiedModule { const root = ast.program; if (root.type !== "Program") { diff --git a/src/proxy/new-expression.ts b/src/proxy/new-expression.ts index 04718ad..08e8265 100644 --- a/src/proxy/new-expression.ts +++ b/src/proxy/new-expression.ts @@ -6,7 +6,7 @@ import { proxifyArrayElements } from "./array"; export function proxifyNewExpression( node: ASTNode, - mod?: ProxifiedModule + mod?: ProxifiedModule, ): ProxifiedNewExpression { if (node.type !== "NewExpression") { throw new MagicastError("Not a new expression"); @@ -18,7 +18,7 @@ export function proxifyNewExpression( } if (node.type === "MemberExpression") { return `${stringifyExpression(node.object)}.${stringifyExpression( - node.property + node.property, )}`; } throw new MagicastError("Not implemented"); @@ -33,6 +33,6 @@ export function proxifyNewExpression( $callee: stringifyExpression(node.callee as any), $args: argumentsProxy, }, - {} + {}, ) as ProxifiedNewExpression; } diff --git a/src/proxy/object.ts b/src/proxy/object.ts index 62aec08..9285b1f 100644 --- a/src/proxy/object.ts +++ b/src/proxy/object.ts @@ -9,7 +9,7 @@ const b = recast.types.builders; export function proxifyObject( node: ASTNode, - mod?: ProxifiedModule + mod?: ProxifiedModule, ): ProxifiedObject { if (!("properties" in node)) { return undefined as any; @@ -35,7 +35,7 @@ export function proxifyObject( const getPropName = ( prop: (typeof node.properties)[0], - throwError = false + throwError = false, ) => { if ("key" in prop && "name" in prop.key) { return prop.key.name; @@ -58,7 +58,7 @@ export function proxifyObject( const replaceOrAddProp = (key: string, value: ASTNode) => { const prop = (node.properties as any[]).find( - (prop: any) => getPropName(prop) === key + (prop: any) => getPropName(prop) === key, ); if (prop) { prop.value = value; @@ -114,7 +114,8 @@ export function proxifyObject( key = String(key); } const index = node.properties.findIndex( - (prop) => "key" in prop && "name" in prop.key && prop.key.name === key + (prop) => + "key" in prop && "name" in prop.key && prop.key.name === key, ); if (index !== -1) { node.properties.splice(index, 1); @@ -126,6 +127,6 @@ export function proxifyObject( .map((prop) => getPropName(prop, true)) .filter(Boolean) as string[]; }, - } + }, ) as ProxifiedObject; } diff --git a/test/_utils.ts b/test/_utils.ts index 043643b..5b27f61 100644 --- a/test/_utils.ts +++ b/test/_utils.ts @@ -2,5 +2,7 @@ import { format } from "prettier"; import { generateCode } from "../src"; export function generate(mod: any) { - return format(generateCode(mod).code, { parser: "babel-ts" }).trim(); + return format(generateCode(mod).code, { parser: "babel-ts" }).then((code) => + code.trim(), + ); } diff --git a/test/array.test.ts b/test/array.test.ts index 0cc1871..5e20804 100644 --- a/test/array.test.ts +++ b/test/array.test.ts @@ -1,11 +1,11 @@ import { describe, expect, it } from "vitest"; -import { parseModule } from "../src"; +import { parseModule } from "magicast"; import { generate } from "./_utils"; describe("array", () => { - it("array operations", () => { + it("array operations", async () => { const mod = parseModule<{ default: (number | any | string)[] }>( - `export default [1, 2, 3, 4, 5]` + `export default [1, 2, 3, 4, 5]`, ); expect(mod.exports.default.length).toBe(5); @@ -16,7 +16,7 @@ describe("array", () => { expect(deleted).toEqual([2, 3, 4]); - expect(generate(mod)).toMatchInlineSnapshot( + expect(await generate(mod)).toMatchInlineSnapshot( ` "export default [ 1, @@ -26,11 +26,11 @@ describe("array", () => { \\"bar\\", 5, ];" - ` + `, ); const foundIndex = mod.exports.default.findIndex( - (item) => item.foo === "bar" + (item) => item.foo === "bar", ); const found = mod.exports.default.find((item) => item.foo === "bar"); diff --git a/test/builders/expression.test.ts b/test/builders/expression.test.ts index 9d6977f..9f24089 100644 --- a/test/builders/expression.test.ts +++ b/test/builders/expression.test.ts @@ -1,9 +1,9 @@ import { describe, expect, it } from "vitest"; -import { builders, parseModule } from "../../src"; +import { builders, parseModule } from "magicast"; import { generate } from "../_utils"; describe("builders/expression", () => { - it("new expression", () => { + it("new expression", async () => { const call = builders.newExpression("Foo", 1, "bar", { foo: "bar", }); @@ -22,7 +22,7 @@ describe("builders/expression", () => { const mod = parseModule(""); mod.exports.a = call; - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export const a = new Foo(1, \\"bar\\", { foo: \\"bar\\", });" diff --git a/test/builders/function-call.test.ts b/test/builders/function-call.test.ts index 07f6a99..3f83b7f 100644 --- a/test/builders/function-call.test.ts +++ b/test/builders/function-call.test.ts @@ -1,9 +1,9 @@ import { describe, expect, it } from "vitest"; -import { builders, parseModule } from "../../src"; +import { builders, parseModule } from "magicast"; import { generate } from "../_utils"; describe("builders/functionCall", () => { - it("new", () => { + it("new", async () => { const call = builders.functionCall("functionName", 1, "bar", { foo: "bar", }); @@ -22,7 +22,7 @@ describe("builders/functionCall", () => { const mod = parseModule(""); mod.exports.a = call; - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export const a = functionName(1, \\"bar\\", { foo: \\"bar\\", });" diff --git a/test/builders/raw.test.ts b/test/builders/raw.test.ts index ae8b859..5f3d25f 100644 --- a/test/builders/raw.test.ts +++ b/test/builders/raw.test.ts @@ -1,40 +1,40 @@ import { describe, expect, it } from "vitest"; -import { builders, parseModule } from "../../src"; +import { builders, parseModule } from "magicast"; import { generate } from "../_utils"; describe("builders/raw", () => { - it("object", () => { + it("object", async () => { const expression = builders.raw("{ foo: 1 }"); expect(expression.$type).toBe("object"); expect(expression.foo).toBe(1); const mod = parseModule(""); mod.exports.a = expression; - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export const a = { foo: 1, };" `); }); - it("identifier", () => { + it("identifier", async () => { const expression = builders.raw("foo"); expect(expression.$type).toBe("identifier"); expect(expression.$name).toBe("foo"); const mod = parseModule(""); mod.exports.a = expression; - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export const a = foo;" `); }); - it("identifier as property", () => { + it("identifier as property", async () => { const mod = parseModule(""); mod.exports.default ||= {}; mod.exports.default.foo = builders.raw("foo"); - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default { foo: foo, };" diff --git a/test/errors.test.ts b/test/errors.test.ts index e9c9d78..1e865da 100644 --- a/test/errors.test.ts +++ b/test/errors.test.ts @@ -1,5 +1,5 @@ import { expect, describe, it } from "vitest"; -import { parseExpression, parseModule } from "../src"; +import { parseExpression, parseModule } from "magicast"; import { generate } from "./_utils"; describe("errors", () => { @@ -11,7 +11,7 @@ export default { ? 1 : 2 } - `.trim() + `.trim(), ); expect(() => mod.exports.default.a).toThrowErrorMatchingInlineSnapshot( @@ -25,7 +25,7 @@ export default { 4 | : 2 5 | } " - ` + `, ); }); @@ -35,7 +35,7 @@ export default { export default { a: 1 + 1 } - `.trim() + `.trim(), ); expect(() => mod.exports.default.a).toThrowErrorMatchingInlineSnapshot( @@ -47,11 +47,11 @@ export default { ^ 3 | } " - ` + `, ); }); - it("array destructuring", () => { + it("array destructuring", async () => { const mod = parseModule( ` export default { @@ -61,12 +61,12 @@ export default { ...foo ] } - `.trim() + `.trim(), ); // Adding an item should work mod.exports.default.foo.push("foo"); - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default { foo: [1, 2, ...foo, \\"foo\\"], };" @@ -86,11 +86,11 @@ export default { 6 | ] 7 | } " - ` + `, ); }); - it("object destructuring", () => { + it("object destructuring", async () => { const mod = parseModule( ` export default { @@ -99,12 +99,12 @@ export default { ...bar } } - `.trim() + `.trim(), ); // Adding a property should work mod.exports.default.foo.extra = "foo"; - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default { foo: { a: 1, @@ -128,7 +128,7 @@ export default { 5 | } 6 | } " - ` + `, ); }); diff --git a/test/exports.test.ts b/test/exports.test.ts index 8e916ee..69d8ae8 100644 --- a/test/exports.test.ts +++ b/test/exports.test.ts @@ -1,18 +1,18 @@ import { expect, it, describe } from "vitest"; -import { parseModule } from "../src"; +import { parseModule } from "magicast"; import { generate } from "./_utils"; describe("exports", () => { - it("manipulate exports", () => { + it("manipulate exports", async () => { const mod = parseModule(""); expect(Object.keys(mod.exports)).toEqual([]); expect(mod.exports).toMatchInlineSnapshot(`{}`); - expect(generate(mod)).toMatchInlineSnapshot('""'); + expect(await generate(mod)).toMatchInlineSnapshot('""'); mod.exports.default = { foo: "1" }; - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default { foo: \\"1\\", };" @@ -20,7 +20,7 @@ describe("exports", () => { mod.exports.default.foo = 2; - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default { foo: 2, };" @@ -31,7 +31,7 @@ describe("exports", () => { expect(Object.keys(mod.exports)).toEqual(["default", "named"]); - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default { foo: 2, }; @@ -57,14 +57,14 @@ describe("exports", () => { // delete delete mod.exports.default; - expect(generate(mod)).toMatchInlineSnapshot( - '"export const named = [\\"a\\"];"' + expect(await generate(mod)).toMatchInlineSnapshot( + '"export const named = [\\"a\\"];"', ); delete mod.exports.named; expect(Object.keys(mod.exports)).toEqual([]); - expect(generate(mod)).toMatchInlineSnapshot('""'); + expect(await generate(mod)).toMatchInlineSnapshot('""'); }); }); diff --git a/test/format.test.ts b/test/format.test.ts index b818adf..41f841e 100644 --- a/test/format.test.ts +++ b/test/format.test.ts @@ -1,5 +1,5 @@ import { expect, it, describe } from "vitest"; -import { CodeFormatOptions, detectCodeFormat } from "../src"; +import { CodeFormatOptions, detectCodeFormat } from "magicast"; describe("format", () => { const cases: Array<{ diff --git a/test/function-call.test.ts b/test/function-call.test.ts index 25a636a..fa467d4 100644 --- a/test/function-call.test.ts +++ b/test/function-call.test.ts @@ -1,9 +1,9 @@ import { describe, expect, it } from "vitest"; -import { builders, parseModule, ProxifiedModule } from "../src"; +import { builders, parseModule, ProxifiedModule } from "magicast"; import { generate } from "./_utils"; describe("function-calls", () => { - it("function wrapper", () => { + it("function wrapper", async () => { const mod = parseModule(` export const a: any = { foo: 1} export default defineConfig({ @@ -30,7 +30,7 @@ describe("function-calls", () => { options.modules ||= []; options.modules.push("b"); - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export const a: any = { foo: 1 }; export default defineConfig({ // Modules @@ -39,7 +39,7 @@ describe("function-calls", () => { `); }); - it("construct function call", () => { + it("construct function call", async () => { // eslint-disable-next-line unicorn/consistent-function-scoping const installVuePlugin = (mod: ProxifiedModule) => { // Inject export default if not exists @@ -69,7 +69,7 @@ describe("function-calls", () => { config.plugins.push( builders.functionCall("vuePlugin", { jsx: true, - }) + }), ); }; @@ -83,7 +83,7 @@ describe("function-calls", () => { installVuePlugin(mod1); installVuePlugin(mod2); - expect(generate(mod1)).toMatchInlineSnapshot(` + expect(await generate(mod1)).toMatchInlineSnapshot(` "import vuePlugin from \\"@vitejs/plugin-vue\\"; import { defineConfig } from \\"vite\\"; @@ -96,6 +96,6 @@ describe("function-calls", () => { });" `); - expect(generate(mod2)).toEqual(generate(mod1)); + expect(await generate(mod2)).toEqual(await generate(mod1)); }); }); diff --git a/test/general.test.ts b/test/general.test.ts index 146cc20..8aa5af5 100644 --- a/test/general.test.ts +++ b/test/general.test.ts @@ -1,20 +1,20 @@ import { expect, it, describe } from "vitest"; -import { generateCode, parseModule, parseExpression } from "../src"; +import { generateCode, parseModule, parseExpression } from "magicast"; import { generate } from "./_utils"; describe("general", () => { - it("basic object and array", () => { + it("basic object and array", async () => { const mod = parseModule(`export default { a: 1, b: { c: {} } }`); mod.exports.default.a = 2; - expect(generate(mod)).toMatchInlineSnapshot( - '"export default { a: 2, b: { c: {} } };"' + expect(await generate(mod)).toMatchInlineSnapshot( + '"export default { a: 2, b: { c: {} } };"', ); mod.exports.default.b.c = { d: 3 }; - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default { a: 2, b: { @@ -31,7 +31,7 @@ describe("general", () => { expect(mod.exports.default.modules.$ast).toBeDefined(); - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default { a: 2, @@ -48,7 +48,7 @@ describe("general", () => { mod.exports.default.modules.push("a"); mod.exports.default.modules.unshift({ foo: "bar" }); - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default { a: 2, @@ -88,13 +88,13 @@ describe("general", () => { expect(mod.exports.default.modules[0].$type).toBe("object"); }); - it("mix two configs", () => { + it("mix two configs", async () => { const mod1 = parseModule(`export default { a: 1 }`); const mod2 = parseModule(`export default { b: 2 }`); mod1.exports.default.b = mod2.exports.default; - expect(generate(mod1)).toMatchInlineSnapshot( + expect(await generate(mod1)).toMatchInlineSnapshot( ` "export default { a: 1, @@ -103,90 +103,90 @@ describe("general", () => { b: 2, }, };" - ` + `, ); }); - it("delete property", () => { + it("delete property", async () => { const mod = parseModule(`export default { a: 1, b: [1, { foo: 'bar' }] }`); delete mod.exports.default.b[1].foo; - expect(generate(mod)).toMatchInlineSnapshot( - '"export default { a: 1, b: [1, {}] };"' + expect(await generate(mod)).toMatchInlineSnapshot( + '"export default { a: 1, b: [1, {}] };"', ); delete mod.exports.default.b[0]; - expect(generate(mod)).toMatchInlineSnapshot( - '"export default { a: 1, b: [undefined, {}] };"' + expect(await generate(mod)).toMatchInlineSnapshot( + '"export default { a: 1, b: [undefined, {}] };"', ); delete mod.exports.default.a; - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default { b: [undefined, {}], };" `); }); - it("should preserve code styles", () => { + it("should preserve code styles", async () => { const mod = parseModule( ` export const config = { array: ['a'] } - `.trim() + `.trim(), ); mod.exports.config.array.push("b"); - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export const config = { array: [\\"a\\", \\"b\\"], };" `); }); - it("satisfies", () => { + it("satisfies", async () => { const mod = parseModule( - `export const obj = { foo: 42 } satisfies Record;` + `export const obj = { foo: 42 } satisfies Record;`, ); mod.exports.obj.foo = 100; - expect(generate(mod)).toMatchInlineSnapshot( - '"export const obj = { foo: 100 } satisfies Record;"' + expect(await generate(mod)).toMatchInlineSnapshot( + '"export const obj = { foo: 100 } satisfies Record;"', ); }); - it("satisfies 2", () => { + it("satisfies 2", async () => { const mod = parseModule(`export default {} satisfies {}`); mod.exports.default.foo = 100; - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default { foo: 100, } satisfies {};" `); }); - it("as", () => { + it("as", async () => { const mod = parseModule( - `export const obj = { foo: 42 } as Record;` + `export const obj = { foo: 42 } as Record;`, ); mod.exports.obj.foo = 100; - expect(generate(mod)).toMatchInlineSnapshot( - '"export const obj = { foo: 100 } as Record;"' + expect(await generate(mod)).toMatchInlineSnapshot( + '"export const obj = { foo: 100 } as Record;"', ); }); - it("as 2", () => { + it("as 2", async () => { const mod = parseModule(`export default {} as {}`); mod.exports.default.foo = 100; - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default { foo: 100, } as {};" @@ -224,7 +224,7 @@ export const config = { exp[2] = "foo"; expect(generateCode(exp).code).toMatchInlineSnapshot( - '"[1, { foo: 2 }, \\"foo\\"]"' + '"[1, { foo: 2 }, \\"foo\\"]"', ); }); }); diff --git a/test/helpers/nuxt.test.ts b/test/helpers/nuxt.test.ts index 5a74913..810614a 100644 --- a/test/helpers/nuxt.test.ts +++ b/test/helpers/nuxt.test.ts @@ -1,16 +1,17 @@ import { it, describe, expect } from "vitest"; -import { parseModule } from "../../src"; -import { addNuxtModule } from "../../src/helpers"; +import { parseModule } from "magicast"; import { generate } from "../_utils"; +import { addNuxtModule } from "magicast/helpers"; describe("helpers > nuxt", () => { - it("add module", () => { + it("add module", async () => { const code = `export default defineNuxtConfig({})`; const mod = parseModule(code); + addNuxtModule(mod, "@vueuse/nuxt", "vueuse", { hello: "world" }); addNuxtModule(mod, "@unocss/nuxt", "unocss", { another: "config" }); - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default defineNuxtConfig({ modules: [\\"@vueuse/nuxt\\", \\"@unocss/nuxt\\"], diff --git a/test/helpers/vite.test.ts b/test/helpers/vite.test.ts index a38e3b8..d0a13bf 100644 --- a/test/helpers/vite.test.ts +++ b/test/helpers/vite.test.ts @@ -1,10 +1,10 @@ import { it, describe, expect } from "vitest"; -import { parseModule } from "../../src"; -import { addVitePlugin, updateVitePluginConfig } from "../../src/helpers"; +import { parseModule } from "magicast"; import { generate } from "../_utils"; +import { addVitePlugin, updateVitePluginConfig } from "magicast/helpers"; describe("helpers > vite", () => { - it("add plugin", () => { + it("add plugin", async () => { const code = ` import { defineConfig } from 'vite' @@ -36,7 +36,7 @@ export default defineConfig({}) updateVitePluginConfig(mod, "vite-plugin-inspect", { dev: false }); - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "import { VitePWA } from \\"vite-plugin-pwa\\"; import Inspect from \\"vite-plugin-inspect\\"; import vuePlugin from \\"@vitejs/plugin-vue\\"; @@ -57,7 +57,7 @@ export default defineConfig({}) `); }); - it("add plugin at index", () => { + it("add plugin at index", async () => { const code = ` import { defineConfig } from 'vite' import { somePlugin1, somePlugin2 } from 'some-module' @@ -94,7 +94,7 @@ export default defineConfig({ index: 5, // at the end, out of bounds on purpose }); - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "import { VitePWA } from \\"vite-plugin-pwa\\"; import Inspect from \\"vite-plugin-inspect\\"; import vuePlugin from \\"@vitejs/plugin-vue\\"; @@ -117,7 +117,7 @@ export default defineConfig({ `); }); - it("handles default export from identifier (fn call)", () => { + it("handles default export from identifier (fn call)", async () => { const code = ` import { defineConfig } from 'vite'; import { somePlugin1, somePlugin2 } from 'some-module' @@ -137,7 +137,7 @@ export default defineConfig({ constructor: "VitePWA", }); - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "import { VitePWA } from \\"vite-plugin-pwa\\"; import { defineConfig } from \\"vite\\"; import { somePlugin1, somePlugin2 } from \\"some-module\\"; @@ -145,12 +145,12 @@ export default defineConfig({ const config = defineConfig({ plugins: [somePlugin1(), somePlugin2(), VitePWA()], }); - + export default config;" `); }); - it("handles default export from identifier (object)", () => { + it("handles default export from identifier (object)", async () => { const code = ` import { somePlugin1, somePlugin2 } from 'some-module' @@ -170,14 +170,14 @@ export default defineConfig({ constructor: "VitePWA", }); - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "import { VitePWA } from \\"vite-plugin-pwa\\"; import { somePlugin1, somePlugin2 } from \\"some-module\\"; const myConfig = { plugins: [somePlugin1(), VitePWA(), somePlugin2()], }; - + export default myConfig;" `); }); diff --git a/test/imports.test.ts b/test/imports.test.ts index 3392115..caef742 100644 --- a/test/imports.test.ts +++ b/test/imports.test.ts @@ -1,9 +1,9 @@ import { expect, it, describe } from "vitest"; -import { parseModule } from "../src"; +import { parseModule } from "magicast"; import { generate } from "./_utils"; describe("imports", () => { - it("manipulate imports", () => { + it("manipulate imports", async () => { const mod = parseModule(` import { defineConfig, Plugin } from 'vite' import Vue from '@vitejs/plugin-vue' @@ -64,7 +64,7 @@ foo: [] delete mod.imports.Plugin; - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "import { defineConfig } from \\"vite\\"; import VuePlugin from \\"@vitejs/plugin-vue\\"; import * as path2 from \\"path\\"; @@ -74,7 +74,7 @@ foo: [] });" `); - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "import { defineConfig } from \\"vite\\"; import VuePlugin from \\"@vitejs/plugin-vue\\"; import * as path2 from \\"path\\"; @@ -99,7 +99,7 @@ foo: [] imported: "Good", }); - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "import * as Star from \\"star\\"; import Foo from \\"foo\\"; import { defineConfig, Good } from \\"vite\\"; @@ -113,7 +113,7 @@ foo: [] mod.imports.defineConfig.from = "vitest/config"; - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "import { defineConfig } from \\"vitest/config\\"; import * as Star from \\"star\\"; import Foo from \\"foo\\"; diff --git a/test/object.test.ts b/test/object.test.ts index 7abc09b..d91552a 100644 --- a/test/object.test.ts +++ b/test/object.test.ts @@ -4,7 +4,7 @@ import { deepMergeObject } from "../src/helpers/deep-merge"; import { generate } from "./_utils"; describe("object", () => { - it("object property", () => { + it("object property", async () => { const mod = parseModule( ` export default { @@ -14,7 +14,7 @@ export default { foo() {} } } - `.trim() + `.trim(), ); expect(mod.exports.default.foo.a).toBe(1); @@ -40,7 +40,7 @@ export default { mod.exports.default.foo["a-b"] = "updated"; - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default { foo: { [\\"a\\"]: 1, @@ -52,14 +52,14 @@ export default { `); }); - it("recursively create objects", () => { + it("recursively create objects", async () => { const mod = parseModule( ` export default { foo: { } } - `.trim() + `.trim(), ); // Update existing object keys @@ -72,7 +72,7 @@ export default { mod.exports.default.bar.testValue = {}; mod.exports.default.bar.testValue.value = "a"; - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default { foo: { value: 1, @@ -87,7 +87,7 @@ export default { `); }); - it("recursively merge objects", () => { + it("recursively merge objects", async () => { const mod = parseModule( ` export default { @@ -96,7 +96,7 @@ export default { 100: 10, true: 10 } - `.trim() + `.trim(), ); const obj = { @@ -118,7 +118,7 @@ export default { // Recursively merge existing object with `obj` deepMergeObject(mod.exports.default, obj); - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default { foo: { value: 1, @@ -136,7 +136,7 @@ export default { `); }); - it("object keys camelCase style", () => { + it("object keys camelCase style", async () => { const mod = parseModule(`export default defineAppConfig({ test: { foo: 1, @@ -152,7 +152,7 @@ export default { deepMergeObject(config, obj1); - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default defineAppConfig({ test: { foo: 1, @@ -166,7 +166,7 @@ export default { deepMergeObject(config, obj2); - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default defineAppConfig({ test: { foo: 1, @@ -181,7 +181,7 @@ export default { `); }); - it("object keys kebab-case style", () => { + it("object keys kebab-case style", async () => { const mod = parseModule(`export default defineAppConfig({ test: { foo: 1, @@ -198,7 +198,7 @@ export default { deepMergeObject(config, obj1); // Valid - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default defineAppConfig({ test: { foo: 1, @@ -213,7 +213,7 @@ export default { deepMergeObject(config, obj2); // TODO: Should be valid - expect(generate(mod)).toMatchInlineSnapshot(` + expect(await generate(mod)).toMatchInlineSnapshot(` "export default defineAppConfig({ test: { foo: 1, diff --git a/test/utils.test.ts b/test/utils.test.ts index f22f78a..eaa2206 100644 --- a/test/utils.test.ts +++ b/test/utils.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect } from "vitest"; import { print } from "recast"; -import { parseModule, builders } from "../src"; +import { parseModule, builders } from "magicast"; describe("literalToAst", () => { // eslint-disable-next-line unicorn/consistent-function-scoping @@ -23,18 +23,18 @@ describe("literalToAst", () => { it("built-in objects", () => { expect(run(new Set(["foo", 1]))).toMatchInlineSnapshot( - '"new Set([\\"foo\\", 1])"' + '"new Set([\\"foo\\", 1])"', ); expect(run(new Date("2010-01-01"))).toMatchInlineSnapshot( - '"new Date(\\"2010-01-01T00:00:00.000Z\\")"' + '"new Date(\\"2010-01-01T00:00:00.000Z\\")"', ); const map = new Map(); map.set(1, "foo"); map.set(2, "bar"); expect(run(map)).toMatchInlineSnapshot( - '"new Map([[1, \\"foo\\"], [2, \\"bar\\"]])"' + '"new Map([[1, \\"foo\\"], [2, \\"bar\\"]])"', ); }); diff --git a/tsconfig.json b/tsconfig.json index d079baa..ea8204f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,12 +1,19 @@ { "compilerOptions": { + "rootDir": ".", "target": "ESNext", "module": "ESNext", - "moduleResolution": "Node", + "moduleResolution": "Bundler", "esModuleInterop": true, - "strict": true + "strict": true, + "paths": { + "magicast": [ + "./src/index.ts" + ] + } }, - "include": [ - "src" + "exclude": [ + "dist", + "vendor" ] } diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000..5eb5c44 --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,21 @@ +import { fileURLToPath } from 'node:url' +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + resolve: { + alias: { + recast: fileURLToPath(new URL('vendor/recast/main.ts', import.meta.url)), + 'ast-types': fileURLToPath(new URL('vendor/ast-types/src/main.ts', import.meta.url)), + ...(process.env.TEST_BUILD === 'true' + ? {} + : { + 'magicast/helpers': fileURLToPath(new URL('src/helpers/index.ts', import.meta.url)), + magicast: fileURLToPath(new URL('src/index.ts', import.meta.url)), + } + ) + } + }, + test: { + name: (process.env.TEST_BUILD === 'true' ? 'build' : 'src'), + } +}) From 8b03da153977a78588e3e94373f33e28bb69f42d Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Wed, 6 Sep 2023 14:13:46 +0200 Subject: [PATCH 03/10] chore: update --- package.json | 3 ++- pnpm-lock.yaml | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 42f2086..e89298d 100644 --- a/package.json +++ b/package.json @@ -50,8 +50,9 @@ "@vitest/ui": "^0.34.3", "ast-types": "^0.16.1", "changelogen": "^0.5.5", - "eslint-config-unjs": "^0.2.1", "eslint": "^8.48.0", + "eslint-config-unjs": "^0.2.1", + "esno": "^0.17.0", "execa": "^8.0.1", "lint-staged": "^14.0.1", "magicast": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b78e881..3fd81a8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -56,6 +56,9 @@ importers: eslint-config-unjs: specifier: ^0.2.1 version: 0.2.1(eslint@8.48.0)(typescript@5.2.2) + esno: + specifier: ^0.17.0 + version: 0.17.0 execa: specifier: ^8.0.1 version: 8.0.1 @@ -325,6 +328,27 @@ packages: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true + /@esbuild-kit/cjs-loader@2.4.2: + resolution: {integrity: sha512-BDXFbYOJzT/NBEtp71cvsrGPwGAMGRB/349rwKuoxNSiKjPraNNnlK6MIIabViCjqZugu6j+xeMDlEkWdHHJSg==} + dependencies: + '@esbuild-kit/core-utils': 3.2.2 + get-tsconfig: 4.6.0 + dev: true + + /@esbuild-kit/core-utils@3.2.2: + resolution: {integrity: sha512-Ub6LaRaAgF80dTSzUdXpFLM1pVDdmEVB9qb5iAzSpyDlX/mfJTFGOnZ516O05p5uWWteNviMKi4PAyEuRxI5gA==} + dependencies: + esbuild: 0.18.20 + source-map-support: 0.5.21 + dev: true + + /@esbuild-kit/esm-loader@2.5.5: + resolution: {integrity: sha512-Qwfvj/qoPbClxCRNuac1Du01r9gvNOT+pMYtJDapfB1eoGN1YlJ1BixLyL9WVENRx5RXgNLdfYdx/CuswlGhMw==} + dependencies: + '@esbuild-kit/core-utils': 3.2.2 + get-tsconfig: 4.6.0 + dev: true + /@esbuild/android-arm64@0.16.17: resolution: {integrity: sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==} engines: {node: '>=12'} @@ -1668,6 +1692,10 @@ packages: update-browserslist-db: 1.0.11(browserslist@4.21.10) dev: true + /buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: true + /builtin-modules@3.3.0: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} engines: {node: '>=6'} @@ -2467,6 +2495,13 @@ packages: - supports-color dev: true + /esno@0.17.0: + resolution: {integrity: sha512-w78cQGlptQfsBYfootUCitsKS+MD74uR5L6kNsvwVkJsfzEepIafbvWsx2xK4rcFP4IUftt4F6J8EhagUxX+Bg==} + hasBin: true + dependencies: + tsx: 3.12.8 + dev: true + /espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3962,6 +3997,13 @@ packages: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} + /source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: true + /source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} @@ -4214,6 +4256,17 @@ packages: typescript: 5.2.2 dev: true + /tsx@3.12.8: + resolution: {integrity: sha512-Lt9KYaRGF023tlLInPj8rgHwsZU8qWLBj4iRXNWxTfjIkU7canGL806AqKear1j722plHuiYNcL2ZCo6uS9UJA==} + hasBin: true + dependencies: + '@esbuild-kit/cjs-loader': 2.4.2 + '@esbuild-kit/core-utils': 3.2.2 + '@esbuild-kit/esm-loader': 2.5.5 + optionalDependencies: + fsevents: 2.3.2 + dev: true + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} From 8e368121f66b8d5cc452e8ad5d15ad658bc53c81 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Wed, 6 Sep 2023 14:18:08 +0200 Subject: [PATCH 04/10] chore: build first in ci --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71f78ac..57e0b50 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,8 +19,8 @@ jobs: node-version: 18 cache: "pnpm" - run: pnpm install - - run: pnpm lint - run: pnpm build + - run: pnpm lint - run: pnpm test --coverage - run: pnpm test:build - uses: codecov/codecov-action@v3 From 9f883f68de79d2f0f359016c70c3ff95350fc33f Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Wed, 6 Sep 2023 14:28:56 +0200 Subject: [PATCH 05/10] chore: ci --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57e0b50..b321fb0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,6 @@ jobs: - run: pnpm install - run: pnpm build - run: pnpm lint - - run: pnpm test --coverage - - run: pnpm test:build + - run: pnpm run test --coverage + - run: pnpm run test:build - uses: codecov/codecov-action@v3 From 94cf385aa9c012a48e2d8f0caa517bf616049e01 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Wed, 6 Sep 2023 14:32:39 +0200 Subject: [PATCH 06/10] chore: use giget --- package.json | 2 +- pnpm-lock.yaml | 75 ++--------------------------------------------- scripts/vendor.ts | 9 ++++-- 3 files changed, 11 insertions(+), 75 deletions(-) diff --git a/package.json b/package.json index e89298d..7971a2c 100644 --- a/package.json +++ b/package.json @@ -54,13 +54,13 @@ "eslint-config-unjs": "^0.2.1", "esno": "^0.17.0", "execa": "^8.0.1", + "giget": "^1.1.2", "lint-staged": "^14.0.1", "magicast": "workspace:*", "prettier": "^3.0.3", "recast": "^0.23.4", "simple-git-hooks": "^2.9.0", "source-map": "npm:source-map-js@latest", - "tiged": "^2.12.5", "typescript": "^5.2.2", "unbuild": "^2.0.0", "vitest": "^0.34.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3fd81a8..8f3d6d8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -62,6 +62,9 @@ importers: execa: specifier: ^8.0.1 version: 8.0.1 + giget: + specifier: ^1.1.2 + version: 1.1.2 lint-staged: specifier: ^14.0.1 version: 14.0.1 @@ -80,9 +83,6 @@ importers: source-map: specifier: npm:source-map-js@latest version: /source-map-js@1.0.2 - tiged: - specifier: ^2.12.5 - version: 2.12.5 typescript: specifier: ^5.2.2 version: 5.2.2 @@ -1556,11 +1556,6 @@ packages: uri-js: 4.4.1 dev: true - /ansi-colors@4.1.3: - resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} - engines: {node: '>=6'} - dev: true - /ansi-escapes@5.0.0: resolution: {integrity: sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==} engines: {node: '>=12'} @@ -1892,10 +1887,6 @@ packages: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true - /colorette@1.2.1: - resolution: {integrity: sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==} - dev: true - /colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} dev: true @@ -2061,13 +2052,6 @@ packages: tapable: 2.2.1 dev: true - /enquirer@2.3.6: - resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} - engines: {node: '>=8.6'} - dependencies: - ansi-colors: 4.1.3 - dev: true - /error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} dependencies: @@ -2685,15 +2669,6 @@ packages: is-callable: 1.2.7 dev: true - /fs-extra@10.1.0: - resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} - engines: {node: '>=12'} - dependencies: - graceful-fs: 4.2.10 - jsonfile: 6.1.0 - universalify: 2.0.0 - dev: true - /fs-extra@11.1.1: resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} engines: {node: '>=14.14'} @@ -2722,10 +2697,6 @@ packages: dev: true optional: true - /fuzzysearch@1.0.3: - resolution: {integrity: sha512-s+kNWQuI3mo9OALw0HJ6YGmMbLqEufCh2nX/zzV5CrICQ/y4AwPxM+6TIiF9ItFCHXFCyM/BfCCmN57NTIJuPg==} - dev: true - /gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -2895,16 +2866,6 @@ packages: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} dev: true - /https-proxy-agent@5.0.0: - resolution: {integrity: sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==} - engines: {node: '>= 6'} - dependencies: - agent-base: 6.0.2 - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - dev: true - /https-proxy-agent@5.0.1: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} @@ -3446,11 +3407,6 @@ packages: ufo: 1.1.2 dev: true - /mri@1.1.6: - resolution: {integrity: sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ==} - engines: {node: '>=4'} - dev: true - /mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -4162,31 +4118,6 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true - /tiged@2.12.5: - resolution: {integrity: sha512-divl34KaEXBUO8N2m5UcMdQZjqLZRzEq+ychP5bNYSGF0JQq1j6m4uF7WuQOCRomlBeu5vJfjkXtyYumijX+bA==} - engines: {node: '>=8.0.0'} - hasBin: true - dependencies: - colorette: 1.2.1 - enquirer: 2.3.6 - fs-extra: 10.1.0 - fuzzysearch: 1.0.3 - https-proxy-agent: 5.0.0 - mri: 1.1.6 - rimraf: 3.0.2 - tar: 6.1.13 - tiny-glob: 0.2.8 - transitivePeerDependencies: - - supports-color - dev: true - - /tiny-glob@0.2.8: - resolution: {integrity: sha512-vkQP7qOslq63XRX9kMswlby99kyO5OvKptw7AMwBVMjXEI7Tb61eoI5DydyEMOseyGS5anDN1VPoVxEvH01q8w==} - dependencies: - globalyzer: 0.1.0 - globrex: 0.1.2 - dev: true - /tiny-glob@0.2.9: resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} dependencies: diff --git a/scripts/vendor.ts b/scripts/vendor.ts index b4ba6c2..f696bca 100644 --- a/scripts/vendor.ts +++ b/scripts/vendor.ts @@ -2,6 +2,7 @@ import fs from 'node:fs' import fsp from 'node:fs/promises' import { execa } from 'execa' +import { downloadTemplate } from 'giget' // This script clones recast and patches, and then re-bundle it so we get rid of the unnecessary polyfills @@ -11,7 +12,9 @@ async function cloneRecast() { } else { // Clone recast - await execa('npx', ['tiged', 'benjamn/recast#v0.23.4', 'vendor/recast'], { stdio: 'inherit' }) + await downloadTemplate('github:benjamn/recast#v0.23.4', { + dir: 'vendor/recast', + }) // Remove the tsconfig.json so it's targeting newer node versions await fsp.rm('vendor/recast/tsconfig.json') @@ -60,7 +63,9 @@ async function cloneAstTypes() { } else { // Clone recast - await execa('npx', ['tiged', 'benjamn/ast-types#v0.16.1', 'vendor/ast-types'], { stdio: 'inherit' }) + await downloadTemplate('github:benjamn/ast-types#v0.16.1', { + dir: 'vendor/ast-types', + }) // Remove the tsconfig.json so it's targeting newer node versions await fsp.rm('vendor/ast-types/tsconfig.json') From 8f6cc611cec513878a714df7493ae97948ad3466 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Wed, 6 Sep 2023 14:39:55 +0200 Subject: [PATCH 07/10] chore: cleanup --- package.json | 1 - pnpm-lock.yaml | 38 ++++++-------------------------------- pnpm-workspace.yaml | 2 +- scripts/vendor.ts | 1 - 4 files changed, 7 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index 7971a2c..7addaa0 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,6 @@ "eslint": "^8.48.0", "eslint-config-unjs": "^0.2.1", "esno": "^0.17.0", - "execa": "^8.0.1", "giget": "^1.1.2", "lint-staged": "^14.0.1", "magicast": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8f3d6d8..35eb696 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -59,9 +59,6 @@ importers: esno: specifier: ^0.17.0 version: 0.17.0 - execa: - specifier: ^8.0.1 - version: 8.0.1 giget: specifier: ^1.1.2 version: 1.1.2 @@ -108,14 +105,6 @@ packages: '@jridgewell/trace-mapping': 0.3.17 dev: true - /@babel/code-frame@7.21.4: - resolution: {integrity: sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==} - engines: {node: '>=6.9.0'} - requiresBuild: true - dependencies: - '@babel/highlight': 7.18.6 - dev: true - /@babel/code-frame@7.22.13: resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==} engines: {node: '>=6.9.0'} @@ -236,11 +225,6 @@ packages: resolution: {integrity: sha512-4E/F9IIEi8WR94324mbDUMo074YTheJmd7eZF5vITTeYchqAi6sYXRLHUVsmkdmY4QjfKTcB2jB7dVP3NaBElQ==} engines: {node: '>=6.9.0'} - /@babel/helper-validator-identifier@7.22.5: - resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} - engines: {node: '>=6.9.0'} - dev: true - /@babel/helper-validator-option@7.22.15: resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} engines: {node: '>=6.9.0'} @@ -257,22 +241,12 @@ packages: - supports-color dev: true - /@babel/highlight@7.18.6: - resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} - engines: {node: '>=6.9.0'} - requiresBuild: true - dependencies: - '@babel/helper-validator-identifier': 7.22.5 - chalk: 2.4.2 - js-tokens: 4.0.0 - dev: true - /@babel/highlight@7.22.13: resolution: {integrity: sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==} engines: {node: '>=6.9.0'} requiresBuild: true dependencies: - '@babel/helper-validator-identifier': 7.22.5 + '@babel/helper-validator-identifier': 7.22.15 chalk: 2.4.2 js-tokens: 4.0.0 dev: true @@ -1203,7 +1177,7 @@ packages: '@rollup/pluginutils': 5.0.4(rollup@3.29.0) commondir: 1.0.1 estree-walker: 2.0.2 - glob: 8.1.0 + glob: 8.0.3 is-reference: 1.2.1 magic-string: 0.27.0 rollup: 3.29.0 @@ -2381,7 +2355,7 @@ packages: peerDependencies: eslint: '>=8.38.0' dependencies: - '@babel/helper-validator-identifier': 7.22.5 + '@babel/helper-validator-identifier': 7.22.15 '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) ci-info: 3.8.0 clean-regexp: 1.0.0 @@ -2770,8 +2744,8 @@ packages: path-is-absolute: 1.0.1 dev: true - /glob@8.1.0: - resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + /glob@8.0.3: + resolution: {integrity: sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==} engines: {node: '>=12'} dependencies: fs.realpath: 1.0.0 @@ -3589,7 +3563,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.21.4 + '@babel/code-frame': 7.22.13 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index d50ce2a..71ecba8 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,2 @@ packages: - - stubs/* + - '!vendor/*' diff --git a/scripts/vendor.ts b/scripts/vendor.ts index f696bca..65ae7d5 100644 --- a/scripts/vendor.ts +++ b/scripts/vendor.ts @@ -1,7 +1,6 @@ /* eslint-disable unicorn/prefer-top-level-await */ import fs from 'node:fs' import fsp from 'node:fs/promises' -import { execa } from 'execa' import { downloadTemplate } from 'giget' // This script clones recast and patches, and then re-bundle it so we get rid of the unnecessary polyfills From ad67671e4c841a67db2107d7b2e1a6d4987db9a3 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Wed, 6 Sep 2023 14:43:44 +0200 Subject: [PATCH 08/10] chore: update coverage range --- vitest.config.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vitest.config.ts b/vitest.config.ts index 5eb5c44..7345d85 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -17,5 +17,10 @@ export default defineConfig({ }, test: { name: (process.env.TEST_BUILD === 'true' ? 'build' : 'src'), + coverage: { + include: [ + "src/**/*.ts", + ] + } } }) From 5b740373ce9e1b6e596d54cc6df19a0e06258b8b Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Fri, 15 Sep 2023 10:38:20 +0800 Subject: [PATCH 09/10] chore: remove deps of asserts --- scripts/vendor.ts | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/scripts/vendor.ts b/scripts/vendor.ts index 65ae7d5..ac8b6fe 100644 --- a/scripts/vendor.ts +++ b/scripts/vendor.ts @@ -1,6 +1,7 @@ /* eslint-disable unicorn/prefer-top-level-await */ import fs from 'node:fs' import fsp from 'node:fs/promises' +import { join } from 'node:path' import { downloadTemplate } from 'giget' // This script clones recast and patches, and then re-bundle it so we get rid of the unnecessary polyfills @@ -19,24 +20,21 @@ async function cloneRecast() { await fsp.rm('vendor/recast/tsconfig.json') // Remove the assert import and usage - await filterLines('vendor/recast/lib/patcher.ts', (line) => { - if (line.startsWith('import assert from')) { - return false - } - if (/^\s*assert\./.test(line)) { - return `false && ` + line - } - return line - }) - await filterLines('vendor/recast/lib/patcher.ts', (line) => { - if (line.startsWith('import assert from')) { - return false - } - if (/^\s*assert\./.test(line)) { - return `false && ` + line - } - return line - }) + await Promise.all(fs.readdirSync('vendor/recast/lib', { withFileTypes: true }).map(async (file) => { + if (!file.isFile()) { return } + return filterLines(join(file.path, file.name), (line) => { + if (line.startsWith('import assert from')) { + return false + } + if (/^\s*assert\./.test(line)) { + if (line.endsWith(';')) { + return false + } + return `// @ts-ignore \n false && ` + line + } + return line + }) + })) // Remove the require(), and since we are providing our own parser anyway await filterLines('vendor/recast/lib/options.ts', (line) => { @@ -46,6 +44,10 @@ async function cloneRecast() { return line }) + await filterLines('vendor/recast/lib/parser.ts', (line) => { + return line.replace('require("esprima")', `false && require("")`) + }) + await filterLines('vendor/recast/lib/util.ts', (line) => { if (line.includes('isBrowser() ? "\\n"')) { return 'return "\\n"' } return line From 56cb074ba2932e14cf48f0785355b717f3fb5d88 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Fri, 15 Sep 2023 10:45:27 +0800 Subject: [PATCH 10/10] chore: lint --- pnpm-lock.yaml | 19 ++++--------------- scripts/vendor.ts | 6 ++++-- test/array.test.ts | 2 +- test/builders/expression.test.ts | 2 +- test/builders/function-call.test.ts | 2 +- test/builders/raw.test.ts | 2 +- test/errors.test.ts | 2 +- test/exports.test.ts | 2 +- test/function-call.test.ts | 2 +- test/general.test.ts | 2 +- test/helpers/nuxt.test.ts | 2 +- test/helpers/vite.test.ts | 6 +++--- test/imports.test.ts | 2 +- 13 files changed, 21 insertions(+), 30 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2614437..27e4bf4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -200,7 +200,7 @@ packages: '@babel/helper-module-imports': 7.22.15 '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/helper-validator-identifier': 7.22.15 + '@babel/helper-validator-identifier': 7.22.19 dev: true /@babel/helper-simple-access@7.22.5: @@ -221,11 +221,6 @@ packages: resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} engines: {node: '>=6.9.0'} - /@babel/helper-validator-identifier@7.22.15: - resolution: {integrity: sha512-4E/F9IIEi8WR94324mbDUMo074YTheJmd7eZF5vITTeYchqAi6sYXRLHUVsmkdmY4QjfKTcB2jB7dVP3NaBElQ==} - engines: {node: '>=6.9.0'} - dev: true - /@babel/helper-validator-identifier@7.22.19: resolution: {integrity: sha512-Tinq7ybnEPFFXhlYOYFiSjespWQk0dq2dRNAiMdRTOYQzEGqnnNyrTxPYHP5r6wGjlF1rFgABdDV0g8EwD6Qbg==} engines: {node: '>=6.9.0'} @@ -251,7 +246,7 @@ packages: engines: {node: '>=6.9.0'} requiresBuild: true dependencies: - '@babel/helper-validator-identifier': 7.22.15 + '@babel/helper-validator-identifier': 7.22.19 chalk: 2.4.2 js-tokens: 4.0.0 dev: true @@ -2216,7 +2211,7 @@ packages: eslint: 8.49.0 eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.49.0) eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.49.0) - get-tsconfig: 4.6.0 + get-tsconfig: 4.7.0 globby: 13.2.2 is-core-module: 2.12.1 is-glob: 4.0.3 @@ -2360,7 +2355,7 @@ packages: peerDependencies: eslint: '>=8.38.0' dependencies: - '@babel/helper-validator-identifier': 7.22.15 + '@babel/helper-validator-identifier': 7.22.19 '@eslint-community/eslint-utils': 4.4.0(eslint@8.49.0) ci-info: 3.8.0 clean-regexp: 1.0.0 @@ -2703,12 +2698,6 @@ packages: engines: {node: '>=16'} dev: true - /get-tsconfig@4.6.0: - resolution: {integrity: sha512-lgbo68hHTQnFddybKbbs/RDRJnJT5YyGy2kQzVwbq+g67X73i+5MVTval34QxGkOe9X5Ujf1UYpCaphLyltjEg==} - dependencies: - resolve-pkg-maps: 1.0.0 - dev: true - /get-tsconfig@4.7.0: resolution: {integrity: sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==} dependencies: diff --git a/scripts/vendor.ts b/scripts/vendor.ts index ac8b6fe..8919ea7 100644 --- a/scripts/vendor.ts +++ b/scripts/vendor.ts @@ -21,8 +21,10 @@ async function cloneRecast() { // Remove the assert import and usage await Promise.all(fs.readdirSync('vendor/recast/lib', { withFileTypes: true }).map(async (file) => { - if (!file.isFile()) { return } - return filterLines(join(file.path, file.name), (line) => { + if (!file.isFile()) { + return + } + return await filterLines(join(file.path, file.name), (line) => { if (line.startsWith('import assert from')) { return false } diff --git a/test/array.test.ts b/test/array.test.ts index f9b40a9..5e20804 100644 --- a/test/array.test.ts +++ b/test/array.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "vitest"; -import { generate } from "./_utils"; import { parseModule } from "magicast"; +import { generate } from "./_utils"; describe("array", () => { it("array operations", async () => { diff --git a/test/builders/expression.test.ts b/test/builders/expression.test.ts index 153262d..9f24089 100644 --- a/test/builders/expression.test.ts +++ b/test/builders/expression.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "vitest"; -import { generate } from "../_utils"; import { builders, parseModule } from "magicast"; +import { generate } from "../_utils"; describe("builders/expression", () => { it("new expression", async () => { diff --git a/test/builders/function-call.test.ts b/test/builders/function-call.test.ts index 587a834..3f83b7f 100644 --- a/test/builders/function-call.test.ts +++ b/test/builders/function-call.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "vitest"; -import { generate } from "../_utils"; import { builders, parseModule } from "magicast"; +import { generate } from "../_utils"; describe("builders/functionCall", () => { it("new", async () => { diff --git a/test/builders/raw.test.ts b/test/builders/raw.test.ts index bf89a86..5f3d25f 100644 --- a/test/builders/raw.test.ts +++ b/test/builders/raw.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "vitest"; -import { generate } from "../_utils"; import { builders, parseModule } from "magicast"; +import { generate } from "../_utils"; describe("builders/raw", () => { it("object", async () => { diff --git a/test/errors.test.ts b/test/errors.test.ts index e15d53d..1e865da 100644 --- a/test/errors.test.ts +++ b/test/errors.test.ts @@ -1,6 +1,6 @@ import { expect, describe, it } from "vitest"; -import { generate } from "./_utils"; import { parseExpression, parseModule } from "magicast"; +import { generate } from "./_utils"; describe("errors", () => { it("ternary", () => { diff --git a/test/exports.test.ts b/test/exports.test.ts index fe9f301..69d8ae8 100644 --- a/test/exports.test.ts +++ b/test/exports.test.ts @@ -1,6 +1,6 @@ import { expect, it, describe } from "vitest"; -import { generate } from "./_utils"; import { parseModule } from "magicast"; +import { generate } from "./_utils"; describe("exports", () => { it("manipulate exports", async () => { diff --git a/test/function-call.test.ts b/test/function-call.test.ts index 80c2fac..fa467d4 100644 --- a/test/function-call.test.ts +++ b/test/function-call.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "vitest"; -import { generate } from "./_utils"; import { builders, parseModule, ProxifiedModule } from "magicast"; +import { generate } from "./_utils"; describe("function-calls", () => { it("function wrapper", async () => { diff --git a/test/general.test.ts b/test/general.test.ts index ec69a0d..8aa5af5 100644 --- a/test/general.test.ts +++ b/test/general.test.ts @@ -1,6 +1,6 @@ import { expect, it, describe } from "vitest"; -import { generate } from "./_utils"; import { generateCode, parseModule, parseExpression } from "magicast"; +import { generate } from "./_utils"; describe("general", () => { it("basic object and array", async () => { diff --git a/test/helpers/nuxt.test.ts b/test/helpers/nuxt.test.ts index 4fc6f96..810614a 100644 --- a/test/helpers/nuxt.test.ts +++ b/test/helpers/nuxt.test.ts @@ -1,6 +1,6 @@ import { it, describe, expect } from "vitest"; -import { generate } from "../_utils"; import { parseModule } from "magicast"; +import { generate } from "../_utils"; import { addNuxtModule } from "magicast/helpers"; describe("helpers > nuxt", () => { diff --git a/test/helpers/vite.test.ts b/test/helpers/vite.test.ts index 1e51d63..e912571 100644 --- a/test/helpers/vite.test.ts +++ b/test/helpers/vite.test.ts @@ -1,6 +1,6 @@ import { it, describe, expect } from "vitest"; -import { generate } from "../_utils"; import { parseModule } from "magicast"; +import { generate } from "../_utils"; import { addVitePlugin, updateVitePluginConfig } from "magicast/helpers"; describe("helpers > vite", () => { @@ -207,7 +207,7 @@ export default defineConfig({ expect(await generate(mod)).toMatchInlineSnapshot(` "import { VitePWA } from \\"vite-plugin-pwa\\"; import { somePlugin1, somePlugin2 } from \\"some-module\\"; - + import type { UserConfig } from \\"vite\\"; const myConfig = { @@ -243,7 +243,7 @@ export default defineConfig({ expect(await generate(mod)).toMatchInlineSnapshot(` "import { VitePWA } from \\"vite-plugin-pwa\\"; import { somePlugin1, somePlugin2 } from \\"some-module\\"; - + import type { UserConfig } from \\"vite\\"; const myConfig = defineConfig({ diff --git a/test/imports.test.ts b/test/imports.test.ts index a116e4f..caef742 100644 --- a/test/imports.test.ts +++ b/test/imports.test.ts @@ -1,6 +1,6 @@ import { expect, it, describe } from "vitest"; -import { generate } from "./_utils"; import { parseModule } from "magicast"; +import { generate } from "./_utils"; describe("imports", () => { it("manipulate imports", async () => {